Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Architecture question using Move Effect and Events   Message List  
Reply | Forward Message #130911 of 149659 |
Hello,

I'm struggling on wrapping my mind around the best way to architect a
particular feature i am developing. i have gotten my code to work,
but i want to improve it to make it work using a more stable and
scaleble design.

QUESTION: Now, the problem is when a user rolls the mouse over a
custom MXML compoenent which already has a Move effect applied to it,
I want the MXML component to stop moving. The custom MXML component
has a Label, Text Area,and other components inside of it, but the
mouse roll over Event is caught by the inner most UITextField
component. Inside the Event Handler i have a very hacky way to stop
the Move Effect:

event.target.parent.parent.activeEffects[0].pause();

1. how do i make the custom MXML component catch the event instead of
the UITextField buried deep inside the component

2. how do i reference the MoveEffect for the MXML component without
having to use parent.parent.activeEffects[0] since that is basically
hardcoding.

Any help would be greatly appreciated. For more information on my
situation, i've posted some info:

GOAL: the feature is simple, i have a custome MXML component that has
a Label and a TextArea field inside of a Canvas. My flex application
makes HttpService to my server and returns data which i put into an
ArrayCollection. for each element in the ArrayCollection initialize
a new custom MXML component, I bind it to my custom MXML component
which i initialize and apply an effect to the MXML component so that
the component moves across the screen in various places. The
component should stop moving when a user rolls his/her mouse over the
component.


Thanks for all of your help!

--Deven




Fri Nov 21, 2008 7:55 pm

devenhariyani
Offline Offline
Send Email Send Email

Forward
Message #130911 of 149659 |
Expand Messages Author Sort by Date

Hello, I'm struggling on wrapping my mind around the best way to architect a particular feature i am developing. i have gotten my code to work, but i want to...
devenhariyani
Offline Send Email
Nov 21, 2008
7:55 pm

below is the code that i am using. maybe this will help you see what i'm trying to do, and help how i should be properly stopping the Move Effect for UI...
devenhariyani
Offline Send Email
Nov 21, 2008
9:00 pm

I'm not sure I understand the whole context, but if I'm right that there's just one of these custom components per app, and therefore one Move effect running...
Chet Haase
chethaase
Offline Send Email
Nov 22, 2008
4:20 am

I apologize if the context of my question is not fully clear, and I greatly appreciate you taking the time to respond. However, your assumption is not...
devenhariyani
Offline Send Email
Nov 24, 2008
11:20 pm

I believe you need to set the "mouseChildren" property on your custom component to false, that way the label inside your component will not deal with the mouse...
steve.klee
Offline Send Email
Nov 25, 2008
4:37 pm

... has ... moving ... event ... Yet you didn't register an event listener on the label, either, and expect to be receiving events from _it_, hmmm? ... ...
Amy
droponrcll
Offline Send Email
Nov 25, 2008
5:36 pm

Wow..you all have been very helpful! Thank you so much for your support. In the end I did not use the mouseChildren property, because I needed the child...
devenhariyani
Offline Send Email
Nov 26, 2008
1:37 am

This is a good solution -- I was going to suggest that in the handleMouseRollOver function you can check currentTarget to see if it's an instance of...
Jules Suggate
cameron.wilding
Offline Send Email
Nov 26, 2008
6:47 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help