PDA

View Full Version : Please help me on this video auto move to next frame!!!


Silky Boy
2-10-09, 09:16 PM
Could you help me on this??


I tried the exactly the same thing but it seems not work.

I crate two frames:

First one is video

I also set up the Cue Point: cue1 00:00:06.100 ActionScript

I copied this on the second layer of the first frame:
//code
stop();
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
// Put any code you like here
trace("Cue point name: " + eventObject.info.name);
trace("Cue point type: " + eventObject.info.type);
if(eventObject.info.name=="cue1"){
gotoAndStop(2);
}
}
vid.addEventListener("cuePoint", listenerObject);




Second frame is my "continue" button


The problem is the video just playing all the time not go the second frame.


If i put actionScript on the video itself, I got this Scene=Scene1, layer=layer1, frame=1, line34 Statement must appear within on/onClipEvent handler


Please help me on this:(

Guy
2-11-09, 02:32 AM
this code if for actionscript 2 if you using as3 there is another code,

if you are using as2 it sounds like you forgot to name the instance name of the flvplayer, also make sure that your cuepoint is named cue1.

Silky Boy
2-11-09, 01:16 PM
Thanks Guy to answer my question!

I use actionScript2. I do named cuepoint is named cue1. The instance name of the flvplayer is video.

Please see my screen shothttp://www.sfshow.net/roseOLD/TestButton.gif


When I tested it, the movie just running all the way through not go the next frame:(

Maybe I am still miss somthing. Sorry for this???


Acturally, I have one porject is that I need create one

When movie stop, one next(or continue) button show up in the same frame with movie, so people can click next button to next video. The same is after video stop, the next button shows up.

Please show me a way how i am going to work on this. I am really not good at in Flash ActionScript:o :o . But I have to finish this project without choice.:worried2:


tHANKS FOR THE HELP!!!

Guy
2-11-09, 02:02 PM
Silky Boy--

The problem is this--
you named your flvComponent video, but the code is calling for vid
so in the code change vid to video

Silky Boy
2-11-09, 02:25 PM
Thanks!!! Guy!!!!!!!!!

It's work:D

I put wrong name in instant name.


Silky

Guy
2-11-09, 02:29 PM
Glad to help

Silky Boy
2-11-09, 02:30 PM
Is it possible??


If movie finish(stop), at the same time the next button show up in the same frame with viedo. Instead of I go to next frame.


Thanks!!

Silky

Guy
2-11-09, 03:40 PM
Yes

stop();
button._visible=false;
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
// Put any code you like here
trace("Cue point name: " + eventObject.info.name);
trace("Cue point type: " + eventObject.info.type);
if(eventObject.info.name=="cue1"){
button._visible=true;
}
}
vid.addEventListener("cuePoint", listenerObject);

with this code the button well be visible when the cuepoint is called
just rename "button" in the code to the instance name of your button

Silky Boy
2-11-09, 06:25 PM
Thanks a lot:D

Guy
2-11-09, 06:59 PM
Your welcome