problem with rewind in FLVPlayback UI compenents

  • dijup
  • Born
  • Born
  • dijup
  • Posts: 3

Post 3+ Months Ago

I am having problem with rewind button in flash player.when i press the rewind button it redirect the video to the begning.

how can we mange that, to just send few second back.
[AS]import mx.video.*;
my_FLVPlybk.autoRewind = true;
var listenerObject:Object = new Object();
listenerObject.rewind = function(eventObject:Object) {
trace("Video player is #" + eventObject.vp);
trace("State is: " + eventObject.state);
trace("Playhead time is: " + eventObject.playheadTime);
eventObject.seek(eventObject.playheadTime-3);
};
my_FLVPlybk.addEventListener("rewind", listenerObject);
my_FLVPlybk.contentPath = "video1.flv[/AS]

I am using this but still there is no any chnage when i press rewind button the movie goes to the inital stage but the same code works for custom build flash player
  • dijup
  • Born
  • Born
  • dijup
  • Posts: 3

Post 3+ Months Ago

recent update in code but still there is no update in error.
---------------------------------
import mx.video.*;
my_FLVPlybk.autoRewind = false;
var listenerObject:Object = new Object();
listenerObject.rewind = function(eventObject:Object) {
/*trace("Video player is #"+eventObject.vp);
trace("State is: "+eventObject.state);
trace("Playhead time is: "+eventObject.playheadTime);*/
trace("playheadtime"+playheadtime);
trace("rewind----------");
eventObject.seek(playheadtime-1);
};
listenerObject.stateChange = function(eventObject:Object):Void {
trace(my_FLVPlybk.state+"----"+eventObject.playheadTime);
if (my_FLVPlybk.state == "seeking") {
playheadtime = eventObject.playheadTime;
trace("stateChange----------");
}
};
my_FLVPlybk.addEventListener("stateChange", listenerObject);
my_FLVPlybk.addEventListener("rewind", listenerObject);
my_FLVPlybk.contentPath = "video1.flv";
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1827
  • Loc: In the Great White North

Post 3+ Months Ago

what happens if you seek to a set time (20) or something similar instead of the equation currenttime -1? it seems like flash isn't really getting "current time" and is defaulting to the beginning when the current time is undefined.
  • dijup
  • Born
  • Born
  • dijup
  • Posts: 3

Post 3+ Months Ago

when i trace(my_FLVPlybk.state+"----"+eventObject.playheadTime); it gives me the time.

if u look at the second code you can find some solution to that too.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1827
  • Loc: In the Great White North

Post 3+ Months Ago

what happens when you trace(playheadtime)? I suspect that whats happening is that your variable playheadtime is coming back "undefined" and so flash can't go to undefined - 1 so it goes to the start of the clip instead.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 5 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.