Find Jobs
Hire Freelancers

Migrate From Action Script 2.0 to 3.0

$30-250 USD

Geschlossen
Veröffentlicht vor fast 15 Jahren

$30-250 USD

Bezahlt bei Lieferung
I have been working to migrate my custom video player code from AS2 to AS3. I have been able to get everything working except the scrubber bar and the time display. If anyone is interested in helping rewrite this I would really appreciate it. The main trouble I run into is that I am using streaming video from an FMS server and that usually presents additional problems. Here is the AS2 code that works but needs to be rewritten for AS3: var videoInterval = setInterval(videoStatus,100); var amountLoaded:Number; var duration:Number; ns["onMetaData"] = function(obj) { duration = [login to view URL]; } function checkTime(ns:NetStream,duration:TextField) { var ns_seconds:Number = [login to view URL]; var minutes:Number = [login to view URL](ns_seconds/60); var seconds = [login to view URL](ns_seconds%60); var vidminutes:Number = [login to view URL](duration/60); var vidseconds = [login to view URL](duration%60); if (vidseconds<10) { vidseconds = "0"+vidseconds; } if (seconds<10) { seconds = "0"+seconds; } [login to view URL] = minutes+":"+seconds+" / "+(timeText); } var time_interval:Number = setInterval(checkTime,60,ns,duration); function videoStatus() { loader.scrub._x = [login to view URL] / duration * 171; } var scrubInterval; [login to view URL] = function() { clearInterval(videoInterval); scrubInterval = setInterval(scrubit,10); [login to view URL](false,0,this._y,171,this._y); } [login to view URL] = [login to view URL] = function() { clearInterval(scrubInterval); videoInterval = setInterval(videoStatus,100); [login to view URL](); } function scrubit() { [login to view URL]([login to view URL]((loader.scrub._x/171)*duration)); } Here is the rest of the working AS3 code: /////////////////////////////////////////////AS3 Script ////////////////////////////////////////////VIDEO CODE var fileName:String = "video_file"; var timeText:String = "3:27"; var nc:NetConnection = new NetConnection(); var ns:NetStream; [login to view URL] = [login to view URL]; [login to view URL](NetStatusEvent.NET_STATUS, onNetStatus); var counter:int = 0; function onNetStatus(evt:NetStatusEvent):void { if ([login to view URL] =="NetConnection.Connect.Success") { ns = new NetStream(nc); [login to view URL](NetStatusEvent.NET_STATUS, onNetStatus); [login to view URL](AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); var myVideo:Video = new Video(384,216); [login to view URL](ns); addChild(myVideo); myVideo.x = 128; myVideo.y = 30; [login to view URL] = 5; [login to view URL](fileName,true); } } [login to view URL]("rtmp://server",true); function asyncErrorHandler(event:AsyncErrorEvent):void { // trace([login to view URL]); } [login to view URL] = function(p_bw) { //trace("onBWDone: "+p_bw); }; [login to view URL] = function() { return ++counter; }; ///////////////////////////////////////VIDEO CONTROLS CODE [login to view URL](MouseEvent.MOUSE_UP, rew); [login to view URL](MouseEvent.MOUSE_UP, pla); [login to view URL](MouseEvent.MOUSE_UP, sto); function rew(e:MouseEvent):void{ [login to view URL](0); } function pla(e:MouseEvent):void{ [login to view URL](); } function sto(e:MouseEvent):void{ [login to view URL](); } ///////////////////////////////////////SOUND CONTROL CODE [login to view URL] = true; [login to view URL]([login to view URL], muteClick); [login to view URL](MouseEvent.ROLL_OVER, muteOver); [login to view URL](MouseEvent.ROLL_OUT, muteOut); function muteClick(e:MouseEvent):void{ var c:MovieClip = mute; if([login to view URL] == 10){ [login to view URL](30); [login to view URL] = new SoundTransform(0); } else if([login to view URL] == 30){ [login to view URL](10); [login to view URL] = new SoundTransform(1); } } function muteOver(e:MouseEvent):void{ var c:MovieClip = mute; if([login to view URL] == 1){ [login to view URL](10); } else if([login to view URL] == 20){ [login to view URL](30); } } function muteOut(e:MouseEvent):void{ var c:MovieClip = mute; if([login to view URL] == 10){ [login to view URL](1); } else if([login to view URL] == 30){ [login to view URL](20); } }
Projekt-ID: 441607

Über das Projekt

4 Vorschläge
Remote Projekt
Aktiv vor 15 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
4 Freelancer bieten im Durchschnitt $111 USD für diesen Auftrag
Avatar des Nutzers
Easy job:) Check PMB
$75 USD in 2 Tagen
0,5 (1 Bewertung)
1,1
1,1
Avatar des Nutzers
Hi, send me the FLA and I'll have a look at it. Thanks, Petro
$250 USD in 4 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
Lets start the work Please check pm
$70 USD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
Hello, Please PM for details. I am interested.
$50 USD in 2 Tagen
0,0 (1 Bewertung)
0,0
0,0

Über den Kunden

Flagge von UNITED STATES
woburn, United States
0,0
0
Mitglied seit Mai 27, 2009

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.