1 Reply Latest reply on Apr 28, 2006 6:28 PM by DJ_Sick_Nick

    Movice Clip vs Button

    brendafos
      I'm new to Flash but come from a Java programming background and I'm finding Flash with ActionScript a great tool.
      I'm building my first all Flash 8 website. It's going well. I have several MovieClips that act as buttons using AS. I'm keeping all my AS in a single frame, mostly.
      My problem is on 3 buttons that are Buttons (not Movie Clips), I can't get them to work. I'm confused about where to put the AS, how to call the button. I have a MovieClipLoader that I'm using (and working) for the _mc buttons. I want to load .swf files that are the pages of the website.

      I'm trying to use: name_of_btn_btn.onRelease = function () { }
      Here's an error I'm getting:
      **Error** Symbol=bg_buttons_mc, layer=buttonsInBar, frame=36:Line 1: Statement must appear within on handler
      btnLinks_btn.onRelease = function () {

      How is the button class different?
      In the button, in the button_4_state timeline I've set up MC on the states, is that an issue?
      I asked this question on the General Discussion and I got suggestions to us On (Press). But I want to reference the button by name in my AS.

      I think instance name is not being found. When I put trace statements inside the onRelease function I don't any response.