I import a class(this is in a .as file for flash CS5.)
I define it and clearly I later instantiate it
[CENTER]
import com.greensock.TweenMax;
public class Turret extends MovieClip
{
.....
public var TweenMax:TweenMax;
}
private function loop(e:Event)
{
.....
if (x > stage.width - xBound)
{
removeEventListener(Event.ENTER_FRAME, loop);
TweenMax.to(this, tweenTime, {x: 700 - 17.5, scaleX:.2, scaleY:.2, rotation:755});
}
else if (x < xBound)
{
removeEventListener(Event.ENTER_FRAME, loop);
TweenMax.to(this, tweenTime, {x: 17.5, scaleX:.2, scaleY:.2, rotation:-755});
}
if (y > stage.height - yBound)
{
removeEventListener(Event.ENTER_FRAME, loop);
TweenMax.to(this, tweenTime, {y: 500 - 5, scaleX:.2, scaleY:.2, rotation:-755});
}
else if (y < yBound)
{
removeEventListener(Event.ENTER_FRAME, loop);
TweenMax.to(this, tweenTime, {y: 5, scaleX:.2, scaleY:.2, rotation:-755});
}
}
[/CENTER]
does anyone have any suggestions? the error has been killing my work productivity for a few hours so I’d like to get this done soon
D:\Documents\Documents(…)\AdobeScripts\com\N#\Turret.as, Line 36 1046: Type was not found or was not a compile-time constant: TweenMax.