A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Magnifier code problem

  1. #1
    Senior Member
    Join Date
    Jun 2004
    Location
    Estonia
    Posts
    116

    Magnifier code problem

    Hi there developers

    I am not very good when it comes to Actionscript. I am using a magnifier code, but its bouncing too much, i hope someone and point me how to remove bouncing, without making the magnifier movement slow.

    Here´s the code:
    PHP Code:
    onClipEvent (load){
        
    Mouse.hide();
        
    speed 2;
        
    bounce 0.6;
        
    scale 150;
        
    0;
        
    0;
        
    0;
        
    image._xscale scale;
        
    image._yscale scale;
    }
    onClipEvent (mouseDown){
        
    scale = (Key.isDown(Key.SPACE)) ? 50 200;
    }
    onClipEvent (mouseUp){
        
    scale 150;
    }
    onClipEvent (enterFrame){
        
    = (x+(_root._xmouse-this._x)/speed)*bounce;
        
    this._x += x;
        
    = (y+(_root._ymouse-this._y)/speed)*bounce;
        
    this._y += y;
        
    = (scale-image._xscale)/speed;
        
    image._xscale += s;
        
    image._yscale += s;
        
    image._x = (_parent.image._x-this._x)*(image._width/_parent.image._width);
        
    image._y = (_parent.image._y-this._y)*(image._height/_parent.image._height);

    I hope this is enough you need to know

    P.S Just changing the "bounce" is making the movement very slow..

  2. #2
    Senior Member
    Join Date
    Jun 2004
    Location
    Estonia
    Posts
    116
    pop! any ideas, please? (:

Tags for this Thread

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