hello have been working on project , have loaded videos using netstream. have several cue points advance timeline keyframe. have script netstream this, example, when video reaches cue1 advance timeline frame 10?
thank help.
mark.
since no 1 has yet posted on this, i'll re-post part of response post deals using cue points netstream video player:
ok, here working netstream cue point:
var ns:netstream = new netstream(nc);
video_screen.attachvideo(ns);
/* name of video, correct path, goes here */
ns.play("my_video.flv");
ns.oncuepoint = function(evt:object){
trace(evt.name);
trace(evt.time);
if(evt.name == "jump_100") {
trace("yo !jump 100!");
gotoandstop(100);
}
};
reading code:
set new variable "ns" new netstream
attach video "video_screen"... instance name of video on stage
now use variable "ns" play video file name "my_video.flv"
use ns listen "event" type cue point object
when cue point detected trace event name , time
if event name equal "jump_100"
then trace "yo !jump 100!"
and gotoandstop @ frame 100
for exact code work, netstream variable must named "ns"
in video play, there must cue point of "event" type name "jump_100"
there must @ least 100 frames in timeline.
take in small steps;
first make sure can play video using netstream ... that's all.
next, add trace detect cue point... if can't detect it, of course won't anything.
only after can play video , detect cue point, should attempt cue point action (jump frame 100).
you can add more "if" statements if there multiple cue points.
if cue point 1, this.
if cue point 2, this.... etc.
best wishes,
adninjastrator
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment