Skip to main content
November 28, 2006
Question

Button that calls the frame again...

  • November 28, 2006
  • 2 replies
  • 271 views
Hi All-

Probably another simple question for those unencumbered by the web paradigm....

I have a simple one frame Flash movie (using the Yahoo maps control, very cool). The map control has default values assigned to it by way of variables, so when it loads it displays the map for the defaulted address.

In the same frame I have a textInput and a button, that I want to be able to have the user enter a new address, click the button and simply have the same frame called again, with code at the top of the frame to simply look at the textInput field to see if a new address has been submitted. If so, display the new map.

Sounds easy enough, but I can't seem to get the button to call the same frame again, a refresh if you will. Am I missing the obvious (again)??? Does this flow sound correct? I thought a self-submitting form would be the easiest and most elegant solution here.....

Thanks for your help in advance,

Rich

This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
November 28, 2006
the code i gave should be attached to your timeline and should use the instance name of your button.
November 28, 2006
... boy I hate to sound ignorant, but isn't that what I did? The code I listed below is on a layer I called "Actions" and the button's instance is in a different layer called "formlayer" called "mapIt_btn", which I thought I referenced correctly, am I missing something obvious again?

Thanks again,

Rich

kglad
Community Expert
Community Expert
November 28, 2006
1. attach a stop() to your first frame and add a 2nd frame.
2. have your refresh button execute _root.play().
November 28, 2006
... so the 2nd frame would remain empty, and "_root.play()" refers to the name of my play button?

Thanks so much for your help-

Rich

kglad
Community Expert
Community Expert
November 28, 2006
no, _root.play() is the code your play button would execute. for example: