Afficher un message
Vieux 07/04/2008, 11h34   #1
tony_mead
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Variable as a Movieclip name

Hi there.

I want to assign a variable value to a movieclip name and then work with this
movieclip (the movieclips are named on the stage). Does anyone have any idea
how I might be able to do this. The code below is my work in progress - it
doesn't work using the variable name to call the movieclip but when I
statically call the movieclip by it's name it works fine.

Please note: the code below is just an example

// I have a movie clip on the stage named mc1

// I assign a variable the name of the movieclip
var mymc = "mc1"

//this doesn't work;
mymc._x= 200;

//this does work;
mc1._x= 200;

  Réponse avec citation
 
Page generated in 0,05058 seconds with 9 queries