Center the image a click when the movieclip

Need a big help guys...


I'm new with flash, and I got a swf that contains the big picture it will resize better.


When I double click on the image clicked position come to the center of the stage.

I realized little by little, it zoom but image does not come to the central position.


I have attached the FLA in it please give me a solution for it


I used this script to zoom on double click and in bold letters 2 lines are on the position of the image.


////////////////////////////////////////////////////////////////////////////////////////// /

imagePanel.onRelease = function()
{


If (lastclick - (lastclick = getTimer () + 500 > 0) {}
var SF = Math.abs (imagePanel.loadTemp._xscale);
If {(sf < 100)
trace ("zoomIn");
XSS var = imagePanel.loadTemp._xscale > 0? (1) : (-1);
YSS var = imagePanel.loadTemp._yscale > 0? (1) : (-1);
var SF = Math.abs (imagePanel.loadTemp._xscale);
SF = 100;
imagePanel.loadTemp._xscale = FS * xss;
imagePanel.loadTemp._yscale = FS * YSS;
imagePanel.refreshPane ();
imagePanel.loadTemp._x = - (_xmouse) - 35;
imagePanel.loadTemp._y = - (_ymouse) - 150;


}
else {}
trace ("zoomOut");
XSS var = imagePanel.loadTemp._xscale > 0? (1) : (-1);
YSS var = imagePanel.loadTemp._yscale > 0? (1) : (-1);
var SF = Math.abs (imagePanel.loadTemp._xscale);
SF = best_fit;
imagePanel.loadTemp._xscale = FS * xss;
imagePanel.loadTemp._yscale = FS * YSS;
imagePanel.refreshPane ();
}
}
}

////////////////////////////////////////////////////////////////////////////////////////// ///////////

Hi friend, just change with the following code in the zoom part

//////////////Zoom In/////////////////////////////////////
trace ("zoomIn");
               
perX var = (_xmouse - 10)/imagePanel.loadTemp._width * 100;)
perY = var (_ymouse - 43)/imagePanel.loadTemp._height * 100;)
   
XSS var = imagePanel.loadTemp._xscale > 0? (1) : (-1);
YSS var = imagePanel.loadTemp._yscale > 0? (1) : (-1);
var SF = Math.abs (content._xscale);
SF = 100;
Content._xscale = FS * xss;
Content._yscale = FS * YSS;
imagePanel.refreshPane ();
///////////////Zoom In ends////////////////////////////////////
Position to center the image.
It's part that I needed, when I click on the image, it cannot move the postion of the Center, please solve my problem.
/ * If (_xmouse<>
imagePanel.loadTemp._x = - (_xmouse) - 35;
imagePanel.loadTemp._y = - (_ymouse) - 150;
}*/
   
Agree var = imagePanel.loadTemp._width * (perX/100);
var imagePanel.loadTemp._height = y * (perY/100);
   
   
   
imagePanel.loadTemp._x = imagePanel.loadTemp._x - agree;
imagePanel.loadTemp._y = imagePanel.loadTemp._y - y;
   
imagePanel.loadTemp._x = - (_xmouse) - 35;
imagePanel.loadTemp._y = - (_ymouse) - 150;

The code that I had recently included is marked by red color.

Please answer...

Tags: Adobe Animate

