1
votes

I want to make link from a dynamic text(in flash project) to an external swf i created(a gallery that is controlled by xml file). This is the code of first frame of my fla project:

url="edit";
loadVariablesNum(url + "_main.html",0);
_root.link=1;
function linkgal()  {
    loadMovieNum("gal_car.swf", 1);
}
stop();

and my html code for the text link is:

<font color="#438092"><u><a href="asfunction:linkgal">Photos</a></u></font>

Shouldnt that be working and load the gal_car.swf on top of the other swf? loadMovieNum works when i use it on buttons. Thank you.

1
It should be working. Have you tried putting a trace into the linkgal function to test it is being called? - shanethehat
Actually, where is the textField located? It must be within the same scope as the function. - shanethehat
I will try a trace and see if its being called. The textField is located in a symbol called "pages". Something like _root.pages. and the linkgal function is located in the first frame of the scene. Is that a problem? - fat_mike
after putting a trace in function i got nothing in output so it is not being called. Whats the problem then? Thank you anyway - fat_mike

1 Answers

1
votes

For this to work as expected, the function you're calling needs to be in the same scope as the textfield that contains the link. Try moving the function into the 'pages' symbol and changing the code to target the document root:

function linkgal()  {
    _root.loadMovieNum("gal_car.swf", 1);
}