A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [CS3] Error #1010

  1. #1
    Member
    Join Date
    Dec 2007
    Location
    Kirkland WA.
    Posts
    62

    [CS3] Error #1010

    Hopefully this will be an easy question. Im trying to use a button (that is in lower level movie clip) to gotoAndStop() a movie clip in another lower movie clip. think my problem is in the path to the other clip (but I used the “insert target mode’ to get the relative path)


    This is what I have on the button

    Code:
    stop();
    function clickButton(evt:Event):void {
    	trace("the " + evt.target.name + " button was clicked");
    	gotoAndPlay(2);
    	this.shore_cable.gotoAndPlay(1);
    	
    }
    Connect_Shore.addEventListener(MouseEvent.MOUSE_DOWN,clickButton);}
    I also have a “Trace(this name);” on the movie clip “shore_cable” that I want to control
    The below shows that the button was clicked and that the shore_cable is a correct movie clip.

    I do not get a compiler error but the animation does not work and I get this the output note:

    shore_cable

    the Connect_Shore button was clicked

    TypeError: Error #1010: A term is undefined and has no properties.
    at controlpanel_test_fla::Shore_button_3/clickButton()

    any ideas? anyone? thank you in advance for your consideration
    p.s. i did a search and found a lot of information on the #1010 but i could not figure out my problem

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    I'm not a guru but I'm not understanding your code. your evt.target.name is "Connect_Shore" but you are trying to goto and play "shore_cable". Where did shore_cable come from and was is appropriately declared within the function.

    What is the gotoAndPlay(12) assigned to....remember object oriented so you've got to identify who....been learning that little tid bit the hard way.

    Not tested but since evt.target already know what what pressed, just use it to change the frame
    Code:
    evt.target.gotoAndPlay(1)
    or something like that.

    Just a thought.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Member
    Join Date
    Dec 2007
    Location
    Kirkland WA.
    Posts
    62
    shore cable is the animation that is in another lower level movie clip. I want that movie clip to play (i was trying to use) "this.shore_cable.gotoAndPlay(1);" that is what is giving me the #1010

    The gotoAndPlay(2) is connected to the button

    does that make sence, thank you for looking at it

  4. #4
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Okay, is shore_cable a global class or something added within a function? You are using AS 3.0?
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  5. #5
    Member
    Join Date
    Dec 2007
    Location
    Kirkland WA.
    Posts
    62
    Yes AS3

    Global class is probbly my problem; i do not know what that is.
    shore_cable is a movie clip and i thought that was enough.

  6. #6
    Member
    Join Date
    Dec 2007
    Location
    Kirkland WA.
    Posts
    62
    do i need to call out
    var shore_cable = movie clip

    in order to make it be connectable?

  7. #7
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813

    Better view

    private var shore_cable:MovieClip();

    But in a global area inside the class function. Basic the global area is any area NOT within a function

    Code:
    package {
    
        ///global area
    
        public class example {
    
           ///global area
    
            private function example2 {
                ///NOT GLOBAL
            }
        }
    }
    Last edited by samac1068; 12-18-2007 at 07:40 PM. Reason: Add Trimming to code package
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  8. #8
    Member
    Join Date
    Dec 2007
    Location
    Kirkland WA.
    Posts
    62
    I guess I’m to new to understand packaging. I bought a book last night on AS3 and I hope that will help me understand it better. I'm reading it now.

    Would the "package" go in the "parent" movie clip? or does it matter and do I need to declare var shore_cable:MovieClip(); it is a "child" movie clip but i figured because it was a movie clip and i used "this.shore_cale.cable.gotoAndPlay(1)" it should find the child clip?

    thank you again for your time in trying to help the helpless

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center