Advanced Flash Components
Search!
Search!
Home >  Forum
  SearchSearch   
img thumbnail gallery passing vars

 
Post new topic   Reply to topic     Forum Index -> Mashups ActionScript 3.0
View previous topic :: View next topic  
Author Message
rjgulick
AFC Member


Joined: 10 Oct 2008
Posts: 4

PostPosted: Tue Dec 09, 2008 11:11 pm    Post subject: img thumbnail gallery passing vars Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mashups ActionScript 3.0 All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group