On Oct 17, 2014 10:42 PM, "Alex Harui" <aha...@adobe.com> wrote:
>
> Why did we need our own MouseEvent?  I was expecting to use
> flash.events.MouseEvent and whatever the native MouseEvent is in
> HTML/JS/CSS?


This MouseEvent is just a wrapper around the respective native MouseEvents.

I am following the pattern of the FlexJS DragEvent.

Is there another/better way to do this?

Thanks,
Om

>
> -Alex
>
> On 10/17/14, 4:45 PM, "bigosma...@apache.org" <bigosma...@apache.org>
> wrote:
>
> >Repository: flex-asjs
> >Updated Branches:
> >  refs/heads/develop eed8bdaab -> efa544f09
> >
> >
> >Add MouseEvent
> >
> >
> >Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> >Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/576ce96e
> >Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/576ce96e
> >Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/576ce96e
> >
> >Branch: refs/heads/develop
> >Commit: 576ce96ee31fc3030f4b48633a55169bd3880cfe
> >Parents: eed8bda
> >Author: OmPrakash Muppirala <bigosma...@gmail.com>
> >Authored: Fri Oct 17 14:51:52 2014 -0700
> >Committer: OmPrakash Muppirala <bigosma...@gmail.com>
> >Committed: Fri Oct 17 14:51:52 2014 -0700
> >
> >----------------------------------------------------------------------
> > .../as/projects/FlexJSUI/src/FlexJSUIClasses.as |  1 +
> > .../src/org/apache/flex/events/MouseEvent.as    | 57
++++++++++++++++++++
> > 2 files changed, 58 insertions(+)
> >----------------------------------------------------------------------
> >
> >
> >
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/576ce96e/frameworks/
> >as/projects/FlexJSUI/src/FlexJSUIClasses.as
> >----------------------------------------------------------------------
> >diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
> >b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
> >index 6810d10..e2a3904 100644
> >--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
> >+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
> >@@ -113,6 +113,7 @@ internal class FlexJSUIClasses
> >       import org.apache.flex.core.FormatBase; FormatBase;
> >       import org.apache.flex.events.CustomEvent; CustomEvent;
> >       import org.apache.flex.events.Event; Event;
> >+      import org.apache.flex.events.MouseEvent; MouseEvent;
> >       import org.apache.flex.events.ValueEvent; ValueEvent;
> >       import org.apache.flex.utils.EffectTimer; EffectTimer;
> >       import org.apache.flex.utils.Timer; Timer;
> >
> >
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/576ce96e/frameworks/
> >as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as
> >----------------------------------------------------------------------
> >diff --git
>
>a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as
> >
>
>b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as
> >new file mode 100644
> >index 0000000..95db08d
> >--- /dev/null
> >+++
>
>b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as
> >@@ -0,0 +1,57 @@
>
>+/////////////////////////////////////////////////////////////////////////
> >///////
> >+//
> >+//  Licensed to the Apache Software Foundation (ASF) under one or more
> >+//  contributor license agreements.  See the NOTICE file distributed
with
> >+//  this work for additional information regarding copyright ownership.
> >+//  The ASF licenses this file to You under the Apache License, Version
> >2.0
> >+//  (the "License"); you may not use this file except in compliance with
> >+//  the License.  You may obtain a copy of the License at
> >+//
> >+//      http://www.apache.org/licenses/LICENSE-2.0
> >+//
> >+//  Unless required by applicable law or agreed to in writing, software
> >+//  distributed under the License is distributed on an "AS IS" BASIS,
> >+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> >implied.
> >+//  See the License for the specific language governing permissions and
> >+//  limitations under the License.
> >+//
>
>+/////////////////////////////////////////////////////////////////////////
> >///////
> >+package org.apache.flex.events
> >+{
> >+      import flash.events.MouseEvent;
> >+
> >+      /**
> >+       *  Mouse events
> >+     *
> >+     *  @langversion 3.0
> >+     *  @playerversion Flash 10.2
> >+     *  @playerversion AIR 2.6
> >+     *  @productversion FlexJS 0.0
> >+       */
> >+      public class MouseEvent extends flash.events.MouseEvent
> >+      {
> >+              public static const MOUSE_DOWN:String = "mouseDown_";
> >+              public static const MOUSE_UP:String = "mouseUp_";
> >+              public static const MOUSE_OUT:String = "mouseOut_";
> >+              public static const MOUSE_OVER:String = "mouseOver_";
> >+              public static const ROLL_OVER:String = "rollOver_";
> >+              public static const ROLL_OUT:String = "rollOut_";
> >+
> >+        /**
> >+         *  Constructor.
> >+         *
> >+         *  @param type The name of the event.
> >+         *  @param bubbles Whether the event bubbles.
> >+         *  @param cancelable Whether the event can be canceled.
> >+         *
> >+         *  @langversion 3.0
> >+         *  @playerversion Flash 10.2
> >+         *  @playerversion AIR 2.6
> >+         *  @productversion FlexJS 0.0
> >+         */
> >+              public function MouseEvent(type:String,
bubbles:Boolean=false,
> >cancelable:Boolean=false)
> >+              {
> >+                      super(type, bubbles, cancelable);
> >+              }
> >+      }
> >+}
> >\ No newline at end of file
> >
>

Reply via email to