[Flashcoders] Re: Changing width of seekBar during playback (AS2, FLVPlayback)

2009-03-10 Thread jonas magnusson
Probably solved the seekbar issue.

If anyone happen to have the same problem in the future:

Seems I can get it working by making two seekbars and encapsulating them in
container_mc's.
On newSize i set the new size of both seekbars, do remove movieclip on
prev_container.seekBarHandle_mc then set flvplayback.seekBar =
new_container.new_SeekBar.
Then i hide the prev_container with _visible=false and make the
new_container _visible=true.

The handle is now draggable and i remove the old dead handles, the
left/right limits are updated and the visuals are also updated.

Thanks for listening :)

/Jonas



On Mon, Mar 9, 2009 at 5:55 PM, jonas magnusson jonas.mag...@gmail.comwrote:

 Hi List,

 I would like to make a FLV player that scales up the width depending on
 Stage.width.
 The width is different depending on size when starting up, and the user
 monitor size when in fullscreen.

 I am using the FLVPlayback component AS2.0 (several months of work put in
 already).
 Video can easily be scaled up, but the seekbar is a big problem.

 When i change the width of the seekbar, the flvplayback/seekbar does not
 realize the new limits of the handle.

 Most often the seekBar just takes on a temporary look but then reverts back
 after video-end.
 So no new left-right limits + temporary graphic change.

 Solutions tried:

 Placing differently sized seekbars of the same name in different keyframes,
 jumping between keyframes (no change at all)

 Setting width: seekBar._width = 300 or seekBar.progress_mc._width = 300
 (temporary background-only change)

 Switching streams after width-change to force update.


 Having double seekbars, updating the size of one, then switching between
 them (flvplb.seekBar = seekBar2).
 Works really well for the new limits, the handle now moves between new
 limits. Problem with this solution is that the new handle is not clickable.
 Also, there are a lot of dead handles from the previous switches. The
 click-area remains behind the first dead handle.
 I managed to remove the graphics of previous handles by
 using handle_mc.removeMovieClip(), but the new handle does not get
 assigned the functionalityonPress - startDragging..


 Any and all suggestions appreciated!

 /Jonas







___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Changing width of seekBar during playback (AS2, FLVPlayback)

2009-03-10 Thread Muzak

The following works for me:

FLVPlayback and SeekBar instance on stage.
A button that, when clicked, will toggle the size of the seekbar.

In the button click handler: 
- resize the seekbar

- set the seekBar property of the video playback to null
- remove the seekbar handle (seekBarHandle_mc) which is otherwise left behind
- reset the seekBar property of the video playback to the same instance as 
before


var SMALL_WIDTH:Number = 100;
var LARGE_WIDTH:Number = 320;

video_fpb.seekBar = video_sb;
video_fpb.contentPath = paramore_decode_live.flv;

function resizeClickHandler(o:Object):Void {
trace(Application ::: resizeClickHandler);
trace(- seekbar width:  + video_sb._width);
video_sb._width = (video_sb._width == SMALL_WIDTH) ? LARGE_WIDTH : SMALL_WIDTH;
video_fpb.seekBar = null;
removeMovieClip(seekBarHandle_mc);
video_fpb.seekBar = video_sb;
}

video_sb._width = SMALL_WIDTH;
resize_btn.addEventListener(click, resizeClickHandler);

regards,
Muzak

- Original Message - 
From: jonas magnusson jonas.mag...@gmail.com

To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, March 10, 2009 10:39 AM
Subject: [Flashcoders] Re: Changing width of seekBar during playback 
(AS2,FLVPlayback)



Probably solved the seekbar issue.

If anyone happen to have the same problem in the future:

Seems I can get it working by making two seekbars and encapsulating them in
container_mc's.
On newSize i set the new size of both seekbars, do remove movieclip on
prev_container.seekBarHandle_mc then set flvplayback.seekBar =
new_container.new_SeekBar.
Then i hide the prev_container with _visible=false and make the
new_container _visible=true.

The handle is now draggable and i remove the old dead handles, the
left/right limits are updated and the visuals are also updated.

Thanks for listening :)

/Jonas



On Mon, Mar 9, 2009 at 5:55 PM, jonas magnusson jonas.mag...@gmail.comwrote:


Hi List,

I would like to make a FLV player that scales up the width depending on
Stage.width.
The width is different depending on size when starting up, and the user
monitor size when in fullscreen.

I am using the FLVPlayback component AS2.0 (several months of work put in
already).
Video can easily be scaled up, but the seekbar is a big problem.

When i change the width of the seekbar, the flvplayback/seekbar does not
realize the new limits of the handle.

Most often the seekBar just takes on a temporary look but then reverts back
after video-end.
So no new left-right limits + temporary graphic change.

Solutions tried:

Placing differently sized seekbars of the same name in different keyframes,
jumping between keyframes (no change at all)

Setting width: seekBar._width = 300 or seekBar.progress_mc._width = 300
(temporary background-only change)

Switching streams after width-change to force update.


Having double seekbars, updating the size of one, then switching between
them (flvplb.seekBar = seekBar2).
Works really well for the new limits, the handle now moves between new
limits. Problem with this solution is that the new handle is not clickable.
Also, there are a lot of dead handles from the previous switches. The
click-area remains behind the first dead handle.
I managed to remove the graphics of previous handles by
using handle_mc.removeMovieClip(), but the new handle does not get
assigned the functionalityonPress - startDragging..


Any and all suggestions appreciated!

/Jonas


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] AS3 - XML Filter by Date

