Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    7,554
    Tokens
    0

    Latest Awards:

    Default

    Thank you very much..

    +rep, do you go on Habbo?

  2. #12
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Occasionally, and no problem Needs a bit more work as it gets faster each time you press the button, I'll look into that later
    Last edited by Protege; 16-07-2008 at 12:34 PM.
    Hi, names James. I am a web developer.

  3. #13
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    7,554
    Tokens
    0

    Latest Awards:

    Default

    nono, i didn't want it to get faste ... It was going to be a "you are this cool" meter..

    I'll donate you some rares next time i am on if you want

  4. #14
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Its alright, I'll see how I can make it to stop getting faster
    Hi, names James. I am a web developer.

  5. #15
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Heres an update, its a easier method to rotate the objects

    Code:
    var objRotate;
    var rotation;
    
    function rotateObj ()
    {
        if ( ! rotation == 0 )
        {
            _root[objRotate]._rotation += 1;
            rotation--;
            rotating = true;
        }
        else
        {
            rotating = false;
            clearInterval( interval );
        }
    }
    
    function rotateObject ( degree, obj, speed )
    {
        if ( rotating === true )
        {
            // fail
        }
        else
        {
            rotation = degree;
            objRotate = obj;
            for ( var i = 0; i <= 180; i++ )
            {
                clearInterval( interval );
                interval = setInterval( rotateObj, speed );
            }
        }
    }
    
    stop();
    Place that in the actionscript frame (root) and use this func to rotate any movieclip.

    On a button :
    Code:
    on (release)
    {
        rotateObject( 90, "mcobj", -50 );
    }
    In a script...
    Code:
    rotateObject( 90, "mcobj", -50 );
    Syntax:
    Pink -> Degree
    Orange -> Instance name
    Green -> Speed

    Heres the (*.fla)
    http://www.disasterpiece.co.uk/flash/rotateObj.fla

    Heres an example (*.html)
    http://www.disasterpiece.co.uk/flash/rotateObj.html


    Any probs post.
    Last edited by Protege; 16-07-2008 at 04:52 PM.
    Hi, names James. I am a web developer.

  6. #16
    Join Date
    Mar 2008
    Posts
    927
    Tokens
    0

    Default

    Nice work James!

Page 2 of 2 FirstFirst 12

Posting Permissions

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