Expanding movieclip when mouse go out and shrinking it when mouse go in

Dear all friends,
I have movieclip called view_mc and button called btn_scale.
I want when the user click and drag the button btn_scale, he can scale the movieclip view_mc.
but when he goes out with the mouse, the movieclip is expanding.
and when he goes in, the movieclip is shrinking.
I have written the code, but it does the opposite: when he goes out, it shrinks. and when goes in, it expands:
var clickedX:Number;
var clickedY:Number;
var newScale:Number;
stage.addEventListener(MouseEvent.MOUSE_DOWN, on_stage_down);
stage.addEventListener(MouseEvent.MOUSE_UP, on_stage_up);
function on_stage_down(e:MouseEvent):void
if(btn_scale.hitTestPoint(stage.mouseX, stage.mouseY))
  clickedX = stage.mouseX - view_mc.x;
  clickedY = stage.mouseY - view_mc.y;
  newScale = view_mc.scaleX;
  view_mc.addEventListener(Event.ENTER_FRAME, on_enter_scale);
function on_enter_scale(e:Event):void
  if(view_mc.width < restricted.width && view_mc.height < restrictedArr.height)
    view_mc.scaleX = newScale * (clickedY / stage.mouseY);
    view_mc.scaleY = view_mc.scaleX;
function on_stage_up(e:MouseEvent):void
  view_mc.removeEventListener(Event.ENTER_FRAME, on_enter_scale);
Please help me to do the right scaling.

iOS: Troubleshooting FaceTime and iMessage activation
FaceTime, Game Center, Messages: Troubleshooting sign in issues

