Re: [Flashcoders] Determining when the Stage *stops* resizing

2006-07-01 Thread Matt Bennett

Works an absolute treat. Thanks EKA!

On 6/29/06, eka [EMAIL PROTECTED] wrote:

Hello :)

You can use a setInterval to test the stop of the resizing :)

example :

// o Singleton

StageResizer = {} ;

// o Init Broadcaster

AsBroadcaster.initialize(StageResizer) ; // inject broadcast methods

// o Listen Stage onResize event !

Stage.addListener(StageResizer) ;

// o Public Property

StageResizer.id /*Number*/ = null ;
StageResizer.delay /*Number*/ = 100 ;

// o Public Method

StageResizer.reset = function () {
clearInterval(this.id) ;
this.id = null ;
}

StageResizer.stopResizing = function () {
this.broadcastMessage(onStopResize) ;
this.reset() ;
}

StageResizer.startResizing = function () {
if (this.id == null) {
this.broadcastMessage(onStartResize) ;
}
clearInterval(this.id) ;
   this.id = setInterval(this, stopResizing, this.delay) ;
}

StageResizer.onResize = StageResizer.startResizing ;


// -o TEST

var listener = {} ;
listener.onStartResize = function () {
trace(start resize) ;
}

listener.onStopResize = function () {
trace(stop resize) ;
}

StageResizer.addListener(listener) ;


EKA+ :)




2006/6/29, Matt Bennett [EMAIL PROTECTED]:

 Hello all,

 I've got a perplexing problem and I've run out of ideas to solve it -
 I hope you can help!

 I have an application that runs fullscreen in the browser - so the
 object is set to 100%x100% and the Stage.scaleMode is noScale. The
 application realigns itself via a Stage.onResize listener.

 The problem I have, is determining when the user *stops* resizing the
 Stage (i.e the last Stage onResize event in any given resize). For
 example, the widgets inside my application get resized as the stage
 resizes, and since they too have their own layout code, they need to
 know when they're being resized. Consequently, when the stage stops
 resizing I also need to tell them that they're no longer resizing
 also.

 I've had a couple of ideas on how to solve the problem:
 1. Add some method to the Stage.prototype. I'm not really sure what I
 should be looking for though. Does onMouseUp get registered if the
 mouse is not over the flash window?

 2. The HTML body onResize event gets broadcast when the browser window
 stops resizing, so I thought I might be able to use that. Is there any
 way to send information via flashVars after the movie has loaded?

 Many thanks in advance,
 Matt.
 ___
 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


___
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] Determining when the Stage *stops* resizing

2006-06-29 Thread eka

Hello :)

You can use a setInterval to test the stop of the resizing :)

example :

// o Singleton

StageResizer = {} ;

// o Init Broadcaster

AsBroadcaster.initialize(StageResizer) ; // inject broadcast methods

// o Listen Stage onResize event !

Stage.addListener(StageResizer) ;

// o Public Property

StageResizer.id /*Number*/ = null ;
StageResizer.delay /*Number*/ = 100 ;

// o Public Method

StageResizer.reset = function () {
   clearInterval(this.id) ;
   this.id = null ;
}

StageResizer.stopResizing = function () {
   this.broadcastMessage(onStopResize) ;
   this.reset() ;
}

StageResizer.startResizing = function () {
   if (this.id == null) {
   this.broadcastMessage(onStartResize) ;
   }
   clearInterval(this.id) ;
  this.id = setInterval(this, stopResizing, this.delay) ;
}

StageResizer.onResize = StageResizer.startResizing ;


// -o TEST

var listener = {} ;
listener.onStartResize = function () {
   trace(start resize) ;
}

listener.onStopResize = function () {
   trace(stop resize) ;
}

StageResizer.addListener(listener) ;


EKA+ :)




2006/6/29, Matt Bennett [EMAIL PROTECTED]:


Hello all,

I've got a perplexing problem and I've run out of ideas to solve it -
I hope you can help!

I have an application that runs fullscreen in the browser - so the
object is set to 100%x100% and the Stage.scaleMode is noScale. The
application realigns itself via a Stage.onResize listener.

The problem I have, is determining when the user *stops* resizing the
Stage (i.e the last Stage onResize event in any given resize). For
example, the widgets inside my application get resized as the stage
resizes, and since they too have their own layout code, they need to
know when they're being resized. Consequently, when the stage stops
resizing I also need to tell them that they're no longer resizing
also.

I've had a couple of ideas on how to solve the problem:
1. Add some method to the Stage.prototype. I'm not really sure what I
should be looking for though. Does onMouseUp get registered if the
mouse is not over the flash window?

2. The HTML body onResize event gets broadcast when the browser window
stops resizing, so I thought I might be able to use that. Is there any
way to send information via flashVars after the movie has loaded?

Many thanks in advance,
Matt.
___
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


[Flashcoders] Determining when the Stage *stops* resizing

2006-06-28 Thread Matt Bennett

Hello all,

I've got a perplexing problem and I've run out of ideas to solve it -
I hope you can help!

I have an application that runs fullscreen in the browser - so the
object is set to 100%x100% and the Stage.scaleMode is noScale. The
application realigns itself via a Stage.onResize listener.

The problem I have, is determining when the user *stops* resizing the
Stage (i.e the last Stage onResize event in any given resize). For
example, the widgets inside my application get resized as the stage
resizes, and since they too have their own layout code, they need to
know when they're being resized. Consequently, when the stage stops
resizing I also need to tell them that they're no longer resizing
also.

I've had a couple of ideas on how to solve the problem:
1. Add some method to the Stage.prototype. I'm not really sure what I
should be looking for though. Does onMouseUp get registered if the
mouse is not over the flash window?

2. The HTML body onResize event gets broadcast when the browser window
stops resizing, so I thought I might be able to use that. Is there any
way to send information via flashVars after the movie has loaded?

Many thanks in advance,
Matt.
___
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