Well, sit down, make a cuppa coffee and let me explain...

  • StupidSaint
  • Born
  • Born
  • StupidSaint
  • Posts: 2

Post 3+ Months Ago

i have this line of code

Code: [ Select ]
var fileName = "_root.myVars.fileName"+[i]


it should churn out the code

Code: [ Select ]
_root.myVars.fileName1


which i will then use to attach an image to a Movie clip...

Code: [ Select ]
t.loadMovie("http://www.website.com/fileName=" + [fileName], "image"+[i])


and it comes out with an output of

ERROR LOADING IMAGE:

http://www.website.com/fileName=_root.myVars.fileName1

is there any way to make it think that, that variable is a instance path??

thanks
Stupid Saint
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1827
  • Loc: In the Great White North

Post 3+ Months Ago

is fileName an object on the stage? Or is it an item in an array?

If your trying to get an object you do
Code: [ Select ]
_root.myVars["fileName"+i];


to get an array value you need
Code: [ Select ]
_root.myVars[i];

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.