No not quite! I want the width of the MC to increase revealing more of the 
image, so I used a shape mask that is tweened!
  ----- Original Message ----- 
  From: Cor 
  To: 'Flash Coders List' 
  Sent: Sunday, July 13, 2008 5:31 PM
  Subject: RE: [Flashcoders] Wierd roleover problem! AS3


  Look at this:
  www.badmintonclubnetwerk.nl/_Cor/Dave

  Move over the buttons.
  Is this what you mean?


  -----Original Message-----
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of SJM
  Sent: zondag 13 juli 2008 18:27
  To: Flash Coders List
  Subject: Re: [Flashcoders] Wierd roleover problem! AS3

  basically the box is suppose to expand than contract on mouse out!
    ----- Original Message ----- 
    From: Cor 
    To: 'Flash Coders List' 
    Sent: Sunday, July 13, 2008 5:07 PM
    Subject: RE: [Flashcoders] Wierd roleover problem! AS3


    You override your mcName 5 times, so only the last instance remains in
    focus.
    I guess, without knowing the rest of your application, in the function
    addOverOut add these lines as first lines:
    Var mc:MovieClip = new MovieClip();
    mc = mcName;

    -----Original Message-----
    From: [EMAIL PROTECTED]
    [mailto:[EMAIL PROTECTED] On Behalf Of SJM
    Sent: zondag 13 juli 2008 17:46
    To: Flash Coders List
    Subject: [Flashcoders] Wierd roleover problem! AS3

    Hi Guys

    Im having a weird problem with a rollover, im trying to create a simple
    mouse_over/mouse out but for some reason the over and out do not work
    properly! I have 5 MC buttons on the main stage within each of the MCs is
    4layers; layer 1 - a empty MC to load an image into, Layer 2 -shape tween
    set as a mask, Layer 3 - stop(); action and over/out labels

    Everything works fine upto the point when I attempt a mouse over initially
    it works fine but for some reason instead of stopping at the selected
  frame
    it disappears. The image loading file seams to work fine so here is my
  main
    AS file code...


    package {

     import flash.events.*;
     import flash.display.MovieClip;
     import flash.display.DisplayObject;

     public class mainClass extends MovieClip
     {
        
    //////////////////////////////////////////////////////////////
    // Start of Class
    //////////////////////////////////////////////////////////////
      
      public function mainClass():void
      {
       
       image1_mask.image1.file ="images/image2.jpg";
       image2_mask.image2.file ="images/image3.jpg";
       image3_mask.image3.file ="images/image5.jpg";
       image4_mask.image4.file ="images/image7.jpg";
       image5_mask.image5.file ="images/image8.jpg";

       addOverOut(image1_mask);
       addOverOut(image2_mask);
       addOverOut(image3_mask);
       addOverOut(image4_mask);
       addOverOut(image5_mask);
      }          
              
      public function addOverOut(mcName:MovieClip):void {
       mcName.addEventListener (MouseEvent.MOUSE_OVER, overHandler);
       mcName.addEventListener (MouseEvent.MOUSE_OUT, outHandler);
       mcName.addEventListener (MouseEvent.CLICK, clickHandler);
       mcName.mouseChildren = false;
       mcName.buttonMode = true;
       mcName.useHandCursor = true;
      }

      public function overHandler ( ev:MouseEvent ):void
      {
       ev.target.gotoAndPlay("over");   
       trace("OVER - "+ ev.target.name);
      }

      public function outHandler ( ev:MouseEvent ):void
      {
       ev.target.gotoAndPlay("out");
       trace("OUT - "+ ev.target.name);
      }

      public function clickHandler ( ev:MouseEvent ):void
      {
       //first we need to determine which button was clicked
       var buttonName:String = ev.target.name;

       switch (buttonName)
       {
        case "image1_mask":
         trace("Click Image 1");     
        break;
        case "image2_mask":
         trace("Click Image 2");
        break;
        case "image3_mask":
         trace("Click Image 3");
        break;
        case "image4_mask":
         trace("Click Image 4");
        break;
        case "image5_mask":
         trace("Click Image 5");
        break;
       }
       
      }
      
     }
     
    }
    _______________________________________________
    Flashcoders mailing list
    [email protected]
    http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

    _______________________________________________
    Flashcoders mailing list
    [email protected]
    http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  _______________________________________________
  Flashcoders mailing list
  [email protected]
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  _______________________________________________
  Flashcoders mailing list
  [email protected]
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to