A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Stopping flv playback when changing pages without using controls

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    6

    Question Stopping flv playback when changing pages without using controls

    Is this possible? I am transitioning a "slide show" from AS2 to AS3.

    Basically slides with flv playback controls, but when I use "next slide" button, it goes to the next slide but the flvplayback continues from the last slide...

    can I link the flv playback to stop when I use next slide button?

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    567
    Would you like to show us some code? It should be easy enough to stop the video: VideoGoesHere.stop() in your mouse click function triggered by the next button?

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Posts
    6

    Talking code

    duhhh...thanks!!!


    here is the code for three buttons on the page and then there is an flv playback component on the page that plays automatically with controls.

    I can navigate to the next page, but have to manually stop audio/video first, or it continues to play (from previous)


    Home_btn.buttonMode = true;

    var link:URLRequest = new URLRequest("Index.html");

    Home_btn.addEventListener(MouseEvent.CLICK, onClick);

    function onClick(event:MouseEvent):void {
    navigateToURL(link);
    }

    Home_btn.buttonMode = true;


    prev_btn.buttonMode = true;

    var link2:URLRequest = new URLRequest("Index.html");

    prev_btn.addEventListener(MouseEvent.CLICK, onClick2);

    function onClick2(event:MouseEvent):void {
    navigateToURL(link2);
    }

    prev_btn.buttonMode = true;

    next_btn.buttonMode = true;

    var link3:URLRequest = new URLRequest("NDEpg3.html");

    next_btn.addEventListener(MouseEvent.CLICK, onClick3);

    function onClick3(event:MouseEvent):void {
    navigateToURL(link3);
    }

    next_btn.buttonMode = true;

  4. #4
    Senior Member
    Join Date
    Jan 2001
    Posts
    567
    Um... hmm.

    So the swf file is embedded into a html page?

    And the swf... in between the buttons has a video playing?

    Because once you go to a new html page you will start the flash playing from frame 1, even if it is the same swf.

  5. #5
    Member
    Join Date
    Jun 2006
    Location
    Cardiff, UK
    Posts
    44
    I'm trying to do a similar thing, i don't have a stop button on the component skin I'm using so i want the video to stop when the user navigates to a different frame - my code is:

    Code:
    storybutton.addEventListener(MouseEvent.CLICK,StoryButtonClick);
    function StoryButtonClick(event:Event){
          trace("This button is Clicked!");
    	  gotoAndPlay("page1");
    	  page2.video.stop();
    }
    but it won't work. 'video' is my playback instance, 'page2' is the movieclip instance in which the playback component sits - i tried with and without referencing the movie clip... - but i'm not sure i've even referenced it right (this always confuses me in AS2, i'm still thoroughly confused by AS3 at the moment!)

    My video is imported using the Import Video option into an FLV playback component, and is progressive download...

    thanks...

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