PDA

View Full Version : Loading external swf - buttons not working



schutzy
August 25th, 2008, 03:28 AM
Hi,

I am a newbie to AS3 and I am having a problem with the buttons not working on an external swf. Both the main swf and the external swf are written in AS3. I have a button that uses the Loader class to open the external swf - it opens fine and displays as expected. The problem is that there are 3 buttons on the external swf - this is for an email form that writes to a php script - it has a submit button, a clear fields button and a return to main button. When the external swf is tested as a stand alone form everything works fine but when it is loaded from the main swf the buttons don not do anything at all.

Any help would be deeply appreciated!

Thanks!
Schutzy

johnlouis
August 25th, 2008, 07:12 AM
make sure your paths are all absolute in your loaded swf. this is a common problem with loading. the url/path of the loaded swf changes into the parent swf.
the annoying thing about having to change the paths is, when you test your loaded swf alone, it won't work instead. :-/

schutzy
August 25th, 2008, 07:30 AM
make sure your paths are all absolute in your loaded swf. this is a common problem with loading. the url/path of the loaded swf changes into the parent swf.
the annoying thing about having to change the paths is, when you test your loaded swf alone, it won't work instead. :-/


Thanks for the quick response JohnLouis :)
I tried changing to the absolute path - it displays o.k. but again the buttons do not work. They function perfectly as a stand alone but when loaded using the loader class they choke :(

I am not sure how to get this working - I looked all over for a solution with know luck - is there an example that you can point me to somewhere?

Many Thanks!
Schutzy