A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Simple rotation... Why doesnt this work propperly??

  1. #1
    Senior Member
    Join Date
    Feb 2004
    Location
    Orlando
    Posts
    117

    Simple rotation... Why doesnt this work propperly??

    Hi guys.

    I'm having a problem getting the _rotation property to work for me. Im using MX 2004. it doesnt make any sense to me as to why it isnt working, but here's the code:

    code:

    onClipEvent(enterFrame){
    trace(_rotation);
    _rotation += change++;
    }



    Am I just having a serious brain fart today? or is there nothing wrong with this code?
    The New Guy.

  2. #2
    Junior Member
    Join Date
    Mar 2004
    Location
    Northern VA
    Posts
    21
    Are you making the game for PSX2C? Well hurry it up!

  3. #3
    Senior Member
    Join Date
    Feb 2004
    Location
    Orlando
    Posts
    117
    haha, Who is this??
    The New Guy.

  4. #4
    Junior Member
    Join Date
    Mar 2004
    Location
    Northern VA
    Posts
    21
    muhahaha you'll never know j/k it's THX. I go to this site whenever I need flash help and saw your post and finally decided to register just to freak you out.


    I wish I could help but I belong in the newbies section.

  5. #5
    Senior Member
    Join Date
    Feb 2004
    Location
    Orlando
    Posts
    117
    thats cool man... Yeah, Ill work on a game for PSX2 when I have the time. Right now I've got so much on my plate that its kind of a low priority.

    Glad to see you in here man. I wish PSX2C was busy AND as helpfull as this forum man. I kind of feel like PSX2C is my 'forum-native land".
    The New Guy.

  6. #6
    Senior Member
    Join Date
    Feb 2004
    Location
    Orlando
    Posts
    117
    BTW, my output keeps poping out 0.
    The New Guy.

  7. #7
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    You might be having a problem if change is not initialized to a valid number. Try this:

    Code:
    onClipEvent(load)
    {
      this.change = 0;
    }
    
    onClipEvent(enterFrame){
            trace(this._rotation);
            this._rotation += this.change++;
    }
    I assume, from this code, that your intent is to get the rotation to accelerate over time.

  8. #8
    Senior Member
    Join Date
    Feb 2004
    Location
    Orlando
    Posts
    117
    Thanks man, thats exactly what I needed and yes, the object accelerates over time.

    Thanks again
    The New Guy.

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