I also had a similar problem building a video player a while back. I wanted
the play button to mimic the quicktime player play button that fades in and
out as the mouse moves over the video player component. And the location of
the play button is centered in the video player. The problem was that flash
detected a mouse-over the play button as a mouse-out on the video player
(detecting the movement between items on the stage )so the play button would
disappear when you went to click it. I'm sure there is a better solution
(maybe event bubbling?), but basically i created some logic to detect the
whether the moused over target was the video player or the button. I was
able to capture and flag a boolean variable by using
'MouseEvent.relatedObject' to detect which target was the last target.
jed

On Fri, Oct 9, 2009 at 9:57 AM, Scott Talsma <[email protected]> wrote:

> I actually posted something similar about 5 months ago.  The same problem
> crops up when using such containers as a drop target; no background=no
> ability to detect drop.
> http://talsma.tv/post.cfm/using-vbox-as-a-drop-target
>
> I think it is b/c there is "asset" to detect the mouse events.  As soon as
> you add the background, there is something "physical" (or as physical as it
> gets in the programming world) that flash sees under the mouse.
>
> I know it is not a very satisfying explanation, but that is the way it is.
>
>
>
> On Fri, Oct 9, 2009 at 1:34 AM, James Lynn <[email protected]> wrote:
>
>> MouseOver has the same problem and it also has the disadvantage of firing
>> EVERY time a different child node is moused over, not the functionality I
>> want.
>>
>>
>> On Fri, Oct 9, 2009 at 12:02 AM, Darin Kohles <[email protected]> wrote:
>>
>>> My guess is that your event choice - roll over - is only fired by items
>>> that expect input/interaction. I you just want the HBox to say change color
>>> or something - then use mouse over.
>>>
>>>
>>> On Thu, Oct 8, 2009 at 11:34 PM, James Lynn <[email protected]>wrote:
>>>
>>>> Hey this is an issue I that didn't seem to exist before I imported a
>>>> project from Flex Builder 3 into the new Flash Builder 4 Beta (even though 
>>>> I
>>>> believe they're both running the same Flex 4 SDK).
>>>>
>>>> Suddenly I'm having problems getting MouseEvents to trigger over
>>>> containers.  I've got code similar to this:
>>>>
>>>> <mx:Box width="80" height="80" rollOver="onRollOver(event)"
>>>> rollOut="onRollOut(event)">
>>>>        <mx:Text text="Blah"/>
>>>>        <mx:Text text="Blah/>
>>>>        <mx:Image source="{imageUrl}"/>
>>>>  </mx:Box>
>>>>
>>>> Those Roll Over Events are triggering whenever I roll over or out of any
>>>> of the child components, but not when I roll over any of the blank space in
>>>> the rest of the container.  So what should I do if I want I want an event 
>>>> to
>>>> fire when I roll over the 80x80 container itself and not just its children?
>>>>
>>>> Perhaps this has always been an issue and I just noticed it, but I don't
>>>> think so.  Any ideas?
>>>>
>>>> -James Lynn
>>>
>>>
>>>
>>>
>>> --
>>> Darin Kohles
>>> RIA Developer
>>>
>>
>>
>
>
> --
> Scott Talsma
> CTO, echoEleven
>



-- 
Jed Schneider
706-207-4458

Reply via email to