TweenPlugin.activate([AutoAlphaPlugin]);
and...
TweenLite.to(mcHatAndFace, 1, {autoAlpha:1});
need to be inside the Main function :)
the call to TweenPlugin only goes after the imports if you are coding on the
timeline inside the flash IDE.
also, off the top of my head i've never seen new LibraryItem() and certainly
never used it. i'd suggest, seeing as you import MovieClip to do "new
MovieClip()" instead.
2009/11/14 beno - <[email protected]>
> Hi;
>
> The following code throws this error:
>
> Call to a possibly undefined method LibraryItem
> Here's the code, attached through the Document Class in the Properties:
> package
> {
> import flash.display.MovieClip;
> import com.greensock.*;
> import com.greensock.plugins.*;
> import com.greensock.easing.*;
> TweenPlugin.activate([AutoAlphaPlugin]);
> public class Main extends MovieClip
> {
> private var mcHatAndFace:MovieClip;
> public function Main():void
> {
> mcHatAndFace = new LibraryItem();
> mcHatAndFace.x = 100;
> mcHatAndFace.y = 100;
> mcHatAndFace.alpha = 0;
> addChild(mcHatAndFace);
> }
> }
> TweenLite.to(mcHatAndFace, 1, {autoAlpha:1}); // 2nd param in seconds;
> 3rd in % alpha
> }
> Do I have to import the flash movie itself? Please advise.
> TIA,
> beno
> PS I posted this to Adobe a day ago and not a nibble. I sure wish I could
> find an active exclusively Flash AS3 list to ask these questions!
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org