저는 Action Scripting 및 Flash에 매우 익숙합니다. 탐색 바를 구현해야합니다. 내 JSP 페이지에 videoPlayer를 실행하는 SWF를 임베드했습니다. 또한 페이지에서 재생 및 정지 버튼을 구현했습니다. 나는 탐색 바를 구현할 필요가있다. 검색 바, 볼륨 컨트롤 및 타이머가 표시 될 다른 웹 페이지에 내 swf를 포함시켜야합니다. 탐색 막대에 대한 타이머를 swf에 전달하여 그에 따라 이동해야합니다. 그리고 내 필요에 따라 플레이어의 피부를 조정하십시오. 어떻게해야합니까? 누군가 제발 나를 도와 줄 수 있니? 나는 Flash Professional CC와 FlashDevelop를 가지고있다. 고마워.actionscript 3의 플래시 찾기 모음
업데이트 :
나는 다음을 시도했지만 나는 그것을 구현하는 방법을 모르겠어요. 누구든지이 일을 수행하는 방법을 보여줄 수 있습니까? 이것을 위해 Jw-player를 사용할 수 있습니까?
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.media.SoundChannel;
import flash.media.Sound;
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.events.ProgressEvent;
import flash.events.IOErrorEvent;
import flash.net.URLRequest;
import flash.external.ExternalInterface;
import flash.system.Security;
/**
* ...
* @author lisa
*/
public class Main extends Sprite
{
private var _channel:SoundChannel;
private var sound:Sound;
private var duration:Number;
private var playerInstance:String;
private var pausePoint:Number = 0;
private var playing:Boolean = false;
private var timer:Timer;
public function Main():void
{
this.timer = new Timer(250, 0);
Security.allowDomain("*");
this.playerInstance = root.loaderInfo.parameters.playerInstance + ".";
ExternalInterface.addCallback("init", this.init);
ExternalInterface.addCallback("load", this.load);
ExternalInterface.addCallback("playPause", this.playPause);
ExternalInterface.addCallback("pplay", this.play);
ExternalInterface.addCallback("ppause", this.pause);
ExternalInterface.addCallback("skipTo", this.skipTo);
ExternalInterface.call(this.playerInstance + "loadStarted");
return;
//if (stage) init();
//else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(param1:String):void
{
this.load(param1);
return;
//removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
}
private function get channel() : SoundChannel
{
return this._channel;
}// end function
private function set channel(param1:SoundChannel) : void
{
this._channel = param1;
this._channel.addEventListener(Event.SOUND_COMPLETE, this.soundEnded);
return;
}// end function
private function updatePlayhead(event:TimerEvent = null) : void
{
var _loc_2:* = event ? (this.channel.position) : (this.pausePoint);
var _loc_3:* = _loc_2/this.duration;
if (_loc_3 > 1)
{
_loc_3 = 1;
}
if (_loc_3 > 0)
{
ExternalInterface.call(this.playerInstance + "updatePlayhead", _loc_3);
}
return;
}// end function
private function loadProgress(event:ProgressEvent) : void
{
this.duration = event.bytesTotal/(event.bytesLoaded/this.sound.length);
var _loc_2:* = event.bytesLoaded/event.bytesTotal;
if (_loc_2 > 1)
{
_loc_2 = 1;
}
if (_loc_2 > 0)
{
ExternalInterface.call(this.playerInstance + "loadProgress", _loc_2, this.duration/1000);
}
return;
}// end function
private function load(param1:String) : void
{
if (this.channel)
{
this.channel.stop();
}
if (this.sound)
{
this.sound.removeEventListener(ProgressEvent.PROGRESS, this.loadProgress);
}
this.channel = new SoundChannel();
this.sound = new Sound(new URLRequest(param1));
this.pausePoint = 0;
this.sound.addEventListener(IOErrorEvent.IO_ERROR, this.loadError);
this.sound.addEventListener(ProgressEvent.PROGRESS, this.loadProgress);
this.timer.addEventListener(TimerEvent.TIMER, this.updatePlayhead);
this.timer.start();
return;
}// end function
private function loadError(event:IOErrorEvent) : void
{
ExternalInterface.call(this.playerInstance + "loadError");
return;
}// end function
private function play() : void
{
this.channel = this.sound.play(this.pausePoint);
this.playing = true;
this.timer.start();
return;
}// end function
private function pause() : void
{
this.pausePoint = this.channel.position;
this.channel.stop();
this.playing = false;
this.timer.stop();
return;
}// end function
private function playPause() : void
{
if (this.playing)
{
this.pause();
}
else
{
this.play();
}
return;
}// end function
private function skipTo(param1:Number) : void
{
this.channel.stop();
this.pausePoint = this.duration * param1;
if (this.playing)
{
this.channel = this.sound.play(this.pausePoint);
}
else
{
this.updatePlayhead();
}
return;
}// end function
private function soundEnded(event:Event) : void
{
ExternalInterface.call(this.playerInstance + "trackEnded");
return;
}// end function
}
ActionScript를 아주 처음 사용하는 경우
}
무엇을 시도 했습니까? 코드는 어디에 있습니까? 이 사이트는 프로그래밍 관련 질문을 돕기위한 것이지, 당신을 위해 일하거나 당신을 가르치는 것을 돕기위한 것이 아닙니다. – DodgerThud
내 질문에 편집 됨. – user3378735