Page 1 of 1
Changing image size don't work when the angle is not 0
Posted: Sun Nov 17, 2013 2:00 am
by Mag
Hi all,
I'm trying to resize an image after i set it's angle (it's for when the orientation on mobile is changed), but it's seems to me that the new width and eight has effect only when the image is not "rotate". Ideas?
Code: Select all
on mouseUp
set the angle of image 1 to the angle of image 1 + "90"
set the height of image 1 to 100
set the width of image 1 to 100
set the loc of image 1 to the loc of this card
end mouseUp
Re: Changing image size don't work when the angle is not 0
Posted: Sun Nov 17, 2013 3:25 am
by Simon
Hi Mag,
Not sure you have to do this.
When the mobile rotates "top" becomes the new top of the device.. errr
the width and height of your card changes on orientation change .. errr
the left of the stack is always in your left hand?
Ok ok you just need that set the loc. Not the rotation as it still sees the top of the stack as the top of the device.
more: You'll have to work with resizeStack to work out the dimensions of the image you want (maybe 6.5 resolution independence you don't have to), make it wider in landscape etc.
I think I'm not getting the question right.
Simon
Re: Changing image size don't work when the angle is not 0
Posted: Sun Nov 17, 2013 8:24 pm
by Mag
Hi Simon, thank you for your post and useful info. I post an image when you can see the problem.
PS
I need to resize the image because I'm creating a Gallery of photos. So it's important that the image is rotated within the device and resized.
Re: Changing image size don't work when the angle is not 0
Posted: Sun Nov 17, 2013 8:45 pm
by Simon
Hi Mag,
Which version of liveCode are you using?
Oh Wait!
Have you setup your "allowed orientations"?
put mobileOrientation() --should contain landscape
http://lessons.runrev.com/s/lessons/m/4 ... ientations
Simon
Re: Changing image size don't work when the angle is not 0
Posted: Sun Nov 17, 2013 10:16 pm
by Mag
Thank you very much Simon! I had not thought of doing this because I was hoping to make only a card adjustable and not the entire stack which is made of many different sections. But I'll go with your solution, in the end, however, I have to make the stack resizable depending on the device then, there is not much more work.