Jump to content
Search Community

How would I load a video with controls

ngrinchenko test
Moderator Tag

Recommended Posts

I am new to using all of the GreenSock features. I am trying to figure out if it is possible and would be recommended to use Loader Max to upload a video into the flash.

Presently I am using FLV Playback feature to load up a video formatted in .flv

Is it better to use LoaderMax instead? If so how would I go around to implement video controls, such as play, stop, volume, progress bar of the video, full screen button, etc?

Link to comment
Share on other sites

Hi,

 

LoaderMax's VideoLoader is great for loading and controlling video. I've found it to be much more flexible and reliable than FLVPlayback component.

 

You will need to design your control buttons (play, pause, stop) and program them to use the handy methods that VideoLoader provides.

 

The documentation describes all the capabilities in great detail and also contains sample code for loading a video and putting play/pause toggle controls on a button.

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

 

give it a try. once you get the sample code working you should have a good idea on how to start implementing other features and of course you can post back here with specific questions.

 

You might find this tutorial on loading an image to help familiarize you with how LoaderMax works in general. A lot of the concepts are similar with the different media types:

http://www.snorkl.tv/2011/08/loading-im ... le-images/

Link to comment
Share on other sites

Thanks for your replies. I am working on implementing the "Smart AS3 Video Loading with GreenSock LoaderMax" covered on www.active.tutsplus.com

Here are a few logistics problems I run into.

Here is my present set up. I have a section on my website with a list of around 10 videos represented by the image icons.

Each video is scripted to go to a corresponding labeled section on the main time frame where FLV Playback component would be implemented.

 

When I am implementing "Smart AS3 Video Loading with GreenSock LoaderMax" what should be my desirable set up?

Do I keep braking the main timeline into labeled sections for each video and implementing the AS3 Video Loading with GreenSock LoaderMax code on every single labeled section, essentially ending up having around 10 (by the number of my videos) different Video Loaders?

 

Is it better to put the entire video loader coding directly on the main time line or call it in via LoaderMax as a single .swf file?

 

If I have 10 different video buttons/links and each one of them has to open a corresponding video how would I use the next/prev feature in the video loader. Does it mean that for every single video I have to create a unique XML file where that video is in the number one position and the rest is arranged accordingly?

Link to comment
Share on other sites

No, you don't need to create a label on the timeline for each video, nor should you use FLVPlayback components (that's very bloated by comparison). Typically it is best to have everything run by code on a single frame of your FLA. Just use ActionScript to do whatever you need to do (show/hide various videos, buttons, etc.). You don't need to create an XML file for each video - you can use a single XML file or none at all. It's a very flexible system. But judging by your questions, it sounds like this might be a daunting project for you and you could benefit from hiring a professional developer to help out with it. Unfortunately I don't have time to walk you through all the steps but hopefully the tutorials get you going in the right direction.

Link to comment
Share on other sites

Thanks for your answer. Yes, you are correct that I am novice at coding. However this is how I got to where I am by trying to jump over my head.

I was able to get some help at adobe forums with creating the code on two labeled sections and using the "var sourceVar:String;"

Frame with Adobe FLVideo component is called "flv_pb" All the videos are just being refreshed in this frame's FLV.

 

----------------------------------------------------------------------------------------------------

 

BUTTON1:

var sourceVar:String;

function JTV_LampShade_btn_amimated_btnDown(event:MouseEvent):void {

sourceVar="howto_popups/jtvs10w07.flv";

gotoAndPlay("flv_pb");

}

 

 

BUTTON2:

function JTV_SubRose_btn_amimated_btnDown(event:MouseEvent):void {

sourceVar="howto_popups/jtvs11w06.flv";

gotoAndPlay("flv_pb");

}

 

//Then in "flv_pb" frame I have this code:

 

 

SWF_flv2.source=sourceVar;

 

----------------------------------------------------------------------------------------------------

 

I tested it and it works. I was able to do it.

 

Is it much more complicated with the GreenSock LoaderMax?

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...