How do I set _bounds so that my Rectangle drags correctly?

Hi,
So I'm having this issue. I have a movieclip that's longer than the width of the stage. I've put a mask over the stage so that whatever's outside the stage won't be seen. I want the user to be able to drag the movie clip left and right to get to the buttons. However, right now if I have the movieclip where it's left edge is at the left edge of the stage, it will drag off and you can see all this empty stage. If I move the movieclip in the center and try it, you can only see the part of the movieclip that the mask allows, therefore making the dragging useless because it doesn't reveal the rest of the movieclip.
Should I take off the mask and is there some way to set the _bounds so that way I can place the movieclip in, and if can be dragged left and right without it revealing empty stage?
Here's what I have:
import flash.geom.Rectangle;
var rx:Number = 0;
var ry:Number = 0;
var rwidth:Number = 550;
var rheight:Number = 400;
var _bounds:Rectangle = new Rectangle(rx, ry, rwidth, rheight);
campusMC.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
function mouseDown(event:MouseEvent):void {
    startDrag(false, _bounds);
    /*rectangle*/
function mouseReleased(event:MouseEvent):void {
    stopDrag();

Hey hi,
While using the start drag we can give some limitations limitations.
object.startDrag(false, object.width / 2, object.height / 2, stage.stageWidth - object.width / 2, stage.stageHeight - object.height / 2);
try this.

Similar Messages

  • How can I set the page that will open, when I open a new tab, to be the same as the homepage?

    How can I set the page that will open, when I open a new tab, to be the same as the homepage?
    An app changed it to some other search engine, before installing the app, I the tab that would open was the homepage I set.
    In my case it is Google, and I want my new tabs to open on Google like they did before the installation.
    thank you,
    Asaf Privman.

    You can middle-click or Ctrl left-click the Home button on the Navigation toolbar to open the Home page in a new tab.
    You can look at one of these extensions:
    * NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/
    * New Tab Homepage : https://addons.mozilla.org/firefox/addon/new-tab-homepage/

  • When I send an email the rely comes into another account in my apple email.  How do I set it so that my email comes to the correct address?

    When I send an email the rely comes into another account in my apple email.  How do I set it so that my email comes to the correct address?

    Hi Sunny C,
    Welcome to the Support Communities!  The "From" field should be showing by default, but you can check or change your settings for Mail with the instructions below:
    Mail (Yosemite): Set Mail preferences
    http://support.apple.com/kb/PH19178
    In the Composing pane, you can set the email account that you want to send new messages from.
    Also, check the View command on the Menu bar.  View > Message Attributes should have a checkmark beside the "From" field.
    Cheers,
    Judy

  • Upon launching Thunderbird, how can I set a password that will prevent viewing of my emails if someone uses my computer?

    Upon launching Thunderbird, how can I set a password that will prevent viewing of my emails if someone uses my computer?

    100% this addons can help you
    https://addons.mozilla.org/en-us/thunderbird/addon/master-password/
    look at my Thunderbird when I open it

  • How do I set iCal so that my alarms go off when in sleep mode?

    I'm pretty sure that I can set iCal to open a program (iTunes) as an alarm while the computer is in sleep mode but I can't find the setting. This morning it didn't go off while in sleep mode.
    Does anyone know how?

    I am pretty sure that you can't. You can however use the Energy Saver in System Preferences to wake the computer at a set time, and then your iCal alarm could fire.
    AK

  • How do I set an appointment that is every 4 weeks, or the second Thursday of the month?

    How do I set a recurring event that is every 4 weeks or the second Thursday of every month?

    You can't. Not natively to the iPad. The only way would be to make the appointment in some other program and then import the appointment into your calendar app. The app will honor repeats made in other programs.

  • HT201320 how so you set up email that is not hotmail, gmail, etc..?? every time i try to add an account, it doesnt work

    How do you set up email on iphones that are not icloud, exchange, gmail, yahoo,aol, or hotmail?

    I'm thinking you sync to your computer over Wi-Fi, if correct, switch to sync when connected to iTunes, turn off sync over Wi-Fi. Hope this helps, Good luck. Cheers.

  • How does one set options such that the entry for a successfully downloaded file automatically got removed from the download window?

    In earlier versions of Firefox, I could set options such that when a download completed successfully, the download entry was automatically removed from the download windows. I don't seem to be able to get this functionality in ver 13.0.1. In this version, i have to right click on each completed download entry, and choose "remove from List". This is very cumbersome.
    I really liked the earlier auto cleanup as it left only pending, current and failed downloads in the Download window - just the stuff I needed to pay attention to. Is there any way to set up ver 13.0.1 to make things work the way they worked so well earlier.
    A related issue may be that in the Privacy tab, the option for Browsing and Download history have been combined (were they separate earlier? - don't remember). I want to keep my browsing history but not my download history. I can still clear them individualy in the "Clear Recent History" settings, so why can't I set the control for keeping either individually? Or can I?

    The download history is part of the regular browsing history, so you would have to disable the history altogether as you've already noticed.
    * Tools > Options > Privacy > History: Firefox will: "Use custom settings for history"
    **"Remember my browsing and download history"
    Firefox manages the downloads in the Downloads folder in the Library.
    * Firefox > History > Show All History > Downloads
    Future Firefox versions won't use the current download manager (pref: browser.download.useToolkitUI; Bug 726444), but use a toolbar button with a drop down list, similar to the Bookmarks Menu button.

  • How can I set a passcode that is only required at certain times of the day. Ie: my child needs access for school use, but don't want her playing iPad in the middle of the night. I cannot identify a way to have the iPad turn off or require a password

    I cannot find a way to enable my child's iPad to require a passcode only at certain times of the day.
    Yes I have used the clock/timer/ countdown - great to restrict how many minutes of iPad usage they get a day.
    But as my child requires the iPad in school for class lessons the usage at school varies maybe 30 mins 1 day and a few hrs on other days
    I want the ability to say set the iPad to not work between say 7pm and 7am, ( unless a passcode is entered) so my child isn't playing games on it in the middle of the night...
    Apple I cannot see anything in the settings that performs this function
    Help

    You can Remote Lock his iPad with Find My iPad using a computer at whatever time you like.
    http://support.apple.com/kb/PH2700
    Note: The iPad may be disabled if he tries the passcode too many times.

  • How can I set an event that occurs on the same day, not date, every month? Like Thanksgiving is on the third Thursday of November

    On my PowerBook, I was able to set up events to show up on a specific day repeating each month, say the first Thursday.  How can I get that on the iPad 2?

    For your repeating even, I'm assuming this is your Yahoo calendar? that isn't a Firefox issue, I suggest you try to contact yahoo.
    For the other issue, try the following:
    Update to Firefox 15. Then, [[Reset Firefox – easily fix most problems]]

  • How can i set a role that can't see the infoarea?

    HI:
    i want creat a role ,when use the role open the query , he can only see the report under the favorite and role,can't see the infoarea , how can setting the role's right?

    Hi!
    Perhaps you should try creating a user that carries exactly the same authorizations for your intended user/s.  Once created, you can then see if the infoarea can then be visible still.
    Regards,
    P.

  • How do I set the page that a new tab opens to?

    When I open a new tab, the tab opens automatically to Bing or some search engine other than what I have set as my home page which is set to Google. How do I get a new tab to open to my homepage and not something else?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How do you set the number that the voicemail icon corresponds to?

    How can I manually enter the proper number to call for voicemail so that the voicemail icon works?
    Thanks.

    Supposedly you can change it if you do the following:
    Go to the keypad page of the phone app.
    Type in 5005*861234#
    (Where 1234 is your voicemail number)
    Tap Call
    This should save the voicemail number so when you next press the voicemail icon it will call the correct number.
    However, when I tried it (my new provider's voicemail number is 111) it didn't seem to work - so not sure if it will work. The page I found with the instructions had lots of replies saying it had worked so it may do, or might be that it only worked on older versions of the OS.

  • In Mac Mail 4.5, how do I set preferences so that when I click on an email link the webpage opens in Firefox instead of Safari?

    I want to click on a link in an email and have the webpage open in Firefox instead of the default which is Safari.

    Hi roundabout-
    I was able to see links in Mac Mail 4.5 open in Firefox. I had the Firefox application open, and when I clicked a link in the mail client it opened correctly. I'm sorry if this is not helpful. Is Firefox set as your preferred browser?

  • How do you set up so that you can view the alternate text on an image when you hover over it like you do in IE?

    Using Mozilla at present the alternate text for an image does not pop up when you hover your mouse over the image. This is what occurs in Internet Explorer. In Mozilla Firefox you have to right click, choose Properties and then you can view the alternate text. Is there a way to set up the mouse hover? Or is there a keyboard shortcut to at least view the Properties information of an image on a webpage quicker?

    The Alt attribute isn't meant to show as a tooltip on hover.
    The Alt attribute is meant to show if the image isn't or can't be displayed.
    The title attribute is meant to show if you hover an image or link.
    *http://kb.mozillazine.org/Image_tooltips_do_not_work
    Some extensions can interfere and disable the tooltip.
    * [[Troubleshooting extensions and themes]]
    * http://www.w3.org/TR/html401/struct/global.html#title title
    * http://www.w3.org/TR/html401/struct/objects.html#alternate-text
    *Popup ALT Attribute: https://addons.mozilla.org/firefox/addon/1933

Maybe you are looking for

  • Scheduling a Report from outside Scheduler but viewing the output in Plus

    We are using Discoverer 10.1.2 I know that we can schedule a report within Discoverer Plus and the resulting out put can be seen in Discoverer under scheduled work books I am also aware that we put Discoverer command line commands in a DOS script and

  • (Bash) How to set a variable with text from a file? [SOLVED]

    I'm having a little problem. I have textfile with a single line of text. What I want to do is set a variable with that line of text. How do I go about doing that? A simple var="text" wont work in this case, since the text in the file changes with ano

  • Acrobat problems?

    I'm using Word 2011 and Acrobat 9.0 Pro on a MacBook Pro that I just updated to Maverick. I converted a Word document into PDF, using the "print" option. Then I attempt to insert bookmarks into the PDF document -- as I've done a million times before.

  • Adobe Reader XI does not open files with a command line "path" argument.

    Adobe Reader XI does not open files with a command line "path" argument. Version X and lower all worked fine. I have deleted and reinstalled the program with no success. Is this a bug?

  • Mail Crashes with EXC_BAD_ACCESS

    Hello, over the last few weeks, mail has begun crashing. It started out happening once a day or so and now it's crashing nearly every hour. Below is the crash log: Date/Time: 2006-08-17 06:09:23.467 -0700 OS Version: 10.4.7 (Build 8J2135a) Report Ver