Seasons Greetings all!
I am having a problem figuring out how to animate a Sprite using the Tween Class.
The code simply places a 550 x 350 box on the center of the stage.
When tested, the swf displays the following error,
[COLOR=DarkRed]1118: Implicit coercion of a value with static type flash.display:Sprite to a possibly unrelated type flash.display:MovieClip.
[/COLOR]My code is listed below.
[COLOR=DarkRed][COLOR=Black]package {
import flash.display.Sprite;
import flash.events.Event;
import fl.transitions.*;
import fl.transitions.easing.*;
public class BasicInterface extends Sprite {
var ContentBox:Sprite;
public function BasicInterface () {
init();
}
private function init():void {
ContentBox = new Sprite();
addChild(ContentBox);
ContentBox.graphics.lineStyle(1, 0xffffff, .5);
ContentBox.graphics.beginFill(0xffffff, .15);
ContentBox.graphics.drawRect(0, 0, 550, 350);
ContentBox.graphics.endFill();
ContentBox.x = 240;
ContentBox.y = 194.5;
ContentBox.addEventListener(Event.ENTER_FRAME, onEnterFrm);
}
private function onEnterFrm(event:Event):void {
TransitionManager.start (ContentBox, {type:Zoom, direction:0, duration:1.5, easing:Strong.easeOut, startPoint:10});
}
}
}
[/COLOR]
[/COLOR]