Uni wrote:
> I'm trying to make a list of words with the equal translation
> next to those
> words.
> i.e.
>
> makan     : to eat
> tidur        :  to sleep
> duduk     : to sit
> etc...
>
> Because I have about 100 words, I guess it is not very effective if I have
> to type every single words...
> So, I was thinking about putting those words into lingo propertylist and
> then access them using lingo getList or other.
>
> now, I want every word put into a single text field because I
> want the user
> tobe able to click on the word to hear the pronunciation of the word
> clicked.
>
> My question is: Is there a way to create a textfield on the fly
> (using lingo
> scripting) so I can create a textfield and then get the word from the
> propertyList and then put the word into the text field?
>
> Any advise or help is more than welcome...
>
> Thanks!
>
> Regards,
> Uni

Not quite sure what you need but try this:
You can create a text member on the fly using new(type,castLib)
eg. newText=new(#text,1)
newText.name="myText"

Text can be drawn from your propertylist using a simple getaprop
masterList=[#makan:"to eat",#tidur:"to sleep"]
translation=masterList.getaProp(#makan)
myText.text=translation
Assign to a sprite location via puppetsprite(channel,true/false)
eg.myPuppet=puppetsprite 100, 1
myPuppet.member=myText
If you have a lot of words that yiou want to put on screen then use a repeat
loop and set the loc of the puppet sprite
You can reuse the same member though by simply referencing the
member("myText").text=some value

I think though you would be better off though with a more expanded
propertyList that you can use like a database
masterList=[#makan:[#translation:"to eat",#audiofile:"makan.wav"]
Then you just need to query the masterlist for everything associated with
each word
record=masterList.getaProp(#makan)
translation=record.translation
audio=record.audiofile

Hope this goes someways towards what you need
Brad


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to