A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: change (-) position

  1. #1
    Senior Member
    Join Date
    May 2016
    Posts
    133

    change (-) position

    hello evryone
    4-6=-2
    what ac3 code to make it 4-6=2-
    it mean how can i change (-) to right
    thanks so mutch

  2. #2
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,087
    var equaled;
    function subtract(a,b){
    equaled = a-b;
    if(equaled.toString().charAt(0)=="-"){
    equaled=equaled.toString().split("-")[1]+"-"
    }
    return equaled
    }

    trace(subtract(4,6));
    M6 Cluster screenshotter by MangoWave, for your custom digital cluster operating systems will be released soon.

  3. #3
    Senior Member
    Join Date
    May 2016
    Posts
    133

  4. #4
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,087
    haha, nice
    M6 Cluster screenshotter by MangoWave, for your custom digital cluster operating systems will be released soon.

  5. #5
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,785
    Hi

    Or another way for you to study Alloy, and Kofa.

    PHP Code:
    var c;

    function 
    moveMinus)
    {
        
    b;
        if ( 
    )
        {
            
    c.toString().substr(1) + "-";
        }
        return 
    c;
    }

    tracemoveMinus) ); 

  6. #6
    Senior Member
    Join Date
    May 2016
    Posts
    133

  7. #7
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,087
    yeah use fruitbeards, his if statement uses less processing power.
    M6 Cluster screenshotter by MangoWave, for your custom digital cluster operating systems will be released soon.

  8. #8
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,785
    Hi,

    Jealousy, sarcasm, I'm not sure?

    Just another way instead of your long winded string things.

    I know now, it's another excuse to reach 1000, use any you like Kofa, it was not intended to be a competition.

  9. #9
    Senior Member
    Join Date
    May 2016
    Posts
    133
    I'm a student who likes to learn from his professors and each professor has his own way of delivering information to his student
    Finally all thanks and appreciation to all

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center