All children added to the plugin via AS are HUGE

  • So take this example, where 'pf' is a rectangle that exists in the plugin since the beginning (added in flash;the origin in the center) and 're' is instantiated in actionscript. 'tf' is a textfield:

    What happens is that the plugin base (pf) appears over the panorama with exactly the CORRECT dimensions and position. However, BOTH the textfield (tf) AND the rectangle (re) show up *HUGE*! But I really mean, HUGE, like, over 400% as big as they should be.

    And the funny thing is, according to the CONTENTS of the textfield tf, the rectangle re's dimensions are correct!

    What's going on here? Does krpano do anything funny to the plugins' children that I'm not aware of?

  • In case anyone is interested, this size discrepancy was also a scaling issue. In other words, I can avoid this crazy bug by adding every single displayobject in my plugin directly to the stage and using only actionscript to generate the said displayobjects (no mixing pre-included elements).

  • All I was using was align, why does align cause gigantism in the plugin's *children*? :P I do need the origin to be at the center.

    Anyway, I eventually resorted to draw the entire plugin using actionscript and this fixed all issues, so it's all fine now.

Jetzt mitmachen!

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