How to put across the middle in Actionscript

Hi all.

I have the following code:

function box1ScaleUp(e:MouseEvent):void {}

box1.scaleX = 1.5;

box1.scaleY = 1.5;

box2.x = 80

box3.x = 135

}

Now, when he plays, he evolves MovieClip var point 0,0 alignment. So when it evolves, it seems to expand in two directions (down and to the right)

Is it possible she's the center of the area-wide so that he is also in all 4 directions?

Thanks in advance!

You can change your reg in the center of box1 point or you can add box1 a parent and offset and fit its parent:

var p:MovieClip = new MovieClip();

Box1.parent.addChild (p)

p.x=Box1.x+Box1.width/2;

p.y=Box1.y+Box1.height/2;

Box1.x=-Box1.width/2;

Box2.y=-Box1.height/2;

p.addChild (box1);

p.scaleX = 1.5;

p.scaleY = 1.5;

Tags: Adobe Animate

Similar Questions

  • Outlook express 6 - How to put all the unread messages in "BOLD"?

    How to put all the unread messages in "BOLD" with outlook express 6?

    Are you referring to messages unread, displayed in the preview pane?

    If a message is unread, it should be in bold by default.

    ========================================

    * Moved to appropriate forum. *

  • AS100 how to ride in the middle of my chest, and then point to the front?

    AS100 how to ride in the middle of my chest and the point forward, not on the side?

    Hello positivguy,

    See the following link which may answer your question. Chest mount harness.

    If my post answered your question, please mark it as "accept as a Solution.

  • Incorrect display of lines not put across the 9-slice symbols inside the Flash IDE of CC

    Hello everyone.

    I found a problem with the Flash IDE of CC. It shows lines not put across the 9-slice symbols incorrectly inside his IDE (However the final result published is correct). The source and example files can be downloaded here: http://cdn.dmldevelopment.com/plugins/tests/incorrect_work_with_scaling_in_Flash_CC.zip you can compare 2 screenshots in the archive: look_inside_Flash_CC_IDE. JPG and look_inside_Flash_CS4_IDE. JPG and you will easily understand that wrong.

    Will be waiting for the resolution from Adobe on this point. Hopefully they'll fix it soon as this question always takes the extra of our developers time when we try to make perfect pixel patterns.

    Hi Infeter,

    There is another solution to workaround if you do not use thin strokes.

    Change your original symbol - select the shape - Goto Menu - change form - convert lines to fills.

    After that make sure you adjust the width and height of the PI you like and you're good to go!

    And on your old applications, you should be able to follow the same link and please try to provide as much detail as possible while making your requests.

    Kind regards

    Mabrouk

  • How to put in the serial code to convert the first and photoshop to complete test

    So I got the first and photoshop, but the download links do not work when I put in my redemption code. I already have downloaded applications on my laptop at the title of the free trial. How can I put in the serial code to access it in full?

    Hello

    Please see How to download, install and activate Adobe applications

    Hope that helps!

    Kind regards

    Sheena

  • How to track across the images - not 3D camera

    How to create and apply a simple tracker 2D images which are then put to the scale in my main computer. I have the images to 72% in my main computer. I can get a good lead on the images - but do not know how to apply this track in the computer I need it in? When I try to reduce NULL values with the Tracker data attached - it does work for me.

    Help, please.

    Jamie

    Two choices. Before dial then follow or scale 100% then both images and items that you applied the news of wide follow-up.

  • How to put in the time series dynamics in the planning application

    Dear all,

    I'm having a problem by implementing a series of time Dynamics (A-T-J). I put in place at the level of the generation 4. In our application, the time dimension hierarchy is as follows.

    Yeartotal-> HY1-> Q1-> Jan, Feb, Mar

    Consider the following example

    Jan-> 100
    Feb-> 200
    Mar-> 300

    If I want to recover "A-T-J February" the result should see me the sum of Jan and Feb in this case, it should be 300. What is the syntax of recovery CDA in smartview.
    In our dimension of 'Year' application name is 'year '. How can I rename the name of this dimension in the case of the requirement.

    Thanks in advance.

    Kind regards

    Saami

    You must activate DTS - http://docs.oracle.com/cd/E17236_01/epm.1112/epma_admin/epma_dts_members.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to align in the middle of the screen flash content in the browser?

    I'm currently building a cs5.5 using AS2.0 flash site. One of the pages is 1024px wide by height of 1536. I want the display to only show that the first half of the screen and then the user must scroll down using the browser scroll bar to see the second half of the screen.

    Here is the html code. I changed the "overflow" hidden to auto so that the site is drop-down. However when I saw the Web site in the browser, it is aligned to the left. Even if below (highlighted in red) it says "medium". This isn't what I want, I want the site me aligned in the Middle, so that there is a border of hand and on the other Web site. I tried several things to fix but all without success. Could someone please help. Let me know if you need more information.

    Thank you

    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > ""

    "< html xmlns ="http://www.w3.org/1999/xhtml"lang ="fr"XML: lang ="fr">"

    < head >

    aboutus < title > < /title >

    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

    < style type = "text/css" media = "screen" >

    HTML, body {height: 100%; background-color: #333333 ;}}

    Body {margin: 0; padding: 0;} overflow: auto; }

    #flashContent {width: 100%; height: 100% ;}}

    < / style >

    < / head >

    < body >

    < div id = "flashContent" >

    < object classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width = "1024" height = "1536" id = "aboutus" align = "middle" > "

    < param name = "movie" value = "aboutus.swf" / > "

    < param name = "quality" value = "best" / >

    < param name = "bgcolor" value = "#333333" / >

    < param name = 'play' value = 'true' / >

    < param name = "loop" value = "true" / >

    < param name = 'wmode' value = 'window' / >

    < param name = "scale" value = 'showall' / >

    < param name = "menu" value = "true" / >

    < param name = "devicefont" value = "false" / >

    < param name = "salign" value = "" / > "

    < param name = "allowScriptAccess" value = "sameDomain" / >

    <!-[if! IE] >->

    < object type = "application/x-shockwave-flash" data = "aboutus.swf" width = "1024" height = "1536" > "

    < param name = "movie" value = "aboutus.swf" / > "

    < param name = "quality" value = "best" / >

    < param name = "bgcolor" value = "#333333" / >

    < param name = 'play' value = 'true' / >

    < param name = "loop" value = "true" / >

    < param name = 'wmode' value = 'window' / >

    < param name = "scale" value = 'showall' / >

    < param name = "menu" value = "true" / >

    < param name = "devicefont" value = "false" / >

    < param name = "salign" value = "" / > "

    < param name = "allowScriptAccess" value = "sameDomain" / >

    <!-<! [endif]-->

    "< a href ="http://www.adobe.com/go/getflash' > '.

    "< img src ="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"alt ="Get Adobe Flash player"/ >"

    < /a >

    <!-[if! IE] >->

    < / object >

    <!-<! [endif]-->

    < / object >

    < / div >

    < / body >

    < / html >

    {#flashContent}

    Width: 1024px;
    left margin: auto;

    margin-right: auto;

    }

    Get rid of the 100% w/h and give flashContent fixed wide (1024).

    Then you can give the right and left of auto... centering of the

    .

    Best wishes

    Adninjastrator

  • How to check if the event in actionscript is initiated or not?

    Okay, so I played with event management in action script two or three times, but I came across this situation, where I need to check if the event in the actionscript code is already called or not. looks like the code snippet below:

    currentTrajectory = new collection ArrayCollection (event.result as Array);

    var _multiTrajectoryEvent:MultiTrajectoriesEvent;

    If (_multiTrajectoryEvent is initialized) / / that's where I need to check

    {

    _multiTrajectoryEvent = new MultiTrajectoriesEvent (MultiTrajectoriesEvent.DRAW_AUTO_TRAJ);

    }

    //raise an event to

    Swiz.dispatchEvent (_multiTrajectoryEvent);

    }

    Whenever I get the result of the database event and I add result to arraycollection of event collection. However, I want to make sure that this event object is created only if it has not been initialized before in order to have the previous value of the table collection event isnide.

    Check if the event object is null does not work and if the event is not initialized, I can't check its property bubble as well...

    I would appreciate your quick thoughts for the same

    Thank you very much

    Generally, people reuse events. I've never seen a recycled event object, potentially, it could lead to side effects if any code handling the event maintains a reference to the event.

    My advice not to recycle the event objects. They should be garbage collected when they are no longer used. Create a new each time. Your custom event has no payload, so I'm really not point of needing to reuse. Any use not made of currentTrajectory.

  • How to put in the front of the watch during swimming to see heart rate

    Received the Watch 2 day and taken for a swim practice in the pool (of course)

    happly to see enough faithfully has towers and gives average heart rate but only AFTER training

    I wanted to 4000 m (and I fact..) but from the exercise the watch when asked for the total calories to burn.

    QUESTION 1: how to set the distance (rather than calories)? At the start of the year?

    While the dial of the watch training appeared when out of the water and gave the number of laps, total distance, total time of exercise and calories burned.

    QUESTION 2: you can change the information presented during the swim to see heart rate? (Rather than the number of Calories predictable)?

    NOTE

    For swimming training, the watch is a bit disappointing, given that in the swimming training, you normally do a few repetitions as 10 x 100 start each 01:30 or 01:45. I normally use the watch of Garmin swimming to take the time (100 m start button and press again on arrival) of the clock, then briefly shows duration of the tour and afte 4 continuous seconds so you can see when you start again (e.g. to 01:45). I hope that there will be a third-party solution soon for Apple Watch 2, while I don't have to swim with two watches...

    Hello

    1. After selecting the length of the pool, slide laterally on the screen to move to a distance goal, which can be set in meters or yards (firmly press the screen to switch between them).

    2. follow the following steps to customize the information displayed by the application of training during your workouts in the pool swimming:

    • On your iPhone, in the application of the watch, go to: Watch My > training > training view.
    • Choose several metrics.
    • Tap pool swim > press on edit (top-right) > select up to 5 parameters, including heart rate (they can be arranged in your order of preference).
    • When you are finished, tap on Done (top right).

    More information:

    Work with your Apple Watch - Apple Support

  • How to put all the data into one phone to another?

    Okay, so I have an iphone 5 c and I want to spend it with old iphone my mother 5 s. I want to move all the data from the 5 c to 5 s. but I don't know how to do it? I'm sure that you connect the 5 c with itunes on a computer to do. Help?

    You can do it. First of all, make sure that the 5s are deleted properly: what to do before you sell or give away your iPhone, iPad or iPod touch - Apple Support

    Then you can transfer the contents of the 5 c to 5 s: transfer content from your old iOS device to your new iPhone, iPad, or iPod touch - Apple Support

  • How to put in the empty new tab page

    I'm new to firefox and a lot of learning to take in.we a IE8 with a lot of problems so go to firefox.gets source of confusion for us sometimes we don't know much about the computers.don't know how to get the back of the browser, things we had before: for example. page, I got the impression, cut, copy, paste ok.don't have internet browser... but what is really frustrating options, I have read several times, how to get a vacuum on the previous page when you click on a tab above add.bar.all we get is this box that says server not found... with a bunch of strangers symbols.im tired of looking.suggestions...? Please tell us in easy terms.tks so... We use firefox mozilla 18.01 tks cheryl

    You can set the pref browser.newtab.url string "on: empty" on the topic: config page.

    See this article on the page tab (topic: newtab):

  • How to put back the Documents folder in Finders?

    I accidentally slicked and swipped the 'Documents' on the right in Finders folder and it disappeared.  How can hand the Document folder in finders?

    Have you tried to drag the Documents folder to the sidebar of the Finder?

    Have you tried (in the Finder) visit the preferences-> sidebar and the option for the Documents folder?

  • Satellite A300: How to put back the Volume indicator on the screen?

    I have my laptop a few days ago and I've set the volume using the volume knob on the front of the laptop an on screen volume indicator would show.

    I tried to uninstall some software I didn't and probably uninstalled the application that handles this.

    I tried to install Toshiba assist, and added value to Toshiba pack, but it still does not work. I thought that public services has come with this feature.

    I looked and it seems that volumeindicator.exe is used for this, but I can't find that anywhere!

    How can I get this working again?

    Hi guy,

    have you tried reinstalling the driver audio and, subsequently, value added package?

    Would be worthy to try...

    Welcome them

  • How to put across a 4-20mA signal

    Hello

    First of all, I don't know where to look for so that I could be in the wrong place. If someone could help me find a way or a manual, would be great.

    I have a cRIO with 9203 module receive a signal 4-20ma with a flow meter. I added the cRIO in Labview and dragging the entry from the Project Explorer to the code, created a box (indicator) to display the input value.

    The problem is, the value must be adapted to a usable value. How can I do this?

    I tried to experiment with the raw values and genius of the scaling of the tab, but this will not help. Am I missing something? Should I get the values using other means?

    Still, a boost in the right direction is more than enough because it is a question of beginners.

    Thanks for any help!


Maybe you are looking for