-
YouTube style play button?
Hi, I just upgraded to KM v7 and hoped to find an option to add a YouTube style translucent play button on my video. I'm new to action scripting and have been searching these forums with no luck. Any help would be great! Thanks
-
Actually there is an arrow button similar to the YouTube button in the navigation folder. Button colors can be changed - both in the up and over position. You can swap out the oval background with a rounded rectangle background. And you can also control opacity of the button using the opacity slider control in the color selection module.
You can place the button over an image of the video in its video frame that will load your video to play. All this can be done without action script.
-
KoolMoves Moderator
You probably do need to use ActionScripting for this. However the best bet would be to make a new skin.
Soon as I can find the Skin API again, I'll look at doing one.
-
Yeah, a video media player skin with a super imposed play button that disappears after clicking on it would be excellent. I'm trying to add one to the TinyVid skin but I'm in unfamiliar territory. I did find a tutorial on the net with an action script snippet but it didn't work with Koolmoves. A step-by-step tutorial or a ready made skin for doing this in Koolmoves would be very Kool!
-
-
up to my .as in code
With Actionscript
http://krazyaboutpizza.co.uk/KM7/YouTubeLikeFLV.html
I just wanted a reason to play with TweenMax (thanks Bob!)
-
Thanks for the source file Phil. That was helpful. I got my video to play using the button but the movie will not return to the start button frame after it's finished. I guess I need a way to detect the end of the .flv and direct it back to the first frame. I'm doing some research but so far I haven't found anything.
-
All depends on how you intend to set up your movies. Without Actionscript abilities I am always looking for workarounds and depend heavily on the people here.
My simple workaround for the issue you mention is to place a transparent button over the entire movie. Just click on the movie and it takes you back home.
http://www.michianaworldwide.com/KM/...he-jungle.html
-
Just in case someone is interesed in how an additional self made play button named myButton placed on top of a media player named mediaplayer1 can be connected with the media player
Code:
myButton.addEventListener('click', myButtonClick);
mediaplayer1.addEventListener('playlistSet', mpPlaylistSet);
mediaplayer1.addEventListener('itemComplete', mpItemComplete);
mediaplayer1.btnPlay.addEventListener('click', mpBtnPlayClick);
mediaplayer1.btnStop.addEventListener('click', mpBtnStopClick);
function myButtonClick(e:Event):void {
mediaplayer1.play();
myButton.visible = false;
}
function mpPlaylistSet(e:Event):void {
mediaplayer1.playlistOptions.pause = 'before';
mediaplayer1.pause();
}
function mpItemComplete(e:Event):void {
myButton.visible = true;
}
function mpBtnPlayClick(e:Event):void {
myButton.visible = false;
}
function mpBtnStopClick(e:Event):void {
myButton.visible = true;
}
mpPlaylistSet(null);
-
I placed a button named myButton on top of my mediaplayer1 and added the above code to the button Action Script Editor and I get the ERROR MESSAGE...
Line 1: myButton.addEventListener(', myButtonClick);
expecting a mouse event statement
-
Since you mentioned you upgraded to KM7, I was under the impression you wanted to use ActionScript 3. In the ActionScript Editor window you can set what version you want to use. The code I gave is ActionScript 3 code and requires the editor to be set on AS3 (this also means the export will target Flash Player 9).
Edit:
I see your line also misses a part ( 'click' ).
-
Ah! now we're getting somewhere. I needed to set KoolMoves export settings to AS3 and now it kinda works...I get sound but no video unless I hit pause and then nudge the time slider a bit. Even without the button I get the same result. Is this some kind of bug?
-
There's not a bug I am aware of but of course it's possible.
In this case however you are giving not enough information to help out. A few things that are important for example are the codec used to encode the video file and if you are trying things out locally or from the net.
-
The code works all right.
-
So far I've only tested locally. I'll try some different things and see what happens. Thank you all very much for your help!
-
Chris, is this a single- or multiple-frame swf? I'm having a tough time getting the first frame of the referenced playlist item to load. Sure it's an operator error problem on my end.
Thanks for the info!
Mary
Originally Posted by Chris_Seahorn
-
up to my .as in code
Surprised the krazyaboutpizza domain is still chugging. Hate having those old references floating around
I posted the source in our Codex Source Code section (KM7/AS3). Mine requires the Tweenmax classes be installed btw.
http://www.km-codex.com/?page_id=85
-
Thanks for the help, Chris! And, especially, thanks for helping those poor mugs like me who feel like babes amongst the elders here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|