Warning: include() [function.include]: Unable to access /var/www/html/rogue-development/blog2/wp-content/advanced-cache.php in /var/www/html/rogue-development/blog2/wp-settings.php on line 62

Warning: include(/var/www/html/rogue-development/blog2/wp-content/advanced-cache.php) [function.include]: failed to open stream: No such file or directory in /var/www/html/rogue-development/blog2/wp-settings.php on line 62

Warning: include() [function.include]: Failed opening '/var/www/html/rogue-development/blog2/wp-content/advanced-cache.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/rogue-development/blog2/wp-settings.php on line 62

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/html/rogue-development/blog2/wp-includes/functions.php on line 3468

Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /var/www/html/rogue-development/blog2/wp-includes/functions.php on line 3382

Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in /var/www/html/rogue-development/blog2/wp-includes/functions.php on line 3382
Flex ADDED_TO_STAGE event and scrollbars « Marc’s Musings

Flex ADDED_TO_STAGE event and scrollbars

Be careful with ADDED_TO_STAGE event handlers, I ran into a interesting bug today.  Upon resizing the browser window, the current “activity” the user was working on would restart.  It should only have restarted when it was added to the stage and was confusing me why it would occur upon resizing a browser window.

A little digging, and I figured out why.

If you have a component inside a flex container like a Canvas.  And the container is resized and all of a sudden it requires a scrollbar to fit everything you will get an extra ADDED_TO_STAGE event.  Internally the container removes the component, creates a content pane to scroll around, and moves all of it’s children from the base container object onto this content pane.  That removal/addition causes the ADDED_TO_STAGE events to fire and caused my bug.

0 Responses to “Flex ADDED_TO_STAGE event and scrollbars”


Comments are currently closed.