Jump to content
Search Community

Loading a single flv from an Array

Lightbulb test
Moderator Tag

Recommended Posts

Hi. I've been using the extreemly awesome TweenMax class like a maniac, so now I feagured I wanted to try out the LoaderMax class.

Please understand I'm a AS3 newb, missing some basics yet. :mrgreen:

 

In a new project of mine, I want to make a showreel DVD. The DVD will contain 6 videos, each to be loaded once a button is clicked and a animation has finished playing. I feagured to use an Array, so I can preload the videos before they get added? [button click]. The videos will be running directly from the DVD.

 

With Netstream I would go about it like this, I think:

TweenMax Animation plays and triggers onComplete
TweenLite.to(mc, 1.5, {x:100, ease:Elastic.easeOut, delay:0.5, onComplete:myFunction});
function myFunction():void {
   myvideo.play(myvideoarray[3]);
}

 

I'm currently studying the GetLoader_Video file to learn some more. Could any of you give me a push in the right direction how I should go about this? Do I even need them toi load when streaming from a DVD?

 

 

Cheers

Link to comment
Share on other sites

The code you showed is a bit lacking, so there isn't a whole lot to offer advice on.

 

 

What you want to do is create a VideoLoader that points to the location of your video file. ( i have never tried loading off of a dvd )

if it is a single video file, there is no need for an array or a LoaderMax. A single VideoLoader will handle it just fine.

http://www.greensock.com/as/docs/tween/ ... -list.html

 

 

If you are loading multiple videos, you could:

 

1: append VideoLoaders to a LoaderMax

http://www.greensock.com/as/docs/tween/ ... erMax.html

 

2: create an array of video urls and throw it into LoaderMax's parse method:

http://www.greensock.com/as/docs/tween/ ... tml#parse()

 

3: keep all of your video urls in an external xml file and once the xml is loaded all the videos will start loading using XMLLoader:

http://www.greensock.com/as/docs/tween/ ... oader.html

 

 

LoaderMax is very powerful and offers a lot of features, with that though there is a bit of study time involved at the beginning.

 

 

When learning LoaderMax, I found this tutorial very very helpful as it covers a large percentage of what you will need LoaderMax to do when working with video.

http://active.tutsplus.com/tutorials/ac ... e-premium/

 

I would strongly recommend starting small with one VideoLoader and get it to work as you need, then look into adding multiple VideoLoaders to a LoaderMax.

 

Once you get some code working, feel free to come back with questions.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...