Как мне переделать свой SWF для команд xml? «Remake» звучит глупо, но я просто хочу, чтобы целочисленные значения обновлялись в XML-файле. Это может быть за пределами моего понимания. Я хотел бы
Например, месиво или метод, из которого я могу работать.
myThoughts
- Необходимо прочитать XML "разобрать и т. Д."
- переменные получают e: data вместо "моя борьба с передачей значений и вызовами функций"
XML
//XML
<head>
<seq_no>text</seq_no>
</head>
<body>
<count>0</count>
<timer>10</timer>
<fcount>0</fcount>
</body>
RUBY REXML
msg1 = {"msg" => {"head" => {"type" => "frctl", "seq_no" => seq_no},
"body" => {"count" => "0", "timer" => 10, "fcount" => 10000}}}
msg1 = {"msg" => {"head" => {"type" => "frctl", "seq_no" => seq_no},
"body" => {"count" => "0", "timer" => 100, "fcount" => 100000}}}
Flash
//Flash "the counter" half of Stackoverflow has participated in writing
var timer:Timer = new Timer(10);
var count:int = 0; //start at -1 if you want the first decimal to be 0
var fcount:int = 0;
timer.addEventListener(TimerEvent.TIMER, incrementCounter);
timer.start();
function incrementCounter(event:TimerEvent) {
count++;
//
fcount=int(count*count/10000);//starts out slow... then speeds up
//
var whole_value:int = int(fcount / 100); //change value
var tenths:int = int(fcount / 10) % 10;
var hundredths:int = int(fcount) % 10;
mytext.text = whole_value + " : " + tenths + hundredths;
}
"в надежде скоро покинуть Нубсвилль, продолжайте их ждать"