Hello and thanks for looking, here is my propblem i am currently loading a list of images with this code.
The variables being sent are as such myLoadVars.img1 .. all the way to myloadVars.img266.Code:var myLoadVars = new LoadVars(); myLoadVars.load("http://www.DomainName.com/SlideShow/GetImages.cfm?AlbumID=12"); myLoadVars.onLoad = function(success) { gotoAndPlay("start"); };//Close Successful var i = 1;
at the "start" frame i have a simple action script that resets the i to 1 then continues to the next frame and ill show ya why in a secound.
The next frame called "fade" has this code.
now here is the problemCode:var imgString:String = "img"; // var temp:String = imgString + i Test.text=myLoadVars.temp; // for testing purposes Test is a dynamic text field
When i do Test.text=myLoadVars.img1 it works great the text box displays the image name. but when i try to do something like
Test.text=myLoadVars.variable it says undefined.
The variable as ya can see is the concadination of 2 variables one with "img" and the other with "i". i at this point is 1. which should theoredicaly give ya
when i send "Temp" which is the concadination of thoes two variables the output is "img1" but when i place it all together in
myLoadVars.Temp it doesnt work.. Does any one know how to access the variables dynamicly?
so eventually i could simply loop the i and cycle threw all the img names..
Thanks for looking
~Peter M.![]()


Reply With Quote
