Deprecated: Assigning the return value of new by reference is deprecated in /var/www/omflash.dk/public_html/wp-includes/cache.php on line 33

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/omflash.dk/public_html/wp-content/plugins/sem-subscribe-me2/sem-subscribe-me.php on line 511

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method UltimateTagWarriorActions::ultimate_query_vars() should not be called statically in /var/www/omflash.dk/public_html/wp-includes/functions.php on line 1252

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method UltimateTagWarriorActions::ultimate_posts_where() should not be called statically in /var/www/omflash.dk/public_html/wp-includes/functions.php on line 1252

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method UltimateTagWarriorActions::ultimate_posts_join() should not be called statically in /var/www/omflash.dk/public_html/wp-includes/functions.php on line 1252

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method UltimateTagWarriorActions::ultimate_tag_templates() should not be called statically in /var/www/omflash.dk/public_html/wp-includes/functions.php on line 1329
ActionScript 3 - Send events fra dine egne klasser - omFlash();
Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method UltimateTagWarriorActions::ultimate_add_ajax_javascript() should not be called statically in /var/www/omflash.dk/public_html/wp-includes/functions.php on line 1329

ActionScript 3 - Send events fra dine egne klasser


Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/omflash.dk/public_html/wp-includes/functions-formatting.php on line 83

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method UltimateTagWarriorActions::ultimate_the_content_filter() should not be called statically in /var/www/omflash.dk/public_html/wp-includes/functions.php on line 1252

Strict Standards: Non-static method UltimateTagWarriorActions::regExEscape() should not be called statically in /var/www/omflash.dk/public_html/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior-actions.php on line 638

Strict Standards: Non-static method UltimateTagWarriorActions::regExEscape() should not be called statically in /var/www/omflash.dk/public_html/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior-actions.php on line 638

Strict Standards: Non-static method UltimateTagWarriorActions::regExEscape() should not be called statically in /var/www/omflash.dk/public_html/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior-actions.php on line 639

Strict Standards: Non-static method UltimateTagWarriorActions::regExEscape() should not be called statically in /var/www/omflash.dk/public_html/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior-actions.php on line 639

Strict Standards: Non-static method UltimateTagWarriorActions::replaceTagWithLink() should not be called statically in /var/www/omflash.dk/public_html/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior-actions.php on line 643

Et super hurtigt lille tip: Hvis du har lavet en klasse som extender en allerede eksisterende klasse, eksempelvis Sprite eller Movieclip, så er det super nemt at sende events.

Der hvor du vil starte en event indsætter du bare følgende kode:

dispatchEvent(new Event(Event.COMPLETE));

Her er det en Event.COMPLETE, men man kan naturligvis sende en hvilken som helst eventtype på denne måde.



Del:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg

3 kommentarer

  1. Bjeld siger: (13. december 2007 kl. 13:53 )

    Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/omflash.dk/public_html/wp-includes/functions-formatting.php on line 83

    Ja, Events er super smart, og det bliver endnu smartere når man i sine projekter laver sine egne cusom Events.

    Jeg har en video tut om Custom events på www.flashforum.dk/video

  2. Mads Buch Stage siger: (14. december 2007 kl. 11:02 )

    Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/omflash.dk/public_html/wp-includes/functions-formatting.php on line 83

    Ja, Custom Events er også en rigtig god ting og en virkelig ny, stærk feature i AS3.

  3. Jamal Soueidan siger: (15. december 2007 kl. 00:05 )

    Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/omflash.dk/public_html/wp-includes/functions-formatting.php on line 83

    Du kan også bruge navngive din egen events kald det du vil :)

    dispatchEvent(new Event(”SETUP”));

    du lytter bare eventen på den her måde :)

    addEventListener(”SETUP”, onSetup);

    Så simpelt :)

Skriv en kommentar