• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Two issues and a question with flash video

Explorer ,
Dec 31, 2009 Dec 31, 2009

Copy link to clipboard

Copied

I am trying to create a film module template but have some issue below as well as a question

A video's sound continues to play after navigating to another frame.

My video cue buttons do not play or work after the video has played through one complete time

Is it possible to make a button appear only after a video has played all the way through?

here is some of the code and I have attached the files, thanks for looking

stop();

import flash.events.*;
import fl.video.*;

function cuePointHandler( event:MetadataEvent ):void
{
    // On cuePoint, look for a button named with the cue name
    // plus "_btn". If it exists, then call its select method...
    navigate(event.info.name, false);
}
display.addEventListener(MetadataEvent.CUE_POINT, cuePointHandler);

//-----------------
// Navigation / screen state
//-----------------

// Store the current button name
var currentBtn:*;
var currentBtnName:String = "";

function navigate( cueName:String, seekTo:Boolean ):void
{
    // Handle previous button
    var prev = getChildByName(currentBtnName);
    if( prev != null ){
        currentBtn.reset();
    }
    // Handle new button
    var next = getChildByName(cueName+"_btn");
    if( next != null ){
        currentBtn = next;
        currentBtn.select();
        currentBtnName = cueName+"_btn";
    }
    // Seek to Cue Name
    if( seekTo == true ){
        var c = display.findCuePoint(cueName);
        if( c != null ){
            display.seekSeconds(c.time);
        }
    }
}

//-----------------
// Button event handling
//-----------------

// Cue point 1_btn
function cpt1Handler( event:MouseEvent ):void
{
    navigate("cpoint1", true);
}
cpt1_btn.addEventListener(MouseEvent.CLICK, cpt1Handler);

// Cue point 2_btn
function cpt2Handler( event:MouseEvent ):void
{
    navigate("cpoint2", true);
}
cpt2_btn.addEventListener(MouseEvent.CLICK, cpt2Handler);

// Cue point 3_btn
function cpt3Handler( event:MouseEvent ):void
{
    navigate("cpoint3", true);
}
cpt3_btn.addEventListener(MouseEvent.CLICK, cpt3Handler);

// Cue point 4_btn
function cpt4Handler( event:MouseEvent ):void
{
    navigate("cpoint4", true);
}
cpt4_btn.addEventListener(MouseEvent.CLICK,cpt4Handler);

// Cue point 5_btn
function cpt5Handler( event:MouseEvent ):void
{
    navigate("cpoint5", true);
}
cpt5_btn.addEventListener(MouseEvent.CLICK, cpt5Handler);

TOPICS
ActionScript

Views

458

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 01, 2010 Jan 01, 2010

Copy link to clipboard

Copied

First, a note. You shouldn't assume when posting questions that it will be clear to anyone what your application is supposed to do. In other words, it would be beneficial if you describe what you expect (use cases) and than what goes wrong from stand point of your use cases.

So, what do you expect your application to do? What is supposed to happen when user click buttons, etc?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 01, 2010 Jan 01, 2010

Copy link to clipboard

Copied

My navigation buttons advance the page to other frames set up to look like different

'slides" for students to read and watch different video clips on.  The video sound is still playing from one frame when it goes to the next frame.

So I need to know how to stop the video's sound from playing when the user advances to the next slide.

20100101-CaptureIt-Picture-1.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 01, 2010 Jan 01, 2010

Copy link to clipboard

Copied

LATEST

You can stop video by using method stop() on the instnace of FLVPlayback:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html#stop()

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines