Zoom out to the original size of the document

Hello! I have a problem with this code, because I need to zoom out to the original size. Please help me in it! Thank you

import flash.events.MouseEvent;

stage.addEventListener (MouseEvent.MOUSE_WHEEL, Zoom);

function Zoom(e:MouseEvent):void

{

var mod:Number = 20;

kep2. ScaleX += e.delta / mod.

kep2. ScaleY += e.delta / mod.

kep2.x = ((2 * mouseX)-(2 * (e.localX * kep2.scaleX))) / 2;

kep2.y = ((2 * mouseY)-(2 * (e.localY * kep2.scaleY))) / 2;

}

import flash.events.MouseEvent;

this.addEventListener (MouseEvent.MOUSE_DOWN, startDragging, true);

this.addEventListener (MouseEvent.MOUSE_UP, stopDragging, true);

function startDragging(e:MouseEvent) {}

kep2.StartDrag ();

}

function stopDragging(e:MouseEvent) {}

kep2.stopDrag ();

}

Use an if statement to check if the scale is too small

import flash.events.MouseEvent;

stage.addEventListener (MouseEvent.MOUSE_WHEEL, Zoom);

function Zoom(e:MouseEvent):void

{

var mod:Number = 20;

kep2. ScaleX += e.delta / mod.

kep2. ScaleY += e.delta / mod.

If (kep2.scaleX<>

kep2. ScaleX = kep2. ScaleY = 1;

}

kep2.x = ((2 * mouseX)-(2 * (e.localX * kep2.scaleX))) / 2;

kep2.y = ((2 * mouseY)-(2 * (e.localY * kep2.scaleY))) / 2;

}

import flash.events.MouseEvent;

this.addEventListener (MouseEvent.MOUSE_DOWN, startDragging, true);

this.addEventListener (MouseEvent.MOUSE_UP, stopDragging, true);

function startDragging(e:MouseEvent) {}

kep2.StartDrag ();

}

function stopDragging(e:MouseEvent) {}

kep2.stopDrag ();

}

Tags: Adobe Animate

