Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default component parameters in AS3 ?????

Status
Not open for further replies.

activa

Technical User
Jan 10, 2005
6
US
In an AS2 file I create a movieClip.Next, I define the movieClip as a component. In the component definition dialog, I define a component variable:

Name:My Variable, Variable:myVar, Default:32, Type:Number

In the script for the component I write "trace('this.myVar')". Compile and run, and the output is "32" as expected. Now I place another instance on the stage and set the value of My Variable to 27 in the Parameters dialog, compile & run, and the output is "32" and "27" as expected.

Now I convert to AS3. This time, the output is "undefined" and "27." For some reason, AS3 doesn't like the default variable setting. Any ideas what's going on here?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top