Newbie question: use of fields for mobile phone sim
sarahr at genesearch.com.au
Wed Jan 26 22:00:44 EST 2005
> Since I'm creating a prototype of a mobile phone application in
> Revolution, the boss would like it to be "as close as possible" to the
> real thing. To give some context, take a look at this picture:
> Each line must be 29 pixels high, and the text 42 pixels over from the
> left. There may be different icons on each line, which are 7 pixels
> over, and vertically centered on each 29 pixel-high line.
> Now, I'm wondering the best way to implement this. The text in each
> line will be pulled from a stack containing names (imagine a list of
> contacts). Is it better to:
> A) Create several single-line fields? The problem with this comes into
> play when there are more than 8 items...figuring out scrolling could be
> B) Create a multi-line field. This seems easier, but how do I put
> different images on each line? If the user scrolls up and down, I'd
> like the correct image to stay on the correct line.
> C) Something I haven't thought of yet?
> The thought of different icons (and dealing with the transparency) is
> giving me headaches. How do I best approach this as a Revolution
This is an interesting application for Revolution.
A single scrolling field is probably the easiest. Set your font and
make sure the fixedLineHeight is set so that you get your 29 pixels per
For the icons, the easiest thing is to use the imageSource which allows
you to insert a picture instead of a single character in any field.
put "XLine 1" into your field.
The X can be any character even a space, it's just a placeholder for
Now import an image into your stack and give it a useful name say
Then type this in the Message Box:
set the imageSource of char 1 of field "MyList" to "ContactPic"
Your image will then appear instead of the letter X in the field.
Transparency is just a matter of getting the image right in a graphics
editor and then saving it as a gif or png so the transparency is
preserved. When you import it into Rev, the transparency should still
be there although I have had trouble with GraphicConverter's pngs.
Unless you have a lot of large images, I would recommend importing them
all into your stack and giving them logical names. You can then hide
them but still use them for button icons or imageSources.
More information about the Use-livecode