flash video player



import fl.video.*;

var myVideo:FLVPlayback = new FLVPlayback();
myVideo.width = 720;
myVideo.height = 480;
myVideo.source = "video.flv";
myVideo.skin = "SkinOverAll.swf";
myVideo.skinBackgroundColor = 0x000000;
myVideo.skinBackgroundAlpha = 0.3;
myVideo.skinAutoHide = true;

myVideo.addEventListener(VideoEvent.COMPLETE, completePlay);
function completePlay(e:VideoEvent):void {

myVideo.play();

}

addChild(myVideo);

youtube player











var so = new SWFObject('player.swf','ply','480','270','9','#');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addVariable('playlistfile','http://gdata.youtube.com/feeds/api/playlists/4705506A8FAF8B01?v=2');
so.addVariable('playlistsize', '150');
so.addVariable('playlist','right');
so.addVariable('repeat','always');
so.addVariable('shuffle','true');
so.write('mediaspace');

Percent %



var text1;
calculate_btn.addEventListener(MouseEvent.CLICK, onButtonClicked);
function onButtonClicked(e:MouseEvent):void
{
text1 = (int(amount_txt.text) * int(perc_txt.text) / 100 );
answer_txt.text = text1;

}

clickTAG

import flash.display.LoaderInfo;
import flash.events.MouseEvent;

click_btn.addEventListener(MouseEvent.CLICK, onButtonClicked);
function onButtonClicked(e:MouseEvent) :void {
if (root.loaderInfo.parameters.clickTAG.substr(0, 5) == "http:")
{
navigateToURL(new URLRequest(LoaderInfo(root.loaderInfo).parameters.clickTAG), "_blank");
}
}