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 <[EMAIL PROTECTED]> 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

Reply via email to