I am trying to read the width and height of an image but running into problems. I have a main stack with two sub stacks Assets and Behaviours. Assets has a card that holds a number of png images. The behaviour stack has a card that has buttons that have behaviours defined/written. The main stack has a button that uses a behaviour. The behaviour code sets the icon of the button to that of one of the stored images - this code works. But I wish to resize the host button so that it is large enough to display the image that is assigned to it. Here is my code:
Code: Select all
set the icon of me to theFrame
set the width of me to the width of theframe -- fails
set the height of me to the height of theframe -- fails
I have tried variations e.g. set the width of me to the width of image theframe plus typing in the image name directly and also referring to it by ID number. I have tried reading the width in an answer statement but that fails as well.
Any ideas?