Revision: 33086
Updated Code
at July 6, 2011 06:06 by heathbo
Updated Code
// METHOD 1 // Add Content var someMc:String = "this_mc"; var newClass = getDefinitionByName(someMc); var mcAdded= new newClass (); addChild(mcAdded); // Use Content var someString:String = "mcAdded"; var selectedInstance = getChildByName( someString); selectedInstance.x = 210; // METHOD 2 // In the MovieClip properties, set it to export for ActionScript and give it a class name. //In your code. var MC = new yourMCclassName();
Revision: 33085
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 6, 2010 01:55 by heathbo
Initial Code
// Add Content var someMc:String = "this_mc"; var newClass = getDefinitionByName(someMc); var mcAdded= new newClass (); addChild(mcAdded); // Use Content var someString:String = "mcAdded"; var selectedInstance = getChildByName( someString); selectedInstance.x = 210;
Initial URL
Initial Description
Add content to stage from Library through code and use the content.
Initial Title
Load content from library onto stage
Initial Tags
Initial Language
ActionScript 3