rjgulick AFC Member
Joined: 10 Oct 2008 Posts: 4
|
Posted: Tue Dec 09, 2008 11:11 pm Post subject: img thumbnail gallery passing vars |
|
|
Hello,
I have a main swf that loads the img thumbnail gallery. I created an php page that generates an xml based apon the a url var that the thumbnail gallery uses when loading the xml.
ie (from the the loaded gallery swf)
if (!folder_name){
var folder_name="B";
}
myScroll.contentXML = "getpics_new.php?folder_name="+folder_name;
All this works great....
My problem is passing the var from my main swf to the loaded img gallery swf. I new how to do this in as2 but not in as3.
Here is an example of my last attempt.
var url:String = "gallery.swf";
trace(url);
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, setup);
mc_gallery.addChild(ldr);
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
function setup(event:Event):void{
trace("loaded");
mc_gallery.folder_name="F";
}
i have gotten this to sorta work if i create multiple gallery swfs and change the one var in each. it works, but i'd rather just pass the var.
Thank you,
Rob |
|