Flashhilfe.de - Flash Community

Prototype: MovieClip.onDoubleClick [Flash 8]

Forum > Tipps & Tricks zu Flash, Flex und Adobe AIR > Prototype: MovieClip.onDoubleClick

 


AntwortenRegistrieren Seite1  

 24.07.2003, 17:27 
Benutzerbild von SebastianFlashhilfe.de Moderator
Beiträge: 6940
Wohnort: München
Registriert: Jan 2002

Prototype: MovieClip.onDoubleClick
Event Handler - Doppelklick

Prototype:
ActionScript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
MovieClip.prototype.addProperty("onDoubleClick",function() {
   return this.$onDoubleClick;
   },function(f) {
    this.__proto__ = DoubleClick.prototype;
    this.$onDoubleClick = f;
   ASSetPropFlags(this,["$onDoubleClick"],1,true);
});
DoubleClick = function() {};
DoubleClick.prototype = new MovieClip();
DoubleClick.prototype.onMouseDown = function() {
    if(this.hitTest(_root._xmouse,_root._ymouse,true)) {
        (this.t = getTimer()) < this.$a+250 ? this.$onDoubleClick() : this.$a = this.t;
    }
};
ASSetPropFlags(MovieClip.prototype,["onDoubleClick"],7,true);
ASSetPropFlags(this,["DoubleClick"],7,true);


Beispiel Aufruf:
ActionScript:
1
2
3
mc.onDoubleClick = function() {
    trace("Dies war ein Doppelklick")
};

Flex Freelancer || Flashhilfe @ Twitter || XING Profil
Schlagwörter: Movieclip, prototype
 
Themen
Ähnliche Beiträge zum Thema
 

AntwortenRegistrieren Seite1  

Schnellantwort

Du musst registriert sein, um diese Funktion nutzen zu können.
Partner Webseiten: DesignerInAction.de   Designnation.de   Mediengestalter.info   php-resource.de   phpforum.de   phpwelt.de   Pixelio.de   PSD-Tutorials.de   Tutorials.de

Haftungsausschluss   Datenschutzerklärung   Hier Werben   Impressum
© 1999-2012 Sebastian Wichmann - Flashhilfe.de