Articles Tagged 'MouseEvent'

Papervision 3D: to show the hand cursor on the 3D interactive elements

Set in a material way interactive and engaging event with a plan:

1
2
3
4
5
6
7
8
BitmapAssetMaterial = new BitmapAssetMaterial ( "foto1" ) ; var mymaterial: BitmapAssetMaterial BitmapAssetMaterial = new ("photo1");
; mymaterial. interactive = true;
Plane = new Plane ( my_material , 200 , 100 , 0 , 0 ) ; var myplane: Plane = new Plane (my_material, 200, 100, 0, 0);
( InteractiveScene3DEvent . OBJECT_PRESS , myplane. addEventListener (InteractiveScene3DEvent. OBJECT_PRESS,
e : InteractiveScene3DEvent ) : void { function (e: InteractiveScene3DEvent): void {
/ / Todo
}
);

Continued ...

Very short trick: addEventListener () AS3, a handler more events

In Actionscript 3.0 you must use addEventListener() to intercept any event:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/ **
* Given a MovieClip mc, you set events and handlers
* /
( MouseEvent . CLICK , on_click ) ; mc. addEventListener ( MouseEvent . CLICK, on_click);
( MouseEvent . ROLL_OVER , on_roll_over ) ; mc. addEventListener ( MouseEvent . ROLL_OVER, on_roll_over);
( MouseEvent . ROLL_OUT , on_roll_out ) ; mc. addEventListener ( MouseEvent . ROLL_OUT, on_roll_out);
/ **
* Functions hander for the above events
* /
e : MouseEvent ) : void { on_click function (e: MouseEvent ): void {
/ / Click
}
e : MouseEvent ) : void { on_roll_over function (e: MouseEvent ): void {
/ / Roll over
}
e : MouseEvent ) : void { on_roll_out function (e: MouseEvent ): void {
/ / Roll-out
}

Continued ...

Adobe AIR and the API Feedburner: reloaded

I draw inspiration by the excellent tutorial Napolux , Flex 3, Adobe AIR and the API Feedburner , which shows how to write a simple application (or widgets) using Flex 3 Adobe AIR, to show how to accomplish the same thing using Adobe Flash CS3. If you wish, and you can also use the extension for creating Adobe AIR applications. It is not necessary for the purposes of this tutorial, complete the application as an AIR executable, you can use the proposed code as a simple Flash movie to be "affixed" to your Web pages

Continued ...

Flash CS3: The new event handling

Finally with ActionScript 3.0 no longer have two different management of events as they did before ActionScript 2.0 (see: Event management: similarities between Flash and Javascript ). The method addEventListener() , ubiquitous in the new architecture allows to manage new and exceptionally clean all possible events, even personal ones. The new organization in the package allows you to import the events that we serve and treat everyone equally:

1
2
3
4
/ / Events
. KeyboardEvent ; import flash.events. KeyboardEvent ;
. MouseEvent ; import flash.events. MouseEvent ;
. Event ; import flash.events. Event ;

Continued ...