RSS
email

Attach MovieClip in AS3:



In Actionscript 3.0 attachMovie(); function does not exist, but there
are some ways new ways to do that...

Create a movieClip in the IDE.. (name: Star)

Open library (ctrl+L)..and click linkage..

Select Export for ActionScript..(Note: We can give Any name in the identifier that is the linkage name)



Open Actions panel

Code follows:

var mc:Star=new Star();
mc.x=100;
mc.y=100;
addChild(mc);

Where Star is the linkage name..and its important to add it in the displaylist

Bookmark and Share

4 comments:

Anonymous said...

Thanks... I was pulling my hair out but now i am fine

Anonymous said...

Gracias man, soy nuevo n sto del as3, y ya staba a punto de cortarme las venas...

ALLAN NIELSEN said...

what if you would add (attach) it to an already existing movieclip?

Mike said...

yeah, they changed it. No fun.

 

Recent Posts

Recent Visitors

Donate Me

About Me

My photo
Chennai, Tamil nadu, India
Nothing more to say about me.. Just a Action Script programmer / Flex developer having 4.5 years of experience.