How to click button in exported SWF to go to frame in parent SWF?

I looked online, but couldn't find anything helpful.   I got these codes on the web, but they're not working.... (I'm pretty new to flash).
projectgallery.swf - PARENT SWF
projectgallery_cutLimestone.swf - EXPORT SWF
returnToAlbums_btn_inst - instance of a button on the export swf that I want to be able to click to go to a different frame in the parent SWF
Here are my codes:
on the parent SWF:
import flash.display.MovieClip;
import flash.events.MouseEvent;
var myLoader:Loader = new Loader();
var url:URLRequest = new URLRequest("projectgallery_cutlimestone.swf");
myLoader.load(url);
function loadHandler (event:Event) {
          var projectgallery_cutlimestone:MovieClip = event.target.content;
          addChild(myLoader);
          trace(projectgallery_cutlimestone);
          function returnToAlbums (event:MouseEvent):void {
                    projectgallery_cutlimestone.returnToAlbums_btn_inst.play();
          projectgallery_cutlimestone.addEventListener(MouseEvent.CLICK, returnToAlbums);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadHandler);
When I try it, the SWF loads fine, but when it loads, this OUTPUT error appears:
[object Main]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/frame2()
          at flash.display::MovieClip/gotoAndStop()
          at Main/preload1()
then, when I try to click the button returnToAlbums_btn_inst, this OUTPUT error appears:
ReferenceError: Error #1069: Property play not found on flash.display.SimpleButton and there is no default value.
          at Function/<anonymous>()
I'm really new to flash, so I don't know why it's not working.  The instance is labeled (I double-checked).

Export SWF works without error now, but parent SWF returns:
TypeError: Error #2007: Parameter child must be non-null.
          at flash.display::DisplayObjectContainer/addChild()
          at Main/frame3()
          at flash.display::MovieClip/gotoAndStop()
          at Main/gotoCutLimestone()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Main/preload1()
under OUTPUT when I try to load the SWF.  The returnToAlbums_btn_inst doesn't work still either.

Similar Messages

  • How make a button open a .swf file in a new window?

    How do I make a button open a swf file in a seperate window
    new window (like if i opened to swf file seperately)
    Anyone know ?

    well you can publish the the other FLA, which would give you
    an HTML file, upload that and the SWF then link to the SWFs' HTML
    page.

  • How to Click Button by pressing spacebar?

    Is there anyway that I can get a button clicked by pressing the keyboard spacebar?
    Message was edited by:
    Rumpi

    Is there anyway that I can get a button clicked by pressing the keyboard spacebar?
    Message was edited by:
    Rumpi

  • Crystal Report/STRUTS: Error (404) when clicking on Control Buttons (Print, Export, Next, Previous, etc...) on report viewer

    Post Author: jwenny
    CA Forum: Deployment
    Need help badly!!!
    We are using the crystal reports plugin for STRUTS.
    We are able to display the report in the crystal report viewer.  However, when we click any control buttons (print, export, etc...), then we get:
    JSPG0036E:  Failed to find resource /Report-viewer.jsp
    We then moved Report-viewer.jsp to the WebContents folder (root directory) and got a different error when we clicked any control button:
    Error:  400 page not found
    Does anyone know how to solve this problem?  For instance, is there a setting or parameter that needs to be set?
    Greatly appreciate any help!

    HI,
    Whenever we print the viewer does an auto postback, I believe due to this some of the values are getting missed. Moreover we are referring to the viewer and reportdocument object, it seems. So can you try this simple code in an application to see if it helps:
    ReportDocument rdoc = new ReportDocument();
    rdoc.Load("C:\TASKECrystalReports\Intraday.rpt");
    rdoc.SetDatabaseLogon("uid","pwd");
    rdoc.SetParameterValues("parameter name","value");
    CrystalReportViewer.ReportSource = rdoc;
    Helps?
    Thanks.

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

  • How to set a loop on an .flv so that an exported .swf loops?

    hi there. i am using Flash CS4 and I would like to know how to set a loop in an flv file so that when it is exported to swf, the movie will loop. Basically i have taken an existing interactive flash movie and have decompiled it into its individual flv counterparts. what i intend to do is take out all the nonsense from each flv file and then reconstruct the flash movie, export each file to swf and then convert each swf to avi or some other video format. to do this i will be using sothink swf to avi converter which allows you to convert swf files to avi files. this program allows you to convert swf files that loop by looping the swf file for as long as you want until you stop it, in which a video file is created from "the recording"
    after i decompiled the original file, many of the existing flv files were already set to loop. i know this because when exported to swf the swf file would loop. now when i went ahead and went into each flv file to edit a couple things, when i went to export them to swf, the swf files wouldn't loop. mind you, some of them did loop, and some of them did not loop. the ones i have edited are all supposed to loop and i cannot figure out what it is thats preventing some of the flv or exported swf files to loop. all i did was take out a few unnecessary frames from the beginning of each flv and nothing more. i am pretty new to Flash and do not know anything about coding and know very little about flash settings.
    i figured that selecting the "loop playback" option in the control drop down menu might help seeing as the flv file does loop when played in the editor, but again when exported to swf the swf file does not loop. what confuses me the most is that some of the exported swf files do loop. ALL of the exported swf files need to loop and my guess is that in order to make that happen, something in the flv file needs to be set correctly.
    can someone please assist me with this issue? if there is a way to simply loop an existing swf file that does not loop, can someone tell me how to do that? any help with this problem is greatly appreciated and i appologize if something like this has been asked before.... i just couldnt stand looking through 22 pages of search results to find the exact solution to my problem
    thank you!!!

    Hi,
    You can use shortDesc property. Something like
    <af:commandToolbarButton text="Some Button"
          id="ctb1" shortDesc="This button does something.."/>-Arun

  • How to get the index of the clicked button on TOOLBARBUTTONCHOICE

    Hello Experts,
       I have used toolbarbuttonchoice and created the dropdown list of the buttons dynamically. now when any of the button is clicked i need to get the reference of the button to call appropriate code in the action, but i am unable to get the either the reference or index of the clicked button.
    Please help.
    Regards,
    Kinshuk

    Hi Sascha,
      My code goes this way
      data:
        lr_btn_ch   type ref to if_wd_view_element,
        lr_toolbar_btn_choice type ref to cl_wd_toolbar_btn_choice,
        lr_row_data           type ref to cl_wd_row_data,
        item                  type string,
        action                type string.
    CALL METHOD view->get_element
      EXPORTING
        id      = 'BTNCH'   " button choice Element in layout
      receiving
        element = lr_btn_ch
    lr_toolbar_btn_choice ?= lr_btn_ch.
    DATA:  lt_items      type string_table,
        lt_actions    type string_table.
    loop at lt_dyntab into ls_dyntab.
      append ls_dyntab-name to lt_items.
    append 'ONBTNCH' to lt_actions.
    endloop. 
    i get the data in the table lt_dyntab from API not in context
      loop at Lt_items into item.
        read table Lt_actions index sy-tabix into action.
        create_choice_item( i_toolbar_btn_choice = lr_toolbar_btn_choice i_item = item i_action = action i_view = VIEW ).
      endloop.
    create_choice_item creates the menu item for the button choice..
    My question is where should i call the map_on_action method. and how do i retrieve the index or reference in ONBTNCH method.
    please elaborate.
    Regards,
    Kinshuk

  • How do I Re enabled the Buttons in MainMovie.swf from a Button within SecondMovie.swf???

    I have the following situation
    MainMove.swf is doing a loadmovie of SecondMovie.swf
    The Button that loads SecondMovie.swf also disables other buttons in MainMovie.swf
    on (release) {
        _root.intro_btn.enabled = false;
        loadMovieNum("SecondMovie.swf", 2);
    How do I Re enabled the Buttons in MainMovie.swf from a Button within SecondMovie.swf???
    Using AS2 is this current project
    Thanks

    lol Sorry bout that I'm brand new here and was looking for the option to remove the post from the other location.

  • Java.lang.NullPointerException when click on the Export button

    I had created a advance table with a export button to export the data to csv. Both the advance table and the export button point to the same view. The advance table region works correctly and show all the necessary transactions, but when I click on the Export button I get the following error
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.lang.NullPointerException; at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source) at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source) at OAErrorPage.jspService(_OAErrorPage.java:80) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    Do anyone can help. Thanks in advance
    Regards
    Lawrence

    It was and Oracle bug#6469196/5880921. I installed patch#5880921 and It foxed the proble.

  • How to call this out by clicking button from other file??

    The following coding is easy and workable...!! i wonder how do i call this out by clicking button from other file... please help!!
    import java.awt.geom.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.print.PrinterJob;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.print.*;
    public class Receipt extends JPanel implements Printable, ActionListener {
    final static Color bg = Color.white;
    final static Color fg = Color.black;
    final static Color red = Color.red;
    final static Color white = Color.white;
    final static BasicStroke stroke = new BasicStroke(2.0f);
    final static BasicStroke wideStroke = new BasicStroke(8.0f);
    final static float dash1[] = {10.0f};
    final static BasicStroke dashed = new BasicStroke(1.0f,
    BasicStroke.CAP_BUTT,
    BasicStroke.JOIN_MITER,
    10.0f, dash1, 0.0f);
    final static JButton button = new JButton("Print");
    public Receipt() {
         setBackground(bg);
    button.addActionListener(this);
    public void actionPerformed(ActionEvent e) {
    if (e.getSource() instanceof JButton) {  
    PrinterJob printJob = PrinterJob.getPrinterJob();
    printJob.setPrintable(this);
    if (printJob.printDialog()) {
    try {
    printJob.print();
    catch (Exception ex) {
    ex.printStackTrace();
    public void paintComponent(Graphics g) {
         super.paintComponent(g);
         Graphics2D g2 = (Graphics2D) g;
         drawShapes(g2);
    public void drawShapes(Graphics2D g2){
    g2.drawString("Hello world",50,50);
    public int print(Graphics g, PageFormat pf, int pi) throws PrinterException {
    if (pi >= 1) {
    return Printable.NO_SUCH_PAGE;
         drawShapes((Graphics2D) g);
    return Printable.PAGE_EXISTS;
    public static void main(String s[]){
         JFrame f = new JFrame();
         JPanel panel = new JPanel();
         panel.add(button);
         f.getContentPane().add(BorderLayout.SOUTH, panel);
         f.getContentPane().add(BorderLayout.CENTER, new Receipt());
         f.setSize(580, 500);
         f.show();

    The following coding is easy and workable...!! i wonder how do i call
    this out by clicking button from other file... please help!!Copy the code from your main() method and put it into the actionPerformed() method of the other class. If you do not need to reference the instance of Receipt from the othe class, it is that easy.

  • Hi - Re Keynote  I'm trying to figure out how to create a music album on USB flash drive. What I want is a background picture with 'click-buttons' to play each track listed, also similar for embedded videos and photos etc.  Is this possible with Keynote ?

    Hi - Re Keynote  I'm trying to figure out how to create a music album (as an artist) on USB flash drive, (accessible by both Mac and PC). What I want is a background picture with 'click-buttons' to play each track listed, and play in order (like a cd) - also similar for embedded videos and photos etc. This should all be on the one page.  
    Is this possible with Keynote, or any other software package for Mac (am using Macbook Pro) ?
    Gav 88

    Hi there,
    Yikes, it sounds like you've been doing a lot of work on this project... Unfortunately, however, this isn't the Adobe Encore forum, but the Acrobat.com forum. While it seems like an exciting question, we're not able to address issues pertaining to other Adobe products and services. Here's a link to the Adobe Encore forum, where you're more likely to get help for this specific issue:
    http://forums.adobe.com/community/encore
    Sorry not to be of more specific help to you. Best of luck!
    Kind regards,
    Rebecca

  • How to easily add roller click buttons to my iweb page?

    How easy is it to add roll over mouse click buttons to my website, using iWeb 09.
    Many thanks.
    Graham

    iWeb only supports rollover text, not images.
    To use images you have to create them first. One for the normal state and one for the hover or rollover state.
    Then you must embed them in iWeb with the HTML Snippet.
    Here's such a page :
    http://www.wyodor.net/_Demo/duckmenu/HoverImages.html
    Instead of two images it uses one that changes position when you hover the mouse over them :
    !http://www.wyodor.net/Demo/duckmenu/duckassets/iWebHome.png!
    Open the Activity window in Safari, Command-Opion-A, to see the other images. Option-double-click the image to save them.
    Also save the webpage and study the code.

  • How to click a HTML page button from Java code?

    Know the HTML page name and the button id in this page, how to click the button automaticly in java code(Like in awt or swing)?

    ukkus wrote:
    Hi,
    Thank for the quick reply,
    It will be very helpful if you can tell me how can we do this, I am not able to get how to do the same, with the link that you have provided.You haven't even had time to read it yet.
    >
    Actually main scenario is:
    I have to RUN a JSP report which will call this script. That JSP report and script is in UNIX server. Can you please explain how to perform this task.Running this from a JSP is an even worse programming practice than running it from a standalone application.

  • How to deactivate button after click??

    hello experts,
    how to deactivate button after click???
    there are 2 buttons
    Download | Add
    now if i click on download the download button should get deactive.....n  Add button position should not change..
    thanks in advance.

    Hi,
    1. Declare an internal table of type sy-ucomm. i.e.
    DATA : it_fcode TYPE TABLE OF sy-ucomm.
    2. Append Function Codes of the options in the Menu that you want to deactivate to the above declared internal table. For e.g. If DWL & ADD are the Function Codes of options that need to be deactivated then,
    APPEND 'DWL' TO it_fcode.
    APPEND 'ADD' TO it_fcode.
    3. Set PF_-Status as shown below.
    SET PF-STATUS 'status_name' EXCLUDING it_fcode.
    4. Now, the options in the menu bar with Function Codes 'DWL' & 'ADD' will be deactivated.
    aRs
    pOINTS ARE ALWAYS WELCOME

  • How to capture previously clicked button(previous event)?

    Hi guyz,
    I have frame in which i have different panels. I would like to capture the last clicked button. My objective is to bring a pop-up box(dialog) when anything other than a specific button is clicked in one of the panels. So, i would like to know if i can see what button was clicked previously. Does anyone know?

    How to capture previously clicked button(previous event)?Store it somewhere and then you can use it later:
    ActionListener previousActionEvent;
    JButton b = new JButton();
    b.addActionListener(new ActionListener(){
       public void actionPerformed(ActionEvent evt){
          previousActionEvent = evt;
    });

Maybe you are looking for

  • System Shutdown under Windows2000

    Hy I need a VI that ends all running tasks and shutdown Windows2000. Under Windows98 I have used the "user32.dll" but under W2K it´s more complex and many DLLs are needed to do this. Have someone a shutdown VI or information about needed DLLs to shut

  • Error message when installing iDVD 08

    Would love some help please. I have downloaded the iDVD program from Apple website and can't open it with out getting the following message " Alert: An eligible iDVD application was not found in the location /Applications." I have downloaded the iDVD

  • How to update the iTunes in the iPad using the I pad

    How to update the iTunes in the iPad using the I pad?

  • Why does Firefox not give me an option to save a document before opening it from Google?

    When Google lists sites in response to my search phrases I see pdf or doc files that I know I want. Firefox does not offer me the option of downloading them immediately to a chosen folder. I have to first open them on screen and then save them. This

  • DataSources in BI 7.0

    Hello All, We are just beginning to implement a BI solution in our landscape and would like to know the following: 1) Which DataSource should we be using 3.x or 7.0? What are pros/cons of using one over the another? 2) I replicate 0PLANT_ATTR datasou