[Flashcoders] FLVPlayback progress event listener

2006-06-19 Thread Sarah Plowright

I have a feeling I'm missing something incredibly stupid...

I'm having problems with my FLVPlayback progress event listener -
everytime I test it, it pauses, then the the event is called once, and
my FLV starts playing. My code is as follows:

var listenerObject:Object = new Object();

listenerObject.progress = function(eventObject:Object):Void {
trace('progress');
var percent = introflv.bytesLoaded/introflv.bytesTotal;
trace(percent);
};
introflv.addEventListener(progress, listenerObject);

Shouldn't it be calling progress more than once? The docs say it's
called every .25 seconds.

Thanks,
Sarah
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] FLVPlayback progress event listener

2006-06-19 Thread Sarah Plowright

I am really just starting to do video stuff, so i'm a little
clueless.. I believe it's a progressive download. And the code doesn't
seem to be being executed repeatedly, as the other flv events are
behaving themselves.

The FLVPlayback component is sitting on the timeline, and the
actionscript is on the timeline as well, on the same frame#

The full code I have is:
stop();
skipintro._visible = false;
introflv._visible = false;

var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
gotoAndPlay('main');
};
listenerObject.ready = function(eventObject:Object):Void {
introflv._visible = true;
preloader._visible = false;
skipintro._visible = true;
introflv.play();
};
listenerObject.progress = function(eventObject:Object):Void {
trace('progress');
var percent = introflv.bytesLoaded/introflv.bytesTotal;
trace(percent);
preloader.progressbar._xscale = percent * 100;
};
introflv.addEventListener(complete, listenerObject);
introflv.addEventListener(ready, listenerObject);
introflv.addEventListener(progress, listenerObject);

introflv.load(DRIVERSPLASHLg.flv);


The events ready and complete are behaving as expected, progress is
the only one that's misbehaving.

autoplay is set to false, buffer time is set to 20 sec.

Is there anything else that could be affecting it?

Thanks,
Sarah

On 6/19/06, Steve Krichten [EMAIL PROTECTED] wrote:

Are you using streaming video or progressive download?

Please explain the context of this code... How is your flash movie setup and 
where exactly is this code located?  Is this code perhaps getting executed 
repeatedly or going out of scope?

-Steve

---
Date: Mon, 19 Jun 2006 10:48:06 -0400
From: Sarah Plowright [EMAIL PROTECTED]
Subject: [Flashcoders] FLVPlayback progress event listener

I have a feeling I'm missing something incredibly stupid...

I'm having problems with my FLVPlayback progress event listener -
everytime I test it, it pauses, then the the event is called once, and
my FLV starts playing. My code is as follows:

var listenerObject:Object = new Object();

listenerObject.progress = function(eventObject:Object):Void {
trace('progress');
var percent = introflv.bytesLoaded/introflv.bytesTotal;
trace(percent);
};
introflv.addEventListener(progress, listenerObject);

Shouldn't it be calling progress more than once? The docs say it's
called every .25 seconds.

Thanks,
Sarah

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] FLVPlayback progress event listener

2006-06-19 Thread Sarah Plowright

I am testing locally, although I assumed that since you can test other
progress loaders locally this would work - now that it's uploaded -
the progress bar is sort of working (at least it's called more than
once), but the ready event isn't triggering properly... it'll show the
first frame of the video, but it won't play for 30 seconds or so.

On 6/19/06, Steve Krichten [EMAIL PROTECTED] wrote:

 From the help ...

Event; dispatched at the frequency specified by the |progressInterval|
property, *starting when the load begins and ending when all bytes are
loaded* or there is a network error. Default is every .25 seconds.

So my guess is that you are testing this locally... loading an FLV file
that is on your computer.  If so, what you are seeing is the expected
behavior.  Since the video file is already on your machine, it loads
instantly and the progress event will not fire once the video is
loaded.  Try it with a file that is on a server somewhere and you will
see what you are looking to see.

-Steve


From: Sarah Plowright [EMAIL PROTECTED]
Subject: Re: [Flashcoders] FLVPlayback progress event listener
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I am really just starting to do video stuff, so i'm a little
clueless.. I believe it's a progressive download. And the code doesn't
seem to be being executed repeatedly, as the other flv events are
behaving themselves.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com