A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: firefox help

  1. #1
    Senior Member
    Join Date
    Sep 2006
    Posts
    125

    firefox help

    Hi

    I use firebug a lot for my work. Recetnly I have begun to start embedding swfs into html pages, and they don't always work (no!) - debugging can be quite a slow process.

    Is there a way I can use firebug to peer inside my swf - often the errors are stupid like pulling in assets with incorrect urls. Perhaps someone could recommend a firebug extension?

    Thanks

    Edward
    E

  2. #2
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    Seems to me that if you are debugging a .swf AFTER you have already embedded it in an HTML page, you are putting the cart before the horse.
    I'd suggest that you get all the debugging done in Flash before you place the flash on a Web page. Things like incorrect urls will show up just as easily in Flash and if they are a function of the .swf, Flash is where you will need to do the correction anyway.
    If by incorrect urls you mean pathing to external assets, like xml files, text files, images or video files, perhaps a quick review of Flash pathing issues would resolve most of those issues. From an old post:
    Pathing issues

    Almost always when it works on the local machine and not the server, it's a pathing problem.
    You can put your Flash related files in whatever folders you want, they do NOT have to be in the root, they do NOT all have to be in the same folder. But if you have a problem and if sticking them all in the root folder works, then you know that the issue was a pathing problem.
    Just remember that paths used in the .swf become relative to the Web page on which the .swf is placed, NOT it’s physical location. So for example, if your .swf is in the flash/data folder and you use that .swf on a Web page in the root folder, you are in effect, removing that .swf from flash/data and putting it in root. So if the .swf is loading any related files (xml, images, video, etc), the path used inside the .swf to load the .xml file has to be relative to it's new location in root and then back down into flash/data. This is true even though when testing the .swf by itself, it can be inside flash/data and work just fine, since relative to it's location, the path is just fine, they are in the same folder. But if that same path is used when the .swf is placed on a page two folder levels up, the relative path has changed, the old "same folder" path will not work.
    In fact if you are placing the .swf on a web page in a different folder than the .swf is stored in, and that .swf calls external assets, then direct clicking and opening of the .swf in it’s folder should NOT work! That’s because the paths to the external assets should be relative to the Web page and not the physical location of the .swf.
    So just be sure that you use addresses relative to the final Web page locations (not physical file locations) and you can put the Flash related files in what ever folders you want.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com
    Best wishes,
    Video Man

  3. #3
    Senior Member
    Join Date
    Sep 2006
    Posts
    125
    Interesting reply - thanks again! You are right of course abut the cart/horse, and I do test the sef thoroughly. I find that often I can only get the swfs to work with absolute links - yuck! This post explains why. - so thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center