FORUMS: list search recent posts

New Flash Tutorial - Simple Multi-Video Player in AS2

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Creative COW
New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 6, 2009 at 3:54:35 pm

Adobe Flash
Simple Multi-Video Player in AS2Simple Multi-Video Player in AS2

In this video tutorial, Creative Cow leader Tony Ross demonstrates how to create a simple multi-video player in Flash using Actionscript 2. Also learn to have several videos use a single flv player.

Tutorial, Video Tutorial   02/05/2009
Author: Tony Ross


http://library.creativecow.net/tutorials/adobeflash


Return to posts index

Adam Figueira
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 8, 2009 at 4:14:47 am

Tony,

Great tutorial. I think I followed your steps, but for some reason all my video files are playing simultaneously. I can only see one of them, but I can hear all of them. Do you have any idea what I did wrong?



Return to posts index

Tony Ross
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 9, 2009 at 4:39:11 pm

Hey Adam-
Perhaps you imported all 3 flvs? If so, you only need to import 1, the buttons call the others from the folder via actionscript. If you are still having issues, post the actionscript you have.

Thanks Tony

keep it simple, make it perfect…


Return to posts index


Adam Figueira
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 9, 2009 at 11:58:16 pm

Well, that was a problem. I'm not hearing them all anymore, but my buttons don't work now. Here's my actionscript:

play01_btn.onRelease = function(){
vidPlayer.contentPath ="01.flv";
}
play02_btn.onRelease = function(){
vidPlayer.contentPath ="02.flv";
}
play03_btn.onRelease = function(){
vidPlayer.contentPath ="03.flv";
}
play04_btn.onRelease = function(){
vidPlayer.contentPath ="04.flv";
}
play05_btn.onRelease = function(){
vidPlayer.contentPath ="05.flv";
}
play06_btn.onRelease = function(){
vidPlayer.contentPath ="06.flv";
}

I used different names than you, and more buttons, but it should still work, shouldn't it?



Return to posts index

Tony Ross
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 10, 2009 at 12:45:04 pm

OK, This looks good. So, the next question is, "is the fla you are working on in the same directory/folder as the flvs? According to your script, it has to be.

Is everything named correctly so instance names match your script?

keep it simple, make it perfect…


Return to posts index

Adam Figueira
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 10, 2009 at 1:57:35 pm

Yes, they are in the same folder. I copied and pasted the content path just like you said.



Return to posts index


Tony Ross
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 10, 2009 at 4:10:57 pm

Can you zip your fla and send it to me? Don't worry about the flvs.
Send it to classes[at]tonyteach.com
Thanks Tony

keep it simple, make it perfect…


Return to posts index

Tony Ross
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 11, 2009 at 1:24:39 pm

Hey Adam-
I hadn't seen anything yet. Were you able to email that? or you cn ftp it to me. Unless you've solved your issue, in that case, congrts!

Tony

keep it simple, make it perfect…


Return to posts index

Rune Pedersen
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 11, 2009 at 3:22:36 pm

Hi Tony.

Maybe this is the correct thread, maybe not, but here goes.!

It has been about 6 years since I've worked with Flash, and now I'm tryin' to keep up. My problem is somewhat similar to what Adam described. I have only one .flv file playing on my site, and it plays fine. But when I navigate further on, the .flv file doesn't stop playing. I can still hear the audio rambling on in the background. And when I click back to the page where the .flvplayer is, it begins playing on top of the already playing .flv-file.

You can see my site here:
http://www.greenfeeguide.com/HTML/Testsite.html

And my actionscript looks like this:
Home_B.addEventListener(MouseEvent.CLICK, link1);
Demo_B.addEventListener(MouseEvent.CLICK, link2);
Koncept_B.addEventListener(MouseEvent.CLICK, link3);
Benefit_B.addEventListener(MouseEvent.CLICK, link4);
About_B.addEventListener(MouseEvent.CLICK, link5);

function link1(e:MouseEvent):void {
gotoAndStop(1);
}

function link2(e:MouseEvent):void {
gotoAndStop(5);
}

function link3(e:MouseEvent):void {
gotoAndStop(10);
}

function link4(e:MouseEvent):void {
gotoAndStop(15);
}

function link5(e:MouseEvent):void {
gotoAndStop(20);
}


My simple guess is that I need to assign an action to my buttons, telling them to stop the .flv file on release, or something like that. But as I wrote earlier. My Flash-skills are pretty outdated. ;-)

I hope you're able to help me with this, or guide me further on.!

Rune
(A danish novice.!)



Return to posts index


Adam Figueira
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 12, 2009 at 3:18:44 am

Sorry, Tony.

I sent it off last night. I'll try to send it again in a few minutes when I can get to the computer it's on.



Return to posts index

Adam Figueira
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 12, 2009 at 3:53:06 am

I just sent it again, Tony. Hope it works this time.

Thanks so much for your help.

Adam



Return to posts index

Tony Ross
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 13, 2009 at 12:25:41 am

Adam
I found the problem. Everything is named correctly, your buttons however are built incorrectly. You had buttons placed inside of your buttons. I made a quick Jing to show you the correction:
http://www.tonyteach.com/jing/adam_video.swf

keep it simple, make it perfect…


Return to posts index


Adam Figueira
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 13, 2009 at 4:26:12 am

Thanks a million, Tony. I'm quite a Flash novice, so I didn't even realize what I did, why it was a problem, or how to detect/solve it. I get it now.

Thanks again,

Adam



Return to posts index

Michael Belanger
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Feb 13, 2009 at 4:20:34 pm

Yes this tutorial is quite good indeed especially for newbies and those of us in AS2 for now.
I will throw you this one tough (maybe) question. I have a flash page where I have four buttons representing 4 demo videos. They are buttons with instances and I need to have each play the correct video HOWEVER I would prefer to have the videos come into frame kinda like flowplayer...dissolve on and start playing but with some controls. Can I do this with 4 separate SWF files each having controls and then make each button trigger those swfs to play OR is there some more sophisticated way to do this? I need to do this in AS 2 . I guess the point is that I don't want to have a box area where the videos play like your tutorial. Any suggestions with script would be great.

Mike B
Dandelion Picture&Sound
Toronto Canada
http://www.dandelionediting.com



Return to posts index

terry brown
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Mar 11, 2009 at 4:55:41 am

Hi Tony,
I'm having trouble as well. Instead of numbers, I kept the 'proper names' on my flvs, could that be the problem? My buttons aren't working.



Return to posts index


Tony Ross
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Mar 11, 2009 at 1:00:58 pm

Hey Terry-
If you typed:

play01_btn.onRelease = function(){
vidPlayer.contentPath ="01.flv";
}

but you have the flv called anything other than "01.flv" that would be a problem.
Keep your flv names simple (I would go with one word), and make sure the button is calling for that name. Does that make sense?

Hope this helps.

Thanks Tony

keep it simple, make it perfect…


Return to posts index

Terry Brown
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Mar 11, 2009 at 3:11:42 pm

Seems I can get the first flv to load if I give it a URL on video import (http://domain/FLAS/flv) but the other flvs won't load when using the buttons.



UPDATE: I managed to get it to work on my computer but mot from the server.


Return to posts index

Terry Brown
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Mar 11, 2009 at 3:52:33 pm

Is the problem that the flvs are in a subfolder (FLAS/fls)?



Return to posts index

Tony Ross
Re: New Flash Tutorial - Simple Multi-Video Player in AS2
on Mar 11, 2009 at 7:03:18 pm

Yes, you have to tell the buttons the path you want them to use for each flv.

-Thanks Tony

keep it simple, make it perfect…


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]