FORUMS: list search recent posts

LoadVars - need help in setting variables.

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
J&#281;drzej Kuchta
LoadVars - need help in setting variables.
on Apr 13, 2009 at 3:10:02 pm

I'm trying to create a simple translator for one of fantasy games. It's content is unimportant.

The thing is, that I can't set the flash movie to search a typed in text in a loaded file. I use the LoadVars function.


00 on(keyPress "")
01 {
02 Temp.text = Inp.text;
03 Hum.text += Inp.text+" ";
04 Inp.text = "";
05
06 var dict_lv:LoadVars = new LoadVars();
07 dict_lv.onLoad = function(txt:String):Void
08 {
09 txt = Temp.text;
10 Kam.text += dict_lv.Temp.text; // <-- This here does not work. I want a variable here, so every time I press "space" he searches for a word given, not a constant.
11 }
12
13 dict_lv.load("KamaelDictionaryFile.txt");
14}


When one writes a word in Inp textfield and hit's space, this text should be added to Hum text field (where the oroginal text is storaged), then searched in dict_lv for the translation and added to the Kam text field.
Line 10: Kam.text += dict_lv.Temp.text;
Kam.text is the textfield where the translation should be added. But, after dict_lv. I can add only a constant value, so flash searches for one word only.

How to make this thing a variable?

Files:
http://files.filefront.com/Translatorzip/;13593232;/fileinfo.html

Cheers.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]