|
Selteco.com > FlashDesignerZONE.com >
Tutorials > T1090
Insert YouTube in FlashHow to load and display YouTube movie in Alligator Flash Designer project.The link to the movie usually looks like this www.youtube.com/watch?v=5RFxGn6C6ak If you know the link you can easily insert the movie to your Flash animation.
If yuo want to resize the movie after it has been loaded YouTube use the following commands:
_xscale = 50; where 50 means 50% of original size. Download source project t1090.zip (5 kb)
Inserting 2 or more YouTube videosIf you place more than one YouTube video and jump between frames, the movie will not stop automatically. To prevent playing 2 or more movies at the same time you have to execute ActionScript commands to stop all videos at the beginning of each frame. Choose Frame > ActionScript and enter the code:Sprite1.stopVideo(); Sprite2.stopVideo(); Sprite3.stopVideo();where Sprite1, Sprite2 i Sprite3 are inserted YouTube videos.
How to control YouTube video in Flash projectUse the following commands (in this example the movie placeholder is Sprite1):
Sprite1.playVideo();
Sprite1.pauseVideo();
Sprite1.stopVideo();
Sprite1.destroy();
Sprite1.clearVideo();
Sprite1.seekTo(seconds:Number, allowSeekAhead:boolean);
Sprite1.mute();
Sprite1.unMute();
Sprite1.isMuted():boolean;
Sprite1.getVolume():Number;
Sprite1.setVolume(volume:Number);
Sprite1.setSize(width:Number, height:Number);
Sprite1.getVideoBytesLoaded():Number;
Sprite1.getVideoBytesTotal():Number;
Sprite1.getPlayerState():Number;
Sprite1.getCurrentTime():Number;
Sprite1.setPlaybackQuality(quality:String);
Sprite1.getPlaybackQuality():String;
Sprite1.setPlaybackQuality("small");
Sprite1.setPlaybackQuality("medium");
Sprite1.setPlaybackQuality("large");
Sprite1.setPlaybackQuality("hd720");
Sprite1.setPlaybackQuality("hd1080");
Sprite1.setPlaybackQuality("default");
Sprite1.getVideoUrl():String;
Sprite1.getDuration():Number;
Sprite1.getVideoEmbedCode():String; Download source project with YouTube controls t1090a.zip (5 kb) |
|
Products
|
Purchase
|
Downloads
|
Support
|
Flash Tutorials
|
Contact
|
Privacy Policy
|
Avoid Piracy
|
Jobs
Copyright © 1999-2011 Selteco Software, 1821 Walden Office Square, Schaumburg, IL 60173, Ph: +1-800-490-0407 |