Thanks David for the tip.
I would like the artist to set certain values, so ideally, a method that
doesn't require them to mess with the script window is the best.
Would it be ok if I add parameters to the Component Definition? Behind the
scene what is the difference between a movieclip vs a movieclip with component
definition set? It seems like both behave like a regular mc anyways...except
that one you can compile into SWC.
Another question I have is that component can also be associated with AS 2
as well, what's the effects of setting AS2 there alongside with AS2 in linkage
property?
David Rorex <[EMAIL PROTECTED]> wrote: In your class, define the variable you
want to pass in, like:
class Test extends MovieClip
{
var passedIn;
//...
}
Then, on the stage, select your movieclip instance, and bring up the
actionscript window (press F9), and enter the code:
onClipEvent(load)
{
passedIn = 123;
}
NOTE: Passed in variables will not be availabe until 1 frame after the
component loads (I think), so either don't use them in the
constructor, or put a 1 frame delay.
-David R
On 11/17/05, Boon Chew wrote:
> Hi all,
>
> I have created a movieclip and associated it to an AS2 class in the linkage
> property. I have different instances of this movieclip on stage and I would
> like to pass different init params to the AS2 class. Is there a way to do it
> in the IDE? Must I turn the movieclip to a component in order to pass init
> params?
>
> Thanks!
>
>
> ---------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders