Everything listed under: scaleY

  • AS3 / Flash / FlashDevelop - scaleY = 0 ... Bug with scaleY value on Custom Class

    I haven't found much on the web about this...

    Issue:

    Has anyone experienced an issue where a custom class extending a library MovieClip instantiated on stage has an initial scaleY value of 0, but scaleX is 1?

    example:

    - class MovieClipAndThenSome extends
    - class MovieClipPlus extends class FL_MCFromLibrary
    - class FL_MCFromLibrary is generated by flash when not found in the classpath (it is the linkage name of a library movie clip in flash) and extends MovieClip

    //as3 example..

    var newCustomMC:MovieClipAndThenSome = stage.addChild(new MovieClipAndThenSome());

    trace(" >> scaleX: " + newCustomMC.scaleX); // output: >> scaleX: 1
    trace(" >> scaleY: " + newCustomMC.scaleY);// output: >> scaleY: 0


    is this a known flash bug?

    solution:

    an obvious workaround... call this line after object is added to stage..

    this.scaleY = this.scaleX = 1;