I've been using Flash 8's FLVPlayback component to load flv movies, but I'm wanting to use an FLV as an intro, and then continue on in the website. How can I tell Flash to gotoAndPlay("Home") after the intro FLV has completed?
Any Help?
I've tried using a cuepoint at the end of the movie, but I can't say I'm an expert on cuePoints.
How would I set up the 'on event load'...within the FLV or actionscript in my main movie?
thomas - thanks for the suggestion, I finally got it working.
Here is the code if you need the final.
----------------------------------------------
post this actionscript with an FLVPlayback component labeled "Intro_Flv".
Place an event cuePoint at the end of your FLV and use the name as the event.
Code:
var introListener:Object = new Object();
introListener.cuePoint = function(eventObject:Object):Void {
if (eventObject.info.name == "CUEPOINTNAME") {
gotoAndPlay("NEXTFRAMEorLABEL");
}
};
Intro_Flv.addEventListener("cuePoint", introListener);
stop();
the cue point type: event
name on the cue point: end
name of FLVPlayback: open_me
parameters for the cuepoint: name: open_me value: open_me - don't worry about parameters
your script then on the frame that holds the FLV;
Code:
var introListener:Object = new Object();
introListener.cuePoint = function(eventObject:Object):Void {
if (eventObject.info.name == "end") {
gotoAndPlay("loadOther");
}
};
open_me.addEventListener("cuePoint", introListener);
stop();
Once it reaches cuepoint "end" it should go to the frame labeled "loadOther"
If you want it to load a movieClip, put your script in the "loadOther" frame and have it load there. If you did it in the same frame as your FLV, you would first have to unload the FLV - then attach your movieClip.
- one Layer with the movie.
- one layer with keyframes, for my text(whatever) movieclips saying:
this.attachMovie("textclip_linkagename","textclip_ name",3,{_x:505, _y:215});
- and of course on the frame 1 of the video (FLV), all the script for all my cuepoints
Sopiaz,
So, this is assuming you're using Flash 8 professional (which has the FLVPlayback component). I'm providing you with the FLV, FLA, and Quicktime. The FLV has already been encoded with cuePoints, but you can use the QT if you want to configure the FLV. If you already know this, skip the description:
In flash, go to "Import to Library" and choose your QT ("Test"), and click Import. A wizard will walk you through converting this to an FLV. Choose progressive download, then in the Encoding window choose the advanced options and open the Cue Points tab. In the preview box, take the playhead to the end of the movie. Click on the + sign to add a cue point. Name it "End" and set the type as "event". On the next window, because a skin probably isn't neccessary, choose "none". And Finish. The FLVPlayback should be on the stage, name it "myFLV".
You can look at the FLV and disect the actionscript. It's not too difficult. I've just set up an event listener to listen for the "End" cue point in our FLV.
Hopefully this helps.
Hey guys I know you guys are prob done with this, but i have a question.
I'm using Flash CS3 with AS3, and using .swf to stream .flv
Here is want i would like to do:
I have some video clips that i am playing in a .swf (MAIN.swf)(i am doing this via streaming .flv) and its working fine. What i would like to is have a shorter video (SMALL.swf)(which will also be a .swf via .flv) play before the MAIN.swf, and i want to rotate or change the SMALL.swf every 3 times the SMALL.swf gets played and keep the MAIN.swf constant. With a cycle of about 3 diffrent SMALL.swf's going down a list SMALL1.swf, SMALL2.swf, etc. I would, if it is an all-in-one .swf, to have a preloader. Kinda like this:
Sopiaz,
So, this is assuming you're using Flash 8 professional (which has the FLVPlayback component). I'm providing you with the FLV, FLA, and Quicktime. The FLV has already been encoded with cuePoints, but you can use the QT if you want to configure the FLV. If you already know this, skip the description:
In flash, go to "Import to Library" and choose your QT ("Test"), and click Import. A wizard will walk you through converting this to an FLV. Choose progressive download, then in the Encoding window choose the advanced options and open the Cue Points tab. In the preview box, take the playhead to the end of the movie. Click on the + sign to add a cue point. Name it "End" and set the type as "event". On the next window, because a skin probably isn't neccessary, choose "none". And Finish. The FLVPlayback should be on the stage, name it "myFLV".
You can look at the FLV and disect the actionscript. It's not too difficult. I've just set up an event listener to listen for the "End" cue point in our FLV.
Hopefully this helps.
Thanks for your zip... that worked fine.
How can this be made with Actionscript 3?
I have a flv player that requires AS3
And without using cuePoints!
There may be better ways of doing this, but this is what I find works:
Everything is nearly identical to the AS2 version in the 'test.zip', but update the code and update the components(FLVPlayback and Button) to be compatible to AS3.
Frame 1 code:
PHP Code:
function gotoFrame(event:MouseEvent):void { gotoAndPlay(2); } play_btn.addEventListener(MouseEvent.CLICK, gotoFrame); stop();
Frame 2 code:
PHP Code:
import fl.video.*; function flvComplete(event:VideoEvent):void { gotoAndStop(3); } myFLV.addEventListener(VideoEvent.COMPLETE, flvComplete); stop();
Frame 3 code is just a stop();
Try it and see if it works...let me know how it goes.
Enjoy!
well i'm afraid i'm going to burden you guys with more cue point "nonsense"....
I have a series of videos which i'd like to have some control over. They're for use at a conference. Essentially (and in pseudocode, i'm afraid) in need something like this: