RE: [flexcoders] dispatching effects

2005-07-19 Thread Philippe Maegerman





I would go for : 
obj.dispatchEvent({type:'resize'})

Philippe 
Maegerman


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Sauro, 
NickSent: lundi 18 juillet 2005 21:55To: 
flexcoders@yahoogroups.comSubject: [flexcoders] dispatching 
effects

Hey guys, here'sa question.

I have a Panel, and on this Panel there is a Button. 
Initially, the Panel is not exposed(save for the Button).When the user 
clicks the button, I want to dispatch the Panel's Resize effect. 
Currently, its hacked, so the panel has a , and yea 
that works, but it's not the right way to do it(everytime after that, when 
thePanel is open, when user selects something on the grid, it resizes again 
lol). I've been googling for hours, and it shows how to do Custom events, 
but i want to dispatch that built in event.

Thanks

Nick 
Sauro+R 
O U N D 
A R C H + 
bus 
212.909.2335+ mob 914.882.3687



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of 
dimkapimkakolbasaSent: Monday, July 18, 2005 1:27 
PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] How 
to catch events of a child component by the parent 
component?
I've got a custom component Widget which makes a child "image" in 
it's createChildren() method like that:function createChildren (): 
Void { super.createChildren 
(); this.image = this.createClassObject 
(  
mx.controls.Image, 
 "abc", 
 0, 
 {source: 
"rose.jpg"} );}I want to call a 
rotateImage function when image is clicked.Is using a Delegate the only way 
to make it? I made it by adding such code to 
createChildren():var rotateDelegate: Object = Delegate.create 
(this,rotateImage);image.addEventListener ("mouseDown", 
this.rotateDelegate);Can I make it without a Delegat?





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






--**STATEMENT OF CONFIDENTIALITY** 
This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited.
We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus.--


RE: [flexcoders] dispatching effects

2005-07-18 Thread Tracy Spratt










While I have not tried it personally, I
believe you can just run the event with a statement like:

myDataProvider.modelChanged



I know I have seen that particular syntax.



Could it be as easy as myPanel.resize; ?



Tracy











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sauro, Nick
Sent: Monday, July 18, 2005 3:55
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] dispatching
effects





Hey guys, here'sa question.



I have a Panel, and on this Panel there is
a Button. Initially, the Panel is not exposed(save for the
Button).When the user clicks the button, I want to dispatch the Panel's
Resize effect. Currently, its hacked, so the panel has a
 and yea that works, but it's not the
right way to do it(everytime after that, when thePanel is open, when user
selects something on the grid, it resizes again lol). I've been googling
for hours, and it shows how to do Custom events, but i want to dispatch that
built in event.



Thanks







Nick
Sauro+R O U N D A R C H + bus 212.909.2335+ mob 914.882.3687















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of dimkapimkakolbasa
Sent: Monday, July 18, 2005 1:27
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to catch
events of a child component by the parent component?

I've got a custom component Widget which makes a child
image in it's 
createChildren() method like that:

function createChildren (): Void {

super.createChildren ();
 this.image =
this.createClassObject (

 mx.controls.Image,

 abc,

 0,

 {source: rose.jpg}
 );
}

I want to call a rotateImage function when image
is clicked.
Is using a Delegate the only way to make it? I
made it by adding such 
code to createChildren():

var rotateDelegate: Object = Delegate.create
(this,rotateImage);
image.addEventListener (mouseDown,
this.rotateDelegate);

Can I make it without a Delegat?










--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.