Copy link to clipboard
Copied
Hello to everyone! I'm new to the forums here and relatively new to AS3. I use FlashBuilder to code. I'm trying to load a local external .swf into my app. My URLRequest can't seem to be able to find the location of the local swf. I've dropped it everywhere with my app but no matter what I put for the url it can't find the swf. For example, my swf is name game.swf but no matter where I put it in the project folder and any combination of URL, I can't seem to access it. Interestingly enough, if it's in the bin-debug and I put URLRequest("game.swf"), it'll find the one in the bin-debug it seems. Please help and thanks in advance!
In a Flash Builder project you should put it in the /src folder. The bin-debug is auto-populated with anything you put in /src.
Ideally you should make an /assets folder under /src (so /src/assets) and then load new URLRequest('assets/game.swf');. Flash Builder will copy the /assets folder from /src over to /bin-debug and eventually to your final export folder as well.
Copy link to clipboard
Copied
In a Flash Builder project you should put it in the /src folder. The bin-debug is auto-populated with anything you put in /src.
Ideally you should make an /assets folder under /src (so /src/assets) and then load new URLRequest('assets/game.swf');. Flash Builder will copy the /assets folder from /src over to /bin-debug and eventually to your final export folder as well.
Copy link to clipboard
Copied
Thanks, that worked and I did manage to get it to work with placing all my swf within my assets folder. Okay so my understanding is that the URLRequest will look within the bin-debug for the .swf and the .swf will be automatically be copied there when I place the .swf into my source folder?
Copy link to clipboard
Copied
bin-debug is where Flash Builder places the files when you press the Debug or Run buttons. When you export your release build you will choose your own folder to place the final. In both situations, /src is the folder Flash Builder expects all the files you want "packaged" in your app to be in. Arrange them in any folder names you like. Consider the root of /src to be the root of your project. All relative links should be as if you're in that folder.
Copy link to clipboard
Copied
Okay awesome! Thanks for the help!
Copy link to clipboard
Copied
If you have any further Flash Builder questions you might want to try the Flash Builder forum. Although there are plenty of us here that use it as well. The products do overlap.
If you're all set please mark any helpful/correct so we can filter unanswered.
You're welcome and good luck!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now