How to access a button inside a MovieClip which is the source of a scrollpane?

Hi Everyone,
I have created a crollpane in my flash file and the source of the scrollpane is a movieclip which contains a buttons.
Now I want to add a gotoAndStop function to that button to link to a frame on the main timeline.
Could anyone tell me what is the right as3 code to access this button?
Thank you!

Hi Ned,
I'm still getting a error message. This is my code:
MovieClip(spane8.content).AppsOptimizerBtn.addEventListener(MouseEvent.CLICK, gotoApp1);
function gotoApp1(event:MouseEvent):void
          gotoAndStop(21);
This is the error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at MyAssests_Scene2_fla::MainTimeline/frame11()
          at flash.display::MovieClip/gotoAndStop()
          at MyAssests_Scene2_fla::MainTimeline/gotoAppStore()
Frame 11 is where my scrollpane is.
"gotoAppStore" is a function that I used at frame 1 to link to frame 11.
Any idea what is wrong?

Similar Messages

  • Access a button inside a movieclip

    Hey...
    Im pretty new to flash, I have a problem that have taken hours, only not to getting sorted out, so i'll try my luck here...
    I've basicly made a rollover menu which is nested inside a movieclip. the movieclip is put on 1 st. frame on the main timeline and I want the buttons inside the movie clip to take the user to a different frame on the main timeline, but no matter what I do it's just not working...
    here is some of he solutions i have tried to do:
    function work1(e:Event)
    //MovieClip(parent.parent).gotoAndStop("work1")
    //gotoAndStop("work1")
    //this.gotoAndStop("work1")
    //parent(gotoAndStop("work1"))
    //MovieClip(this.parent).gotoAndStop("work1")
    //MovieClip(parent.gotoAndStop("work1"))
    //this(gotoAndStop("work1"))
    //main.gotoAndStop("work1")
    //root.gotoAndStop("work1")
    //MovieClip(root).gotoAndPlay("work1")
    //MovieClip(stage).gotoAndPlay("work1")
    //MovieClip(root.parent.parent).gotoAndStop("work1");
    work1_btn.addEventListener(MouseEvent.CLICK, work1);
    hope someone can help...

    sure, there are a zillion ways, that timeout function was more to demonstrate the problem than offer a valid solution...
    Personally, with what you're doing, here's my first inclination for handling it:
    Just add this bit, dumping that other stuff:
    stage.addEventListener(MouseEvent.CLICK, clickHandler);
    function clickHandler(event:MouseEvent):void{
         if (event.target is SimpleButton&&event.target.name!=null){
              gotoAndPlay(event.target.name);
    That assumes you've given those buttons the same name as the frame you want them to go to. In your example, rename that first button as work1, and that code will send you to the frame with that name on click. That code will handle all the buttons, assuming you name the frame and button instances the same (like button work2 would take you to a frame named work2 etc).
    Since it's a stage click handler, it can handle any click. Here's the breakdown:
    //adding a global click listener.
    stage.addEventListener(MouseEvent.CLICK, clickHandler);
    //what to do with the click
    function clickHandler(event:MouseEvent):void{
         //here we're just checking to see what's clicked (from your example, they are SimpleButtons)
         //and then the && means 'and'  we're making sure that button has a name.
         if (event.target is SimpleButton&&event.target.name!=null){
              //goto the frame with the same name as the button
              gotoAndPlay(event.target.name);
    HTH,
    -Ted

  • How to insert a button on a page which changes the field value in a list

    Hi,
    I need to send a workflow email to the manager giving him an option to approve/reject the ongoing process. Now i want to make it such a way that, manager is redirected to some page, where he will see two button, Approve and Reject. On click of any of them,
    the status field in sharepoint list should change accordingly.
    Please suggest how can i implement this. 
    Many thanks.

    Hi
    check this real example
    http://blogs.msdn.com/b/sharepointdesigner/archive/2012/08/16/a-sample-approval-workflow-which-can-be-recalled-by-initiator.aspx
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Buttons inside a movieclips won't work...

    I have a movieclip that has several buttons inside it. When I use this code:
    mc.onRollOver = function()
         // do stuff
    The buttons won't work anymore..

    Hello there Mr. Ned Murphy,
    Is there any other way to make buttons inside a movieclip work?
    The scenario of my project is having a panel for control buttons, progress bar, sound buttons(on/off). When the cursor is rollover the panel, it will animate going up to reveal buttons which hidden below, for the shortcut of every scenes.
    This is what I got.
    control_panel_mc->2 frames w/ stop(); on each->2 layers->1st layer(bottom)panel contains buttons->2nd layer(contains button w/ a "swapdepths very important")
    and on the 2nd frame 2nd layer theres no button w/ a swapdepths and on the actionscript I have that code: mc.onRollOut = function{ //do something };
    Any other suggestion please...
    Thanks and more power,

  • MovieClip buttons inside a MovieClip button inside another MovieClip button

    I am trying to make a Portfolio of my study abroad experience and can get something right about the movie clip buttons inside each other. I have a button to click on titled "travel" and a window shows up with more movieclip buttons to organize different locations of pictures. I can click on the button to have to slide of pictures but nothing happens. I have the "turnOffAllButtons"  coding and  also have the coding for stay clicked, but I can't get the 3rd set to show up. what am i not doing?
    I don't have any errors or output comments showing up

    I have it working now. what I did, I make a slideshow setup (gotoAndStop(1);) in a specific frame and the code I put in for the next, didnt work.
    this is was I have now, without the "turnOffAllButtons" coding:
    Main Button (actions Layer):
    stop();
    travelButton_mc.buttonMode=true;
    travelButton_mc.addEventListener(MouseEvent.ROLL_OVER, colorizetravelButton);
    function colorizetravelButton(givenEvent:MouseEvent){
      if (givenEvent.currentTarget.currentFrame != 50)
      travelButton_mc.gotoAndPlay(2);
    travelButton_mc.addEventListener(MouseEvent.ROLL_OUT, decolorizetravelButton);
    function decolorizetravelButton(givenEvent:MouseEvent){
      if (givenEvent.currentTarget.currentFrame != 50)
      travelButton_mc.gotoAndPlay(21);
    travelButton_mc.addEventListener(MouseEvent.CLICK, loadtravelLocations);
    function loadtravelLocations(givenEvent:MouseEvent){
      travelButton_mc.gotoAndStop(50);
      travelLocations_mc.gotoAndPlay(1);
    Inside the travelLocations_mc I have currently one button to show a slide of pictures, this is the second layer of buttoncode:
    stop();
    scotlandButton_mc.buttonMode=true;
    scotlandButton_mc.addEventListener(MouseEvent.ROLL_OVER, colorizescotlandButton);
    function colorizescotlandButton(givenEvent:MouseEvent){
      if (givenEvent.currentTarget.currentFrame != 50)
      scotlandButton_mc.gotoAndPlay(2);
    scotlandButton_mc.addEventListener(MouseEvent.ROLL_OUT, decolorizescotlandButton);
    function decolorizescotlandButton(givenEvent:MouseEvent){
      if (givenEvent.currentTarget.currentFrame != 50)
      scotlandButton_mc.gotoAndPlay(21);
    scotlandButton_mc.addEventListener(MouseEvent.CLICK, loadscotlandInfoPage);
    function loadscotlandInfoPage(givenEvent:MouseEvent){
      scotlandButton_mc.gotoAndStop(50);
      scotlandInfoPage_mc.gotoAndPlay(1);
    I turned the alpha up so you can see the mc that loads
    I currently have a keyframe at 60 with a code of stop(); so the travelLocations_mc will still
    does this make sense?

  • How to access XML files inside IDML?

    Hi All,
    How to access the different XML files like designmap, story, masterspread, etc. found inside the IDML files?
    Pl. help.
    Thanks,
    Praveen

    An External Library DC is only intended to include jars. Using a Java DC may be a better idea, unless you put your xml files into a jar first (but you'd need a Java DC for that...).

  • How to open a folder inside a folder, without closing the first?

    I can't find a way to open a sub-folder, inside a mainfolder, without closing the main folder.
    What's even worse, if you hold "option" or "command,"  (old OS9 muscle memory kicking in) it opens the new folder but wipes-out the ability to use the back button!  So then if you needed that main folder open, and it's deep inside some chain, you have to go searching for it again.
    So, is there any fix for this?
    <Edited by Host>

    Problems such as yours are sometimes caused by files that should belong to you but are locked or have wrong permissions. This procedure will check for such files. It makes no changes and therefore will not, in itself, solve your problem.
    First, empty the Trash, if possible.
    Triple-click anywhere in the line below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:
    find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 -o -acl \) 2> /dev/null | wc -l
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.
    The output of this command, on a line directly below what you entered, will be a number such as "41." Please post it in a reply.

  • I have an old i tunes library but i dont know how to access it, when i plug my ipod into the new computer it will let me sync but then i lose all my music i have on my ipod. how can i transfer music from my ipod to my new itunes library?

    I have an old i tunes library but i don t know how to access it. im trying to sync my ipod with my new itunes library but it wont let me. how can i copy the songs off my ipod to my new library.

    You can transfer itunes purchases:
    File>Transfer Purchases

  • How to access a method of a class which just known class name as String

    Hi,
    Now I have several class and I want to access the method of these class. But what I have is a String which contain the complete name of the class.
    For example, I have two class name class1and class2, there are method getValue in each class. Now I have a String containing one class name of these two class. I want to access the method and get the return value.
    How could I do?
    With Class.forName().newInstance I can get a Object. but it doesn't help to access and execute the method I want .
    Could anybody help me?
    Thanks

    Or, if Class1 and Class2 have a common parent class or interface (and they should if you're handling them the same way in the same codepath)...Class c = Class.forName("ClassName");
    Object o = c.newInstance(); // assumes there's a public no-arg constructor
    ParentClassOrInterface pcoi = (ParentClassOrInterface)o;
    Something result = pcoi.someMethod(); Or, if you're on 5.0, I think generics let you do it this way: Class<ParentClassOrInterface> c = Class.forName("ClassName");
    // or maybe
    Class<C extends ParentClassOrInterface> c = Class.forName("ClassName");
    ParentClassOrInterface pcoi = c.newInstance();
    Something result = pcoi.someMethod();

  • Can't remember how to access voicemail from a landline or phone outside the verizon network?

    Can't remember how to access voice mail from a land line or a mobile phone outside the Verizon network?

    Dial your full 10-digit number, then hit the * key whenyour voicemail answers.  It will ask for your password and you will be connected to your voicemail as if you were on your phone.

  • How to directly insert pictures inside a wiki page without the need to enter the picture's properties

    I am working on a publishing site collection using the enterprise wiki template. Add when I want to add a new Picture from my Pc to the wiki page, I will be prompted with the following dialog:-
    So can anyone advice how i can bypass this dialog and directly add the imag to the wiki page?
    i tried modifying the "Images" content type by hiding the above fields, but still i will be prompted to enter the following :-

    Hi,
    According to your post, my understanding is that you want to directly insert pictures inside a wiki page without the need to enter the picture's properties.
    Per my knowledge, you can use javascript to bypass Edit Properties Page while uploading pictures.
    Here are some similar articles for your reference:
    How to bypass Edit Properties
    Page while uploading documents in a document library
    How to bypass Edit Properties Page while uploading documents in a
    SharePoint and .NET: How to bypass Edit Properties Page or Skip EditForm.aspx Page while uploading documents in a document library
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to save changed data from a input field to the source structure

    Hi,
    I have a small problem with the onChange event with HTML input fields.
    When changing a value of a input field or by creating a new value for a field the OnChange event is called by moving away the mouse pointer....
    get_form_field( 'field_name' ).
    But is it possible to write back the new value in the source field ls_screenstructure_field1 without using the OnInputProcessing?
    I ask because my application´s structures have a lot of fields that should be filled and changed by input fields.
    It´s not comfortable to request every new value with .. = request->get_form_field(... .
    Thanks for helping.
    Cheers,
    André

    you wanted a onchange for a htmlb:inputfield which would also trigger server event. try the following code.
    <htmlb:inputField id            = "test"
                                alignment     = "LEFT"
                                size          = "6"
                                required      = "TRUE"
                                doValidate    = "TRUE"
                                type          = "INTEGER"
                                 />
    <bsp:htmlbEvent id="myid" onClick="myonclick" name="ValueChanged" />
      <script for="test" event=onchange type="text/javascript">
    alert(this.value);
    ValueChanged();
    </SCRIPT>
    if the value in the inputfield is changed it would trigger a alert at the client side and also trigger a server event. now you can caputre the value in oninputprocessing.
    Hope this helps.
    do let us know if you need help in how to capture this value in oninputprocessing.
    Regards
    Raja

  • How to restore iPod when it doesn't appear in the Source List?

    About 6 months ago I stupidly wiped my iPod Nano (5th Gen) and reformatted it as fat32. I assumed that when I formatted it back to Mac OS Journaled it would work normally as an iPod again but it doesn't. When it is plugged into my Mac running 10.5.8, it appears on the desktop/mac harddrive (without its individualised nano icon) and it fails to appear in the source list in iTunes (10.2.2).
    I have tried everything I know how to do, including the steps outlined in this support document:
    http://support.apple.com/kb/TS1410
    I need to restore the iPod to factory settings, but need a way to do this not through iTunes seeing as the iPod is not recognised. Specifically, in the following support document I cannot complete step 4:
    http://support.apple.com/kb/HT1339
    One last thing I have tried is duplicating the files (including hidden ones) from a 5th gen nano that does appear in my source list, and placing those files into my apparently invisible nano but this has not made any difference.
    Does anyone have any suggestions? I have basically been left with a bricked paperweight (due mostly to my own stupidity!) but would love to be able to use it again.
    Thanks for any help offered

    Hello kismet_kracker,
    What happens if you place the iPod into Disk Mode with it still connected to your Mac?  Does it then show up in Finder as a mounted drive?  Here are instructions for putting your iPod into Disk Mode.
    http://support.apple.com/kb/ht1363
    B-rock

  • How do I use a OS (Windows) Environment Variable in the source path of me ActionScript 3.0 settings

    I'm sure this can be done as I know we used something similiar at my old work place, below is an image showing what I am attempting to do.
    We used this to create more portable / shareable assets files which when symbols are linking to code, the code was very often in different directories on different machines.
    So we had set up environment variables in the OS to point to source directories and then used these variables in the source paths.
    As long as everyone had these variables set up then it would all work.
    Anyone know the correct way to do this in Flash CC
    Thanks in advance!
    Best Wishes
    Rhys Thomas

    sinious the problem with doing that is that the changed path gets into the code repository as well, so you wind up with everyone going back and forth changing it to their own value, which is a hassle. If you use relative paths and a standard project setup, then it all "just works" without a problem.
    For example, this is the setup I use:
    .dev
         .thisProject
              .Flash1
                   Flash1.as
                   .Flash1
                        Flash1.xfl
                   .view
                        .audioAssets
                        .customViews
              .SoundLib
                   SoundLib.xfl
              SoundLib.swc
         .bin <swfs are output here
              .xml
         .core
              .control
              .model
              .service
              .view
    We have a "base project" that you check out to start a new project (we do heaps of similar work), and the paths are already set up to be relative. Having each project point to its own copy of the core code allows for fine-grained control of which revision you're using--we've even pointed deliberately to old versions or branches on rare occasions.
    The bin folder is actually shared with the website repository, which is in a different directory from the Flash source code (in the website, it has a different name). This allows the generated swfs to be easily updated and ensures that the latest XML is being used both for development and on the site.
    The "thisProject" folder actually includes a Flash Builder workspace with all the standard shortcuts, etc., already set up. This is primarily because of how the "default path" works when you create a new Flash Pro project in FB. Because we output a level up from the workspace, we hack the .metadata folder every time, but that's a small change.

  • I have access to both Vista and XP - which is the preferred?

    Since I have access to both Vista and XP I was wondering which is the most preferred? I have an iMac and MBP that I will be installing the OS on. Thanks.

    Chris:
    I have experience with both, Vista and XP. I use a MBP 15" 2GB RAM and I have had great success with both. I really no not overload my system. I have software to connect to the internet and full office 2007 Suite. So, mostly internet and productivity software. No major issues with either.
    Axel F.

Maybe you are looking for

  • How can I delete a system?

    A couple of years ago I had trouble with my HD so to play safe I installed another one and put a new system onto it. I meant to use it for a few days to make sure it worked and then delete the old system, but I forgot! I know most people say you shou

  • Updated to Premiere CC 2014 - Now getting Startup Error - Could not find any capable video play modules

    I have a late 2013 MacBook Pro Retina with NVIDIA GeForce GT 750M 2048 MB. Ever since the Premiere CC 2014 update, on launch, I get this error right after it shows "ExporterQuickTimeHost.bundle" loading (I tried removing this, but it still did it, so

  • Changing FROM header during Forwarding from PSTN to PSTN

    Hi, Is there a possibility to change the FROM header in INVITE message: 1. calling from PSTN network to lync user 2. user got call forwarding to PSTN number set that the FROM header got user's number? Lync is 2013 with newest update.

  • Skype has stop working error - Skype 7.3 in Window...

    After I log in when I try to call someone I get the error message stating " Skype has stopped working". Here are the error details. Problem signature: Problem Event Name: BEX Application Name: Skype.exe Application Version: 7.4.80.102 Application Tim

  • 10.8.2 cant be installed. help!

    i tried updating form 10.8.1 to 10.8.2 and during the update on restart their was an error and had to abort. now the update is missing on the App Store. how to i fix this? thanks