PDA

View Full Version : loadVars - External HTML - href interacting w/ flash?


Ashley
07-11-2003, 02:26 AM
I'm using a loadVars command to load in HTML formatted text from an external .txt file. What I am trying to do is make a link (<a href="url">) from my external text file, set a variable and then call out a flash function. Can this be done?

for an example of exactly what I'm trying to do... goto:
http://www.donsuemor.com/0.9.html
When it's done loading... Click the "madeleines" button
Then click "serving suggestions"

you'll notice an underlined link in the first and second line ("DonSueMor Madeleine"). If you click that, it tells flash to load in differant content. Right now that text is built into flash, however I would like to load it in from an external txt file if it's possible.

Thanks a lot for any help

CyanBlue
07-11-2003, 02:33 AM
Howdy... ;)

I am not 100% sure if I understand your question, but I think you need to use 'asfunction' to do that...

Do the search in the forum with that term and check these threads as well...
http://www.actionscript.org/forums/showthread.php3?s=&threadid=26564
http://www.actionscript.org/forums/showthread.php3?s=&threadid=28483

Ashley
07-11-2003, 03:25 AM
Hey thanks a lot... that worked... except for one minor detail

this is what I got...
<a href='asfunction:_global.loadNewContent,this'>

problem is I want "this" to represent the actionscript "this". As in the location of the current timeline.

I assume while I'm loading my text file I would have to save "this" as a variable and send it to my text file. Maybe using the "loadVarsObject.send

CyanBlue
07-11-2003, 03:32 AM
Um... I don't know how you have set up your function, but maybe you can try eval() function with the argument??? Like eval(argInTheFunction) or similar???

littleRichard
07-12-2003, 03:16 AM
asfunction can only pass 1 string argument. so you can't pass a object refernce through it. you'll have to send the full path to whatever object as a string and evaluate it in the function. kinda like what CyanBlue said.

<a href='asfunction:_global.loadNewContent,_level0.so meclip.anotherclip'>