A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Zooming At Specific point

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    4

    Zooming At Specific point

    Hi

    i started a full flash website

    i have problem in my work

    in this site
    johnwest.com.au

    if you Rollover any object, whole Screen zoom into that point !
    can you help me?
    tnx

  2. #2
    Junior Member
    Join Date
    Jun 2012
    Posts
    4
    i mean i want this code

  3. #3
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Use a movieclip's _xscale and _yscale properties:

    Actionscript Code:
    normalScale = mc._xscale;
    targetScale = mc._xscale+100;
    speed = 5;

    mc.onRollOver = function(){
        delete this.onEnterFrame;
        mc.onEnterFrame = function(){
            if(this._xscale < targetScale){
                this._xscale += speed;
                this._yscale += speed;
            } else {
                delete this.onEnterFrame;
            }
        }
    }

    mc.onRollOut = function(){
        delete this.onEnterFrame;
        mc.onEnterFrame = function(){
            if(this._xscale > normalScale){
                this._xscale -= speed;
                this._yscale -= speed;
            } else {
                delete this.onEnterFrame;
            }
        }
    }
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  4. #4
    Junior Member
    Join Date
    Jun 2012
    Posts
    4
    tnx for replaying
    but i want to zoom specific point (x,y)
    like this pic

  5. #5
    Junior Member
    Join Date
    Jun 2012
    Posts
    4
    when i Rollover on button , the picture zoom in button position
    tnx
    Last edited by saberflash; 06-03-2012 at 05:33 AM.

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