Deprecated: Assigning the return value of new by reference is deprecated in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-settings.php on line 472

Deprecated: Assigning the return value of new by reference is deprecated in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-settings.php on line 487

Deprecated: Assigning the return value of new by reference is deprecated in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-settings.php on line 494

Deprecated: Assigning the return value of new by reference is deprecated in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-settings.php on line 530

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/classes.php on line 611

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/classes.php on line 728

Strict Standards: Redefining already defined constructor for class wpdb in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/wp-db.php on line 306

Deprecated: Assigning the return value of new by reference is deprecated in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/cache.php on line 103

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/cache.php on line 425

Deprecated: Assigning the return value of new by reference is deprecated in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/theme.php on line 623

Strict Standards: Redefining already defined constructor for class WP_Dependencies in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/class.wp-dependencies.php on line 15
GP - What can wii do » Blog Archiv » Erste Schritte // Import der WiiFlash-Klassen in ActionScript
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 947

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 948

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 947

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 948

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 947

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 948

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 947

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 948

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 947

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 948

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 947

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 948

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 947

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w00c0b5d/ba-ma-gp2009/wp-includes/kses.php on line 948
Erste Schritte // Import der WiiFlash-Klassen in ActionScript - Christian Selent

Zunächst werden die notwendigen Klassen in das erste Bild, dass den ActionScript-Code enthält, importiert.

import org.wiiflash.Wiimote;
import org.wiiflash.events.ButtonEvent;
import org.wiiflash.events.WiimoteEvent;
import flash.events.*;

Hier sieht man, dass Flash auf den Ordner „.org“ zugreift. import ist standardmäßig bei AS die Methode, mit der Klassen importiert werden. Danach wird auf das Verzeichnisse „.org.wiimote“ und „.org.wiimote.events“ verwiesen, in dem sich die Klassen für die Wiimote befinden. Mit import flash.events.*; werden alle Eventklassen von AS3 importiert.

Als nächstes wird das Wiimote-Objekt instanziert, mit dem weitergearbeitet werden soll.

var myWiimote:Wiimote = new Wiimote();

myWiimote ist ein neues Objekt der Klasse Wiimote und erbt damit ihre ganzen Events, Eigenschaften und Methoden. Der Name des instanzierten Objekts steht frei, die berühmten Beispiele „hund“ oder „katze“ können natürlich auch verwendet werden.

Gibt es mehrere Wiimotes, die verbunden sind, muss man mehrere Wiimote-Objekte instanzieren. Diesen wird eine ID zugewiesen (mehr dazu später).

Danach verbindet man das Wiimote-Objekt über die Methode connect.

myWiimote.connect ();

Damit ist die Wiimote verbunden und die Grundlagen für die weitere Programmierung gelegt.