English 中文(简体)
页: 1
原标题:hitTestPoint not giving correct results

I have a movie clip on which I have added a MouseEvent.MOUSE_OUT listener.

movieclip.addEventListener(MouseEvent.MOUSE_OUT, removeMovieClip);

现在的逻辑是删除MOUSE_OUT上的电影剪辑,并在另一个纽顿的<代码>MouseOver上添加。 预定功能就像显示某种胎儿的激光器。

The MouseEvent. 备忘录SE_OUT 在本案中的发射并非始终如一地运作。 当我把烟雾移出时。 如果我转播,那么慢慢慢的,那就没有火力,因此,电影短片仍然处于这一阶段。

What could be the problem? .

<>Update: 我只想提及,如果 mo在<之外,我就使用。 在大多数情况下,如果我慢慢慢地搬走,hit Test Point就没有给出它在电影节外的正确结果(false),因此我不能删除该物体。

Update 2: Let me rephrase the question. I think I have messed up the explanation.
The Mouse events work correctly.

movieclip.addEventListener(MouseEvent.MOUSE_OUT

火灾是正确的,我当时正在处理方法。 现在,当我试图确定我是否偏离了这个电影节,是问题产生时。

private function removeObj(eve:Event):void
{
    var e:MouseEvent = MouseEvent(eve);
    if (m_wishlistImage)
    {
        var InsideSlot:Boolean = eve.currentTarget.hitTestPoint(e.stageX, e.stageY);
        if(!InsideSlot){

在慢慢慢地将 mo移出标语<代码>InsideSlot时,仍属实,因此代码流在if的条件下,因此我无法删除标语。

追踪<代码>e.stageX 我看到,它常常显示坐标,它并非确切地表明在什么地方(在时间段内某个点)。 在我慢慢慢慢慢慢慢慢慢慢退步时,这种行为最经常发生。

原因何在?

问题回答

检查你在 阶段坐标(NOT 贵儿童电影剪辑坐标)。

换言之,确保你使用<条码>分级:mouseX, 阶段.mouseY,而不是在电影片段内含蓄地使用当地成员变量(这将给电影片面上的湿度)。

页: 1

如果你取代你的《工作守则》,这个问题就能够得到解决。 谅解备忘录——活动成果。 你们需要加以利用,因为有时在Mouse-Event的听众中不捕获模拟节目,还因为旋涡轮机总价通常太快,无法追踪烟花运动如此使用。 ENTER_FRAME.

在此之前,我曾遇到过此类问题。 因此,增加听众的这个阶段。

增加EventListener(Event.ENTER_FRAME,removeMovieClip)

现在,在从集装箱中删除物体或电影带之前,检查也像检查一样。

公共职能

页: 1

如果(ParentClip.contains(ChildClip)) 父母委员会记录。

iii

努力听取<代码> MouseEvent.ROL_OUT event, 相反。

如果贵国电影院的照片没有伪造儿童财产,那么,你会根据电影院的内容,在你之前启动《谅解备忘录》——“遗产”活动,是站不住脚的。





相关问题
Disable button tooltip in AS3

I want to disable the tooltip on certain buttons. The tooltip manager seems to be an all or nothing solution. Is it possible to disable the tooltip for just one or two buttons?

Multiple Remote call made simultenously

I was making multiple remote calls and they are done sequentially and when I am getting a result event back it s triggering calls to all the methods with ResultEvent as an argument . I am supposed to ...

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I ve been advised in another SO question to write a custom ...

Clearing RSL in Cache

I have built a flex application which has a "main" project and it is assosciated with a few RSL s which are loaded and cached once i run my "main" application. The problem i am facing is that the ...

What s a good way of deserializing data into mock objects?

I m writing a mock backend service for my flex application. Because I will likely need to add/edit/modify the mock data over time, I d prefer not to generate the data in code like this: var mockData =...

AS3 try/catch out of memory

I m loading a few huge images on my flex/as3 app, but I can t manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont ...