If the mcHatAndFace is a symbol with a linkage in your library,
var mcHatAndFace should not be a new MovieClip();
instead, it should be:
var (anything) = new mcHatAndFace();
anything => an Object;
mcHatAndFace => a Class;
You need to turn a class into a new object each time you use in
ActionScript
and that (anything) will be that name that you type instead of
mcHatAndFace for its .x / .alpha or so
When you want a new mcHatAndFace, you will need to input again:
var (anything the 2rd) = new mcHatAndFace();
P.S. you seriously need a good tutorial, head to a library or a book
store and search for some book about Flash and Actionscript (Dont
script if you are not ready, it will only mess you up)
Hope all these help
On 16 Nov 2009, at 01:17, beno - wrote:
I think I'm beginning to understand how this works. I've clicked on
the item I want to link (in the Flash movie), then the menu in the
library panel, then "Properties", then advanced, and checked "Export
to ActionScript" and "Export first frame". What confuses me is that
I need to enter a class name. I left the default of "mcHatAndFace"
because when I tried to enter "Main", as is in the script below (and
what is the class associated in the "Properties" tab for the whole
Flash movie) Flash complains that I must use a unique name. However,
as you can see from the code below, I don't actually call such a
class. That must be where my problem is, but I don't know how to
code it. Please advise.
TIA,
beno
package
{
import flash.display.MovieClip;
import com.greensock.*;
import com.greensock.plugins.*;
import com.greensock.easing.*;
public class Main extends MovieClip
{
public function Main():void
{
TweenPlugin.activate([AutoAlphaPlugin]);
var mcHatAndFace = new MovieClip();
this.addChild(mcHatAndFace);
mcHatAndFace.x = 100;
mcHatAndFace.y = 100;
mcHatAndFace.alpha = 0;
TweenLite.to(mcHatAndFace, 1, {autoAlpha:1}); // 2nd param
in seconds; 3rd in % alpha
}
}
}
_______________________________________________
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