Results 1 to 15 of 15

Thread: Any way to prevent a Flash image from reloading every visit to a page...?

  1. #1
    Join Date
    Jun 2005

    Any way to prevent a Flash image from reloading every visit to a page...?

    I've got a Flash image at the top of each page of my Web site and I only want it to load once per site visit. (Link) What is the easiest way to accomplish this?

  2. #2
    Join Date
    Feb 2008
    When I go to your site, the flash is cached - I am only downloading it once.

    It does restart every time though - is that what you mean?

  3. #3
    Join Date
    Oct 2006
    You can put the flash file in a frame and have the rest of the site change in a different frame. This would prevent the flash file from restarting when a new page is loaded. You can do this nicely with it looking like ugly oldschool frames, but most people dont like using frames.

  4. #4
    Join Date
    Feb 2008
    NW Washington State
    I think I understand what you are hoping to do. Have the Flash animation play on your home page put not replay each time the viewer visits another page. Is the correct? If that's it, use the flash animation only on your home page and use an image (jpg, etc) of the last frame of the animation for the rest of the pages. Then the banner will LOOK like it had just finished playing regardless of which page the viewer is on (except Home page).
    To create that image, go to the last frame of the animation, then File / Export / Export Image. Just place that image on your page in place of the animation.
    You might also consider using swfobject on your Home page. That allows you to place alternate content in the place of the animation. So while almost everyone has Flash in their browser, maybe a few donít. Well just use that same image as the alternate content on your home page. Then even without Flash, the viewer would still see an image of the last frame of your animation, and the banner would look just like all the other pages.
    Nice site by the way! I like the colors and layout.
    Good luck!

  5. #5
    Join Date
    Jun 2005
    Yes, that is correct. Any suggestions?

  6. #6
    Join Date
    Feb 2008
    NW Washington State
    What would you like the viewers to see as they browse to the secondary pages? Just a still image of the logo, or a part of the animation? It looks like the animation loops now, is that what you intended or did you want it to stop after one time through?
    Since each page is kind of a separate entity as far as the browser is concerned, it seems like the long way around to alter the Flash to make it control the HTML. Frames would give you one option but you already have all the pages built. Did you do the coding for the Web pages so far? It still seems that a better way to go would be to use a still image as the banner for the secondary pages.
    Anyway, good luck on your project!

  7. #7
    Join Date
    Mar 2008
    Wow, I came to this forum for the exact same question. I don't see the answers I'm looking for however. Using a static image for other pages doesn't work for me because the banner is animated. I really, really, really don't like Frames either and will avoid them at all costs.

    I'm hoping the solution is not as complicated as I think it will be. I suppose however I could create two flash files, one with the full animation for the homepage and one with just the basic loop made for every other page. It will be a pain if there are ever updates, but it may have to do.

  8. #8
    Join Date
    Feb 2008
    So is the issue that you have a flash that has a beginning and a repeated section, and you don't want the animation to restart from the beginning each time there is a page load, but continue through the looped part?

    If so, then you can do a similar thing, where you have the main flash animation, and then a second one for subsequent pages which just consists of the looping element.

    Of course it won't be seamless.

    But your insistence in "avoiding frames at all costs" leaves you with little alternative.

    Frames have received a deserved bad rap after being abused in the 90s [shudder], but there are times where they are appropriate and the best solution.

    In this case, an IFRAME would work perfectly for your needs without compromising usability, navigability or the design aesthetic.

  9. #9
    Join Date
    Mar 2008
    Yeah I was thinking iFrame too... much better than standard frames. I'm just researching how that will impact SEO if at all. Then I might go for it.

  10. #10
    Join Date
    Feb 2008
    NW Washington State
    The use of iframes could be one way around the problem, but it seems that in the case of a site which already has all the pages designed and working…. well it just seems like the long way around. If I understand this correctly, the object would be to hard code in the small animated banner on (for example), the home page and then bring all other content from every other page into that home page in an iframe? Just to have some manner of control over the banner? Or maybe I’m missing something. On the other hand if you put the animation in the iframe, and load page 2 (for example), won’t the browser just have to reload the banner as the page is parsed? If so, then what’s the purpose?
    I’ve only used iframes to bring in small pieces to a larger page and not the other way around, so I’d be interested to see how it would work. Since the original (finished) site already has several pages of links, file paths, etc. , wouldn’t redoing all the pages into 1 iframe result in a lot of path and link issues?
    A second banner, either static or animated just seems to make more sense to me. Personally I would go with the static version to avoid the annoyance of the instant replay affect (or at least start the looping section with a short period of no animation).
    But….I’m keepin’ an open mind…

  11. #11
    Join Date
    Mar 2008

    preventing flash image from reloading

    Write a 'local shared object', this can store data on the client side. You then read the stored data when the flash page is refreshed and take the appropriate action.

  12. #12
    Join Date
    Feb 2008
    NW Washington State
    Well the "local shared object" was new to me but I really appreciate the tip. Now that I've done a little research on it, I can think of an application or two that I would like to try it on. Thanks!

  13. #13
    Join Date
    Dec 2005
    American, living in Toronto, ON. CANADA
    Quote Originally Posted by digitaldervish
    ...I really, really, really don't like Frames either and will avoid them at all costs...
    Use "<object> ~ </object>" tag:

    <object type="text/html" data="http://www.webdeveloper.com/forum/" style="width:500px; height:500px;"></object>
    (example. -you'll want to control the data="" part with your own page, which would contain the FLASH in a 'container' equal to the width/height used in the "<object>" tag, and nothing else..)

    Do note that for Accessibility reasons, there will ALWAYS be a "vertical scrollbar" on "object", -even if grayed-out and not needed. This is built into every browser's shell (or chrome) to always provide navigation should the programmer err and forget to make it "scroll" if the height of the content exceeds the height of the constraining box...
    Last edited by WebJoel; 03-08-2008 at 02:10 PM.
    I build for: Firefox and tweak for IE

  14. #14
    Join Date
    Jun 2005
    Thanks for all the great replies guys. To clarify, what I am looking for is a way to prevent the Flash from RESTARTING when the page is changed; so, in other words, prevent it from reloading, and just continuing where it left off from page to page. The IFRAME might work, but I tried that and I just get a blank white box with scroll bars when I use that. Is there ANY way to get this to work???

  15. #15
    Join Date
    Oct 2011

    same issue...

    I've the same question. see example here;


    The counters at the top right are flash. the appear on every page when you navigate through the site they disappear and reload with each page. it would be much nicer if they could load once and then stay constant while the pages change around them. Any suggestions?

    P.S. They are already in an iframe as this was the simplest way to add them to the site.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.16028 seconds
  • Memory Usage 3,009KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (15)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (15)postbit
  • (15)postbit_onlinestatus
  • (15)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates