4 posts
  • 7 Years of Membership
  • Collector Level 2
zer0_j
says

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:

http://theflashblog.com/?p=78

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

279 posts
  • 7 Years of Membership
  • Affiliate Level 2
  • Author Level 5
  • Collector Level 1
+5 more
FonZ
says

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.

4 posts
  • 7 Years of Membership
  • Collector Level 2
zer0_j
says

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

607 posts
  • 7 Years of Membership
  • Affiliate Level 1
  • Collector Level 2
  • Exclusive Author
+1 more
sanju1979
says

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

by
by
by
by
by
by