Page 1 of 1

Image missing ?

Posted: Wed Apr 23, 2014 1:08 pm
by michel_bujardet
I am playing with a hello world project and added an image area.

The picture it contains shows in the editor, but does not show in the iPhone simulator, whether I use jpg or png.

What am I missing ?

Also, the virtual keyboard does not seem to want to go away, even when I click on the home button, or out of the keyboard area...

Any help will be appreciated. Thank you in advance.

PS : I wanted to post a screen grab, but the forum won't let me insert a picture :(

Re: Image missing ?

Posted: Wed Apr 23, 2014 2:36 pm
by Dixie
If you import an image into your stack it becomes 'part' of your stack...

You added an image area and then chose a file to display within the image area... When you run your stack in the simulator it does not know where that image is. You must copy the image that you wish to use into the 'app'. Do this by adding your image to the stack you wish to run in the simulator through the copy files pane... 'file > standalone settings'..

Then when you open the card

Code: Select all

on preOpenCard
   set the filename of image 1 to specialfolderpath("engine") & "/world.jpg"
end preOpenCard
As for the kkeyboard hiding/showing.. set the focusable (traversalON) in the property inspector to 'off'.. In the script of the field place the following :-

Code: Select all

on mouseDown
   set the traversalOn of me to true
   focus on me
end mouseDown
The keyboard will appear when you 'click/touch' the field.

in the card script... place the following to take the focus away from the field and the keyboard will hide...

Code: Select all

on mouseDown
   set the traversalOn of fld 1 to false
end mouseDown

Re: Image missing ?

Posted: Wed Apr 23, 2014 3:12 pm
by michel_bujardet
Thank you so much Dixie :)