Thanks for the swift response! VERY much appreciated, not to mention quite a surprise because in a fidgety expression of panic, I diagrammed my issues out for the kirupaverse.
The diagram might serve some good, as I’m not totally sure I properly explained myself the first time…
In regards to your script:
node = this.firstChild.childNodes.childNodes*.childNodes[0].firstChild.nodeValue; //whatever triggers the event
loadMovie(node, _root.empty);
I think it’s the “whatever triggers the event” part that I’m uncertain about.
Here’s what I’m trying to accomplish (now in diagramtic, drop-shadowed form!).
Hope it makes sense and correlates with my question. If so, it will make my questions a lot easier to ask.
And have this function in the same time line as your text field:
function loadMovieProxy(target:String):Void {
trace(target);
pathTo.empty.loadMovie(target);
}
[FONT=Courier New]asfunction:function:Function,parameter:String[/FONT]
See the help file for more info. Note that you can only pass one parameter to the function called, you can overcome this by using a delimiter in the string and splitting it in the function:
So using a delimiter will allow for the multiple links in the txt file to link to different swfs (ie. the different galleries).
Whereas the first asfunction will call the same function for each link in the file - loading only 0506.swf for each.
Am I understanding that right, albeit in rudimentary laymanspeak? :block:
Thanks for the directional point toward clarity surrounding this issue. I’m out of my league here, but glad to be learning by fire among good hands and minds.
I’ll start digging into the help files less blindly now thanks to you Canadian.
No, using the delimiter is only if you want to pass multiple parameters to a single function call and shouldn’t be necessary to use in your case. Something like this is all you need to do:
You can <a href='asfunction:loadMovieProxy,0506.swf'>press me</a> to load 0506.swf or <a href='asfunction:loadMovieProxy,0406.swf'>me</a> to load 0406.swf.
function loadMovieProxy(target:String):Void {
trace(target);
pathTo.empty.loadMovie(target);
}
If you press press me, it will load 0506.swf whereas pressing the second me, you will load 0406.swf
That is making more and more sense. Thanks immensely for the light-shedding.
I have a quick question though. I just tried it in multiple iterations of refering to add the _root (where 0406.swf and the empty mc are), in both the html and the AS in as many variations as I can think of… with no luck.