2 Replies Latest reply on Jul 24, 2008 11:57 AM by Gregory Lafrance

    Drawing with AS3

    cesaregb
      Hi all,

      I wondering if I can draw something with AS3 in the flex, that make any sence ??

      what im trying to do is draw something deppending of the data that the flex have
      So I guess I can do this by:

      Import a flash animation to Flex but I have to give parameters from flex to the SWF for example a with or height of an object, and i dont know if I can do that, and if I do how can I.


      Or making all the AS code of the drawing in a package and run it on Flex and this show u the dinamic content this make any sence ?? for example I have this code


      var triangleHeight:uint = 8;
      var triangleShape:Shape = new Shape();
      triangleShape.graphics.beginFill(0x2147AB);
      triangleShape.graphics.moveTo(triangleHeight/2, 5);
      triangleShape.graphics.lineTo(triangleHeight, triangleHeight+5);
      triangleShape.graphics.lineTo(0, triangleHeight+5);
      triangleShape.graphics.lineTo(triangleHeight/2, 5);

      how can I import it and make it possible in Flex 3 ? In a spesific part of the stage, for example in the buttom or something like that ???

      well I hope make any sence ja, and also hope that u can helpme with this ... jaja i rather the first working with the swf file =P that make all work easier, but if you can giveme info for both of them I'll be glad jaja ..

      Kind Regards
      Cesar Gonzalez