how to add both signal and battery indicator in a swf?
hi
I'm working on a project and it's about eyePhone ui for my Nokia 6700 Slide :)
and I'm having trouble combining both function in the swf file
I'm following those two tutorials
[URL="http://www.developer.nokia.com/Community/Wiki/How_to_make_a_signal_indicator"]http://www.developer.nokia.com/Community/Wiki/How_to_make_a_signal_indicator[/URL]
[URL="http://www.developer.nokia.com/Community/Wiki/How_to_make_a_battery_indicator"]http://www.developer.nokia.com/Community/Wiki/How_to_make_a_battery_indicator[/URL]
here's my code
[CODE]
//battery
status = fscommand2("FullScreen", true);
fscommand2("SetQuality" ,high);
blevelsNumber=15
batMax = fscommand2("GetMaxBatteryLevel");
batLevel = fscommand2("GetBatteryLevel");
batSource = fscommand2("GetPowerSource");
batLevel2 = Math.ceil(batLevel*blevelsNumber/batMax);
if (batSource == 1) {
gotoAndPlay(blevelsBumber+1);
}else{
gotoAndPlay(batLevel2);
}
//(Signal)
levelsNumber=5;
signalMax = fscommand2("GetMaxSignalLevel");
signalLevel = Math.ceil(fscommand2("GetSignalLevel")*levelsNumber/signalMax);
networkstatus = fscommand2("GetNetworkStatus");
if (networkstatus == 0) {
signalLevel = levelsNumber + 1;
}else{
gotoAndPlay(signalLevel);
}
[/CODE]
the battery were working but after I added signal indicator, the battery follows signal function
for example if there were 3 bars of signal the battery signal will be 3 too
any suggestion?
Re: how to add both signal and battery indicator in a swf?
you call "goto" in the same movieClip (in current movieClip)... and it is called twice... probably only the last "goto" executes...
try make separated movieClips for indicators and code somethig like this:
[code]
...
battery.gotoAndPlay(blevelsBumber+1);
...
battery.gotoAndPlay(batLevel2);
...
signal.gotoAndPlay(signalLevel);
.....
[/code]