tags:

views:

47

answers:

1

I have a situation where I need my swf to load from a domain. Currently my flex set up always loads a SWF from file//...

I would prefer the domain to be local.somedomain.com

Does anyone know how to do this?

+1  A: 

Create a simple html page that has the object tag and load it from there. It will load from the same domain the html page is loaded from.

When you hit the debug button in Flex Builder, you are actually running an html page (its in the html-template folder called index.template.html). If you right click the project in the navigator and click properties, then click run/debug settings, you can edit a "launch configuration" and tell it what page to load (here, you can just modify the debug or run path to be a url instead of a folder path).

Gabriel McAdams
What do you mean by "object tab"?
Tony
Sorry. Object tag (http://www.w3schools.com/flash/flash_inhtml.asp)
Gabriel McAdams
Is there a better way than copying my SWF to a new location every time? I understand that I can do it your way, but I was hoping to make this easy so I can hit the debug button and the SWF automatically loads from the domain.
Tony
See my modified answer for more information
Gabriel McAdams
That still loads as file:// ...not a domain, therefore that solution will not work for me
Tony
actually explicitly setting it to http works, but i haven't been able to get the local domain to forward to the proper directory yet
Tony
Point `Project|Properties|Flex Build path|Output folder url` to the appropriate path in your server's `htdocs` folder and use something like `lcoalhost:8080/path.html` in the run/debug settings
Amarghosh