PDA

View Full Version : passing variables // Attachmovie


Scorche
09-28-2005, 09:06 PM
hmm I'm having quite a headache with this - I want to pass a variable to a newly created movie clip
something like this but it's not working


any ideas ?


// my for(x=0 to 10) statement
this.attachMovie("myMov", "newmov"+x , 30-x);
newmov.num = x

deadbeat
09-28-2005, 09:09 PM
Two ways:

//Using the initObject:
this.attachMovie("myMov", "newmov"+x , 30-x,{num:x});

//or using a clip reference:
var mc=this.attachMovie("myMov", "newmov"+x , 30-x);
mc.num = x;

HTH,

K.

Scorche
09-28-2005, 09:18 PM
thanks

I ended up using this
set (("B"+x+".num"),x)

wow - so many ways to do it - and I spent an hour on this
I'll go hit my ead a couple times

bearsark86
09-29-2005, 01:34 AM
wow - so many ways to do it - and I spent an hour on this
I'll go hit my ead a couple times

lol..

been figurin this out too for a while..