Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0

Reply
 
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Old 12-13-2006, 04:48 PM   #1
Lostin ActionScript
Registered User
 
Join Date: Dec 2006
Posts: 1
Default script to identify when FLV movie complete and goto Scene ...

I am no Action Script expert!
Would greatly appreciate anyhelp to below:

We have craeted a viral video.

I converted raw video to an FLV file and created a swf playing file which progressively streams the FLV file.

At end of video I just want to have a final screen that shows some animated text. How is this done?!

That is my confusion. In the swf playing file (that “calls” FLV file) can one program an Action Script that identifies when video has stopped playing and then move to say Scene 2, Frame 1 to play animated text?

Much appreciated!
Lostin ActionScript is offline   Reply With Quote
Old 12-13-2006, 05:40 PM   #2
rondog
ActiveDen.net/user/rondog
 
rondog's Avatar
 
Join Date: May 2006
Location: San Diego
Posts: 579
Default

you can make your video on frame 1 and add a stop command to that frame then add a second keyframe. I did something similair, however I used a netstream connection and after it was done playing it forwarded to a url..heres one that will go to frame2..hope that helps

ActionScript Code:
var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); vidPlayer.attachVideo(ns); ns.play("mayor.flv"); ns.onStatus = function (infoObject:Object) {     if (infoObject.code == "NetStream.Play.Stop")   {         gotoAndStop(2);     } };

Last edited by rondog; 12-13-2006 at 05:44 PM.
rondog is offline   Reply With Quote
Old 04-11-2007, 05:43 PM   #3
ladyb314
Lady B. Productions
 
Join Date: Dec 2005
Location: Fort Lauderdale, FL
Posts: 44
Send a message via AIM to ladyb314 Send a message via Yahoo to ladyb314
Red face Having trouble with your code

I am having trouble using the code you've posted here. Hopefully you will see this as I know that post was from a while back. Here is my code. What do you think i am doing wrong?

ActionScript Code:
import mx.video.*; var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); ns.setBufferTime(5); vidDisplay.attachVideo(ns); ns.play("clips/Legal_End_of_show.flv"); ns.onStatus = function (infoObject:Object) {     if (infoObject.code == "NetStream.Play.Stop")   {         trace("video finished");     } };

I don't get a trace when the video is complete. Any help would be greatly appreciated!
Thanks
ladyb314 is offline   Reply With Quote
Old 04-11-2007, 08:13 PM   #4
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Howdy and Welcome...

What do you get when you trace the value of the infoObjec.code???
ActionScript Code:
ns.onStatus = function (infoObject:Object) {     trace("infoObject.code = " + infoObject.code);     if (infoObject.code == "NetStream.Play.Stop")   {         trace("video finished");     } };
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 04-13-2007, 07:53 PM   #5
ladyb314
Lady B. Productions
 
Join Date: Dec 2005
Location: Fort Lauderdale, FL
Posts: 44
Send a message via AIM to ladyb314 Send a message via Yahoo to ladyb314
Default

I get NetStream.Buffer.Empty at the end of the video which is what I am currently using to call the next video. Unfortunately this triggers the next video a tad bit early. I never get the code NetStream.Play.Stop.
ladyb314 is offline   Reply With Quote
Old 04-16-2007, 07:48 PM   #6
Hollywood_Dave
Senior Member
 
Join Date: Mar 2001
Posts: 150
Default

Interesting. Mr. Wicked's code got me close to what I was wanting. But something doesn't seem to be working right for me.

I have two progressive download movies. One on keyframe 1. One on keyframe 2.

I plugged the code in and it plays the first, then the second.

But...for some reason there seems to be 2 versions of keyframe 1 movie's audio running, creating an echo effect. Just for test purposes, I went into frame 1 and deleted the FLV instance and tested it. The movie was no longer there, but the sound was (the additional audio version which was creating the eecho).

Is something in that code creating a duplicate of the audio and playing it parrallel to the movie?
__________________
-----------------------------------
"Show me a man that doesn't know which side his bread is buttered on, and I'll show you a slippery sandwich."

- Unknown
Hollywood_Dave is offline   Reply With Quote
Old 04-23-2007, 01:43 PM   #7
gristy
Registered User
 
Join Date: Apr 2005
Posts: 30
Default

Quote:
Originally Posted by Hollywood_Dave View Post
Interesting. Mr. Wicked's code got me close to what I was wanting. But something doesn't seem to be working right for me.

I have two progressive download movies. One on keyframe 1. One on keyframe 2.

I plugged the code in and it plays the first, then the second.

But...for some reason there seems to be 2 versions of keyframe 1 movie's audio running, creating an echo effect. Just for test purposes, I went into frame 1 and deleted the FLV instance and tested it. The movie was no longer there, but the sound was (the additional audio version which was creating the eecho).

Is something in that code creating a duplicate of the audio and playing it parrallel to the movie?
Yes, I have the same problem.
I feel as if it may have something to do with the fact that my video component exists on stage and the NetStream script just duplicates what this is supposed to be doing somehow?
gristy is offline   Reply With Quote
Old 05-01-2007, 10:36 PM   #8
Hollywood_Dave
Senior Member
 
Join Date: Mar 2001
Posts: 150
Default

Gristy, you didn't happen to find a solution, did you? I'm still at a wall with this thing.
__________________
-----------------------------------
"Show me a man that doesn't know which side his bread is buttered on, and I'll show you a slippery sandwich."

- Unknown
Hollywood_Dave is offline   Reply With Quote
Old 05-02-2007, 12:50 AM   #9
Hollywood_Dave
Senior Member
 
Join Date: Mar 2001
Posts: 150
Default

Well, not sure how many people are even reading this thread, but I figured out what I was doing wrong.

I was using this code, which worked fine:

Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
vidPlayer.attachVideo(ns);
ns.play("movie1.flv");

ns.onStatus = function (infoObject:Object) {
    if (infoObject.code == "NetStream.Play.Stop")   {
        gotoAndStop(2);
    }
};
stop();
I won't go into what I was doing wrong, but what I needed to do after placing this code in Frame 1 was go to the Library of this FLA, choose 'New Video, drag that video object in the Library to the stage, give it the instance name 'vidPlayer' and boom! Everything worked fine. It went on to Frame 2 after playing movie1.flv . I placed the same code in Frame 2 (this time for movie2.flv) and changed the code to 'gotoAndStop(3)' and so on and so on. Now it plays all my movies one after another.

Thanks to mrwicked for pointing me in the right direction.
__________________
-----------------------------------
"Show me a man that doesn't know which side his bread is buttered on, and I'll show you a slippery sandwich."

- Unknown
Hollywood_Dave is offline   Reply With Quote
Old 05-15-2007, 02:23 PM   #10
3pepe3
;)
 
3pepe3's Avatar
 
Join Date: Aug 2006
Location: In transit--- Still bored
Posts: 1,739
Default

mmhhhhhhhhhhh... i have a problem i ear the music but not the video ussing this code :/
somebody knows why is this?
__________________
http://www.pepemagana.com
3pepe3 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:29 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.