webqaflash
Enthusiast
webqaflash
Enthusiast
Activity
‎Sep 17, 2010
03:23 AM
I don't what happened but the video is playing perfectly. All I did is just login to the Flash Media Server and just looks what is happening while calling the video. On the first i noticed that the requested videostream is serving as livestream. After some times it automatically works.
... View more
‎Sep 08, 2010
09:34 PM
Hi kglad, I have tried that option also. When i tested by installing FMS in my own system it works.(with and without .flv extension) But when I connected to my live server the video not appearing. ie; I am able to connect to server and got netstream o/p as below. NetStream.Play.Reset NetStream.Play.Start One more thing When I uses the FLVPlayback component, there is no problem. The video working fine. regards Sooraj
... View more
‎Sep 08, 2010
02:28 AM
import flash.media.Video; var videoBox:MovieClip = player_mc; var sidebarBox:MovieClip = rightSidebar_mc; ////// VIDEO MOVIE CLIPS ////// var playBtn:MovieClip = player_mc.playBtn_mc; var pauseBtn:MovieClip = player_mc.pauseBtn_mc; var stopBtn:MovieClip = player_mc.stopBtn_mc; var videoBlackBox:MovieClip = player_mc.videoBlackBox_mc; var videoPreloader:MovieClip = player_mc.videoPreloader_mc; //var videoTitleTxt:TextField = player_mc.VideoTitle_txt; var videoTimeTxt:TextField = player_mc.videoTime_txt; var videoThumb:MovieClip = player_mc.videoTrack_mc.videoThumb_mc; var videoTrackProgress:MovieClip = player_mc.videoTrack_mc.videoTrackProgress_mc; var videoTrackDownload:MovieClip = player_mc.videoTrack_mc.videoTrackDownload_mc; var volumeThumb:MovieClip = player_mc.volumeSlider_mc.volumeThumb_mc; var volumeTrack:MovieClip = player_mc.volumeSlider_mc.volumeTrackFull_mc; ////// VIDEO VARS ////// var currentVideo:String; var videoWidth:Number = 500; var videoHeight:Number = 400; var videoInterval:int; var amountLoaded:Number; var duration:Number; var scrubInterval; var videoSound:SoundTransform; var volumeBounds:Rectangle; ////// VIDEO CODE ////// var video:Video = new Video(videoWidth, videoHeight); video.x = 0; video.y = 0; var nc:NetConnection = new NetConnection(); var ns:NetStream; var newMeta:Object = new Object(); ////// FILE STARTUP ////// videoPreloader.visible = false; //videoTitleTxt.text = ""; videoTimeTxt.text = "0:00 / 0:00"; playBtn.mouseChildren = false; playBtn.buttonMode = true; pauseBtn.mouseChildren = false; pauseBtn.buttonMode = true; stopBtn.mouseChildren = false; stopBtn.buttonMode = true; videoThumb.mouseChildren = false; videoThumb.buttonMode = true; volumeThumb.mouseChildren = false; volumeThumb.buttonMode = true; ////// SET STAGE ////// videoSound = new SoundTransform(); videoSound.volume = 1; ////// VIDEO EVENT LISTENERS ////// playBtn.addEventListener(MouseEvent.MOUSE_OVER, btnOver); playBtn.addEventListener(MouseEvent.MOUSE_OUT, btnOut); playBtn.addEventListener(MouseEvent.CLICK, playBtnClick); pauseBtn.addEventListener(MouseEvent.MOUSE_OVER, btnOver); pauseBtn.addEventListener(MouseEvent.MOUSE_OUT, btnOut); pauseBtn.addEventListener(MouseEvent.CLICK, pauseBtnClick); stopBtn.addEventListener(MouseEvent.MOUSE_OVER, btnOver); stopBtn.addEventListener(MouseEvent.MOUSE_OUT, btnOut); stopBtn.addEventListener(MouseEvent.CLICK, stopBtnClick); videoThumb.addEventListener(MouseEvent.MOUSE_OVER, btnOver); videoThumb.addEventListener(MouseEvent.MOUSE_OUT, btnOut); videoThumb.addEventListener(MouseEvent.MOUSE_DOWN, videoScrubberDown); volumeThumb.addEventListener(MouseEvent.MOUSE_OVER, btnOver); volumeThumb.addEventListener(MouseEvent.MOUSE_OUT, btnOut); volumeThumb.addEventListener(MouseEvent.MOUSE_DOWN, volumeScrubberDown); var selectedVideo:String = "sample"; connect(); function netStatusHandler(event:NetStatusEvent) { trace(event.info.code) if (event.info.code == "NetConnection.Connect.Success") { addNetStream(selectedVideo); trace(selectedVideo) } } var tmrDisplay:Timer; var customClient:Object = new Object(); customClient.onMetaData = metaDataHandler; function addNetStream(videoName:String){ ns = new NetStream(nc); ns.play(videoName); video.attachNetStream(ns); ns.bufferTime = 10; ns.soundTransform = videoSound; videoBlackBox.addChild(video); videoInterval = setInterval(videoStatus, 100); ns.addEventListener(NetStatusEvent.NET_STATUS, myStatusHandler); ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); ns.client = customClient; } function connect() { trace("connect") NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0; nc = new NetConnection(); nc.client = this; nc.objectEncoding = flash.net.ObjectEncoding.AMF0; nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); nc.connect("rtmp://mysite/vod/media/"); } function asyncErrorHandler(Event:AsyncErrorEvent):void { trace(Event); } function myStatusHandler(event:NetStatusEvent):void { trace("myStatusHandler :"+event.info.code); switch (event.info.code) { case "NetStream.Buffer.Full" : ns.bufferTime = 10; Tweener.addTween(videoPreloader, {alpha:0, time:.3}); break; case "NetStream.Buffer.Empty" : ns.bufferTime = 10; Tweener.addTween(videoPreloader, {alpha:1, time:.3}); break; case "NetStream.Play.Start" : trace("myStatusHandler :"+event.info.details); ns.bufferTime = 10; Tweener.addTween(videoPreloader, {alpha:1, time:.3}); break; case "NetStream.Seek.Notify" : ns.bufferTime = 10; Tweener.addTween(videoPreloader, {alpha:1, time:.3}); break; case "NetStream.Seek.InvalidTime" : ns.bufferTime = 10; Tweener.addTween(videoPreloader, {alpha:1, time:.3}); break; case "NetConnection.Connect.Failed" : trace("Connection failed"); case "NetStream.Play.Stop" : Tweener.addTween(videoPreloader, {alpha:0, time:.3}); ns.pause(); ns.seek(1); break; } } function onMetaData(newMeta:Object):void { trace("Metadata: duration=" + newMeta.duration + " width=" + newMeta.width + " height=" + newMeta.height + " framerate=" + newMeta.framerate); duration = newMeta.duration; } function onBWDone(... rest):Boolean { trace("bvbvb"+rest.width) nc.client = onMetaData; return true; } // NetConnection.onBWCheck handler function onBWCheck(... rest):Number { return 0; } function metaDataHandler(newMeta:Object):void { duration = newMeta.duration; stage.addEventListener(Event.ENTER_FRAME, videoTimeEnterFrame); // runs this function every time we enter a new frame } function playBtnClick(event:MouseEvent):void { ns.resume(); } function pauseBtnClick(event:MouseEvent):void { ns.pause(); } function stopBtnClick(event:MouseEvent):void { ns.pause(); ns.seek(0); } ////// VOLUME SCRUBBER ////// function volumeScrubberDown(event:MouseEvent):void { volumeBounds = new Rectangle(0,0,75,0); volumeThumb.startDrag(false, volumeBounds); stage.addEventListener(MouseEvent.MOUSE_UP, volumeThumbUp); stage.addEventListener(MouseEvent.MOUSE_MOVE, volumeThumbMove); } function volumeThumbUp(event:MouseEvent):void { volumeThumb.stopDrag(); stage.removeEventListener(MouseEvent.MOUSE_UP, volumeThumbUp); stage.removeEventListener(MouseEvent.MOUSE_MOVE, volumeThumbMove); } function volumeThumbMove(event:MouseEvent):void { volumeTrack.width = volumeThumb.x; videoSound.volume = (volumeThumb.x) / 50; ns.soundTransform = videoSound; } var videoLength:int = player_mc.videoTrack_mc.width - videoThumb.width; ////// TIMELINE SCRUBBER ////// function videoStatus():void { videoThumb.x = ns.time / duration * 240; videoTrackProgress.width = videoThumb.x; } function videoScrubberDown(event:MouseEvent):void { var bounds:Rectangle = new Rectangle(0,0,240,0); clearInterval(videoInterval); scrubInterval = setInterval(scrubTimeline, 10); videoThumb.startDrag(false, bounds); stage.addEventListener(MouseEvent.MOUSE_UP, stopScrubbingVideo); } function scrubTimeline():void { ns.seek(Math.floor((videoThumb.x / 240) * duration)); //ns.seek(Math.floor((videoThumb.x / 240) * ns.time)); } function stopScrubbingVideo(Event:MouseEvent):void { stage.removeEventListener(MouseEvent.MOUSE_UP, stopScrubbingVideo); clearInterval(scrubInterval); videoInterval = setInterval(videoStatus, 100); videoThumb.stopDrag(); } ////// BTN OVER & OUT FUNCTIONS ////// function btnOver(event:MouseEvent):void { event.currentTarget.gotoAndPlay("over"); } function btnOut(event:MouseEvent):void { event.currentTarget.gotoAndPlay("out"); } player_mc.btnFullscreenOn.addEventListener(MouseEvent.CLICK, fullscreenOnClicked); player_mc.btnFullscreenOff.addEventListener(MouseEvent.CLICK, fullscreenOffClicked); function videoTimeEnterFrame(event:Event):void { var totalSeconds:Number = ns.time; // variable to hold the ns.time var totalSeconds2:Number = duration; // variable to hold the duration var minutes:Number = Math.floor(totalSeconds / 60); // variable to hold the rounded down totalSeconds divided by 60 var minutes2:Number = Math.floor(totalSeconds2 / 60); // variable to hold the rounded down totalSeconds2 divided by 60 var seconds = Math.floor(totalSeconds) % 60; // variable to get 60 percent of the totalSeconds var seconds2 = Math.floor(totalSeconds2) % 60; // variable to get 60 percent of the totalSecond2 if(seconds < 10) // if the seconds variable is less than 10 then... { seconds = "0" + seconds; // the seconds variable is equal to 0:seconds } if(seconds2 < 10) // if the seconds2 variable is less than 10 then... { seconds2 = "0" + seconds2; // the seconds2 variable is equal to 0:seconds } videoTimeTxt.text = minutes2 + ":" + seconds2 + " / " + minutes + ":" + seconds; // update the videoTimeTxt field with the total time and current time. } function fullscreenOnClicked(e:MouseEvent):void { // go to fullscreen mode trace("fullscreenOnClicked"+stage.displayState); stage.displayState = StageDisplayState.FULL_SCREEN; player_mc.btnFullscreenOn.visible=false; player_mc.btnFullscreenOff.visible=true; } function fullscreenOffClicked(e:MouseEvent):void { // go to back to normal mode trace("fullscreenOnClicked"+stage.displayState); stage.displayState = StageDisplayState.NORMAL; player_mc.btnFullscreenOn.visible=true; player_mc.btnFullscreenOff.visible=false; } //Using this I am able to get the videos from localhost
... View more
‎Aug 26, 2010
12:15 AM
WhatToPrint is the array of movieclips to be printed and you can set the width and height of the doc to be printed change the highlighted one for your need. function PrintFunc(WhatToPrint:Array) { var PrintQueue:PrintJob = new PrintJob(); var PrintStart:Boolean = PrintQueue.start(); if (PrintStart) { for (i=0; i<=WhatToPrint.length; i++) { PrintQueue.addPage(WhatToPrint,{xMin:10, xMax:606, yMin:10, yMax:800}); } PrintQueue.send(); } }
... View more
‎Aug 18, 2010
09:43 PM
You should use msgA{3} is as http://www.sub.com note that Ihave added an http://
... View more
‎Jul 23, 2010
02:03 AM
var datas:XML = new XML(); datas.load("test.xml"); datas.ignoreWhite = true; datas.onLoad = function(success:Boolean) { trace(success); if (success) { var datasToXMLString:String = new String(); datasToXMLString = datas.toString(); var datasXML:XML = new XML(datasToXMLString); datasXML.parseXML(datasToXMLString); trace(datasXML); var datasNodes:Object = datasXML.firstChild; var datasNodesChildren:Object = datasNodes.childNodes; trace("-----------------------"); trace(datasNodes.childNodes[0].childNodes[5].firstChild);//3 } };
... View more
‎Jul 19, 2010
09:46 PM
Ofcourse ns = new NetStream(nc); video.attachNetStream(ns); ns.play("sample"); This is that part.
... View more
‎Jul 19, 2010
09:42 PM
Thanks for your reply mamatha. I had already downloaded that files. But it seems to be FlashCS4 document.(I am using CS3). I don't know how, but my problem has been solved. Now I am able to stream video content from localhost. Anyway thanks for your reply.
... View more
‎Jul 19, 2010
12:58 AM
Currently I am working on FLVPlayer using AS3 and FMS3. When I test tthe connection Traced NetConnection.Connect.Success And I had added eventlistener for NetStream. It also shown NetStream.Play.Reset NetStream.Play.Start But the video is not showing. Please I need some help.
... View more
‎Jul 18, 2010
11:23 PM
Currently I am working on FLVPlayer using AS3 and FMS3. When I test tthe connection Traced NetConnection.Connect.Success And I had added eventlistener for NetStream. It also shown NetStream.Play.Reset NetStream.Play.Start But the video is not showing. Please I need some help.
... View more
‎Jun 28, 2010
09:39 PM
Yes, may some thing wrong. For allChinese it is 80kb increase and level 1 traditional chinese 25 kb for me.
... View more
‎Jun 28, 2010
05:30 AM
To use chinese characters you should use embedding characters(Can be done in the flash interface.from the embed fonts select chenese).I think size will increase with 80 kb.
... View more
‎Jun 25, 2010
04:36 AM
I think you have to embed the chinese characters in the dynamic textfields
... View more
‎May 26, 2010
09:38 PM
All is in the help panel . Press F1 for the panel appear. If you have difficult to find what you looking for then type the one in AS panel for eg Array select it and press F1, help panel will explore with the details of Array
... View more
‎May 24, 2010
11:59 PM
1 Upvote
<?php $myaudio="http://www.test.com/test.mp3"; ?> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0, 79,0" width="550" height="550"> <param name="movie" value="fvar.swf" /> <param name="quality" value="high" /> <param name="FlashVars" value="theFile=<?php echo $myaudio; ?>" /> <embed src="fvar.swf" width="550" height="400" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="theFile=<?php echo $myaudio; ?>"></embed> This is working for me. I just printed the vale in a dynamictextbox in the swf. var theFile:String; test_txt.text = theFile;
... View more
‎May 24, 2010
11:48 PM
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0, 79,0" width="35" height="35"> <param name="movie" value="http://www.myurl.com/audioButton.swf" /> <param name="quality" value="high" /> <param name="FlashVars" value="theFile=<?php echo $myaudio; ?>" /> <embed src="example.swf" width="550" height="400" quality="high" pluginspage=" http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="theFile=<?php echo $myaudio; ?>"></embed> </object> The value of swf is different in embed and param tag
... View more
‎May 20, 2010
06:05 AM
I have checked the steps. use test_FLK.stop();//for stop or pause button use test_FLK.play();//for play button this will play from where stoped. test_FLK is the instance name of FLVPlayback.
... View more
‎May 20, 2010
03:15 AM
I think you add the property resume for the FLVPlayback. resume is the method of "NetStream"
... View more
‎May 20, 2010
01:43 AM
if ns is NetStream then ns,play() ------ will play the movie from the start. ns.pause(); --- pause the movie where the play head is ns.resume(); -- start the movie where it is paused.
... View more
‎May 14, 2010
04:29 AM
onClipEvent (enterFrame) { function onPress() { pressing = 1; } function onRelease() { pressing = 0; } function onReleaseOutside() { pressing = 0; } if (pressing == 1) { _root.aimStraw(); } } //above is the code on the button
... View more
‎May 13, 2010
09:43 PM
That was script initialising your animation.When you commented the line then the animation will not work. Try this. package { import flash.events.MouseEvent; import flash.system.ApplicationDomain; import flash.events.Event; import flash.display.MovieClip; import com.shinedraw.effects.ColorfulFireworks; public class Document extends MovieClip{ private var _colorfulFireworks : ColorfulFireworks; public function Document(){ _colorfulFireworks = new ColorfulFireworks(); addChild(_colorfulFireworks); var coverClass : Class = ApplicationDomain.currentDomain.getDefinition("Cover") as Class; var cover : MovieClip = new coverClass(); addChild(cover); cover.addEventListener(MouseEvent.MOUSE_OVER, on_cover_click); } private function on_cover_click(e:MouseEvent):void{ var cover:MovieClip = e.target as MovieClip; removeChild(cover); _colorfulFireworks.start(); } } }
... View more
‎May 13, 2010
05:59 AM
The class you have created is calling butthis line not executing. this.addEventListener(Event.ADDED_TO_STAGE, on_added_to_stage);
... View more
‎May 13, 2010
05:04 AM
package { public class Document { public function Document(){ trace("called"); } } } this a sample calss Document. Below is the script in the flash file .fla import Document;//importing the Document class var test:Document = new Document();//Defining an instance of the class Document.This will call the constructor function in the class and trace "called"
... View more
‎May 13, 2010
04:05 AM
It will work import Document; var test:Document = new Document();//will trace "called" THis is my Document.as class(along with fla) package { public class Document { public function Document(){ trace("called"); } } }
... View more
‎May 13, 2010
03:14 AM
Please do the action for the am and pm times in the place of trace. trace only print the text.
... View more