Similar Questions

  • How to increase the resolution from which to zoom out of the graphical interface of Firefox on Windows?

    The interface of Firefox is zoomed out/low resolution. This affects all parts of the browser (buttons, tablets, bars, etc.) and the web pages viewed.

    I tried to start safe mode and then reset Firefox; neither fixed the problem.

    Note that my display settings are correct, as Firefox seems to be the only application affected.

    refer to

  • Why pdf images are blacked out when the document is downloaded?

    When I download a PDF file from the internet, many of the graphics are blacked out.  In some cases, this seems to happen when it is shading.

    I can usually get rid of the black areas by selecting and delete using the Acrobat X image editor.  We then see the underlying image.

    Just to be clear, this is not a question of being blocked by the author of the images.

    Why is this happening?  Any ideas would be appreciated.

    Finally, I found that the solution is to disable 'replace the colors in the document' in the preferences - accessibility.

  • Fill in the page for the site test under design Web does not appear in firefox. I have to zoom out to the page to appear. What is the problem?

    Hello

    I am designing a Web test page and it looks wrong in firefox... half top of page Web appears and I have to press ctrl and - to see the whole page... also, even when I see the entire page, the right scroll bar that appears on every Web page does not appear? What could be the problem? Any help will be appreciated.

    The missing scroll bar is caused by the position: fixed; and top: 0px; rules.

    DIV .header also has a height: 100px which is not correct.

    .header {
    background-image: url(images/bg-header.jpg);
    padding: 0px 0px 0px 0px;
    height: 100px;
    position: fixed;
    top: 0px;
    width: 100%;
    z-index: 50;}

    A good place to ask for advice on web development is to the 'Web Standards Development/evangelism' MozillaZine forum.

    Aid to this forum are better informed on issues related to web development.

    You must register on MozillaZine forum site to post in this forum.

  • Target in the Palette buttons layers &amp; zoom out

    I have two questions. First, the target in the layers palette buttons are missing. Secondly, when I'm using the direct Selection tool and try to zoom out on an extended area using the keyboard shortcut, it zoom out from the center of the document. The first is on a Mac OS. The second is on the two OSs.

    You will probably have to empty your preferences.

  • How to zoom in and out on the timeline of the first cc effects?

    I can zoom out on the timeline of project with alt + mouse wheel, but I can understand how do on the effects Panel and project zoom seems not to effect it.

    Never mind--and looked in the keyboard shortcuts and a = found

  • Need to zoom out to see the clips in the monitor of the Organizer

    Hello

    I'm working on a project with PAL AVCHD HD1080i 25 parameters. When I put a clip on the timeline, it is too much for the monitor Panel. Is it possible to zoom out in the monitor Panel, so that the frame is visible please?

    Yes. Right-click and select magnification > Fit

    See you soon,.
    --
    Neale
    Insanity is hereditary, get you your children

  • Change page size when I he perform a zoom out and zoom again on a browser.

    I created a site recently that is www.sanrachna.co.in. I get some kind of weird problem on my page, I opened my site in the browser, it opens normally, as expected, but when I zoomed in on the footer keeps down and down and page length becomes larger and after I Zoom in to 100% (original size) times the page length is bigger and the footer elements are less than the position where they are declining been to zoom out. Please open the page and zoom out u will get too know what I'm saying. Please help@.

    Sorry for the late reply, it took me a bit to find the problem. The problem is one of the widgets that you use. See screenshot:

    Remove this widget has solved the problem. If you want to continue using this widget, you may have to contact for help on how to work in your case.

    You can see here... (I also put the scroll bars to automatic instead of always).

    WELCOME TO SANRACHNA

  • How to create the ability to zoom in on the user of Web site documents in Dreamweaver?

    Hello

    I don't know if this question has been posted yet or not, but my boss wants me to include documents scanned in old in Dreamweaver files and allow the user to zoom in on documents... What is the best way to do it? I thought that maybe having the download as PDF documents, but he wants them to be able to zoom in on the documents on the site itself, so that the user doesn't have to download lots of PDF documents. I'm sure there's an easy way, I do not know...

    Thanks for any help!

    Neva

    It is already integrated in browsers.  Just click on view > text size > increase or Ctrl +++

    You can use a script to switch to style sheet with 3 or 4 style sheets to achieve a similar effect.  I have a demo of this work below. (see the page source to see the code)

    http://ALT-Web.com/templates/variable_width.shtml

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    www.Alt-Web.com/
    www.Twitter.com/ALTWEB
    www.Alt-Web.blogspot.com

  • Is it possible to hide the grids on the document in InDesign?

    I'm hoping to hide the Document out of the document grid. Is this possible?

    Or would that be possible?

    Do you mean you want the grid to be visible on the page, but not the table editing? If that's what you mean, there is no a possibility to embed to combat it that way.

    If the pasteboard grid mind really, you pouvez (using image filled Peter's suggestion):

    1. Go to a master page and zoom out until the complete editing table is in sight.
    2. Draw two rectangles; on the size of the page (aligned to the edges of the page) and the other the size of the pasteboard.
    3. The two rectangles selected, choose object > paths > make compound path...
    4. Apply a white fill.
    5. Eventually, lock the layer to one or more new layers above the content.
    6. This could be saved as a template if you do not have to repeat it.

  • How to delete emails from the documents folder?

    I saved the old emails in a folder to use later, but when these to transfer all my info on a new computer, installed also and 'delete' does not appear as an option when I want out them the documents folder. The email address was collected using Outlook Express for XP and the new computer's 2010 Outlook Express in Windows 7.  I moved the files from the old computer to the new one using a USB.  The e-mails were in a single folder.  This certainly isn't a big problem, but I'm trying to keep documents as simple as possible and these emails are a lot of junk.  Thank you very much for your advice.

    Hello

    1. what email program are you using?
    2. you are trying to delete the emails saved in the documents folder?
    3. How did transfer the email from your old computer to a new computer?
    4. have you imported or exported the emails to the new computer or just transferred by manually copying?
    Suggestions for a question on the help forums
    http://support.Microsoft.com/kb/555375
    Please respond with more information
  • CTRL + _ makes smaller browser window. How to make more big (take it back to the original size)?

    Well it was accidental. I was trying to SHIFT + _ italic Forum to chat I use and must have hit CTRL + _ rather... now my browser window is so small my typing looks like a caterpillar, crawl across the page. How do I make the window back to its original size? Tried SHIFT + CTRL + _ nothing works.

    Have you checked the shortcuts but can't find the command there

    Reset zoom: CTRL + 0 (zero)

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You must update some plug-ins:

  • I shrank my Yahoo email by pressing the control button. How can I restore original size

    I shrank my Yahoo email by pressing the control button. How can I restore original size?

    This has happened

    Just once or twice

    == I pressed control button

    See this:
    https://support.Mozilla.com/en-us/KB/page+zoom

  • How can I place several smaller images of varying size on one page for printing without losing the original size.  Board contact option to resize my pictures

    Does anyone know how to place several small pictures on a single page, so I can print them out as a rather print over and over again.  I want to maintain the original size of the images that vary somewhat.  I tried to use the option of the Board-contact, but he seems to want to resize my images which unfortunately is of no use to me.  I tried to cut and paste on a new page, but I don't think that it is now the original size.

    Alternative applications sometimes can provide quick and easy results.

    It might be interesting to download the demo version of Photoline: it includes a simple Board-contact option that allows for images to be included without loss of resolution, i.e. the original is left intact and the proportions remain unchanged. Since Photoline also supports documents several pages, all the thumbnails are collected into rows and columns, the user can control and the end result can be exported as PDF.

    -Download the trial of pl32.com

    -Open Photoline, then open the browser (CTRL/CMD (B)

    -Navigate to your folder with the images you want to combine for printing.

    -right mouse click in the thumbnail view, and then select "Create image Catalog.

    -Select the page by Page size

    -under 'Size' define the number of rows and columns (there are here a translation error: "Spalten (COL) / rows (lines)".)

    -Uncheck "scale photos physically." This ensures that the original images are intact and incorporated in full resolution.

    And then click OK.

    Some of the other testing devices until you get a satisfactory result. Then export it to PDF.

  • The mouse wheel events to perform a zoom in and zoom out

    Hi all

    I have this for my function:


    var Mydelta:int;
    var zoomAmt:int = 35;

    addEventListener (MouseEvent.MOUSE_WHEEL, Myzoom);

    function Myzoom(event:MouseEvent):void
    {
    Mydelta = event.delta;

    If (Mydelta > 0)
    {
    images_mc. Width += zoomAmt;
    images_mc. Height += zoomAmt;
    }
    Else if (Mydelta < 0)
    {
    images_mc. Width = zoomAmt;
    images_mc. Height = zoomAmt;
    }
    }

    But I want to zoom out to stop at the size of the document

    Help, please.

    Thanks in advance.

    scaleX defaults 1.0 use a reasonable increase

    var zoomAmt:Number is. 1;

    function Myzoom(event:MouseEvent):void

    {

    Mydelta = event.delta;

    If (Mydelta > 0)

    {

    images_mc. ScaleX += zoomAmt;

    images_mc. ScaleY += zoomAmt;

    }

    Else if (Mydelta<>

    {

    If (images_mc.width - zoomAmt > = stage.stageWidth)

    {

    images_mc. ScaleX = zoomAmt;

    }

    If (images_mc.height - zoomAmt > = stage.stageHeight)

    {

    images_mc. ScaleY = zoomAmt;

    }

    }

    }

Maybe you are looking for