A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: resetting width and height

  1. #1
    Senior Member
    Join Date
    Jul 2008
    Posts
    418

    resetting width and height

    this may seem like a noob question, and it probably is.
    I have this code:
    wall.rotation = sp.rotation;
    wall.width = sp.width;
    wall.height = sp.height;
    When i then trace the width and height of both wall, and sp, they are just not the same.
    Width is the same on both objects, but height is not. height just stays the same. whats going on here?

    I see that the order in which i set height and widht matters. i don't get this.
    how do i just set the width and height seperately?
    Last edited by omniscient232; 12-20-2010 at 04:57 AM.
    I program in AS3 only.

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    So adding a trace immediately after wall.height, your numbers are not the same? What is wall? Is it just an object or is it a movieclip?
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Senior Member
    Join Date
    Jul 2008
    Posts
    418
    Quote Originally Posted by samac1068 View Post
    So adding a trace immediately after wall.height, your numbers are not the same? What is wall? Is it just an object or is it a movieclip?
    Both wall and sp are movieclips, and sp is on stage.
    sp is a spawner, that i put in a moviecliep called "Level1"

    it immedietly spawns a wall on de stage when created.
    it should then give the width and height to it, but it doesn't.
    I program in AS3 only.

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