Hi There,
I wonder if someone can help me.
I am working with a flv (playBack component) in flash. This flv has got a cue point.
I need to triger a movieclip when the video hits the cue point.
Similar to this:
Also, I need this video the loop.
This is the code I am using forlooping and muting the video:
listenerObject = new Object(); listenerObject.complete = function(eventObject:Object):Void { aFLV.play(); }; aFLV.addEventListener(“complete”, listenerObject); aFLV.contentPath = “myvideo.flv”; aFLV.play();
var nc:NetConnection = new NetConnection(); nc.connect (null);
var ns:NetStream = new NetStream(nc);
ns.setBufferTime();
var videoInterval = setInterval (videoStatus, 200); var amountLoaded:Number; var duration:Number;
ns[“onMetaData”] = function (obj) { duration = obj.duration; }
function videoStatus () { amountLoaded = ns.bytesLoaded / ns.bytesTotal; loader.loadBar._width = amountLoaded * 320; loader.scrub._x = ns.time / duration * 320; }
_root.createEmptyMovieClip(“vsound”,_root.getNextHighestDepth()) vSound.attachAudio(ns);
var so:Sound = new Sound(vSound);
so.setVolume(0);
mute.onRollOver = function() { if(so.getVolume() == 0) { this.gotoAndStop(“onOver”); } else { this.gotoAndStop(“muteOver”); } }
mute.onRollOut = function() { if(so.getVolume() == 0) { this.gotoAndStop(“on”); } else { this.gotoAndStop(“mute”); } }
mute.onRelease = function() { if(so.getVolume() == 100) { so.setVolume(0); this.gotoAndStop(“muteOver”);
} else { so.setVolume(100); this.gotoAndStop(“onOver”); } }
Any thoughts???
Thanks for your help.
Best
zer0_j
- Bought between 1 and 9 items
- Exclusive Author
- Has been a member for 5-6 years
- Item was Featured
- Netherlands
- Referred between 10 and 49 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 10 000 and 50 000 dollars
if you want the video to loop, check the
ns[“onMetaData”] = function (obj) { duration = obj.duration; }
against the time played. If the time played equals the duration, my guess is, you want it to start again.
Fonz thank you so very much for you reply.
With the code I’ve got in place the video is already looping.
Is just that the methods I’ve been using to track the cue point involve using a new eventlistener.
I don’t know if I can use more than one eventlistener with the code I have.
I hope this make sense.
Really apreciate your help.
Best,
zer0_j
hi send me the player and the file u want to play…hope the movie clip plays over the player…
cost: usd 55
paypal mode
email: support@flashmart.in
thanks