2009-03-10 Thread Doug Coning
Thank you, that helped a lot.  For anyone else trying to filter by date, here's 
the line of code:

var today:Date  = new Date();
var showXML:XMLList = result_xml.item.(new Date(date.toString()) = today);

Thanks,

Doug Coning
Senior Flash / ASP.Net Developer
Webize Interactive Media
345 Massachusetts Avenue
Indianapolis, Indiana
dcon...@webize.com

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David 
Hershberger
Sent: Monday, March 09, 2009 5:02 PM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 - XML Filter by Date

You can filter XML with arbitrary boolean functions, so the answer is
definitely yes.

See http://livedocs.adobe.com/flex/3/html/13_Working_with_XML_08.html#131880

One of the examples there shows XML stored in var x with a list of employee
id=23/ type elements, and you can use this syntax to get an XMLList of
employees with id attributes over 300:

x.employee.(@id  300)

Similarly, if you had a birthdate field stored as milliseconds since 1970
you could filter on that like so:

x.employee.(new Date(@birthdate).getFullYear() == 2000)

to return a list of employees who were born in the year 2000.  (Presumably a
short list. :-)

Dave

On Mon, Mar 9, 2009 at 1:07 PM, Eric E. Dolecki edole...@gmail.com wrote:

 I suppose if the XML has that kind of data in it you could.

 On Mon, Mar 9, 2009 at 12:02 PM, Doug Coning dcon...@webize.com wrote:

  Greetings everyone,
 
  In AS3, can you filter xml by a date value or range?
 
  Thanks,
 
  Doug Coning
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 http://ericd.net
 Interactive design and development
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Changing width of seekBar during playback (AS2, FLVPlayback)

2009-03-10 Thread jonas magnusson
Thanks Muzak,

Seems like setting it to null loses the reference, and then since it's not
the same, the seekBar property can be updated again.

Working with Flash often leads to creative workarounds.. :)

Cheers,

/Jonas

On Tue, Mar 10, 2009 at 1:19 PM, Muzak p.ginnebe...@telenet.be wrote:

 The following works for me:

 FLVPlayback and SeekBar instance on stage.
 A button that, when clicked, will toggle the size of the seekbar.

 In the button click handler: - resize the seekbar
 - set the seekBar property of the video playback to null
 - remove the seekbar handle (seekBarHandle_mc) which is otherwise left
 behind
 - reset the seekBar property of the video playback to the same instance as
 before


 var SMALL_WIDTH:Number = 100;
 var LARGE_WIDTH:Number = 320;

 video_fpb.seekBar = video_sb;
 video_fpb.contentPath = paramore_decode_live.flv;

 function resizeClickHandler(o:Object):Void {
 trace(Application ::: resizeClickHandler);
 trace(- seekbar width:  + video_sb._width);
 video_sb._width = (video_sb._width == SMALL_WIDTH) ? LARGE_WIDTH :
 SMALL_WIDTH;
 video_fpb.seekBar = null;
 removeMovieClip(seekBarHandle_mc);
 video_fpb.seekBar = video_sb;
 }

 video_sb._width = SMALL_WIDTH;
 resize_btn.addEventListener(click, resizeClickHandler);

 regards,
 Muzak

 - Original Message - From: jonas magnusson 
 jonas.mag...@gmail.com
 To: flashcoders@chattyfig.figleaf.com
 Sent: Tuesday, March 10, 2009 10:39 AM
 Subject: [Flashcoders] Re: Changing width of seekBar during playback
 (AS2,FLVPlayback)



 Probably solved the seekbar issue.

 If anyone happen to have the same problem in the future:

 Seems I can get it working by making two seekbars and encapsulating them
 in
 container_mc's.
 On newSize i set the new size of both seekbars, do remove movieclip on
 prev_container.seekBarHandle_mc then set flvplayback.seekBar =
 new_container.new_SeekBar.
 Then i hide the prev_container with _visible=false and make the
 new_container _visible=true.

 The handle is now draggable and i remove the old dead handles, the
 left/right limits are updated and the visuals are also updated.

 Thanks for listening :)

 /Jonas



 On Mon, Mar 9, 2009 at 5:55 PM, jonas magnusson jonas.mag...@gmail.com
 wrote:

 Hi List,

 I would like to make a FLV player that scales up the width depending on
 Stage.width.
 The width is different depending on size when starting up, and the user
 monitor size when in fullscreen.

 I am using the FLVPlayback component AS2.0 (several months of work put in
 already).
 Video can easily be scaled up, but the seekbar is a big problem.

 When i change the width of the seekbar, the flvplayback/seekbar does not
 realize the new limits of the handle.

 Most often the seekBar just takes on a temporary look but then reverts
 back
 after video-end.
 So no new left-right limits + temporary graphic change.

 Solutions tried:

 Placing differently sized seekbars of the same name in different
 keyframes,
 jumping between keyframes (no change at all)

 Setting width: seekBar._width = 300 or seekBar.progress_mc._width =
 300
 (temporary background-only change)

 Switching streams after width-change to force update.


 Having double seekbars, updating the size of one, then switching between
 them (flvplb.seekBar = seekBar2).
 Works really well for the new limits, the handle now moves between new
 limits. Problem with this solution is that the new handle is not
 clickable.
 Also, there are a lot of dead handles from the previous switches. The
 click-area remains behind the first dead handle.
 I managed to remove the graphics of previous handles by
 using handle_mc.removeMovieClip(), but the new handle does not get
 assigned the functionalityonPress - startDragging..


 Any and all suggestions appreciated!

 /Jonas


 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders