A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Is there a major problem in ActionScript or am I being an idiot?

  1. #1
    Always needs help marinebro0306's Avatar
    Join Date
    Jul 2005
    Location
    Philadelphia
    Posts
    166

    Is there a major problem in ActionScript or am I being an idiot?

    I was experimeting with gravity in KM, and I cannot make a ball fall faster and faster using ActionScript.

    My code:
    onClipEvent(load){
    speedX = 5;}

    onClipEvent(enterFrame){
    this._x += speedX;}

    The code is inside a MC of a ball.

    Any ideas???
    From what I can see, nothing is wrong.
    Attached Files Attached Files

  2. #2
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    Code:
    onClipEvent(load){
    	speedY = 0;
    }
    
    onClipEvent(enterFrame){
    	speedY += 0.5;
    	this._y += speedY;
    }
    p.s.
    In a 2D environment, gravity is 0Y related

    cheers

  3. #3
    Always needs help marinebro0306's Avatar
    Join Date
    Jul 2005
    Location
    Philadelphia
    Posts
    166
    Quote Originally Posted by necromanthus
    p.s.
    In a 2D environment, gravity is 0Y related

    cheers

    Yeah, I know. I was just testing it out anyway.

  4. #4
    Some dude, says hi Ultra Pulse's Avatar
    Join Date
    Jun 2005
    Posts
    262
    Since I got an AS book, a small one(I don't need a bible) It has that code in it, And it's the buggiest thing there the ball goes from one side to the other on random.

  5. #5
    Junior Member
    Join Date
    Sep 2005
    Posts
    21

    Time Delay between frames

    Hi, I am a newbie here and I am trying to get some help. I am trying to put together a short slide show compose of several pictures. The transition between each picture (frame) will vary and there should be a short time delay between each frame. I am evaluating KoolMoves for now and can not seem to be able to this. Can some one please help me.

    Thanks.
    Vanbao

  6. #6
    Relaxing tmoore935's Avatar
    Join Date
    Oct 2001
    Location
    colorado, usa
    Posts
    1,713
    Quote Originally Posted by vanbao
    Hi, I am a newbie here and I am trying to get some help. I am trying to put together a short slide show compose of several pictures. The transition between each picture (frame) will vary and there should be a short time delay between each frame. I am evaluating KoolMoves for now and can not seem to be able to this. Can some one please help me.

    Thanks.
    Vanbao
    I would have started a new thread for this, but attached is a pic of were the tween settings are. You can set the tweens for each frame. Or change it to seconds. The uploaded file is in monochrome for uploading size.
    Any programming language is at its best before it is implemented and used.

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