Results 1 to 4 of 4

Thread: flash keeps playing after i leave web page

  1. #1
    Join Date
    Aug 2009

    flash keeps playing after i leave web page

    I have run into a sticky problem in IE7.

    A visitor can click on one of four links on an HTML page. Each takes them to a correlating anchor position within a movie that is located on another page.

    When they click on the link, they are taken to that page and the movie begins playing at that location. So far, so good.

    Some visitors hit IE's browser back button to return to the orig page. There, they click on one of the other anchors and are once again taken to the page with Flash. This time, however, the audio from the first anchor they clicked continues to play below the new audio they selected.

    Apparently, the original link doesn't stop playing. Is there a way to stop a movie from playing as someone uses the browser's navigation to leave that page? Is there another solution?

    I'm a novice at AS3, and really need the help.

    Thanks. The links page is here (just click on a photo to begin the movie. The most problematic link is the first one, "Larry")


  2. #2
    Join Date
    Feb 2008
    NW Washington State
    Well without seeing the code you are using it’s pretty hard to tell you how to fix it, but here are a couple suggestions on basic rules to fix the problem. And please don’t show me the code… try to fix it yourself from these suggestions.
    First directly download the .swf file you are using here:
    click all the buttons… everything works fine .. but, did you notice, when the file first load it auto plays starting with Dr. Larry. So in the Web page, regardless of which Dr. you click, it will always play Dr. Larry (from the cache), besides the other Dr. you may have clicked on. Test that for yourself. Then do this, play the Dr. Larry video and back arrow to the home page. While there, delete all the files from the Temp Internet cache (in IE Tools/Internet Options/Browsing History/Settings/View Files) .. then delete them all. Close everything out and you’re back to your Web page. Now choose any Dr. and NO Problem.
    Since I ain’t ah’ very good at PHP, I’m not exactly sure how you are navigating to the various sections of the .swf, but however you are going it, you will need to stop the current video from playing before any nav changes are made.
    So if you are using a PHP array, one way around this would be to load a non-existent element. To stop one video from playing (as in an array), call for an element which does not exist in the array. So if you have 4 videos in your array, on click, have your function call for the 6th element in the array. You now have stopped video 1 and the 6th file does not exist, so nothing happens. Then immediately call for the correct element. At the very least, you will need to stopAllSounds(); (Google for more info).
    To illustrate, here is a AS2 button which took viewers to another page… but the music would keep playing.. until I added the code to load a fake url in the array
    home_btn.onRelease = function() {		
    When jukebox did a loadSound, it stops the current and tries to load [100]. Since there is no 100 in the array, it stops playing while getting the other URL.
    Sorry that this doesn’t solve the issue but it should help you understand the problem better.
    Best wishes,
    Eye for Video

  3. #3
    Join Date
    Aug 2009
    Thanks for the input. When I go from the html page (a page in Joomla) to the html/joomla page that holds the flash movie, I use a simple hyperlink with the page url plus "#" and then the label of the flash frame I want to jump to. No PHP.

    From what you're showing me, I can code into AS3 so that it stops the audio when I call a non-existent label. But here's the rub. These users are either linking back to the original Joomla page using the web page's nav bar OR they are linking back using the back button in IE. So is there a code in flash like in javascript that calls a function when the current page unloads? For instance, onUnload stop movie OR onUnload play non-existent audio?

  4. #4
    Join Date
    Feb 2008
    NW Washington State
    I don't know about that. But the idea is to stop all video (or sounds) as the first step in starting the next video. So the main .swf should not auto play in the first frame but either call a non existent element or stopAllSounds.
    So whichever Dr. you choose, all prior choices are negated (as you described with the .js).

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.09077 seconds
  • Memory Usage 2,870KB
  • 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
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (4)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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 (73):
  • 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_postinfo_query
  • fetch_postinfo
  • 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
  • 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