Saturday 15 March 2014

Not able to use addElement in the flash-builder class -


I am trying to experiment with the graphics API in Flash Builder.

1) The default application is "Maine AS" (not main MXML). 2) Application uses Spark (not MX package)

What I see is the function addElement To show the size in the following code,

here is the code:

  package app {import flash.display.Shape; Import flash.display.Sprite; Import spark.core.SpriteVisualElement; Public square key {public function main () {var size: size = new size (); Shape.graphics.lineStyle (3,0xff); Shape.graphics.moveTo (0,0); Shape.graphics.lineTo (300,300); Var sve: Sprite Visual Element = New Sprite Visual Element (); Sve.addChild (size); // ************************************************************************************************* ********************************** Element (sve); // & lt; & Lt; & Lt; Compiler error is here ****************************************}} }  "post-text" itemprop = "text"> 

Your class should have a class extension that supports visual elements.

In this case, you try to increase the spark category:

  package {import spark.components.Application; The public class expands the main application {public function main () {super (); }}}    

No comments:

Post a Comment