Similar Questions

  • I get a message that my Windows Security Center is not on, but when I go to the center of the Action it won't let me turn it on

    I get a message that my Windows Security Center is not on, but when I go to the center of the Action it won't let me turn it on.  What should I do?

    Hello

    · You have a third-party security software installed on the computer?

    · What is the error message that you receive the error code when you try to turn it on?

    · Do you remember all the recent changes on the computer before the show?

    · What is the service pack installed on the computer?

    Follow the methods below:

    Method 1:

    Make sure that the Security Center service is configured properly, and then start the Security Center service. To do this, follow these steps:

    a. click on start, click on run

    (b) in the Open box, type services.msc

    c. on the right side of the window, locate the Security Center service in the list of services.

    d. right click on Security Center, and then select Properties.

    e. in the drop-down list startup type, select Automatic (delayed start).

    f. under service status, click Start.

    g. click on apply, click OK, and then close the Services window.

    Method 2:

    Run the verification and virus scan online if any malware or virus detected on the computer activity. You can run the scan for viruses online from the link below: http://www.microsoft.com/security/scanner/en-us/default.aspx

    NOTE: Make sure that you select the correct version of the operating system before downloading the scanner)

  • "" My Windows J.4 Center repair center is currently disabled but when I try to turn it on I get the error "cannot be turned on.

    original title: Security Center

    I had a virus to infect my computer but I'm to remove by doing the scans. I can't solve the problem of after-sales service. "" My Windows J.4 Center repair center is currently disabled but when I try to turn it on I get the error "cannot be turned on.

    Hello Barbaram1,

    Use the Windows key + R on the keyboard or click on start, select run.
    In the run box, type services.msc
    Click OK.

    Make sure that the Security Center service is enabled and started.
    Probably, you will need to click Start to start the service.
    The Startup Type should be automatic.  The status should be started.

    Let me know what happens. If the problem persists, it may be that there are residual questions of the malware infection.

    Councillor of State & progress.

    Maurice Naggar ~ MS - MVP

  • To center the images...?

    Here's my problem.  I can't use the superior rule because I can't do the math.

    I want to center the image and text here.

    Here is a screenshot.  ignore the line down the "Center." It is not the Center.  I put it there usiing a rule of the hand directly on the screen.  Be nice. I'm a fool. Help out me?

    Don't forget: I can't do math!

    Screen Shot 2014-04-10 at 8.33.44 AM.png

    I am a little confused about what you're trying to Center, and what you're trying to Center on. If you are centering over the full page, there is a button for this in the dialog box align. If this isn't the case, draw a rectangle equal to the space that you want to Center in, then click on it once extra so it highlights as a key object. Centering then leave this object where it is, moving other itmes selected to align with him.

  • Make a button in a movieClip takes you to a different image outside the movieClip? (AS2)

    I have a project, a clip that contains panoramic text and a button.

    Basically, the second image contains said film clip, the movieClip is panoramic of text, then the last image of the movieClip is a keyframe with a button inside. How can I do so by clicking on the 'next' button takes me to frame 3 of the project overall? Thank you!

    Assign the button an instance name (example uses 'btnName'), then in the timeline that it occupies, put the code so he can tell the main timeline to go to the next section...

    btnName.onRelease = function() {}

    _root.nextFrame ();  or _root.gotoAndStop (3);

    }

    If "_root" does not try to substitute "_level0."

  • ﷯Error: error creating folder / / images. Click on resume to try again. If the problem persists, try aga

    When you try to FTP download my site, I get this error message-

    ﷯Error:

    Error creating folder / / images. Click on resume to try again. If the problem persists, try again later.

    The only solution I found is irritating.  I have download the entire site to a different folder and then copy it into the correct folders after the removal of previous versions of the updated files.

    Any thoughts?

    Doc

    Hello

    It seems to be a problem of permission on the root folder (where you try to publish the website via FTP).

    I suggest you to contact your webhost and ask to reset the permissions on the folder root FTP to your account.

    I hope this helps.

    Kind regards

    Sachin

  • Help (recovery of the image of an xml file name, then appear inside the movieclip

    Hello guys, I just want to ask sometihng about the display of the image inside the movieclip by pulling on the image name in the xml file.

    It comes to my xml file.

    <? PHP

    Header ("Content-type: text/xml");

    $host = "localhost";

    $user = 'root ';

    $pass = "";

    $database = "test";

    $gelo = "image1.jpg";

    / * xml output * /.

    $xml_output = ' <? XML version=\"1.0\? > ';

    $xml_output. = "< GALLERY > ';

    $xml_output. = '< IMAGE > '. $gelo. "< / IMAGE >";

    $xml_output. = "< / GALLERY > ';

    echo $xml_output;

    ? >

    This is the code inside my actionscript

    stage.scaleMode = StageScaleMode.NO_SCALE;

    var loader: URLLoader = new URLLoader();

    loader.dataFormat = URLLoaderDataFormat.TEXT

    loader.addEventListener (Event.COMPLETE, loadCompleteHandler);

    loader.load (new URLRequest ("http://localhost/loadimagefromxmlAS3/data.php"));

    function loadCompleteHandler(event:Event):void {}

    var xml = new XML (event.target.data);

    txt.text = xml.toXMLString ();

    trace (xml. IMAGE [0]);

    var list: XMLList = xml.data.title

    var loader: Loader = new Loader()

    This ["holder_mc" + 0]. AddChild (Loader)

    Loader.Load (new URLRequest (list [0]. IMAGE))

    }

    When I run it in flash, I got the error


    Image1.jpg

    TypeError: Error #1010: a term is undefined and has no properties.

    at xml_fla::MainTimeline/loadCompleteHandler()

    at flash.events::EventDispatcher/dispatchEventFunction()

    at flash.events::EventDispatcher/dispatchEvent()

    at flash.net::URLLoader/onComplete()

    I hope you will consider my ignorance since im a beginner with actionscript. Thank you

    (1) you should have "Permit debugging" enabled in the settings of publication so you could tell exactly the line of witch will not

    (2) this line makes no sense for me: var list: XMLList = xml.data.title

    Change it to var list: XMLList = xml. IMAGE;

    (3) loader.load (new URLRequest (list [0] m:System.NET.SocketAddress.ToString (()));

    (4) also this line is suspicious: this ["holder_mc" + 0] .addChild (loader)

    Why not just say: holder_mc0.addChild (loader)?

  • Scene make dark when the movieclip is opened. AS3

    I am trying to create an effect that when someone clicks on a button, it opens a movieclip.  I want everything behind this movieclip to dark so that the only option is to click a button in the open movieclip.  Does anyone know how to do this?

    You could probably create a movieclip that is a stage size black box that you make visible/invisible if necessary and place just behind the movieclip selected in the index of the child order.  The first thing you need to do is to get the movieclip that was clicked to the highest index of the children in the film (numChildren-1) and the black movieclip would be awarded to the second highest high... (numChildren-2).

    You may need to assign a set of event listeners pout with the dummy event handler functions to the black area in order to block whatever it is clickable below.  The alternative would be to have something that disables all other clickable objects until disappearance of the black area.

    If your background is black, another approach would be to do everything except the movieclip that was clicked invisible.

  • How to stop the movieclip created in flash when they are imported to seduce?

    I created a movieclip and drag it onto the main timeline(flash cs4), the movieclip have 60 fps and I put stop(); the last image. When they are imported from the swf to Captivate, the movieclip loop play. I tried the rdcmndPause = 1; but don't know where to put it. I don't really know the idea how to proceed. (already search in the forum and read adobe help, but no step by step how to do this).

    Hello

    Maybe try to animate your Flash in the main Flash timeline. I don't know if it is possible to promote a MovieClip to the main timeline, but usually people want the animation to loop and it doesn't and it is because they have not animate in a MovieClip. They did it in the main Flash timeline.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • Folders of bookmarks in Safari in the Favorites bar not open click when you access one after another

    Question: The records of Safari bookmarks in the bookmarks bar not open click when you access one after another

    Diagnostic steps:

    (1) create 2 or more folders in the bookmarks with the individual sites in their breast.  (Examples of folder name: career, finances and health)

    (2) safari > display > display favorite bar. All the Favorites should be visible in the main window of Safari with all these files

    3) click on the folder named career and then go directly to Finance. (the record finance should open with a single click)

    (4) or try to open the folder of health directly after clicking on career record. The health record is expected to open in one click. This does not currently happen

    Currently, 2 click are required to open a folder in the Favorites bar. To activate the button and the second displays the Web sites it contains.

    It is annoying and seems as if the browser is obsolete.

    If opening cursor hover is not what apple wants for these records, we are fine with it. But the least we should do, it's that these files opens in one click.

    Thank you.

    Send feedback to Apple. They will not respond, but at least know that there is a problem. If enough people send feedback, it can become the problem solved as soon as possible.

    Your comments

  • How to center an image in the tab on the front control in LabVIEW 10 (Mac Version)?

    Hello

    I would like to center an image on the front panel. The image is on a tab control that is suitable to the pane. I can't find a way. I work with LabVIEW 10 on Mac. Any suggestions would be very much appreciated.

    Thank you

    Michelle

    You will need to do a bit of math.  Download the locations of the edges of the tab control and image control.  The centers are unlike most high or left half.  I'm not sure without checking, but I think that the values are with respect to the angle of the screen.  Be careful about the origin if you have several displays.  If the differences are odd, you have an error of half of the pixels.  From the positions of the centers, you work towards the positions of the top and left edges.  It may take a few tries.  The rectangle Bounds includes the label (I think), so keep that in mind also.

    Lynn

  • Rotate an image after clicking twice on benchmarks in the photo

    Hello community!

    I am looking for a solution to rotate an image by clicking on the two reference points on the image. The two pairs of coordinates of the mouse clicking on can give me the angle of rotation with a simple geometry. After this, I turn the image with the calculated angle.

    My problem is: How can I get these two pairs of coordinates? I wanted to do it with a simple MatlabScript ' entry: path... imread (path)... imshow... ginput (2)... calculating... out: angle. Apparently imshow doesn't in Labview

    I already have the mouse event to the bottom, but I don't know how I can do Labview let me click EXACTLY and ONLY twice on my photo and store contact information.

    Any of you have a glue / trick how to do this?

    Best,

    Olivier

    (LabView started 2 weeks)

    Added version LV2012.

    Ahhhhh, in the event data node it is already a property for details.

  • How to center an image within the limits specified in labview 7.1

    I'm using labview 7.1.i want to center the image within the limits that I love without using IMAQ software.please help me

    Enter the image within the limits

    Can you explain what exactly you mean by that? Where do you want to center the image? regarding what?

  • Right mouse click when the file name of MS Explorer results saying that he has encountered a problem and will stop, and it stops quickly.

    Right mouse click when the file name of MS Explorer results saying that he has encountered a problem and will stop, and it stops quickly.

    Right click issues are usually caused by a third-party software that put an entry in the context menu. You can solve this with the free ShellExView.

    http://www.nirsoft.net/utils/shexview.html - ShellExView

    Make a right-click is slow or weird behavior caused by context menus management - http://windowsxp.mvps.org/slowrightclick.htm
    Manage the entries in context menu for folders, readers, and the Namespace objects - http://windowsxp.mvps.org/context_folders.htm MS - MVP - Elephant Boy computers - Don ' t Panic!

  • The images appear tense when played using the slide show in full screen

    The images appear tense when played using the slide show in full screen in Windows Vista Basic. That means that a picture of resolution 1920 x 1200 appears full screen covering although a 1920 x 1080 image seems letterbox in fullscreen. My screen resolution was put to the native resolution of 1920 x 1080. It is clear that this slide show program only keeping the proportions of the image. Earlier this problem wasn't there. I think that the slide show program addresses in such a way that my monitor could have 16:10 display of report resolution l / h. thanks for giving me a solution.

    This happens usually when the image resolution is high.

    Keep your screen resolution of 1024 x 768 and it should work fine.

