Why am I getting this error and how do I fix it?

I am new to actionscript. I am following a tutorial on lynda. I am trying to learn how to create flash games. I am using flash cs4. The tutorial uses flash cs3 and and actionscript 3.0. I added a movie clip to my library and enabled export for actionscript. I got a dialog box that says "a definition for this class could not be found in the classpath, so one will automatically be generated in the swf file upon export." I click ok. Then when I try to test it, I get an error that says "call to possibly undefined method". What exactly am I doing wrong?

Try modifying your class and your code as follows...
change the class linkage to be Cursor.  Not that it is wrong, but classes typically have upper case letters to make them easier to identify in code.
then, do not use the name of the class as the instance name....
var cursor:Cursor;
function initializeGame():void
cursor = new Cursor();
etc...

Similar Messages

  • There was an error opening the database for the library "/Users/stacia134/Pictures/Aperture Library.aplibrary".  Why am I getting this message and how do I correct it so that I can open Aperture????  any suggestions would be most appreciated

    There was an error opening the database for the library “/Users/stacia134/Pictures/Aperture Library.aplibrary”.  Why am I getting this message and how do I correct it so that I can open Aperture????  any suggestions would be most appreciated

    Then I'd check the system drive, if it has problems.
    To check your System drive boot into the Recovery Partition, see: OS X Lion: About Lion Recovery
    Restart your Mac and hold down the Command key and the R key (Command-R), and keep holding them until the Apple icon appears, indicating that your Mac is starting up.
    You will see a panel, where you can use Disk Utility to check your System Drive.

  • When I launch iTunes An Unknown Error Occurred (-42110).  What is this error and how do I fix it?

    When I launch iTunes An Unknown Error Occurred (-42110).  What is this error and how do I fix it?

    Try the following user tip:
    iTunes for Windows 11.0.2.25 and 11.0.2.26: "Unknown error -42110" messages when launching iTunes

  • Why am I getting this error?  How do I add confirm message to button press?

    Using Java Studio Creator.
    I do not understand why I am getting the following page error:
    Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error.
    Exception Details: java.lang.IndexOutOfBoundsException
    Index: 0, Size: 0
    Possible Source of Error:
    Class Name: java.util.ArrayList
    File Name: ArrayList.java
    Method Name: RangeCheck
    Line Number: 546
    ======================================================================
    I have a page that works.
    It has a button that is created in the session bean code with the following java:
    button = (HtmlCommandButton)application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
    button.setActionListener( application.createMethodBinding("#{ScheduleEditSessionBean.mainApply}", new Class[]{ActionEvent.class} ));
    button.setId( "applyUndates" );
    button.setType( "submit" );
    button.setTitle( "Apply updates.");
    button.setValue( "Apply" );
    button.setStyle(style);
    children.add(button);
    When the button is pushed, it calls the following session bean method:
    public void mainApply(ActionEvent actionEvent)
    updateScheduleData();
    scheduleAdjustFlag = 1;
    dataApplied = true;
    dataSaved = false;
    addControls();
    This all works just fine - no errors
    ====================================================================
    I wanted to add confirmation to the button press, so I removed the action listener for this button and added
    a javascript function call for the onclick method
    button = (HtmlCommandButton)application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
    style = "text-align: center; font-family: 'Arial','Helvetica',sans-serif; " + font + " height: 22px; width: 115px";
    // Commented out this line button.setActionListener( application.createMethodBinding("#{ScheduleEditSessionBean.mainApply}", new Class[]{ActionEvent.class} ));
    button.setOnclick("confirmApply()"); // Added this line.
    button.setId( "applyUndates" );
    button.setType( "submit" );
    button.setTitle( "Apply updates.");
    button.setValue( "Apply" );
    button.setStyle(style);
    children.add(button);
    I added a dummy button to the page that has the following call to execute the mainApply method in the sessioon bean.
    The button action just calls the mainApply() method in the session bean
    public String mainApplyBtn_action() {
    seb.mainApply();
    return null;
    Added the javascript to the page that simply pushes the dummy button if confirmed.
    function confirmApply()
    if( confirm( 'Are you sure you want to Apply these changes?' ) )
    form1["form1:mainApplyBtn"].click();
    The session bean method looks like this it is the same method as before, but without the action event argument.
    public void mainApply()
    lsb.logMsg( "<ScheduleEditBean.mainApply> Main apply pushed" );
    updateScheduleData();
    scheduleAdjustFlag = 1;
    dataApplied = true;
    dataSaved = false;
    addControls();
    ==================================================================================
    Now, when I push the original 'Apply' button, I get the confirmation box just like I expected.
    But when I confirm the question, I get the error at the top of this post.
    If I push the 'dummy button' directly, I do not get the error.
    I do not understand why I should be gettng this error.
    Can anyone give me a clue as to why this change would cause the problem?
    The error is related to an ArrayList.
    I use several of these on the page, but they should be filled with data in the preRender method of the page.
    Can anyone suggest a way that I can add confirmation to a button that is created under program control?
    Thanks

    Make use of the fact that when an onclick event of a button returns 'false', the action will not be taken.
    Pseudocode:<h:commandButton value="submit" action="#{myBean.action}" onclick="return confirm('Are you sure?');" />

  • I have PSE on my Macbook Pro but get an 'error' listed as 150.30 when I try to use it. What is this error and how do I fix it?

    What is a 150.30 error when i try to use my PSE program on my Macbook Pro 2012 computer?  How do I fix it?

    Hi Dennis,
    Please follow this KB
    Error "Licensing has stopped working" | Mac OS
    Regards,
    Sandeep

  • When attempting to install Acrobat IX i get the following error "Error 1335" "pcw-cab-acr 11007" saying the file is corrupt.  What causes this error and how do I fix it?

    Has anyone else found this error?

    I have found a temporary solution, allowing the previous version of iTunes (v. 11.1.3 (x64) in my case) to be re-installed.  It will allow you to re-establish use of iTunes until the Apple software engineers fix the most recent disasterous upgrade (v. 11.1.4).  Please see and follow the procedure in the following article:http://smallbusiness.chron.com/reverting-previous-version-itunes-32590.html   The previous version works beautifully.

  • Why do I keep getting this error and how do I make it stop?

    Problem Event Name:          APPCRASH
      Application Name:          iTunes.exe
      Application Version:          10.5.0.142
      Application Timestamp:          4e9243f2
      Fault Module Name:          rlls.dll_old_unloaded
      Fault Module Version:          0.0.0.0
      Fault Module Timestamp:          49008aaf
      Exception Code:          c0000005
      Exception Offset:          100297c3
      OS Version:          6.0.6002.2.2.0.768.2
      Locale ID:          1033
      Additional Information 1:          fd00
      Additional Information 2:          ea6f5fe8924aaa756324d57f87834160
      Additional Information 3:          fd00
      Additional Information 4:          ea6f5fe8924aaa756324d57f87834160
    Read our privacy statement:
      http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409

    Such an error caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions 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.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]

  • Exc in ev handl: Error: Bad NPObject as private data!Why do I get this? and how do I get rid of it. I am a senior gal who needs easy help. Thank you.

    It just occurs when it wants to.

    This was the answer. Thank you so much for the easy to follow instruction you left for me.

  • Why am I getting this message, and how can I get rid of it

    the message is:
    Note: WebBrowser.java uses unchecked or unsafe operations
    Note: Recompile with -Xlint:unchecked for details
    the code is:
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class WebBrowser implements ActionListener
       static Frame f = new Frame("WebBrowser");
       static TextField address = new TextField(50);
       static Button back = new Button("Back");
       static Button next = new Button("Forward");
       static Button go = new Button("Go");
       static Panel p = new Panel();
       static JEditorPane pane = new JEditorPane();
       static Label status = new Label("");
       static Stack b = new Stack();
       static Stack forw = new Stack();
       public static void main(String[] args) {
          f.setLayout(new BorderLayout());
          p.setLayout(new BorderLayout());
          Panel topad = new Panel();
          topad.add(address);
          topad.add(go);
          p.add(topad, BorderLayout.NORTH);
          Panel bopad = new Panel();
          bopad.add(back);
          bopad.add(next);
          p.add(bopad, BorderLayout.SOUTH);
          f.setSize(500,500);
          f.setVisible(true);
          f.add(p, BorderLayout.NORTH);
          f.add(new JScrollPane(pane), BorderLayout.CENTER);
          f.add(status, BorderLayout.SOUTH);
          f.addWindowListener(new WindowAdapter() {
              public void windowClosing(WindowEvent e) {
                  System.exit(0);
          pane.setEditable(false);
          new WebBrowser();
       public WebBrowser() {
          back.addActionListener(this);
          next.addActionListener(this);
          address.addKeyListener(new KeyAdapter() {
                public void keyPressed(KeyEvent e) {
                    if(e.getKeyCode() == KeyEvent.VK_ENTER) {
                       loadPage(address.getText());
          pane.addHyperlinkListener(new HyperlinkListener() {
              public void hyperlinkUpdate(HyperlinkEvent event) {
                  if(event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                      loadPage(event.getURL().toString());
       public void loadPage(String url) {
           try {
              pane.setPage(url);
              b.push(url);
           } catch(Exception ex) {
              status.setText(ex.toString());
       public void actionPerformed(ActionEvent e) {
           if(e.getSource() == back) {
               try {
                  String str = (String)b.pop();
                  forw.push(str);
                  pane.setPage(str);
               } catch(Exception ex) {
                  status.setText(ex.toString());
           if(e.getSource() == next) {
               try {
                  String str = (String)forw.pop();
                  b.push(str);
                  pane.setPage(str);
               } catch(Exception ex) {
                  status.setText(ex.toString());
    } //end of code

    ajtgarber wrote:
    when I compile with -Xlint it says something about unsafe operations and it shows the code:When using Java 5, you should be using generics to make your code more type safe, but it's not an absolute requirement (so it's a warning instead of an error).
    If you want to learn more, just google for generics.

  • When ordering a project I'm getting a message " an error occurred while contacting the Apple online store. Please try again"  Can anyone please tell me why I might be getting this message and how to fix the problem.  Thank you

    When ordering a project I'm getting a message " an error occurred while contacting the Apple online store. Please try again"  Can anyone please tell me why I might be getting this message and how to fix the problem.  Thank you

    I've got the same problem.
    It wasn't the case before the upgrade to v 9.2 (Iphoto 11) yesterday.
    The previous solution preferences - advanced - "select a store" (last option) doesn't solve it anymore.
    Thanks!

  • I am trying to listen BBC radio news from BBC App, but on pressing the button I always get the error "there was an error playing this radio feed". What is the source of this error and how can I remove it?

    I am trying to listen BBC radio news from BBC App, but on pressing the button "live radio" I always get the error "there was an error playing this radio feed". What is the source of this error and how can I remove it?

    That is probably just a generic error message and you might not ever know what is causing it. Assuming that you have been able to play live radio with the app in the past (I know nothing about the app) and assuming that all other Internet related functions (Safari, email, etc.) are working properly on your iPad, quit the app completely and reboot your iPad.
    Go to the home screen first by tapping the home button. Double tap the home button and the recents tray will appear with all of your recent apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
    If that fails to resolve the issue, you might want to reboot your router, unplug it for about 30 seconds and then plug it in again.

  • I get missing plug-in error when opening my online bill which is in PDF format. I am using a 2010 Macbook with the latest version of Safari and Adobe suite installed in my computer. Why do I get this error? What should I do?

    I get missing plug-in error when opening my online bill which is in PDF format. I am using a 2010 Macbook with the latest version of Safari and Adobe suite installed in my computer. Why do I get this error? What should I do?

    In relation to my previous inquiry regarding inability to view a pdf file using Safari...
    Is it possible that I can view other online bills from other website but not this particular bill from one specific website?
    Sorry if I missed any important point in this article -->Apple Safari 5.1 and Adobe Reader/Acrobat Advisory
    Thanks again!

  • Hi, i get the error -49 when trying to Export a Movie edited in iMovie and recorded with Elgato Video Capture anyone know why i get this Error and can help me?

    Hi, i get the error -49 when trying to Export a Movie edited in iMovie and recorded with Elgato Video Capture anyone know why i get this Error and can help me?

    Read this
    http://support.apple.com/kb/ts1583

  • Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.

    Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.

    I may have already resolved this issue buy removing the device from my computer and re-pairing it. It is currently working just fine.

  • HT1660 I'm getting a message that reads 'The iTunes Library file cannot be saved. You do not have enough access privileges for this operation." Why is this? And how can I fix it?

    I'm getting a message that reads 'The iTunes Library file cannot be saved. You do not have enough access privileges for this operation." Why is this? And how can I fix it? I'm worried that I'm going to lose my entire library because of this.

    A belated reply, as the problems itunes has have discouraged me from using it much. If you uncheck the "read only" box, it doesn't stay that way! Next time you use it, the box comes up checked.
    I'm still having that problem, even when I open iTunes as administrator.
    I've yet to see the answer to this problem. I use itunes mostly to download audiobooks, and I'm ready to download more, and want to save them!

Maybe you are looking for

  • How to use Combobox to direct link

    Hi all, how can i use combobox to direct link in adf. For example: I have a list of value with combobox, when i selected "Page A" ---> go to Page A, selected "Page B" ----> go to Page B Thanks

  • Replacement fans for quicksilver 2002 933Mhz

    Hello There, I love my 'new' secondhand Quicksilver 2002 but I hate the noise it makes. I have emailed a firm about getting quieter fans but they want to know what size the existing fans are - can someone tell me please? Or at least how does one meas

  • Jstl if doubt?

    I have a variable which comes from my properties file <fmt:message var="maxNumber" key="maxNumber"/>And I have another variable${k}I am trying to comapre tehse two variables as below; <c:if test="${k <'maxNumber' }"> Hello WOrld </c:if>But there seem

  • IWeb '08 Personal Domain Name Network Solutions

    This is maddening and Network Solutions is no help. I have a domain name, say <wxyz.com>, registered with Network Solutions. The CNAME page has 3 columns of fields: "Alias" field; "Refers to Host Name" with Radio Button w/popup menu including "www";

  • How should I go about backing up all my files and system preferences?

    Hey, I'm planning on upgrading to snow leopard very soon, but I'm afraid of loosing all my files and preferences. Backing up my files isn't really the problem, it's the backing up of the system / application preferences that worries me. I have well o