A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] Stopping video when clicking away from page.

  1. #1
    Member
    Join Date
    Dec 2009
    Posts
    51

    resolved [RESOLVED] Stopping video when clicking away from page.

    Ok so i have a video on my page which plays automatically when the user goes on the page. What i want to happen is when the user clicks a button away from the page, the video and the sound all stop so it can't be heard in the background.

    Other pages have videos on, therefore can't use stopallsounds.

    My video is currently a movieclip instance of FLVPlayback.

    Anyone got any ideas on how to stop the video when a button is pressed?

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Curious, has this problem been resolved? If so, can you provide your solution.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Member
    Join Date
    Dec 2009
    Posts
    51
    on buttons going away from the page with the video:

    PHP Code:
    _root.sections.home.advert.myFLVPlayback.stop(); 
    sections being the holder, home being the movieclip instance name within the holder, advert being the name given to the movieclip which holds the video, and myFLVPlayback being the instance name of the FLV playback file.


    and buttons going to the page with the video to restart it:

    PHP Code:
    _root.sections.home.advert.myFLVPlayback.play(); 

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