dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    May 2016
    Posts
    93

    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
    Senior Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    920
    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));
    My 3D browser based flash demo, you can draw on the wall and it saves forever: https://spark.adobe.com/page/oXRKzNxeb9p1t/

  3. #3
    Member
    Join Date
    May 2016
    Posts
    93

  4. #4
    Senior Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    920
    haha, nice
    My 3D browser based flash demo, you can draw on the wall and it saves forever: https://spark.adobe.com/page/oXRKzNxeb9p1t/

  5. #5
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,771
    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
    Member
    Join Date
    May 2016
    Posts
    93

  7. #7
    Senior Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    920
    yeah use fruitbeards, his if statement uses less processing power.
    My 3D browser based flash demo, you can draw on the wall and it saves forever: https://spark.adobe.com/page/oXRKzNxeb9p1t/

  8. #8
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,771
    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
    Member
    Join Date
    May 2016
    Posts
    93
    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

×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.