SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Addict AfroNinja's Avatar
    Join Date
    Oct 2006
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SWF doesn't appear until fully loaded

    I'm embedding .swf files in my pages but the problem is, they don't actually become visible until the entire file is loaded. All of the preloaders are negated and the window remains white until the whole file is present.

    This is for a redesigned website- on the old site I loaded the .swfs in popup windows with standard embed code. The preloaders worked fine there so I know it's not a preloader issue. On the new site I started embedding them with swfobject and ran into this problem. However I then replaced the swfobject code with the code I used in the old site and still had this problem.

    So I'm trying to think more abstract now- some sort of server structure issue? permissions? settings? config/ini stuff?

    Are there any common known reasons as to why a .swf file wouldn't appear on the page until fully loaded?

    thanks!
    The Flash Gaming Network
    Editorial reviews for the latest flash games!
    Afro Ninja Productions
    Original flash games and content from a guy with an afro

  2. #2
    Non-Member
    Join Date
    Apr 2009
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Come on AfroNinja, you've been on forums long enough to know not to Cross post on Kirupa forums.. (http://www.kirupa.com/forum/showthre...29#post2457529)

    I am no Flash guru and am a little puzzled why this is in the HTML forum of this site. Alternately maybe may help you. http://www.forum.flashloaded.com/boa...ad.php?t=16298 This guy seems to have a similar problem.

  3. #3
    SitePoint Addict AfroNinja's Avatar
    Join Date
    Oct 2006
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry this issue is really bugging me, I wasn't aware there was such a similar community between here and kirupa

    I will check the link, thank you
    The Flash Gaming Network
    Editorial reviews for the latest flash games!
    Afro Ninja Productions
    Original flash games and content from a guy with an afro

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,338
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    a2K, just for your information, we don't mind if someone posts a question here that is also posted on another site

    cross posting, as we define it in our FAQ, refers to posting the same question into multiple forums on this site
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    Non-Member
    Join Date
    Apr 2009
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh thanks r937 I just Googled his search term in hopes of helping him and thats how I found it. I thought that cross posting was asking the same question on multiple forums because that defeats the purpose of a forum. I would just not post the answer and just assume he got the answer on another forum

  6. #6
    SitePoint Addict AfroNinja's Avatar
    Join Date
    Oct 2006
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also, I posted in the html/javascript forum because I believe that's where the problem lies.

    I checked the link but that person's issue seems to stem from trying to load a .swf inside of a .swf. I know my preloaders work fine because they've all worked on my old site for years now, so I'm fairly certain it relates to the embed method or some sort of server design. I'm still continuing to test different cases.
    The Flash Gaming Network
    Editorial reviews for the latest flash games!
    Afro Ninja Productions
    Original flash games and content from a guy with an afro

  7. #7
    Non-Member
    Join Date
    Apr 2009
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post the code of the embed you did? Also a link wouldn't help'
    also, I posted in the html/javascript forum because I believe that's where the problem lies.
    There we go

  8. #8
    SitePoint Addict AfroNinja's Avatar
    Join Date
    Oct 2006
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I've pinpointed the problem- it stems from my use of an anchor tag above the content. When I load the .swf, I load it farther down in the page, under all the initial information. However when the user clicks play, they are not aware the content is loading below. So I send them down to the content via an anchor tag, and I use this in my javascript:

    location.href='#content_view';

    when I comment out that line, the .swf loads as expected. So... am I not doing this in javascript the right way? Or is using anchor tags bad altogether?
    The Flash Gaming Network
    Editorial reviews for the latest flash games!
    Afro Ninja Productions
    Original flash games and content from a guy with an afro

  9. #9
    Non-Member
    Join Date
    Apr 2009
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just use a regular anchor tag instead of using javascript to redirect the users to the content

  10. #10
    SitePoint Addict AfroNinja's Avatar
    Join Date
    Oct 2006
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but how would I do this? when the user clicks the play button (an image) it's set up like this:

    <a href="javascript:loadContent(33,700,500)"><img src="play_button.gif" /></a>

    inside of the loadContent function is where the swfobject embed takes place, followed by the location.href change. could I directly link to the anchor in the href part then take care of the javascript in an onclick?
    The Flash Gaming Network
    Editorial reviews for the latest flash games!
    Afro Ninja Productions
    Original flash games and content from a guy with an afro

  11. #11
    SitePoint Addict AfroNinja's Avatar
    Join Date
    Oct 2006
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fixed, I replaced the usage of the anchor tag with javascript's scrollTo() function and everything works fine now.
    The Flash Gaming Network
    Editorial reviews for the latest flash games!
    Afro Ninja Productions
    Original flash games and content from a guy with an afro


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
  •