Buttons moving on top of panorama

Hi,
I have a panorama which I've coded to move back and forth horizontally when I press the arrow keys. I'm trying to get some buttons to sit at designated points across the panorama. I'm having trouble getting them to stick at the right places, though, instead of roaming around. Right now, I'm focusing on Norris_btn (although Annenberg_btn doesn't work right now either), which starts out in the right position (all the way at the far left of the panorama, which is 10061 px wide). However, if I scroll all the way to the right and then try and go back to the left, Norris_btn appears in the wrong place. Here is my code:
const PANWIDTH:Number=10061
const STAGEWIDTH:Number=650
const KEYWIDTH:Number=40
//positions objects on the stage
panorama_mc.x = 0;
Norris1_btn.x=-5030.5;
Norris1_btn.y=0;
Annenberg_btn.x=-1145;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stop();
function keyPressed (event:KeyboardEvent):void {
            switch (event.keyCode) {
        case  Keyboard.LEFT :
           if (panorama_mc.x + KEYWIDTH<=(PANWIDTH / 2) - (STAGEWIDTH / 2)) panorama_mc.x +=KEYWIDTH;
           if (Norris1_btn.x + KEYWIDTH <=-(STAGEWIDTH/ 2)) Norris1_btn.x += KEYWIDTH;
                              if (Annenberg_btn.x<=(PANWIDTH / 2) + KEYWIDTH) Annenberg_btn.x += KEYWIDTH;
           break;
        case  Keyboard.RIGHT :
           if (panorama_mc.x - KEYWIDTH>=-(PANWIDTH / 2) + STAGEWIDTH) panorama_mc.x -= KEYWIDTH;
                              if (Norris1_btn.x - KEYWIDTH >=-(PANWIDTH / 2) + STAGEWIDTH) Norris1_btn.x -= KEYWIDTH;
           if (Annenberg_btn.x>=(-PANWIDTH / 2) + KEYWIDTH + STAGEWIDTH) Annenberg_btn.x -= KEYWIDTH;
Any suggestions? Thanks!

I had tried to do that, but after a lot of searching around and trying out different things I'm still a little bit unsure of how to make it so AS can talk to the button when it's a part of the movie clip.
RIght now I have this in the main timeline:
panorama_mc.Norris1_btn.addEventListener(MouseEvent.CLICK, showNorris);
function showNorris (event:MouseEvent):void
          gotoAndStop(2);
and this in the movie clip timeline:
Norris1_btn.addEventListener(MouseEvent.CLICK, showNorris);
function showNorris(event:MouseEvent):void
          gotoAndStop(2);
But I get an error 1009 for a null object reference and the panorama won't move. What am I doing wrong?

Similar Messages

  • My apps have all moved on top of each other in the top left corner if I drag them back every time I change page then change back they go back to the corner .what have I done

    My apps have all moved on top of each other in the top left hand corner of the page.every time I drag them back to where they are ghosting on the page ,then change page and back again they r back in the corner again help what have I done

    Try a Reset... press the home and sleep/lock buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.

  • The HUD Inspector in Full Screen View seems to position at the right margin of the image as a default(?)  If I toggle the button in the top right of the HUD it 'unlocks' and I can drag it to where I prefer -- at the left margin; (for over a decade) my doc

    The HUD Inspector in Full Screen View seems to position at the right margin of the image as a default(?)  If I toggle the button in the top right of the HUD it 'unlocks' and I can drag it to where I prefer -- at the left margin; (for over a decade) my dock has resided at the right margin so all my slider manipulation over countless editing sessions in Aperture has been ingrained to work at the left margin -- but, the vast majority of the time, the HUD overlaps the image I am editing in this 'unlocked' mode. 
    Every occasionally I enter Full Screen View and it positions on the left margin *without* superimposition...(!) My great joy is modulated into aggravation, however, should my tracking cursor drift all the way 'out of bounds' -- to call in the hidden pane of adjacent images sequenced in the library... This dramatically shrinks the Full Screen display and re-locks the HUD; if I toggle the switch to re-xpand the image it re-positions at the right margin!!!!  I SOOoooooo wish I knew how to control the default 'locked' margin of the HUD in Full Screen View...

    Drag it over to the Left. Then lock it there.

  • How do i get the firefox button to appear (top left corner) ??

    i have downloaded the newest version of firefox on my work computer... the new firefox button in the top left corner does not appear... how do i get it ??? ....i have firefox on all other (home) computers & its there on all of them !!!
    firefox is awesome !!!!!

    You see the orange (on Linux gray) Firefox button if the Menu Bar is hidden (View > Toolbars > Customize or right-click a toolbar).
    You can hide or make the Menu bar visible via View > Toolbars, also accessible via Firefox > Options.
    If you need to access the hidden Menu bar then press F10 or tap the Alt key to make the Menu Bar appear temporarily.

  • My location bar, tool bar (file, edit, tools, bookmarks, help) disappeared and cannot be restored. I have no back button, home button etc. the top of the screen is just an empty blue bar. Internet still works if I click on a hyperlink on the main page.

    My location bar, tool bar (file, edit, tools, bookmarks, help) all disappeared and cannot be restored. I have no back button, home button etc. the top of the screen is just an empty blue bar. Internet still works if I click on a hyperlink on the main page.
    The problem started when I turned on the computer this morning. I tried to install Mozilla 4 from your website and that installed but I still have nothing on the top.

    It may be due to Firebug. Seeing as how you're a web developer, it's very possible you have this installed. The latest version, 1.7X a10, appears to cause everything you described. I downgraded to "a8" and that seems to have fixed everything.
    I also recreated a profile from scratch before trying this out, so I can't guarantee it's definitely Firebug.
    Similar issue: https://support.mozilla.com/en-US/questions/783078
    edit: If you go to the Firebug forums, you'll see this is now a known problem. http://code.google.com/p/fbug/issues/detail?id=4012 for the issue tracker.

  • I've lost the "Send" button in my reply window. When I double click on a Mail message, on order to reply, the "Send" button at the top of the window is missing. I can reply by closing and saving my reply, and re-openning from Drafts. How to fix?

    I've lost the "Send" button in my reply window. When I double click on a Mail message, on order to reply, the "Send" button at the top of the window is missing. I can reply by closing and saving my reply, and re-openning from Drafts. How to fix?

    Hi, try this...
    If nothing is showing in the Toolbar at top, click the little gray oval at top right.
    Right click or Control+click on the Toolbar, choose Customize Toolbar, drag the Send button to the Toolbar.

  • Print button moved when opening PDF in Firefox 26

    I use Firefox with a company made website that allows me to create FedEx shipping labels. When I create the label, it opens in a pop up window as a pdf file. In Firefox 25 and previous versions, there was a button at the top that I could click for "print." This button now is placed on the right side in a drop down menu which has other options "go to first page" "go to last page" etc. Is there any way to get this button back separate from the others? It is not a huge deal but can be a pain when I create 100's of labels a day.
    I also noticed when I open the file a different way that opens it in a new tab instead of a tab, it has the button separate. The only problem is, I have no way of forcing it to open in a tab the first time I make the label, I have to go back to it after it's created which takes even longer.
    Anyone know how I can get it back to how it was? Worst case scenario I will reinstall 25.0.1 or just deal with it. Thanks in advance.

    The toolbar changes depending on the size of the window. As the width of the window is reduced, some of the controls from the bar move onto the overflow drop-down. Can you enlarge the pop-up windows? You might be able to drag the lower right corner or, if Mac works like Windows, if you double-click the title bar of a pop-up window it would be maximized.
    Some sites may code their pop-ups not to be resizable. There is a way to override this if you run into that problem. (Too detailed to describe if not relevant.)

  • How to Create a Persistent button on the top HTML gallery

    Hi,
    In my InDesign Folio I have an article with full page HTML photo gallery. The photo grid occupies the full screen. I want to create a Persistent button on the top of this gallery which user can tap to go to the Main Menu page. This button is  always visible at one place even as user scrolls up and down the gallery. I tried creating it on the top layer, and on the top layer for Master page, but the button disapperas when the HTML gallery loads.
    So the user does not see any button to navigate out of the gallery to another article.
    Any ideas how to create the persistent button ?
    Thanks in advance.
    -MP

    Depending on if you are using the HTML as either an article or in an overlay, you may be able to either use the standard navto and goto hyperlinks syntax or place a blank button on top of your link in the HTML.
    I am not sure if using the standard navto and goto syntax will work between an HTML article and an Indesign article. Maybe Bob Bringhurst, Bob Levine, or one of the staff members can clarify. If you are using your HTML in an overlay, you can add a transparent button on top of your link or image to return to whatever page you like.

  • Where is the button in the top right of a finder window that minimizes sidebar

    In 10.8, where is the button at the top right of a finder window that minimizes the sidebar & toolbar.

    "View > Hide Toolbar" will toggle both - Toolbar and Sidebar at once,
    "View > Hide Sidebar" will only hide the sidebar.

  • Why do the minimize, maximize, & close buttons in the top right corner disappear (turn to a black void) unless FF is maximized?

    I am running Windows 7 on my new laptop. When I bought it back in August, I installed Firefox version 5 (I think) Now that I have updated to version 6, the minimize, maximize, & close buttons in the top right corner disappear when the window is not maximized. It becomes a black space where the buttons should be.

    Hi Kossa,
    You can also check if the issue occurs in
    Clean Boot. If the issue disappears in the Clean Boot environment, you can continue to narrow down which entry is causing the issue.
    Besides, uninstall it and re-download
    a fresh copy of FireFox to check the result. If the issue still exists, create a new user account to see if it occurs.
    If the issue persists, you can contact Mozilla Support directly and use Internet Explorer (IE) during the time.
    J
    Please Note: The third-party product discussed here is manufactured by a company that is independent of Microsoft. We make no warranty, implied or otherwise,
    regarding this product's performance or reliability.
    Regards,
    Linda

  • In Firefox 29, is there a way I Can get the orange menu button from the top left back?

    In Firefox 29 they removed the button at the top left corner. I was wondering if there was a way to revert back to that button.

    The interface you see in Firefox 29 is a major re-design (first one since Firefox 4) of Firefox's user interface called "Australis." We could argue about the UI similarity between 29 and Chrome but what good would that do? Main point is that Firefox is still way more customizable than Google and way more secure.
    If you don't like the new Australis look, you can revert back to the view before Australis using the Classic Theme Restorer addon
    *https://addons.mozilla.org/en-US/firefox/addon/classicthemerestorer/

  • I have Firefox web browser but I have lost the click on Firefox " button" at the top of the monitor screen and can't get it back. How do I do that?

    I have Mozilla Firefox as my web browser. However I have just lost my Firefox "button" on the top of my monitor screen and can't get it back. How do I do that?

    Hello andytuveson, right-click on an empty section of the Tab Strip and uncheck Menu Bar in the pop-up menu.
    see : [https://support.mozilla.org/en-US/kb/display-firefox-button-menu-instead-menu-toolbar Display the Firefox button menu instead of the menu toolbar]
    thank you

  • I do not have the Firefox button in the top left hand corner as shown in the welcome video. This button seems paramount to carry out many of the features. How do I get it?

    In the welcome video there is an orange Firefox button in the top left hand corner - I do not have one. This button appears to be central to the use of Firefox.

    The Firefox Button acts as an alternative to the regular menubar (File, Edit, View etc.), so if you can see the menu bar you're not missing any functionality.
    On Windows XP the default is for the menubar to be shown instead of the Firefox button, but you can switch between the button and the menubar via the View -> Toolbars -> Menu bar option.
    With the Button enabled, you can access the regular menubar by pressing the Alt key.
    More details here: https://support.mozilla.com/en-US/kb/how-do-i-get-firefox-button

  • Just downloaded firefox 4.0, and the firefox button at the top of the page has completely disappeared - how do I get it back?!

    I clicked on the "Firefox" button at the top and then clicked on fullscreen and the Firefox button disappeared - can't figure out how to get out of fullscreen. Tried "alt" already. Thanks!

    Thanks for the response. I figured out the answer - it is to click on the resize button at the top right!
    Holding the mouse pointer at the top edge brings back the tabs, I find escape doesn't do anything when in fullscreen.
    Cheers, Mike

  • Can any one tell me how to remove the 3 buttons at the top of a dialog?

    Hi all
    Can any one tell me how to remove the 3 buttons at the top of a dialog?
    The Close, Minimize and the other I don�t know what you call that one.
    Thanks for you time All
    Have a great day
    Craig

    Try http://java.sun.com/docs/books/tutorial/uiswing/components/frame.html#setDefaultLookAndFeelDecorated

Maybe you are looking for