Skip to main content
May 20, 2008
Answered

Class Based SWF will not work in PHP page

  • May 20, 2008
  • 4 replies
  • 602 views
hello everyone,

i really hope someone out there can help me with an issue i have come across with PHP and AS3.

i basicly have Made a Class called CrossFade, that fades in and cross fades to the next image that are loaded Via an XML file.

now this SWF works fine in a regular HMTL setting on the server, so i know the path to everything is correct. But when it comes to being embedded into the PHP page, it just won't work.

the Files are all contained in a Folder called Banner, the SWF is linked the the CrossFade.as class, and the images and XML are also located within the Banner folder. and again seeing as its working in the HTML setting i know everything is fine.

can you think of anything that PHP would do to cause this to not function? i dont know enough about PHP to figure this out, and there isn't much support out there in terms of this issue.

I would love to hear from anyone that can help or weigh in with a suggestion.

thanks for your time.
This topic has been closed for replies.
Correct answer
thats great!!!

thank you it worked out for me.

where do i get access to error output when the SWF is online?

that truly would have made life a lot easier!!!


Thanks for all your help!

4 replies

kglad
Community Expert
Community Expert
May 21, 2008
check crugnola's flashtracer plugin for firefox.
Correct answer
May 21, 2008
thats great!!!

thank you it worked out for me.

where do i get access to error output when the SWF is online?

that truly would have made life a lot easier!!!


Thanks for all your help!
kglad
Community Expert
Community Expert
May 21, 2008
what's your url?
May 21, 2008
http://www.toptable.ca/media_flashtest.php
this is the test php page, you can see that the flash banner is there, but nothing is going on. no request to the server for the new images as you would see normaly with teh AS running.

http://toptable.ca/swf/banner1/index.html <--- this is the HTML page that i sent to them for testing. you can see that its working and everything is fine.

they are, in both cases, all housed in the same folder, and unless there is something going on in the PHP page that i don;t know about, the paths to the XML and the images and the AS files should be the same?
May 21, 2008
As you can see from this error message, images.xml isn't where it's supposed to be.

Error: There was an IOerror accessing the XML file: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.toptable.ca/images.xml"
at files.net::LoadXml/handleError()[/Users/yjallad/Desktop/TopTableBanners/banner1/files/net/LoadXml.as:47]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/redirectEvent()
kglad
Community Expert
Community Expert
May 21, 2008
you probably have a path problem. the correct paths to your objects (like xml and image files) are relative to the location of the file that embeds your swf, not the location of your swf.
May 21, 2008
I totaly get that,

but i just question one thing. If the files are loaded on to the server and are placed into an HTML body, and everything works. how come it can stop working when its put into a CMS page? the same paths are being used are they not?

would the paths change because its in a PHP/CMS page rather then an HTML page? I really can't follow how that would be.

i'll try it out though. i just think it may be something else.