3 Replies Latest reply on Apr 19, 2010 11:50 AM by La Bestia

    Missing something from currentState

    La Bestia Level 1

      I basically started this today. I have a series of images that will load their larger counterpart on the next state.

       

      Problem # 1 is I cannot switch states on click

       

      Problem # 2 is I am not sure if largeImage.load is working it Alerts back with the full path but the image shows up broken currently

       

      private function onImageMouseClick(evt:MouseEvent):void{
                  currentState=='page2'
                  var largeImage:Image = new Image;
                  largeImage.visible = true;
                  addElement(largeImage);
                  largeImage.x = 300;
                  largeImage.y = 120;
                  largeImage.width=600;
                  largeImage.height=450;
                  largeImage.setStyle("completeEffect",Fade);
                  largeImage.load(new URLRequest("../bin-debug/images/" + evt.currentTarget.id + ".jpg"));
                 
                  }

       

       

      Thumbnail # 1 code

       

      <mx:Image top="193" left="51" width="200" height="150" source="../bin-debug/images/image1.jpg" mouseOver="onImageMouseOver(event)" mouseOut="onImageMouseOut(event)" includeIn="page1" click="onImageMouseClick(event)" id="image1"/>

       

       

      Thank you all!