A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Easing [acceleration/deceleration] PanO Image

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Posts
    2,467

    Easing [acceleration/deceleration] PanO Image

    Hi:

    Okay, I edited out all of my confusing commentary

    Can somebody please analyze the script below, and tell me why it runs choppy???

    It appears that it is too processor intensive at times, but I don't understand why that is.



    Actions on the clip:

    onClipEvent (load) {
    _x=0;
    _y=150;
    speed=0;
    targetSpeed=0;
    }


    onClipEvent (enterFrame) {
    _x+=Math.round(speed/3);
    if (speed < targetSpeed) {
    speed+=Math.round(10/8);
    }else if (speed > targetSpeed) {
    speed-=Math.round(10/8);
    }

    if (_x < 0) {
    _x=762;
    }else if (_x > 762){
    _x=0;
    }
    }


    Actions on the invisible hotspots/buttons [4 in all, each with different values]:


    on (rollOver) {
    _root.image1.targetSpeed=25;
    }
    on (rollOut) {
    _root.image1.targetSpeed=0;
    }


    Here is an example [no preloader, but only 55k]:

    http://www.ekigroup.com/360/hudsonPano.html


    BTW, if I just use a simple _x+=15, etc., there is no choppyness. The frame rate is 24fps.


    Thanks,

    James
    He is risen!!!
    Last edited by jamescover; 10-05-2002 at 07:37 PM.
    "God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life."

    Image Popup Scripting Engine | Thumb PopUp Script | HTML Anchors w/Flash | Popup Script Generator | Seq. Img Swap | Img Swap | Browser Shake | Rand. Img Swap | Inline Img Swap | Screen Res. PopUp | Screen Resolution Popup Script


  2. #2
    Senior Member
    Join Date
    Mar 2002
    Location
    UK
    Posts
    208
    i was also having trouble with a.s. accelleration, i was pointed towards this link:

    http://66.70.72.50/forums/showthread.php?threadid=87583

    related thread:
    http://www.flashkit.com/board/showth...postid=2020528

    hope this helps.

    - jgo
    jgo: pleased to meet you.

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Posts
    2,467
    bump.
    "God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life."

    Image Popup Scripting Engine | Thumb PopUp Script | HTML Anchors w/Flash | Popup Script Generator | Seq. Img Swap | Img Swap | Browser Shake | Rand. Img Swap | Inline Img Swap | Screen Res. PopUp | Screen Resolution Popup Script


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