Showing posts with label navigation. Show all posts
Showing posts with label navigation. Show all posts

March 12, 2008

Cue Point Navigation

Attaching Actions to the buttons

To respond to the cue points in the video, we'll set up an ActionScript "listeners" that will listen for the cue points and then execute actions we specify.

Screen 1: keyframe Home in the layer actions

stop();

// make the videoScreen symbol invisible
setProperty("_root.videoScreen", _visible, false);

// create a variable for an event listener
var cueListener:Object = new Object();

//declare a function called by the event listener
//the listener passes a reference to the cue point

cue.Listener.cuePoint = function(cues) {


//create a variable for the name of the cue point

var cueName = cues.info.name;


//replace the text placeholder in the Dyanmic

//text container with the name of the cue point

_root.videoScreen.textClip.text = cueName;


//move the video banner movieclip to the named

//keyframe that matches the cue name
_root.videoScreen.videoBanner.gotoAndStop(cueName);
}

//start the event listener

_root.videoScreen.theVideo.addEventListener("cuePoint", cueListener);


For the presentation of our video I attached actions to the buttons in the video screen that will allow viewers to navigate to the different points in the video.

The Bride and Groom Button
on (release) {
import mx.video.FLVPlayback;

_root.videoScreen.theVideo.seekToNavCuePoint("The Bride and Groom");
}

The Toss
on (release) {
import mx.video.FLVPlayback;
_root.videoScreen.theVideo.seekToNavCuePoint("The Toss");
}

The Kiss
on (release) {
import mx.video.FLVPlayback;

_root.videoScreen.theVideo.seekToNavCuePoint("The Kiss");
}

The Rings
on (release) {
import mx.video.FLVPlayback;
_root.videoScreen.theVideo.seekToNavCuePoint("The Rings");
}

The site development is now complete!

March 11, 2008

Importing Flash Video

Image 1 - Importing .mov video & converting to FLV format


For converting a single video file to the Flash File (FLV) format, I use the Flash Video Import wizard.

In this project I used "Navigation" cue points for navigation and seeking, but can function secondarily like an "Event" cue. I used navigation because I need the functionality of both types.

The ActionScript shown at Image 1 (above) is for the x button in the top-right corner. It is to close the video screen and stop video playback. Note that if the video had audio and we didn't stop the playback, the video would continue to play and viewers still hear the audio.


//attach action that executes when
//the button is pressed and released.
on (release) {
//make the videoScreen symbol invisible
setProperty("_root.videoScreen", _visible, false);
//stop playing the video
_root.videoScreen.theVideo.stop();
}