Amin Shahnazari
Amin Shahnazari

Reputation: 95

using a flex web application in another HTML file

i'am developing a flex media player that will be include in a simple html file. my project plane is:

1-loading a xml file (using HTTPService)
2-find the sound address in the xml (Using E4x)
3-load the sound
4- ... 

when i run it with adobe flash builder or generate a release version, it works fine. but when i use the flash file in my html file it's xml loading process doesn't work!

after some try , i realized that if the swf file be in the flash builder workspace directory, it work , else it doesn't work.

note that my OS is Microsoft Windows 7 32-bit

what is the different between the workspace directory and usual directories?

and how i can solve my problem?

thanks for your attention

Upvotes: 0

Views: 147

Answers (1)

waxspin
waxspin

Reputation: 406

It sounds as if you are running into a security issue. If you are loading via file:// rather than http:// from a local server instance, then you will have to make sure that the folder and everything in it you are loading from is a trusted location. You can do this via right-clicking the flash object in the browser, and choosing Global Settings->Advanced->Trusted Location Settings->Add->Add Folder and browsing to the folder that contains all of your swf, xml, and so on that need to load.

Another solution would be to run it all under apache, even locally, and then the security will not be a problem, as it will all appear to be coming from the same domain on a webserver (in this case, something like http://localhost/mysite).

Hope this helps!

Upvotes: 1

Related Questions