1

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.

fat_mike
  • 877
  • 12
  • 27
  • It should be working. Have you tried putting a trace into the `linkgal` function to test it is being called? – shanethehat Sep 02 '11 at 14:51
  • Actually, where is the textField located? It must be within the same scope as the function. – shanethehat Sep 02 '11 at 14:59
  • 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 Sep 03 '11 at 20:03
  • 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 Sep 03 '11 at 20:25

1 Answers1

1

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);
}
shanethehat
  • 15,460
  • 11
  • 57
  • 87