0 Replies Latest reply on May 19, 2010 12:46 AM by CRresolving

    Live Preview in flash builder 4 ? possible ?

    CRresolving

      Hi,

       

      here is a simple component :

      <?xml version="1.0" encoding="utf-8"?>

      <s:Group

       

       

      xmlns:fx="http://ns.adobe.com/mxml/2009"

      xmlns:s="

      library://ns.adobe.com/flex/spark"

      xmlns:mx="

      library://ns.adobe.com/flex/mx" width="100%" height="100%"

       

       

      >

       

       

      <fx:Declarations >

       

      </fx:Declarations>

       

       

      <fx:Script >

      <![CDATA[

       

       

       

       

       

       

       

       

       

      [

      Bindable]

      [

      Inspectable]

       

      public var color1 = "#FF0000";

      [

      Bindable]

       

      [

      Inspectable]

       

      public var color2 = "#FF0000";

      [

      Bindable]

      [

      Inspectable]

       

      public function set rcolor(val){

      color1 = val;

      color2 = val;

       

      }

      ]]>

       

      </fx:Script>

       

      <s:Rect width="100%" height="100%">

       

      <s:fill>

       

      <s:LinearGradient rotation="90">

       

      <s:GradientEntry color="{color1}" />=

       

      <s:GradientEntry color="{color2}" />

       

      </s:LinearGradient>

       

      </s:fill>

       

      </s:Rect>

      </s:Group>

       

      I simply would like use live Preview with color in Design Mode, and i Think i can't without compiling this component as a library ?

      Is there any issue to allow simple action script live preview in design mode ?

       

      the code in apps would be :

      <skins:rrectangle

       

      x="0" y="0" width="418" color1="#ff0000" height="78" id="fond0" rcolor="#ff0000" color2="#ff0000">

       

      </skins:rrectangle>

      and then in design mode : le square become red

      Is that possible ?

       

      *Best regards,

       

      CR1