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?
Printable View
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?
Event cuepoint at the end, on event load movieNum
hope that works, please let me know.
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();
thanks man. :D
the cue point is type event;
name on the cue point: open_me
parameters for the cuepoint: name: open_me value: open_me
your script then on the frame that holds the FLV;
var introListener:Object = new Object();
introListener.cuePoint = function(eventObject:Object):Void {
if (eventObject.info.name == "loadSquare") {
gotoAndPlay("loadOther");
}
};
open_me.addEventListener("cuePoint", introListener);
stop();
then it should go to a frame label : loadOther
?
that gotoandPlay / stop on the timeline works.
I investigating how to LoadMovie, but I would like to
this.attachMovieClip ( or something..
I do have movies that I have to make Cuepoints on, Events, then load/unload a text on the events.
:smoov:
later man.
Your code for the first reply would be:
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;
Once it reaches cuepoint "end" it should go to the frame labeled "loadOther"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();
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.
yes, I testet this and have a solution:
- 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
:D
can you send me the flash file with the flv files so i can see this in flash?? thanks, I am having problems and need to fumble a little with the fla
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.
I am pretty good with working with video in flash, so the import is no problem.
thanks i will give it a shot!
solved
solved
not the parameters..
stupid me.. it was the instance name of the video holder..
this laste line:
myFlv.addEventListener("cuePoint", flvListener);
myFlv is the name of the instace name of the video, then its al sweet
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:
Page loads...
Preload....
SMALL1.swf...plays....MAIN.swf.....done.
Page loads...
Preload....
SMALL1.swf...plays....MAIN.swf.....done.
Page loads...
Preload....
SMALL1.swf...plays....MAIN.swf.....done.
Page loads...
Preload....
SMALL2.swf...plays....MAIN.swf.....done.
Page loads...
Preload....
SMALL2.swf...plays....MAIN.swf.....done.
Page loads...
Preload....
SMALL2.swf...plays....MAIN.swf.....done.
Page loads...
Preload....
SMALL3.swf...plays....MAIN.swf.....done.
etc.....
I'm pretty sure you have to store a varible somewhere, somehow to keep up with the loads.
I'm not sure where to begin with this, Im not the best at AS...so any code you can give me would be awesome. Thanks
Would there be anything specail you would have to do if you wanted to play another .flv after the first one?
Hi how would I get this to work in AS3???
Thanks for your zip... that worked fine.Quote:
Originally Posted by caroach
How can this be made with Actionscript 3?
I have a flv player that requires AS3
Thanks :)
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:
Frame 2 code:PHP Code:function gotoFrame(event:MouseEvent):void {
gotoAndPlay(2);
}
play_btn.addEventListener(MouseEvent.CLICK, gotoFrame);
stop();
Frame 3 code is just a stop();PHP Code:import fl.video.*;
function flvComplete(event:VideoEvent):void {
gotoAndStop(3);
}
myFLV.addEventListener(VideoEvent.COMPLETE, flvComplete);
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:
videoInstance.addEventListener(Event.cuepointReach ed, doAction);
function doAction(evt:Event):void{
videoInstance.pause();
addEventListener(MouseEvent.CLICK, playNow);
}
function playNow(evt:MouseEvent):void{
videoInstance.Play;
}
the trouble is i have no idea what the proper event to listen for is. The videos are not dynamically loaded - they're in movieClips.
Any ideas??
Sorry for the poor grammar etc, i'm frazzled...:zzz: