# CCActionTween Class Reference

Inherits from | CCActionInterval : CCActionFiniteTime : CCAction : NSObject
Declared in | CCActionTween.h

## Overview

CCActionTween is an action that lets you modify over time any property of a node.

Examples:

1) Modify the width property of a target from 200 to 300 in 2 seconds: - [target runAction:[CCActionTween actionWithDuration:2 key:@“width” from:200 to:300]]

2) Modify the scale property from 1 to 3 in 5 seconds - [target runAction:[CCActionTween actionWithDuration:5 key:@“scale” from:1 to:3]]

## Tasks

- `+ actionWithDuration:key:from:to:`
- `– initWithDuration:key:from:to:`

## Class Methods

### actionWithDuration:key:from:to:

Creates an initializes a tween action.

`+ (id)actionWithDuration:(CCTime)aDuration key:(NSString *)key from:(float)from to:(float)to`

#### Parameters

aDuration

  Action duration.

key

  Property key to modify.

from

  Value to tween from.

to

  Value to tween to.

#### Return Value

New tween action.

#### Declared In

`CCActionTween.h`

## Instance Methods

### initWithDuration:key:from:to:

Initializes an initializes a tween action.

`- (id)initWithDuration:(CCTime)aDuration key:(NSString *)key from:(float)from to:(float)to`

#### Parameters

aDuration

  Action duration.

key

  Property key to modify.

from

  Value to tween from.

to

  Value to tween to.

#### Return Value

New tween action.

#### Declared In

`CCActionTween.h`