×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    1

    Question 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
    http://www.developer.nokia.com/Commu...gnal_indicator
    http://www.developer.nokia.com/Commu...tery_indicator

    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);
    }
    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?

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2011
    Location
    bucharest
    Posts
    149

    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);
    .....

Similar Threads

  1. battery level indicator
    By urrg in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-05-14, 05:46
  2. RF Signal Strength Indicator (RSSI)
    By genscape in forum General Development Questions
    Replies: 0
    Last Post: 2003-03-31, 16:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×