I want to select an item from a drop down list and show a picture
on mouseUp
create invisible image
set width to 181
set height to 166
set location to 770,463
set filename to "./../My Pictures/Bag Pictures/Pouches/pouch1.jpg"
set visible to true
end mouseUp
why doesn't this script work?
cheers
Glenn
showing a picture
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi Glenn,
When you specify a property, you have to specify whose property you want to change. For example, if you want to change the textStyle of a field, you need to say which field:
If you want to change the width of an image, you also need to refer to that image correctly:
The problem is that you need to know how to refer to a newly created image. There are a few ways to do this.
After creating an image, the it variable contains a full reference to that image. So, you can do:
You can also refer to the last image.
The filename may also be wrong. I'd type
into the message box to check it.
Best,
Mark
When you specify a property, you have to specify whose property you want to change. For example, if you want to change the textStyle of a field, you need to say which field:
Code: Select all
set the textStyle of field "My Field" to bold
Code: Select all
set the width of image "Some Image" to 250
After creating an image, the it variable contains a full reference to that image. So, you can do:
Code: Select all
create img
put it into myImg
set the filename of myImg to <path to file>
Code: Select all
set the filename of the last image to <path to file>
Code: Select all
answer filename ""; put it
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode