0 Replies Latest reply on Nov 5, 2010 9:51 AM by Skoolbus777

    Registration Mark Mess, and this AS3 code not working as a result.

    Skoolbus777 Level 1

      Hello,

       

      When you create a new mc/symbol do you just hit "new" from the library and as it take you within the container do you draw (in my scenario I always draw in Illustrator). I ask because I've been doing this, and I think I'm not understanding the registration mark. I didn't realize that when you go within a container of a mc it's not the same size as the artboard.

       

      That being said my reg. marks were way off, in regards to the artboard. Unfortunately I've created complex animations this way. I'm unable to fix reg. marks for these because you can't Edit All Frames and fix the reg mark.

       

      So when I ran the code below, the mc I created was not seen due to the XY coordinates.

      _________________________________________________________________

      var guy : conanSwingSword_mc = new conanSwingSword_mc();
      addChild(guy);

       

      guy.mouseChildren = false;

       

      guy.addEventListener(MouseEvent.CLICK, funcclickme);

       

      function funcclickme(event:MouseEvent):void {
          guy.play();
      }

      __________________________________________________________________

       

       

       

       

      So in essence... I thought you could drop a MC on your timeline, and then call it to play via the code below [see below code]. I didn't know you had to export to AS and then add child etc. [as seen above].

       

       

       

      ___________________________________________________________________

       

      instanceName.addEventListener(MouseEvent.CLICK, functionName);

       

      function functionName(event:MouseEvent):void

      {

      symbolName.play();

      }

      ___________________________________________________________________

       

       

       

      My fix for now is to put a MC on a keyframe, and a stop action to accompany it. I then have a mc/instance on a previous keyframe that I click to get there in which it plays.