A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Flash CS5/AS3 - MovieClip disappears when dynamically changing width/height property

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    2

    Unhappy Flash CS5/AS3 - MovieClip disappears when dynamically changing width/height property

    Hi everybody!

    Here's my problem: a movie clip symbol is designed and subclassed in Flash, but get instanced and addChild-ed in AS3. It works well as long as I don't change it's width/height property (scaling works too), but if i do, it disappears

    Please help me, thank you.

  2. #2
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    Please help me help you by posting relevant code. Only guess I can give is that the algorithm that calculates the width/height is giving you 0/1/NaN.

  3. #3
    Registered User
    Join Date
    Feb 2012
    Posts
    2
    Thank you for your reply !
    Actually, there is no relevant code to post. It's just simply like:

    var mov:MovClass = new MovClass();
    mov.width = 200;
    mov.height = 200;
    addChild(mov);

    But the mov doesn't show up until I comment the line 2 and 3, or use mov.scale instead.
    Any idea?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center