Similar Messages

  • Growing and shrinking text

    hi,
    does anyone know how to make text grow and shrink? i'm using oprea web browser, and when i place my mouse over some buttons text appears and then moving it off the button the text shrink, it does not appear and disappear, but actually grows out and shrinks in from a point. does anyone know how to do this?
    Thank you.

    hi,
    thank you for the response, i know about the listener, question was really regarding how to resize text so that it resizes smoothly, looks like it's growing and shrinking not just one second it's size 10 and then size 1, i want to make it flow from 10 to 1 for example, like opera browser, should i use a thread or is there a better way?
    Thank you.

  • I accidentally quit my CC on my Macbook pro and now the cloud icon is grayed out and every time I hover over it with the mouse I get the spinning beach ball of death on the icon. I have no idea how to open it because when I use spotlight search to open it

    I accidentally quit my CC on my Macbook pro and now the cloud icon is grayed out and every time I hover over it with the mouse I get the spinning beach ball of death on the icon. I have no idea how to open it because when I use spotlight search to open it it gives me a message saying "Creative Cloud is not open anymore" help!

    Since you didn't include any pertinent info such as the Mac model and OS version you are running, here is some general information:
    Mac OS X: Gray screen appears during startup
    Depending on which OS yours came with originally - and which OS you are now running - you would either need your original install disks - you can call Apple for replacements by giving them your serial number. Or you may be able to reinstall the OS by using recovery (again, depends on which model/which OS).

  • 1st-I was able to log into my account but was not able to open any applications, tried another account and same thing.  was able to log out and restart but now am unable to use mouse.  g5 dual core

    1st-I was able to log into my account but was not able to open any applications, tried another account and same thing.  was able to log out and restart but now am unable to use mouse.  g5 dual core, can't remember the os without seeing it.

    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    Let us know how far you get, or results.

  • Specific region mouse over effect(Button 1 fades out and Button 2 fades in).

    Dear All -
    I am new to Flash CS5 and building Flash navigation bar with buttons on it.
    Below is my problem description that I want to solve with your help.
    I have a rectangular bar and placed one small button(Button 1) on this bar. Also, I have similar button(Button 2) with some graphics on it which is of similar size as to previous Button 1.
    Button 1 - Without graphic.
    Button 2 - With graphic on it.
    What I want is that, whenever mouse is taken over Button 1 placed on the rectangular bar, it should fade out and simultaneously Button 2 should fade in. I want only button region to be sensitive to this mouse over effect and not the complete rectangular bar.
    Kindly let me know how can I define the specific region(button region only) to be sensitive to mouse over effect in flash, and how to place Button 1 and Button 2 in layers so that both are at the same positition(so that there is no displacement of button detected).
    Thank You,
    Saurabh Khanna.

    Hello -
    Thank you for the reply. Button 1 does not have glowing effect, whereas Button 2 has a glowing effect. So what I wanted is that when initially Button 1 is loaded during page load, when I mouse over Button 1, Button 1 would fade out and Button 2 sitting behind Button 1 would automatically look like fade in(due to gradual fad out of Button 1 on top of Button 2).
    I could do this now, and would like to Thank you for your reply.
    I did this by creating movie clip on "Over" event of Button 1 and changing its Alpha property. But now what I want is how to gradually fade out, means when I remove my mouse from over button, then Button 2 should fade out gradually which will automatically make Button 1 fade in gradually.
    I could not find the "Out" event just like we have "Over" event for Button, so I assume this can only be done using ActionScript somehow.
    Let me know if I am going correct with my assumption, and possibly if you could help me achieve the remaining half(fading out gradually when mouse is removed from the button).
    Thank You once again for your reply.
    Thank You,
    Saurabh Khanna.

  • Need help!!!! I've got an old mac mini G4 and while adding a cd to itunes, there was a power shortage to the house. Now when I try to reboot I get three beeps and the CD is still stuck in the mac. How do I get the CD out and is that why I am getting beeps

    Need help!!!! I've got an old mac mini G4 and while adding a cd to itunes, there was a power shortage to the house. Now when I try to reboot I get three beeps and the CD is still stuck in the mac. How do I get the CD out and is that why I am getting the three beeps?

    If you can't eject a CD or DVD or open the drive tray
    How do I eject a defective DVD?: Apple Support Communities
    How to eject a CD on a MAC mini with PC keyboard and mouse « FAQforge
    From:
    Mac computers: About startup tones
    3 successive tones, a 5 second pause (repeating): This indicates RAM does not pass a data intregrity check.
    1 long tone while holding down the power button: Indicates an EFI ROM update is in progress on a computer manufactured before 2012.
    3 long tones, 3 short tones, 3 long tones: Indicates EFI ROM corruption is detected and the computer is in EFI ROM recovery mode.

  • My Mighty Mouse wont come out and play!

    This is really not a new topic but an old problem for which I have yet to find an answer. I have a new iMac 27” i7 on which I have installed Windows XP Home Edition. I can’t get the Mighty Mouse to work.
    I have tired a number of solutions. I have gone through the Windows trouble shooting process and not found anything wrong except that the mouse still doesn’t work. I have reinstalled the Bootcamp drivers from the Snow Leopard OS DVD but that did nothing.
    All this has entailed a lot of exploration and exposition for me in the Windows wilderness and I have been able to identify the point at which my mouse refuses to come out of its hole.
    In Windows when I go into the Control Panel/Printers and other Hardware/Bluetooth devices a window opens with two pale icons, one is the keyboard and the other the mouse. The Keyboard icon is identified as “passkey enabled” and “connected”. The mouse is identified as “enabled” but there is no connected entry. When I highlight the mouse icon, click on Properties and click on the Services tab a touch appears and looks for and finds a check box labelled “Drivers for keyboard, mice, etc (HID)”.
    When I check this box and click either “OK” or “Apply” a window opens titled “Bluetooth Service Error” telling me that “Access is denied”.
    Denied! Denied! Windows XP is behaving like my best friends mother telling me her son has a cold and I can't come over to play and he can't come out.
    So how do I get this best friend (my Mighty Mouse) to come out and play in Windows XP?

    Thanks Barry
    I remember trying this download earlier in the year and getting nowhere. Still I gave it another shot.
    I downloaded the update "AppleBcUpdate.exe" from the link
    http://support.apple.com/kb/HT3934
    and tried to install it in Windows.
    As the link you directed to me explained it is possible to get the following message "This update is not intended for this computer and will not be installed".
    Well that put an end to that little idea.
    It wouldn't install and the link didn't explain how to get around this message. The link also suggested that you should see if the drivers were correctly installed. I figured if the update wouldn't install it was because the drivers were already there. So I followed the instructions - Start menu/All Programs/Accessories/Systems Tools/Systems Information/Software Environment/(+) and looked for the drivers.
    The link said that the Apple Built-in Bluetooth should be version 3.0.0.9. It was. It also said that the Apple Wireless Mouse driver should be version 3.0.0.5. Well there was no such driver.
    This download was dated Oct 28th. My machine was bought in late Dec and has Snow Leopard OS X 10.6.2 so perhaps this version of Snow Leopard has Bootcamp drivers that supersedes this update.
    Who know?
    Anyway the problem remain.
    I have a young friend who has just bought the small version iMac and I helped him install Windows XP using Bootcamp. He also can't use his mouse.
    I should also correct myself at this point. I called my mouse "Mighty Mouse" when it should of course be "Magic Mouse". Well what do you expect I'm old. In my day there was only one mouse and his name was Mickey.
    John

  • Sometimes I can't get out of Day view in iCal.  There is no where on the screen to select month view, even when I close it out and go back into iCal.

    Sometimes I am locked in "day" view in iCal.  There is no where on the screen to choose "month" view, even when I close it out and open again.  Tapping anywhere on the screen or scrolling doesn't help.

    Give this a try:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home/Library/ Preferences folder.
    2 - delete the contents the following folder: User/Library/Containers/com.apple.iPhoto
    3 - reboot, launch iPhoto and try full screen again.
    NOTE: For Mavericks and Yosemite,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    where you can check the Show Library Folder checkbox.

  • My problem is that after printing the first photo or picture, when I come to print a second, both the Colour Management and Epson Colour Controls are greyed out and showing No Colour Management

    I have recently purchased a Mac computer (updated to Maverick) to go with my Epson Stylus Photo RX500 printer which has given excellent service with my old Windows computer. However, when trying to print pictures or photos via Photoshop Elements 11, the best results I can get are using the Colour Management and Epson Colour controls in the printing options box.
    My problem is that after printing the first photo or picture, when I come to print a second, both the Colour Management and Epson Colour Controls are greyed out and showing No Colour Management, The only way I can reset the controls is to shut down the printer and computer and restart.
    Could there may be a setting somewhere that I need to adjust please?  I have been in touch with Epson and they say that the Epson Colour controls are part of the Photoshop Elements software but a post on the Adobe forum brought no results and I am unable to contact Adobe.
    <Edited by Host>

    Hello Garry. Thanks for the reply. I guess I should have used a different title from "How do I post a question?" That should come after trying to resolved the colour settings first. However, to answer your question, after experimenting with all the different settings in Photoshop Elements and Epson software, I now start with PSE11 Colour settings then click "no colour management" then after clicking Print, I choose "More Options/Colour Management/Colour Handling/Printer Manages Colour" then I choose "Page Setup/Layout/Colour Matching" which then shows Epson Colour Controls but I also choose "Layout/Colour Management" which then shows "Colour Controls/Mode" I then of course choose an Epson printer profile depending on the paper I am using. I get good results but as I said, the Colour Matching and Colour Controls are then greyed out. Hope that makes sense.

  • Hi when i open my application folder, all the application is shown in trash folder. when i click the application it says this app is in trash first move it out. and when i try to open through finder go it says this file doesn't exist. can some1 plz help?

    hi when i open my application folder, all the application is shown in trash folder. when i click the application it says this app is in trash first move it out. and when i try to open through finder> go it says this file doesn't exist. can some1 plz help? how can i put all my application through application folder?

    Something really odd is going on. In your first screen shot, I noticed that the Applications folder does not have the proper icon displayed in the side bar. Also, in the title bar it lists it as Applications 08-59-29-909.
    Not sure where it's picking up that odd name, unless it's because it's still truly within the Trash folder.
    Try this. In the Finder > Preferences > General > turn on "Always open folders in a new window". (I have a feeling you have the default setting with this off).
    Now, in Finder > Go > move down and open the Applications Folder from there. Now open the folder where you see all your applications that you show in your screen shot, select all, and move them to this true appliactions folder.
    This is what you should properly seeing (but with different apps listed):
    See how the Applications folder has the icon of the letter A shaped with a pencil, ruler & pen.

  • Help needed, M getting this message sandbox environment error no test user account, when downloading any application from iTunes, friend told me to sign out and sign in iTunes it might solve the problem but instead I cannot login I to my itune account.

    Help needed,
    I am getting this message sandbox environment error no test user account, when downloading any application from iTunes, friend told me to sign out and sign in iTunes it might solve the problem , and i triyed it but still  I cannot login I to my itune account. Same message keeping. Popping up,  this problem started supricly today.

    Take a look at the instructions here.
    http://www.technogal.net/2012/03/this-is-not-test-user-account-please.html

  • I tried to sync music from iTunes to my iPhone and when I click on "on this phone" the songs are there, but they are greyed out and have a circle in front of them.  I can not click on those songs and when I eject the phone they are not on the phone.

    I tried to sync music from iTunes to my iPhone and when I click on "on this phone" the songs are there, but they are greyed out and have a circle in front of them.  I can not click on those songs, delete or anything and when I eject the phone they are not on the phone.  I tried to re-add the songs and it says it can't add songs because they've already been added.  So HOW can I get the songs to actually ADD to my phone to where I can listen to them?  It's like they're stuck in Sync limbo or something!  Any help would be greatly appreciated.

    I am having the same problem. I have just tried this. Unplug iphone > open itunes > delete all music from itunes library > close itunes > re-open itunes > add music from original folder > plug in iphone > select songs > press sync > unplug iphone using eject button onscreen > checked phone .... still nothing in music folder on phone. On itunes the "On this iphone" tab the songs remain there but greyed out.

  • I've had a problem with syncing itunes, when i sync it dosent sync songs previously deleted it just greys them out, which is great but if i want to add a new video or song from my computer it wont sync it will just grey out and wont play. now all my songs

    ive had a problem syncing with itunes recently. when i delete a song on my iphone when i sync with my computer it still syncs but just greys out and is rendered useless. thats great unless i when i want to add new music or videos from my pc to my iphone it wont sync and will just grey out. i looked for solutions and one said that deleteing all your music from the usage in settings would fix it, well now when i sync all of my music is greyed out. ive tried adding all of my songs manually into my ipod instead of syncing entire library and nothing. (also when i select to sync music nothing shows up in the usage bar (normally 3 gigs)  might help) could someone please help?

    I had major issues with the iPhone 4s battery, however it’s resolved.
    The tech who set the phone up at the Apple store did so with little training.
    if you have a mobile me account. First go and move all your data to the cloud by going on your computer and logging in at me.com/move. The cloud has replaced mobile me, so there is no need for those two accounts
    Also make sure that for any of your email accounts you set them up to fetch, not push. My tech person set them all to have the email servers push data to the phone. The new iphone4s antenna is extremely strong so it will continually try to access stuff that is pushed–***** a lot of battery life doing this. It makes it worse if you have exchange 2010 accounts. Something about changes made to exchange really suck battery life from devices that access such accounts.
    turning of locator and the push notifications from facebook--they have a lot!

  • When I want to organise my bookmarks most of the options are greyed out and cannot be used including create new folder! Help

    '''''''''bold text'''''''''
    When i want to organise my bookmarks most of the options on the organise bookmarks menu are greyed out and cannot be used - including create new folder etc. Help please.

    Make sure you are not in the Private Browsing Mode:
    File > Private Browsing is UNCHECKED.

  • TS2446 I just got my iPad,  I have an iPod. When I go to put apps on it says my apple I'd Is disabled. I have reset the passwords. Somehow I have two id's?  I've gone into settings for apps signed out and back in with the new p.w.  I can't think of what e

    I just got my iPad,  I have an iPod. When I go to put apps on my new ipad it says my apple ID Is disabled. I have reset the passwords. Somehow I have two id's?  I've gone into settings for apps signed out and back in with the new p.w.  I can't think of what else to do to get the disabled block off.  Any ideas?? Thanks

    See this Apple document for help...
    http://support.apple.com/kb/ts2446

Maybe you are looking for

  • Attachments received as text in Mail

    I have my email set-up as an IMAP account using Mail 3.5 under OS 10.5.6. I am having a reoccurring problem receiving attachments as plain text within the message. It happens with a variety of file types: .jpg, .xls, .igs. Rather than displaying the

  • Safariu disappears when maximised

    OS: Windows XP Pro Graphics card: ATi Radeon X300, running in dual-screen mode when safari is on the secondary display and maximise is clicked, it vanishes. (right-clicking safari in the taskbar and choosing restore makes it reappear). This doesn't h

  • Line item gets duplicated while creating billing document

    Hello, I have created an order with two billing plans (periodic & milestone) having single line item. When I create a billing document, line item gets duplicated. Can any one help me... Regards, Kishore

  • 6pm and the latency spikes. 10pm and the internet ...

    Had this problem for the last three weeks and it is just getting more and more frustrating to stick with BT EVERY evening at 6pm on the dot the internet grinds to a halt and the latency shoots upto the 500~ mark and continues to fluctuates from 500 t

  • Rename files with a given string

    Can anyone please help with the following code. I need to rename files with a given string. My code is: import java.io.File; public class RenameFile      public RenameFile()      void naming(File destFiles, String rename)           System.out.println