Make sure that the object that you call dispatchEvent on is the same as the 
object where you did the addEventListener.  So if 'this' in the 
addEventListener line is the panel, make sure you're calling dispatchEvent on 
the Panel.

Matt

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Barrau 
Antoine
Sent: Tuesday, January 10, 2006 9:25 AM
To: [email protected]
Subject: [flexcoders] Question about creating a rotating horizontal list on flex

Hi,
i'm trying to create in flex some kind of nice catalog
presenting its elements in a sliding (or rotating)
way, each element having a different alpha reporting
to its position (the element on the center of the
screen is 100% alpha, the side elements are 0, etc..).
As i'm new in flex, i'm trying to use event broadcast
and listener to manage all that.
I'm creating a simple canvas and call several time the
 same custom mxml component (offerPanel, basically a
panel displaying my element information), each element
having his alpha depending on a formula (and this is
working fine). What i want to do is to have a button
enabling the slide and thus changing the x coordinate
of all element panels in one click (to trigger an
effect for example).
What i do so far is : 

my button call a click function doing : 
dispatchEvent({type:"moveOffersRight"});

in my offerPanel.mxml, i do the following thing : 

function initializePanel():Void
{

this.addEventListener("moveOffersRight",mx.utils.Delegate.create(this,
function(event):Void {
mx.core.Application.alert("received
moveOffersRight");}));

}

and call this function at initialization of the main
mx:Panel of my offerPanel component.

The fact is that nothing happen when i click on the
button.
I think i'm doing a big mistake somewhere (may be i
don't really understand how broadcast and listener
works together?).
Anybody to help me so far?

thanks a lot,

Antoine



        

        
                
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com


--
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



 




--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to