Hi there,
i made a lot of as2 based components in the past. Now i need to create a
new one in AS3, I cant find anything in the flash's docs i only find a
few sites talking about AS3 componentes.
I understand, are 2 components type, a FLA based and the old SWC.
i try to create a new SWC component. something easy to start.
MovieClip Symbol in the Library call it window
Linkage Class window
Base Class : flash.display.MovieClip
Component Definition: window
I only have a asset in the stage for this component a MovieClip Instance
name "mc_test" then in my class window.as just a few lines
package {
import flash.display.MovieClip
public class window extends MovieClip
{
public function window()
{
createChildren();
}
private function createChildren():void
{
trace(mc_test)
}
}
}
Ctrl+Enter and everything work, i get "[object MovieClip]", BUT when i
export this using "Convert to Compiled Clip" or "Export SWC File" and
then i try to use this "component" in a new Flash File y get :
ReferenceError: Error #1056: Cannot create property mc_test on window.
at flash.display::Sprite/flash.display:Sprite::constructChildren()
at flash.display::Sprite$iinit()
at flash.display::MovieClip$iinit()
at window$iinit()
at flash.display::Sprite/flash.display:Sprite::constructChildren()
at flash.display::Sprite$iinit()
at flash.display::MovieClip$iinit()
I really don't understand why, and i can't find information about it
Thanks in advance
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com