Maybe you are looking for

  • Mailbox size?

    Hello there someone had a similar problem with the mailbox. As I have not used of .me VAC for the last 3 years when logged in to account that he had ove 69000 email that has been sent from my Gmail ACC. I have delete them all and deleted items also,

  • Problems with restart, turn off, finder app and desktop missing files

    I put my macbook (Pro 15 inch Retina 13 end) on 'sleep' last weekend and didn't use it for a few days. Came home and found that my office files have disappeared and the "finder" icon does not work and will not restart. Tried to download El Capilan to

  • Photosmart C309a: Problem downloading Driver Photosmart C309a

    I got in trouble in the long term with the print jobs stuck in the print queue. I uninstalled all the HP software and tried to download the latest version of the software of the 309 printer. After crossing the French extraction process, a window anno

  • How to create PDF with PDF Exaprom bookmarks?

    IText in ACTION by Bruno Lowagie reading, you can create bookmarks for a PDF automatically by adding chapters. Is it possible to do it with Exaprom. I can just mod a paragraph add so it adds a chapter? I love Exaprom. Great package! Norm

  • How to stop the cells to merge into the dashboard

    HelloI wonderered just how I could stop this automatically merge cells.  I took a screenshot to show what it looks like when I export a report in Excel.Is there a way I can change this in the analysis/dashboard so that it gives me individual lines, a