Container layers tween and set active differently in Flash and html5

  • Hi everyone)

    Yestrday I've been racking my brains while trying to bug-hunt a tour. It had a container layer at the bottom with some buttons, and this container had to be tweened in slowly and then switched on. I finally got it working both in Flash and html5, but this aroused some questions, so a made a test for this case.

    Let's assume, we need to tween a container layer slowly (2 seconds) after the pano was loaded. Here's the link:

    http://tours.viewit360.se/develop/bug_re…ontainer_tween/

    and full xml

    http://tours.viewit360.se/develop/bug_re…_tween/tour.xml

    There are three container layers with buttons. Top one has the following settings of alpha/availability:

    Code
    enabled="false" alpha="0"

    and action to tween it is:

    Code
    tween(layer[background].alpha,1,2);delayedcall(2, set(layer[background].enabled,true); );

    Center layer has these settings:

    Code
    enabled="false" alpha="0" visible="false"

    and action:

    Code
    set(layer[background_center].visible, true);tween(layer[background_center].alpha,1,2);delayedcall(2, set(layer[background_center].enabled,true); );

    and bottom one has setting

    Code
    enabled="true" visible="false" alpha="0"

    and action:

    Code
    set(layer[background_bottom].visible, true);tween(layer[background_bottom].alpha,1,2);

    When I test in chrome on my laptop, all three layers wok fine in Flash. But in html5, only the bottom one becomes enabled.

    So I wonder what goes wrong in html5.

    Thank you! *smile*

  • I thought about bgcapture, but I did not even indicate bgcapture setting in the container's code, that means the default ("false") is used meaning there's no background which will block receiving mouse events behind the container. And also, as far as I understand, bgcapture blocks mouse events behind the container, not for the children layers inside it. Hmm...

    Посмотрим, что скажет Клаус *smile*

  • Hi,

    I'm not sure what exactly you mean, but yes, enabled=false children elements can act differently in some case in Flash and HTML5 - but 'fixing' that is almost impossible due the internal Flashplayer/HTML5 architectural differences...

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!