flash - Actionscript Button click to Flv video Help -
flash - Actionscript Button click to Flv video Help -
i'm new @ actionscript , not sure how this.
i have button named btnplay , flv video named valerie.flv when button pressed, flv video plays in same flash file through standard flv player.
i tried , have no idea. appreciate help.
as3 solution:
this takes place on 1 frame in timeline.
components panel > video > flv playback <-- drag component on stage
in component inspector panel, flv playback instance selected, set:
source: valerie.flv (this relative html path work if flv in same folder html , swfs) autoplay: falsethen, flv playback instance selected, in properties panel, set:
myvideo instance namecomponents panel > user interface > button <-- drag on stage
with button instance selected, in properties panel, set:
mybutton instance namein component inspector panel, button instance selected, set:
label: play videowith frame selected both these components on, open actionscript window , come in this:
import fl.controls.button; import fl.video.flvplayback;
var playbtn:button = mybutton; var flvvideo:flvplayback = myvideo;
playbtn.addeventlistener(mouseevent.click, buttonclick);
function buttonclick(e:mouseevent) { var button:button = button(e.target); button.enabled = false; button.label = "playing..."; flvvideo.play(); }
upload valerie.flv file same folder html , swf go.
publish flash film , re-create html , 2 swfs folder.
flash actionscript flv
Comments
Post a Comment