Results 1 to 7 of 7

Thread: Ajax content loader not working for flash content

  1. #1
    Join Date
    May 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Ajax content loader not working for flash content

    Hello everyone, it's my first post :P

    I found this:
    http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    And tried to implement it to my website but this doesn't load flash movies. No, I am not directly trying to load a .swf but a html website with a flash movie in it and it's not loading it :/

    All other pages are loaded correctly so I don't think I'm doing something wrong?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Probably won't work. If by:

    a html website with a flash movie in it
    you mean a different domain, that won't work with or without Flash. AJAX will not work cross domain, period.

    But even if it's on the same domain, Flash tags work differently than ordinary HTML code, often they're script generated too - scripts on AJAX imported pages are ignored. Even if the Flash object is hard coded on the page you want to import, it may not work properly once imported. At the very least, removing it and replacing it with other content may not stop the audio portion (if any) in some browsers.

    Flash import is best done either with iframe or some sort of api designed for Flash.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply.

    The files are in the same domain... it's just a normal flash movie embed inside a html normally (exported both swf and html in flash).

    So... there's no way to do it?

    Is there an ajax iframe or something? I am not familiar with ajax at all

    You can check an example on my site ynef.net

    As you can see the links are at the very bottom and they open exactly as I like them to open... is there another way to do this?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, I just tried this out and it appears to work (I substituted a Flash page for the Ferrari Page):

    http://home.comcast.net/~jscheuer1/s...content_flash/

    I admit my test was designed to succeed. As I say, there are many things that can go wrong when combining AJAX and Flash.

    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    Last edited by jscheuer1; 05-15-2010 at 03:44 AM. Reason: add demo
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    May 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Well for example I would like the main page to load this: http://www.ynef.net/Games/BlackBox/

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The path to BLAC.swf is incorrect for the page you are importing it to. It should be:

    /Games/BlackBox/BLAC.swf

    Otherwise, it appears to work - that is it loads the object, just can't find the .swf file.

    But there could be other issues. Ideally, the page with the Flash object on it should have virtualy no other code (the center tag is OK). This might not matter though unless you are concerned with details of validation for the 'top' page after import, or warnings that some browser's developer tools may give. The path certainly does matter, so change the object/embed as shown (in two places, scroll the code block to see the other spot):

    Code:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="200" height="150" id="BLAC" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="/Games/BlackBox/BLAC.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#cccccc" /><embed src="/Games/BlackBox/BLAC.swf" quality="high" bgcolor="#cccccc" width="200" height="150" name="BLAC" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ynef (05-17-2010)

  8. #7
    Join Date
    May 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    It's working now. Thanks a lot for helping me!

Bookmarks

Posting Permissions

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