Jump to content
Search Community

Adding skin to a video loaded with loaderMax

lanawylma test
Moderator Tag

Recommended Posts

Hi All,

 

I have simple movie that plays a video per press of the button, than upon completion has replay and close options. Everything works fine. My only question is - how do I add a skin (SkinOverPlaySeekStop.swf) to the player? I know how to do that with regular FLV playback syntax - however, don't know how to do that with loaderMax? any help would be super appreciated!! Below is the code:

 

 

import com.greensock.*;

import com.greensock.loading.VideoLoader;

import flash.display.SimpleButton;

import flash.events.MouseEvent;

 

// Close Button cross

var ButtonCloseCross:Close_cross_btn = new Close_cross_btn();

 

// last buttons

var close_btn:Close_btn = new Close_btn();

var replay_btn:Replay_btn = new Replay_btn();

 

// Video Loader

var Video_test:VideoLoader = new VideoLoader("video.f4v", {container:this, x:0, y:0});

 

// Video Complete Event Listeners

Video_test.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying);

 

// Button Close Cross EVent listner

ButtonCloseCross.addEventListener(MouseEvent.MOUSE_DOWN, closeVideo);

 

// Play Video Event Listener

play_video_btn.addEventListener(MouseEvent.MOUSE_DOWN, playVideo);

 

// Play Video

function playVideo(event:MouseEvent):void {

Video_test.load();

this.addChild(Video_test.content);

Video_test.playVideo();

addChild(ButtonCloseCross);

ButtonCloseCross.x = 753;

ButtonCloseCross.y = 4;

}

 

function donePlaying(e:Event):void {

addChild(close_btn);

addChild(replay_btn);

close_btn.x = 389.5;

close_btn.y = 164.85;

replay_btn.x = 213.5;

replay_btn.y = 164.85;

}

 

// Close Video

function closeVideo(event:MouseEvent):void {

Video_test.unload();

removeChild(ButtonCloseCross);

if(contains(close_btn)) removeChild(close_btn);

if(contains(replay_btn)) removeChild(replay_btn);

}

 

Thanks a bunch ahead of time!

 

Lana

Link to comment
Share on other sites

i believe the component skin swfs you are referring to are specifically made to work with the FLVPlayback Component.

 

don't they have to be loaded and associated with an FLVPlayback Component? how are you getting the skin into your fla?

Link to comment
Share on other sites

VideoLoader doesn't have all the extra baggage and bloat that FLVPlayback has. It's a much lower-level thing that you skin yourself. There aren't any pre-fabricated skins. It's not very difficult to do yourself, though. There's a whole tutorial about VideoLoader that uses a custom skin at:

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

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