Skip to main content
November 17, 2009
Question

How to reload swf?

  • November 17, 2009
  • 1 reply
  • 2219 views

I have a form, when the user clicks reset, I want the flash file to reload so everything is back to it's intial settings.  Anyone know how to do this?

I should point out, its not on a server, it's just a local file, so I don't think I can use the .load function.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
November 17, 2009

the easiest way to tdo that depends on your setup.  for example,

if the initial settings are assigned by a function, call that function to reset.

if the intial text properties of textfields are assigned in the authoring environment, create a function to loop through your textfields and store their text properties using an object.  then create another function to re-assign the text properties stored in that object:

function retrieveTextF(){

textObj[tf1._name]=tf1.text

etc

}

function resetTextF(){

tf1.text=textObj[tf1._name];

etc.

}

November 17, 2009

Thanks.

My set up is all in a function, which is the constructor function.  However when I call that it says incorrect number of arguments, expected 1.  I haven't declared any arguments in the constructor function.

kglad
Community Expert
Community Expert
November 17, 2009

the constructor function of what?