Go Back   kirupaForum > Flash > ActionScript 3.0

Reply
 
Thread Tools Display Modes
Old 11-29-2009, 04:51 AM   #1
IqAndreas
Registered User
Location Värmland, Sweden (and Illinois, USA)

Posts 1,329
DisplayObject.height all messed up...

It seems that the getters and setters for the height are all botched up when the DisplayObject has any rotation applied to it at all.

The getter for the height returns the total height of all the bounds.
The setter for the height sets the height regardless of rotation.

If you set the same value for height several times in a row, you will get about 3 different results until it stays at the same result.
If the heigt's getters and setters are different, imagine the ramaflacations involved, first and foremost setting properties via "+=".

Just posted up a quick example:
http://iqandreas.isbetterthanyou.org...htProblems.swf
http://iqandreas.isbetterthanyou.org...htProblems.fla


The properties "width", "height", and "rotation" are applied in that order as listed, but setting them in a different order will affect the result differently, but I don't have the time for that.


Anyone else annoyed by this? Whatever happened to the Logic?
I'm still waiting for properties (in progress by me) such as "unscaledHeight", and sprites which do not stretch when you set the height or width.

__________________
Give someone code, and they will have code for a day.
Teach someone to code, and they will have code for life.

Support a starving developer. Click ads in my blog...
http://iqandreas.blogspot.com/

Last edited by IqAndreas; 11-29-2009 at 04:58 AM..
IqAndreas is online now   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Old 11-29-2009, 05:57 AM   #2
lope
Registered User
http://www.gskinner.com/blog/archive...ng_as3_bu.html ?
lope is offline   Reply With Quote
Old 11-29-2009, 09:54 PM   #3
Shaedo
Registered User
 
Shaedo's Avatar
Location Australia, Sydney

Posts 572
Thanks to both of you for the heads up!
Shaedo is offline   Reply With Quote
Old 11-30-2009, 02:59 AM   #4
Scythe
Mwa ha ha
 
Scythe's Avatar
Location USA

Posts 338
It was like any other night when I encountered an grizzly old man in a cabin in the forest. His face was dark and foreboding as he warned me never to use the height and width properties of display objects when they're rotated. Now it all makes sense...

Quick, turn back before it's too late!
Scythe is online now   Reply With Quote
Reply

Tags
displayobject, height, rotation, sprite, width


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:45 PM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com