Button inside MovieClip don't work...?!

Hello,
I\m traying to create AIR for Android app & I have 2 MovieClips in the main timeline the first in frame 35 and the second in frame 99 with the name of quary_mc. Inside the second movieclip there is a button with the name of sID_btn. When i addEventListener in frame 1 of the  main timeline it display:
Error #1009: Cannot access a property or method of null object reference
This is the code:
quary_mc.sID_btn.addEventListener(MouseEvent.CLICK, displayData);
function displayData(evt:MouseEvent):void
          trace("Hello");
Regards,

You will be unable to add the event listener to the button until frame 99 when it actually exists.
Alternatively, you can just add the button on frame 1 at an alpha of 0 and then set it to 1 at frame 99. However, it will still get mouse input so you will need to set quary_mc.visible = false on frame 1 and quary_mc.visible = true on frame 99 to solve that issue.

Similar Messages

  • Hi, I have a problem wih Photoshop. I am trying to press the buttons but they don't work at all. Also the program are not closed. How can i fix this? FYI, Illustrater is working normally.

    Hi, I have a problem wih Photoshop. I am trying to press the buttons but they don't work at all. Also the program are not closed. How can i fix this? FYI, Illustrater is working normally.

    You have not provided any useful technical information like system specs, error messages or whatever. We don't even know your exact product version.
    Mylenium

  • Button inside movieclip on stage

    What do I have to do to get the button to work? I view the swf and there is no active button.
    I need the button inside the clip to be active. I can't find the answer. Thank you.

    no i put a button from the library inside the clip to see if i could access a button once movie played and i couldnt see the states of that library version if I viewed the scene I could.
    I was going to create my own button, which I will, but I don't think I will be able to get to it once publised and I'm frustrated.
    I think I have run into this before, it's been a while. Is it an enable thing?

  • Accessing Button inside Movieclip/ScrollPane

    Hello all,
    I'm trying to understand how to build a button inside a movieclip.  I have a template that has movieclips within movieclips, and when I create a button (all using AS2) the button will work if I test the scene, but in the whole flash movie it does not work.  I also have some buttons located inside a ScrollPane that also do not call correctly.
    For my button I am using this code:
    facebookbtn.on (release) {
    getURL("http://www.facebook.com/","_blank","GET");
    ^ This is placed on the button "facebookbtn". I also tried using: _root.bgPages.pg1.facebookbtn.on (release), to no avail.
    For the one inside a ScrollPane I am attempting to call a javascript function:
    on(release){
         import flash.external.ExternalInterface;
         ExternalInterface.call("GroupDelegate","dayone1");
    ^ This also does not work, with or without the button name before on(release).
    I'm putting the FLA file here so that if anyone has the time, could help me with this quick problem. Thanks!
    FLA: Download FLA

    Do not place code inside objects with code on(blah2x). It will lead to unpredictable behaviors and besides it is bad practice. Centralize all your code on one frame in the timeline. Use this format on the main timeline:
    import mx.utils.Delegate; //declare at top only ONCE
    YourButton.onRelease = Delegate.create(this, YourFunctionCall);
    or
    YourButton.onRelease = function()
       //do your stuff here
    Do the same thing with the ExternalInterface. You can put the import at the top along with Delegate.

  • Control button inside movieclip with AS

    If I got a mc with a button inside, how do write the script
    to control that button from the main timeline?
    My script (that doesn't work) looks like this:
    mymovieclip.mybutton.onRelease = function() {
    gotoAndStop(2);

    Sorry, my mistake, it should go to frame 2 inside
    mymovieclip.
    Script should be like this:
    mymovie.mybutton.onRelease = function() {
    mymovie.gotoAndStop(2);

  • N86 media buttons and volume don't work with music

    I used my N86 on a trip last week as my music player, and used the nokia remote attachment which I used to play/pause, skip, repeat and adjust volume with no problems.  Just today I used my phone again, this time without the remote, or headphones, and now the media buttons on the end of the phone (when slid oposite the keypad) don't work, and the sound volume won't adjust with the volume key.  I even tried with the remote and that didn't work either.  The volume works fine with phone calls.  Any ideas on what caused this?
    PS I just updated to 20.115 and this did not correct the problem.  
    Bruce
    Message Edited by Erhard on 18-Nov-2009 02:43 PM
    Solved!
    Go to Solution.

    Sigh.. sorry to hear that. What is it with these phones that you have to format them all the time? (a rhetoric question, knowledgeable presons needn't answer )
    (Trivia: search results for 'hard reset': 6738, search results for 'format': 16063, search results for 'factory reset': 4329)
    You'll probably soon have that same problem again - my all means I don't hope you will, but I'm just guessing
    kvirtanen.deviantart.com

  • BEx Analyzer buttons withing planning don't work

    Hello,
    I tried to create a little planning application with BEx Analyzer. For this I tried different ways (my last try using: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0a89464-f697-2910-2ba6-9877e3088954) but my problem is that the created buttons don't work.
    If I enter a value into the key figure field and press "refresh data" or "save data" in both cases the value is set back to 0 and my entered value doesn't appear anywhere.
    I checked the input-ready query by using the Query Designer. Both key figures can be changed by user entry or planning function. 
    Are there any other things I have to check or change?
    Thanks for your help!
    Bettina

    Hi D,
    but if it would be locked it wouldn't be possible to enter a value - would it? I can add a value into the field but afterwards when using the button it disappears and becomes 0 again.
    Here's a more detailed description:
    I created a input-ready query on a aggregation level which contains sales man number, calender year/month, customer number and planned turnover.
    I opened this query with the BEx Analyzer and executed the steps described in the PDF for which I added the link before in my first post in this thread. I implemented this HowTo until the popup messages.
    I did some planning tries before on the planning wizard in the portal . There it was possible to add values (my test data I also created with the planning wizard but without adding a turnover value) and to save them.
    There's no other planning function implemented yet. For the first step I just want to have the possibility to enter turnover values manually by using the workbook with the input-ready query. Nothing more.
    Bettina

  • My iphone volume button and ringer don´t work

    For some reason, suddenly, my ringer doesn´t work when I get incomng calls. Also, the volume buttons don´t work. For that matter, any button on the permiter of the phone works. All other functions of the phone work well. It seems to be a software problem, rather than a hardware one. Please help! Thanks, Jorge

    then i would restore the phone as new.

  • My down and up arrow buttons for scrolling don't work except on the firefox help page, it worked fine with chrome?

    I had google chrome before I switched to firefox due to the obsessive popups on chrome. All of a sudden the up and down keys don't scroll up and down on web pages, the only one they work on is the firefox help page. Any thoughts?

    In order to be able to find the correct solution to your problem, we require some more non-personal information from you. Please do the following:
    *Click the Firefox button at the top left, then click the ''Help'' menu and select ''Troubleshooting Information'' from the submenu. If you don't have a Firefox button, click the Help menu at the top and select ''Troubleshooting Information'' from the menu.
    Now, a new tab containing your troubleshooting information should open.
    *At the top of the page, you should see a button that says "Copy text to clipboard". Click it.
    *Now, go back to your forum post and click inside the reply box. Press Ctrl+V to paste all the information you copied into the forum post.
    If you need further information about the Troubleshooting information page, please read the article [[Use the Troubleshooting Information page to help fix Firefox issues]].
    Thanks in advance for your help!

  • Button inside MC won't work - Basic

    Hi everyone,
    I'm a pretty novice user of Flash 8. I have a basic button
    that when users click on, just takes them to another frame on the
    timeline. When it's outside the movie clip of a map, it works fine:
    on (release) {
    gotoAndStop("Scene 1", "villa2");

    you just have a path issue here and need to call the correct
    path. If there is only one scene then you do not need to use the
    scene parameter. dz's code will work by calling to the _root
    timeline or use _level0 or _parent._parent (if understand your
    structure correctly) so it should read:
    on(release) {
    _root.gotoAndStop('villa2');
    that is if this code is being attached to the button, if it
    is on the timeline of the button's parent clip it would read:
    the_btn.onRelease = function() {
    _root.gotoAndStop('villa2');
    I find it interesting that a getURL would work for this
    though, I'm not sure how you would have done that, but I digress
    PS. you can post your fla here, zip the file, mount it on
    your server, and post the address to the file using the http link,
    in the reply window (use the 'Reply' link in the top of the
    window)

  • Buttons inside movie clip dont work

    I have a simple HTML website with 5 buttons one of which, a movie clip, drops down 3 more buttons but the buttons dont always work. I get wierd issues for instance: whether I'm on the mcs page or another page completly the drop down buttons only work when Im on the parent movie clips page. When the buttons do work and you click on the button of the page your on  they only work once then the whole issue repeats itself. Hopefully to clarify here is the code inside of the movie clip that directs the drop down buttons.
    stop();
    var cdButton:URLRequest= new URLRequest("character desin.html");
    cd_btn.addEventListener(MouseEvent.CLICK, cd);
    function cd(event:MouseEvent):void
            navigateToURL(cdButton,"_self");
    var caButton:URLRequest= new URLRequest("concept art.html");
    ca_btn.addEventListener(MouseEvent.CLICK, ca);
    function ca(event:MouseEvent):void
            trace("ca_btn");
            navigateToURL(caButton,"_self");
    var dsButton:URLRequest= new URLRequest("draw sketch.html");
    ds_btn.addEventListener(MouseEvent.CLICK, ds);
    function ds(event:MouseEvent):void
            trace("ds_btn");
            navigateToURL(dsButton,"_self");

    From what I see you are trying to somehow program a Actionscript only iframe navigation. That will never work without an external Interface call to the Browsers Javascript. This is complicated stuff and surely not what you have in mind. If concept art, draw sketch etc. are all separate swf files, you should load them (instead of the html you embedded them in)

  • HT4085 How do I lock my ipad screen so the swipe action and side button on screen don't work? My cats do these things and the game disappears.

    How do I lock my ipad screen so the swipe action and the side button on the screen do not work?  When my cats play a game on my ipad, they regularly swipe the screen and push the side button and the game disappears.

    The button on the top that you use to lock and unlock or put to sleep is the power button.  The button lower center of the screen is the home button...can be used to also wake from sleep and switch to the base home screen.
    Good to hear you are now able to lock rotation, even if you are not sure how you did it
    If you go to the iBook icon, tap Store in the uppper left side of the screen, you can search for the iPad User Guide...a free download that will place the guide in your iBooks library as a great source of background information.

  • Button in form don't work in browser

    Hi,
    We have few pdf files who have some form button.
    With this button's we can go to different other pdf file.
    this button's are use to navigate between PDF files.
    Since Adobe reader DC, with the new plugin in the browser, this button's have no action.
    this forms can be used properly in adobe reader or adobe acrobat pro, but not in the browser.
    I think there is a security in the plugin browser who block tyhis fontionnality.
    all is ok for all version before adobe DC.
    could you hel me please.
    thank's

    Hi aurélienm34916766,
    I can understand your concern & will guide you in the right direction.
    Can you please let me know the browser which you are using?
    If its Google Chrome then I am sorry to inform you that  the Adobe Reader plugin will not be supported in Chrome. The Chromium team has decided to remove support for NPAPI plugins like Adobe Reader. Here's a blog post that describes their decision - Chromium Blog: The Final Countdown for NPAPI
    On Windows, it is still possible to view the PDF in the Google Chrome web browser using 'Chrome PDF Viewer' plugin however some components of the PDF won't work ( like buttons or check-box etc. ).
    Regards,
    Aadesh

  • HELP- Buttons on 20" don't work with MacBook

    For the past two years I've been using my 20" Apple Cinema Display (the one with the white edges, not the newest version) with my 12" PowerBook by connecting it through Apple's ADC to DVI adapter and plugging it into the Mini-DVI slot on my PowerBook. It worked great and I especially liked how the power button on the display would turn the computer on without the need to open the lid of the PowerBook.
    I just bought a Black MacBook Pro, used the Migration assistant to transfer over my User folder. All works fine except the buttons on the display no longer does anything. I'll push it and it will glow but it doesn't seem any signal is sent to the MacBook. The display works fine when plugged in but neither the power button or the brightness button works anymore with the new MacBook.
    Very frustrating...any ideas? Could this be a limitation of the new integrated graphics card? But what would that have to do with powering on the computer?
    My MacBook currently only has 512MB RAM. The 2GB upgrade chip is on the way, but I'm not sure this would make any difference.

    Never got this to work, looks like it's a hardware limitation of the converter.

  • Urgent! "ThinkVant​age" button and F11 don't work after disk partition.

    I just bought a ThinkPad T400 last week.
    At first, I partitioned the C disk into 3 disks: C, D, E. I didn't change EISA partition.
    Then I use "Rescure and Recover " to reinstall Vista and restore the system.
    After it finished, I can enter Windows, but windows is not installed properly, without many funtions. And I can't install software to solve the problems because Windows Installer is no correctly installed. Furthermore,  driver letters are changed, i.e., after restoring system, SW_Preload disk becomes "F:" instead of "C:" before restoring.
    I then restarted the computer and want to rescure my T400 via "ThinkVantage". After pressing "ThinkVantage" button, system just asked me choose from "F1- BIOS, F11-Rescure". But when input "F11", the PC still can not enter "Rescure and Recovery" .
    I searched Google about this, somebody said disk partition may lead to thinkvantage error. If it's the case, how to solve the problem?
    Thanks a lot!
    hanks

    hi,
       i have the same problem. i have t400 with vista. i try to enter into the recovery but it is not going. so since it was urgent i installed xp. i havent changed the partition size. now it is not even showing the f11 option to enter the recovery. initially when i tried to enter into the recovery a blue screen used to come and the message used to display. it said a problrm was detected and to prevent damage to the computer windows is shutting down. so i called lenovo and they sent me the recovery disk. but when i run the recovery disk it shows the screen windows is loading files. then again blue screen appears with the same old message. even that recovery disk is not entering into the recovery. i dont know what to do. if anyone knows what to do please let me know. my email address is [email protected]
    Amar Deo

Maybe you are looking for