[flexcoders] Hello world iOS example

2011-10-26 Thread Kevin McDonald
Can anyone point me to an end to end example of how to use Flash Builder to 
build, deploy and debug an iPad app, preferably one that doesn't gloss over 
glorious amounts of important detail?

Thanks!

Kevin MacDonald

[flexcoders] Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread sdl1326
I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I need
to get access to the Datagrid from the custom itemrenderer. What's the
best way to do this?

Thanks, in advance.



[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread turbo_vb
Cast the owner property to DataGrid.

-TH

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@... wrote:

 I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I need
 to get access to the Datagrid from the custom itemrenderer. What's the
 best way to do this?
 
 Thanks, in advance.





[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread sdl1326
Thanks. I should have mentioned that I did initially that and was
getting the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert
spark.components.gridClasses::GridLayer@260fac29 to
spark.components.DataGrid


--- In flexcoders@yahoogroups.com, turbo_vb TimHoff@... wrote:

 Cast the owner property to DataGrid.

 -TH

 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I
need
  to get access to the Datagrid from the custom itemrenderer. What's
the
  best way to do this?
 
  Thanks, in advance.
 




[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread turbo_vb
That error looks like you were trying to cast parent instead of owner.

-TH

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@... wrote:

 Thanks. I should have mentioned that I did initially that and was
 getting the following error:
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 spark.components.gridClasses::GridLayer@260fac29 to
 spark.components.DataGrid
 
 
 --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
 
  Cast the owner property to DataGrid.
 
  -TH
 
  --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
  
   I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I
 need
   to get access to the Datagrid from the custom itemrenderer. What's
 the
   best way to do this?
  
   Thanks, in advance.
  
 





[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread sdl1326
No, I was casting owner and got that error.
i.e. - Datagrid(owner).dataprovider

--- In flexcoders@yahoogroups.com, turbo_vb TimHoff@... wrote:

 That error looks like you were trying to cast parent instead of owner.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  Thanks. I should have mentioned that I did initially that and was
  getting the following error:
  
  TypeError: Error #1034: Type Coercion failed: cannot convert
  spark.components.gridClasses::GridLayer@260fac29 to
  spark.components.DataGrid
  
  
  --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
  
   Cast the owner property to DataGrid.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
   
I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I
  need
to get access to the Datagrid from the custom itemrenderer. What's
  the
best way to do this?
   
Thanks, in advance.
   
  
 





[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread turbo_vb
hmm, don't know what to tell you.  The following works fine:

var myDataProvider:ArrayCollection = DataGrid( owner ).dataProvider as 
ArrayCollection;

-TH

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@... wrote:

 No, I was casting owner and got that error.
 i.e. - Datagrid(owner).dataprovider
 
 --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
 
  That error looks like you were trying to cast parent instead of owner.
  
  -TH
  
  --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
  
   Thanks. I should have mentioned that I did initially that and was
   getting the following error:
   
   TypeError: Error #1034: Type Coercion failed: cannot convert
   spark.components.gridClasses::GridLayer@260fac29 to
   spark.components.DataGrid
   
   
   --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
   
Cast the owner property to DataGrid.
   
-TH
   
--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:

 I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I
   need
 to get access to the Datagrid from the custom itemrenderer. What's
   the
 best way to do this?

 Thanks, in advance.

   
  
 





[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread turbo_vb
Try sticking that in override prepare() or set data(), and make sure that data 
isn't null, and I bet you that it'll work.

-TH

--- In flexcoders@yahoogroups.com, turbo_vb TimHoff@... wrote:

 hmm, don't know what to tell you.  The following works fine:
 
 var myDataProvider:ArrayCollection = DataGrid( owner ).dataProvider as 
 ArrayCollection;
 
 -TH
 
 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  No, I was casting owner and got that error.
  i.e. - Datagrid(owner).dataprovider
  
  --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
  
   That error looks like you were trying to cast parent instead of owner.
   
   -TH
   
   --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
   
Thanks. I should have mentioned that I did initially that and was
getting the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert
spark.components.gridClasses::GridLayer@260fac29 to
spark.components.DataGrid


--- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:

 Cast the owner property to DataGrid.

 -TH

 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I
need
  to get access to the Datagrid from the custom itemrenderer. What's
the
  best way to do this?
 
  Thanks, in advance.
 

   
  
 





[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread sdl1326
That worked! I put it in prepare() and was able to get a reference to the 
datagrid. 

Thanks to all for the assistance.

--- In flexcoders@yahoogroups.com, turbo_vb TimHoff@... wrote:

 Try sticking that in override prepare() or set data(), and make sure that 
 data isn't null, and I bet you that it'll work.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
 
  hmm, don't know what to tell you.  The following works fine:
  
  var myDataProvider:ArrayCollection = DataGrid( owner ).dataProvider as 
  ArrayCollection;
  
  -TH
  
  --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
  
   No, I was casting owner and got that error.
   i.e. - Datagrid(owner).dataprovider
   
   --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
   
That error looks like you were trying to cast parent instead of 
owner.

-TH

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:

 Thanks. I should have mentioned that I did initially that and was
 getting the following error:
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 spark.components.gridClasses::GridLayer@260fac29 to
 spark.components.DataGrid
 
 
 --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
 
  Cast the owner property to DataGrid.
 
  -TH
 
  --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
  
   I have a custom itemrenderer in a GridColumn of a Spark Datagrid. 
   I
 need
   to get access to the Datagrid from the custom itemrenderer. What's
 the
   best way to do this?
  
   Thanks, in advance.
  
 

   
  
 





[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread turbo_vb
Cool!  -TH

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@... wrote:

 That worked! I put it in prepare() and was able to get a reference to the 
 datagrid. 
 
 Thanks to all for the assistance.
 
 --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
 
  Try sticking that in override prepare() or set data(), and make sure that 
  data isn't null, and I bet you that it'll work.
  
  -TH
  
  --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
  
   hmm, don't know what to tell you.  The following works fine:
   
   var myDataProvider:ArrayCollection = DataGrid( owner ).dataProvider as 
   ArrayCollection;
   
   -TH
   
   --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
   
No, I was casting owner and got that error.
i.e. - Datagrid(owner).dataprovider

--- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:

 That error looks like you were trying to cast parent instead of 
 owner.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  Thanks. I should have mentioned that I did initially that and was
  getting the following error:
  
  TypeError: Error #1034: Type Coercion failed: cannot convert
  spark.components.gridClasses::GridLayer@260fac29 to
  spark.components.DataGrid
  
  
  --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
  
   Cast the owner property to DataGrid.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ 
   wrote:
   
I have a custom itemrenderer in a GridColumn of a Spark 
Datagrid. I
  need
to get access to the Datagrid from the custom itemrenderer. 
What's
  the
best way to do this?
   
Thanks, in advance.
   
  
 

   
  
 





Re: [flexcoders] Manual TextFlow + Embedded Font not supported?

2011-10-26 Thread Baz
My examples work in Flex 4.5.1, and monkey patching is not straightforward
based on my Googling. Looks like no way out without upgrading.

Baz


On Tue, Oct 25, 2011 at 12:37 PM, Baz li...@thinkloop.com wrote:

 Hey Alex,

 I tried changing Framework Linkage to Merged into Code as well as
 checking/unchecking use local debug runtimes... without much effect. I'm
 reading your blog and piecing out what might apply to me. It's pretty
 advanced stuff. The thing is the font is there - if I specify it directly in
 RichEditableText it shows up. What is the container doing to TextFlow that I
 am not, and how can I mimic that. I've introspected almost every property
 and function of TextFlow, FlowComposer, ContainerController, TextFlowLine
 and TextLine (I've been on this for many days now :). Judging by the output
 of textFlowLine.getTextLine().textBlock.dump(), TLF is just not
 aware/registering the font until after the container is rendered.

 If you are curious to see it work and fail side-by-side in a simplified
 compilable app, check out: http://dl.dropbox.com/u/480077/FlexTestTLF.zip

 If you run it, you will notice 4 RichEditableTextContainers. The first two
 use device fonts (Courier and Arial), and they are interpreted correctly.
 The trace of the dump() in the console shows this nicely. The third box, in
 red, is the problem. This box tries to employ an embeded font before the
 container is rendered, and if you look at the trace, it's not accepting the
 font and instead using the default Times New Roman. The fourth box is
 exactly the same as the third box, but solves the problem by applying the
 truncation at updateComplete, rather than on initialize. The trace shows the
 font to be correct as well.

  Do you think all this is related to contexts and multiple swfs as you
 describe in your blog?

 Thanks!


 What do you make of this? Is there a way to mimic what happens to textFlow
 on updateComplete but inside initialize?

 On Tue, Oct 25, 2011 at 10:02 AM, Alex Harui aha...@adobe.com wrote:

 **


 See the embedded font post on my blog.  The control  needs to have the
 right SWF context.  Does it work if you turn off RSLs?



 On 10/25/11 3:01 AM, Baz li...@thinkloop.com wrote:






 Hello,

 Anyone have any idea why the embedded font in the following basic
 application does not show up?

 ?xml version=1.0 encoding=utf-8?

 s:Application

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

   xmlns:s=library://ns.adobe.com/flex/spark 
 http://ns.adobe.com/flex/spark 

   xmlns:mx=library://ns.adobe.com/flex/mx 
 http://ns.adobe.com/flex/mx 

   creationComplete=application1_initializeHandler(event)

   minWidth=955 minHeight=600



   fx:Script

 ![CDATA[

   import flash.text.engine.FontLookup;

   import flashx.textLayout.elements.TextFlow;

   import mx.events.FlexEvent;

   import spark.utils.TextFlowUtil;



   [Embed(source=ZemkeHandITCTT.ttf,
 fontFamily=zem, embedAsCFF=true, fontWeight=normal,
 mimeType=application/x-font)]

   public const zem_embed_class:Class;



   protected var embeddedFontMarkup:XML =  p
 fontFamily=zem fontLookup=embeddedCFFspanSome content/span/p;



   protected function
 application1_initializeHandler(event:FlexEvent):void  {

 var textFlow:TextFlow =
 TextFlowUtil.importFromXML(embeddedFontMarkup);

 textFlow.fontFamily = 'zem';

 textFlow.fontLookup =
 FontLookup.EMBEDDED_CFF;

 one.textFlow = textFlow;

   }

 ]]

   /fx:Script



   s:RichEditableText id=one width=500 height=204
 renderingMode=cff fontLookup=embeddedCFF /

 /s:Application



 I know the font works because if I specify *any* embedded font directly
 in the RichEditableText, the specified embedded fonts shows up.



 Thanks,

 Baz








 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui

  





Re: [flexcoders] Manual TextFlow + Embedded Font not supported?

2011-10-26 Thread Baz
Actually what Alex mentioned is correct too - I need to change the linkage
to merged into codes well as upgrade to 4.5.1.

Baz



On Wed, Oct 26, 2011 at 1:40 PM, Baz li...@thinkloop.com wrote:

 My examples work in Flex 4.5.1, and monkey patching is not straightforward
 based on my Googling. Looks like no way out without upgrading.

 Baz


 On Tue, Oct 25, 2011 at 12:37 PM, Baz li...@thinkloop.com wrote:

 Hey Alex,

 I tried changing Framework Linkage to Merged into Code as well as
 checking/unchecking use local debug runtimes... without much effect. I'm
 reading your blog and piecing out what might apply to me. It's pretty
 advanced stuff. The thing is the font is there - if I specify it directly in
 RichEditableText it shows up. What is the container doing to TextFlow that I
 am not, and how can I mimic that. I've introspected almost every property
 and function of TextFlow, FlowComposer, ContainerController, TextFlowLine
 and TextLine (I've been on this for many days now :). Judging by the output
 of textFlowLine.getTextLine().textBlock.dump(), TLF is just not
 aware/registering the font until after the container is rendered.

 If you are curious to see it work and fail side-by-side in a simplified
 compilable app, check out: http://dl.dropbox.com/u/480077/FlexTestTLF.zip

 If you run it, you will notice 4 RichEditableTextContainers. The first two
 use device fonts (Courier and Arial), and they are interpreted correctly.
 The trace of the dump() in the console shows this nicely. The third box, in
 red, is the problem. This box tries to employ an embeded font before the
 container is rendered, and if you look at the trace, it's not accepting the
 font and instead using the default Times New Roman. The fourth box is
 exactly the same as the third box, but solves the problem by applying the
 truncation at updateComplete, rather than on initialize. The trace shows the
 font to be correct as well.

  Do you think all this is related to contexts and multiple swfs as you
 describe in your blog?

 Thanks!


 What do you make of this? Is there a way to mimic what happens to textFlow
 on updateComplete but inside initialize?

 On Tue, Oct 25, 2011 at 10:02 AM, Alex Harui aha...@adobe.com wrote:

 **


 See the embedded font post on my blog.  The control  needs to have the
 right SWF context.  Does it work if you turn off RSLs?



 On 10/25/11 3:01 AM, Baz li...@thinkloop.com wrote:






 Hello,

 Anyone have any idea why the embedded font in the following basic
 application does not show up?

 ?xml version=1.0 encoding=utf-8?

 s:Application

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

   xmlns:s=library://ns.adobe.com/flex/spark 
 http://ns.adobe.com/flex/spark 

   xmlns:mx=library://ns.adobe.com/flex/mx 
 http://ns.adobe.com/flex/mx 

   creationComplete=application1_initializeHandler(event)

   minWidth=955 minHeight=600



   fx:Script

 ![CDATA[

   import flash.text.engine.FontLookup;

   import flashx.textLayout.elements.TextFlow;

   import mx.events.FlexEvent;

   import spark.utils.TextFlowUtil;



   [Embed(source=ZemkeHandITCTT.ttf,
 fontFamily=zem, embedAsCFF=true, fontWeight=normal,
 mimeType=application/x-font)]

   public const zem_embed_class:Class;



   protected var embeddedFontMarkup:XML =  p
 fontFamily=zem fontLookup=embeddedCFFspanSome content/span/p;



   protected function
 application1_initializeHandler(event:FlexEvent):void  {

 var textFlow:TextFlow =
 TextFlowUtil.importFromXML(embeddedFontMarkup);

 textFlow.fontFamily = 'zem';

 textFlow.fontLookup =
 FontLookup.EMBEDDED_CFF;

 one.textFlow = textFlow;

   }

 ]]

   /fx:Script



   s:RichEditableText id=one width=500 height=204
 renderingMode=cff fontLookup=embeddedCFF /

 /s:Application



 I know the font works because if I specify *any* embedded font directly
 in the RichEditableText, the specified embedded fonts shows up.



 Thanks,

 Baz








 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui

  






[flexcoders] Custom Itemrenderer - maintaining changed value in dropdownlist

2011-10-26 Thread sdl1326
I have a custom itemrenderer for a datagrid's column that contains a
dropdownlist (DDL). This DDL is populated with a set of numbers starting
at 1 and stopping at the length of the itemrenderer's datagrid
dataprovider's length (i.e. 1 thru 20). I then have the DDL'S
selectedIndex set to the row number in which the DDL appears. So,
looking at the datagrid, first row is set to 1, second row to 2, etc.,
etc. The DDL is being populated correctly as well as its
selectedIndexes. This is all being handled in the prepare function of
the itemrenderer.

The issue comes in when I go to change the DDL's value, if I scroll the
datagrid, or mouse back over the DDL, the value of the DDL reverts back
to the original value. I am pretty sure this has something to do with my
code and the fact that it's been handled in the prepare function as well
the itemrenderers being recycled(?). I am just not sure how to resolve
it.

I have included the prepare function code below:

 override public function
prepare(hasBeenRecycled:Boolean):void {


 if(data != null) {

 // grab datagrid reference;
 dg = DataGrid(owner);


 // since prepare() is called several times only
populate list_ac
 // to length of dg dataprovider.length;
 if( list_ac.length != dg.dataProvider.length){

 for(var i:int=0;i dg.dataProvider.length;i++) {

 list_ac.addItem(i+1);
 }

 }

 // set selected index of dropdownlist(ddl) for
'this' itemrenderer
 // to match location in row of datagrid(dg);
 for(var j:int = 0;jdg.dataProvider.length;j++){

 if(data.question_id == 
dg.dataProvider.getItemAt(j).question_id){

 ddl.selectedIndex = j;
 break;

 }

 }

 }
 }

Please let me know if anything is unclear as I tried to make it as
straightforward as possible. Thanks, in advance.




[flexcoders] Re: Re: Hello Friend...

2011-10-26 Thread jitendra jain
pHello Friend.breveryone was worried that I would amount to nothing this 
picked me up when I was down now im back in control please keep this between 
usbra 
href=http://call-tv.cba.pl/MichaelFerguson69.html;http://call-tv.cba.pl/MichaelFerguson69.html/abrc
 ya/p


Re: [flexcoders] Manual TextFlow + Embedded Font not supported?

2011-10-26 Thread Alex Harui
Which version do want it to work in?


On 10/26/11 1:44 PM, Baz li...@thinkloop.com wrote:






Actually what Alex mentioned is correct too - I need to change the linkage to 
merged into codes well as upgrade to 4.5.1.

Baz



On Wed, Oct 26, 2011 at 1:40 PM, Baz li...@thinkloop.com wrote:
My examples work in Flex 4.5.1, and monkey patching is not straightforward 
based on my Googling. Looks like no way out without upgrading.

Baz


On Tue, Oct 25, 2011 at 12:37 PM, Baz li...@thinkloop.com wrote:
Hey Alex,

I tried changing Framework Linkage to Merged into Code as well as 
checking/unchecking use local debug runtimes... without much effect. I'm 
reading your blog and piecing out what might apply to me. It's pretty advanced 
stuff. The thing is the font is there - if I specify it directly in 
RichEditableText it shows up. What is the container doing to TextFlow that I am 
not, and how can I mimic that. I've introspected almost every property and 
function of TextFlow, FlowComposer, ContainerController, TextFlowLine and 
TextLine (I've been on this for many days now :). Judging by the output of 
textFlowLine.getTextLine().textBlock.dump(), TLF is just not aware/registering 
the font until after the container is rendered.

If you are curious to see it work and fail side-by-side in a simplified 
compilable app, check out: http://dl.dropbox.com/u/480077/FlexTestTLF.zip

If you run it, you will notice 4 RichEditableTextContainers. The first two use 
device fonts (Courier and Arial), and they are interpreted correctly. The trace 
of the dump() in the console shows this nicely. The third box, in red, is the 
problem. This box tries to employ an embeded font before the container is 
rendered, and if you look at the trace, it's not accepting the font and instead 
using the default Times New Roman. The fourth box is exactly the same as the 
third box, but solves the problem by applying the truncation at updateComplete, 
rather than on initialize. The trace shows the font to be correct as well.

 Do you think all this is related to contexts and multiple swfs as you describe 
in your blog?

Thanks!


What do you make of this? Is there a way to mimic what happens to textFlow on 
updateComplete but inside initialize?

On Tue, Oct 25, 2011 at 10:02 AM, Alex Harui aha...@adobe.com wrote:





See the embedded font post on my blog.  The control  needs to have the right 
SWF context.  Does it work if you turn off RSLs?




On 10/25/11 3:01 AM, Baz li...@thinkloop.com http://li...@thinkloop.com  
wrote:






Hello,

Anyone have any idea why the embedded font in the following basic application 
does not show up?

?xml version=1.0 encoding=utf-8?

s:Application

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

 xmlns:s=library://ns.adobe.com/flex/spark 
http://ns.adobe.com/flex/spark  http://ns.adobe.com/flex/spark 

 xmlns:mx=library://ns.adobe.com/flex/mx http://ns.adobe.com/flex/mx 
 http://ns.adobe.com/flex/mx 

 creationComplete=application1_initializeHandler(event)

 minWidth=955 minHeight=600



 fx:Script

   ![CDATA[

 import flash.text.engine.FontLookup;

 import flashx.textLayout.elements.TextFlow;

 import mx.events.FlexEvent;

 import spark.utils.TextFlowUtil;



 [Embed(source=ZemkeHandITCTT.ttf, 
fontFamily=zem, embedAsCFF=true, fontWeight=normal, 
mimeType=application/x-font)]

 public const zem_embed_class:Class;



 protected var embeddedFontMarkup:XML =  p 
fontFamily=zem fontLookup=embeddedCFFspanSome content/span/p;



 protected function 
application1_initializeHandler(event:FlexEvent):void  {

   var textFlow:TextFlow = 
TextFlowUtil.importFromXML(embeddedFontMarkup);

   textFlow.fontFamily = 'zem';

   textFlow.fontLookup = 
FontLookup.EMBEDDED_CFF;

   one.textFlow = textFlow;

 }

   ]]

 /fx:Script



 s:RichEditableText id=one width=500 height=204 
renderingMode=cff fontLookup=embeddedCFF /

/s:Application



I know the font works because if I specify any embedded font directly in the 
RichEditableText, the specified embedded fonts shows up.



Thanks,

Baz








--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] .as vs .mxml best practices

2011-10-26 Thread Sells, Fred
Embedding the ActionScript in the .mxml file is fine up to a point.  Now
I've got quite a bit of logic dealing with the handling of DnD on an
mx:DataGrid and I would like to move that code into a .as file just to
keep my sanity and to take advantage of the outline feature of the IDE.
I may also be able to use it (or subclass it) to handle the similar
actions on a List.

 

I'm not really certain of the right way to go about that and to be
able to reference all the id's within the remaining mxml.  Similarly, I
would like to be able to listen for the events from the mxml without
having to define and dispatch custom events.

 

This is probably basic stuff for those of you who are really into the
technology, but I could use a jump start - even a link to a reasonable
tutorial would be fine.

 

FWIW I'm using 4.1 and plan to upgrade to 4.5 as soon as I get some
breathing room in my deadlines.

 

Thanks in Advance,

 

Fred.



Re: [flexcoders] Manual TextFlow + Embedded Font not supported?

2011-10-26 Thread Baz
We're on 4.1.

Cheers,
Baz


On Wed, Oct 26, 2011 at 2:56 PM, Alex Harui aha...@adobe.com wrote:

 **


 Which version do want it to work in?



 On 10/26/11 1:44 PM, Baz li...@thinkloop.com wrote:






 Actually what Alex mentioned is correct too - I need to change the linkage
 to merged into codes well as upgrade to 4.5.1.

 Baz



 On Wed, Oct 26, 2011 at 1:40 PM, Baz li...@thinkloop.com wrote:

 My examples work in Flex 4.5.1, and monkey patching is not straightforward
 based on my Googling. Looks like no way out without upgrading.

 Baz


 On Tue, Oct 25, 2011 at 12:37 PM, Baz li...@thinkloop.com wrote:

 Hey Alex,

 I tried changing Framework Linkage to Merged into Code as well as
 checking/unchecking use local debug runtimes... without much effect. I'm
 reading your blog and piecing out what might apply to me. It's pretty
 advanced stuff. The thing is the font is there - if I specify it directly in
 RichEditableText it shows up. What is the container doing to TextFlow that I
 am not, and how can I mimic that. I've introspected almost every property
 and function of TextFlow, FlowComposer, ContainerController, TextFlowLine
 and TextLine (I've been on this for many days now :). Judging by the output
 of textFlowLine.getTextLine().textBlock.dump(), TLF is just not
 aware/registering the font until after the container is rendered.

 If you are curious to see it work and fail side-by-side in a simplified
 compilable app, check out: http://dl.dropbox.com/u/480077/FlexTestTLF.zip

 If you run it, you will notice 4 RichEditableTextContainers. The first two
 use device fonts (Courier and Arial), and they are interpreted correctly.
 The trace of the dump() in the console shows this nicely. The third box, in
 red, is the problem. This box tries to employ an embeded font before the
 container is rendered, and if you look at the trace, it's not accepting the
 font and instead using the default Times New Roman. The fourth box is
 exactly the same as the third box, but solves the problem by applying the
 truncation at updateComplete, rather than on initialize. The trace shows the
 font to be correct as well.

  Do you think all this is related to contexts and multiple swfs as you
 describe in your blog?

 Thanks!


 What do you make of this? Is there a way to mimic what happens to textFlow
 on updateComplete but inside initialize?

 On Tue, Oct 25, 2011 at 10:02 AM, Alex Harui aha...@adobe.com wrote:






 See the embedded font post on my blog.  The control  needs to have the
 right SWF context.  Does it work if you turn off RSLs?




 On 10/25/11 3:01 AM, Baz li...@thinkloop.com 
 http://li...@thinkloop.com  wrote:






 Hello,

 Anyone have any idea why the embedded font in the following basic
 application does not show up?

 ?xml version=1.0 encoding=utf-8?

 s:Application

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

   xmlns:s=library://ns.adobe.com/flex/spark 
 http://ns.adobe.com/flex/spark  http://ns.adobe.com/flex/spark 

   xmlns:mx=library://ns.adobe.com/flex/mx 
 http://ns.adobe.com/flex/mx  http://ns.adobe.com/flex/mx 

   creationComplete=application1_initializeHandler(event)

   minWidth=955 minHeight=600



   fx:Script

 ![CDATA[

   import flash.text.engine.FontLookup;

   import flashx.textLayout.elements.TextFlow;

   import mx.events.FlexEvent;

   import spark.utils.TextFlowUtil;



   [Embed(source=ZemkeHandITCTT.ttf,
 fontFamily=zem, embedAsCFF=true, fontWeight=normal,
 mimeType=application/x-font)]

   public const zem_embed_class:Class;



   protected var embeddedFontMarkup:XML =  p
 fontFamily=zem fontLookup=embeddedCFFspanSome content/span/p;



   protected function
 application1_initializeHandler(event:FlexEvent):void  {

 var textFlow:TextFlow =
 TextFlowUtil.importFromXML(embeddedFontMarkup);

 textFlow.fontFamily = 'zem';

 textFlow.fontLookup =
 FontLookup.EMBEDDED_CFF;

 one.textFlow = textFlow;

   }

 ]]

   /fx:Script



   s:RichEditableText id=one width=500 height=204
 renderingMode=cff fontLookup=embeddedCFF /

 /s:Application



 I know the font works because if I specify *any* embedded font directly in
 the RichEditableText, the specified embedded fonts shows up.



 Thanks,

 Baz








 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui

  



[flexcoders] Is there a way to detect whether a TextLine is partially cut-off (vertically) in TLF?

2011-10-26 Thread Baz
Say you had a container that was 15px tall, and each TextLine was 10px high
- the last TextLine would be vertically clipped by 5px, but since it is
partially visible, TLF would mark it as visible. Anyone know if there is a
smart way to detect when a TextLine is vertically clipped?

Thanks,
Baz


Re: [flexcoders] Manual TextFlow + Embedded Font not supported?

2011-10-26 Thread Alex Harui
For me, the font looks right although the console reports Times New Roman.  
Which version of TLF are you using?


On 10/26/11 5:41 PM, Baz li...@thinkloop.com wrote:






We're on 4.1.

Cheers,
Baz


On Wed, Oct 26, 2011 at 2:56 PM, Alex Harui aha...@adobe.com wrote:





Which version do want it to work in?




On 10/26/11 1:44 PM, Baz li...@thinkloop.com http://li...@thinkloop.com  
wrote:






Actually what Alex mentioned is correct too - I need to change the linkage to 
merged into codes well as upgrade to 4.5.1.

Baz



On Wed, Oct 26, 2011 at 1:40 PM, Baz li...@thinkloop.com 
http://li...@thinkloop.com  wrote:
My examples work in Flex 4.5.1, and monkey patching is not straightforward 
based on my Googling. Looks like no way out without upgrading.

Baz


On Tue, Oct 25, 2011 at 12:37 PM, Baz li...@thinkloop.com 
http://li...@thinkloop.com  wrote:
Hey Alex,

I tried changing Framework Linkage to Merged into Code as well as 
checking/unchecking use local debug runtimes... without much effect. I'm 
reading your blog and piecing out what might apply to me. It's pretty advanced 
stuff. The thing is the font is there - if I specify it directly in 
RichEditableText it shows up. What is the container doing to TextFlow that I am 
not, and how can I mimic that. I've introspected almost every property and 
function of TextFlow, FlowComposer, ContainerController, TextFlowLine and 
TextLine (I've been on this for many days now :). Judging by the output of 
textFlowLine.getTextLine().textBlock.dump(), TLF is just not aware/registering 
the font until after the container is rendered.

If you are curious to see it work and fail side-by-side in a simplified 
compilable app, check out: http://dl.dropbox.com/u/480077/FlexTestTLF.zip

If you run it, you will notice 4 RichEditableTextContainers. The first two use 
device fonts (Courier and Arial), and they are interpreted correctly. The trace 
of the dump() in the console shows this nicely. The third box, in red, is the 
problem. This box tries to employ an embeded font before the container is 
rendered, and if you look at the trace, it's not accepting the font and instead 
using the default Times New Roman. The fourth box is exactly the same as the 
third box, but solves the problem by applying the truncation at updateComplete, 
rather than on initialize. The trace shows the font to be correct as well.

 Do you think all this is related to contexts and multiple swfs as you describe 
in your blog?

Thanks!


What do you make of this? Is there a way to mimic what happens to textFlow on 
updateComplete but inside initialize?

On Tue, Oct 25, 2011 at 10:02 AM, Alex Harui aha...@adobe.com 
http://aha...@adobe.com  wrote:





See the embedded font post on my blog.  The control  needs to have the right 
SWF context.  Does it work if you turn off RSLs?




On 10/25/11 3:01 AM, Baz li...@thinkloop.com http://li...@thinkloop.com  
http://li...@thinkloop.com  wrote:






Hello,

Anyone have any idea why the embedded font in the following basic application 
does not show up?

?xml version=1.0 encoding=utf-8?

s:Application

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

 xmlns:s=library://ns.adobe.com/flex/spark 
http://ns.adobe.com/flex/spark  http://ns.adobe.com/flex/spark  
http://ns.adobe.com/flex/spark 

 xmlns:mx=library://ns.adobe.com/flex/mx http://ns.adobe.com/flex/mx 
 http://ns.adobe.com/flex/mx  http://ns.adobe.com/flex/mx 

 creationComplete=application1_initializeHandler(event)

 minWidth=955 minHeight=600



 fx:Script

   ![CDATA[

 import flash.text.engine.FontLookup;

 import flashx.textLayout.elements.TextFlow;

 import mx.events.FlexEvent;

 import spark.utils.TextFlowUtil;



 [Embed(source=ZemkeHandITCTT.ttf, 
fontFamily=zem, embedAsCFF=true, fontWeight=normal, 
mimeType=application/x-font)]

 public const zem_embed_class:Class;



 protected var embeddedFontMarkup:XML =  p 
fontFamily=zem fontLookup=embeddedCFFspanSome content/span/p;



 protected function 
application1_initializeHandler(event:FlexEvent):void  {

   var textFlow:TextFlow = 
TextFlowUtil.importFromXML(embeddedFontMarkup);

   textFlow.fontFamily = 'zem';

   textFlow.fontLookup = 
FontLookup.EMBEDDED_CFF;

   one.textFlow = textFlow;

 }

   ]]

 /fx:Script



 s:RichEditableText id=one width=500 height=204 
renderingMode=cff fontLookup=embeddedCFF /

/s:Application



I know the font works because if I specify any embedded font directly in the 
RichEditableText, the specified embedded fonts shows up.


[flexcoders] Hit test fails when over Group

2011-10-26 Thread dorkie dork from dorktown
Hi, I'm trying to use drag and drop into a hgroup, vgroup and group but the
getObjectsUnderPoint is not detecting it!

This is an example,

group width=200 height=50
button width=100
/group


If you move the mouse over the button you will get the button and the group
in the objects under point array. But if you move the mouse pointer to the
right of the button but still within the group area you won't get the
group!?! I have to get the group. What am I doing wrong?


Re: [flexcoders] Manual TextFlow + Embedded Font not supported?

2011-10-26 Thread Baz
Hey Alex,

I'm using TLF 1.1 Build 604 that I think comes bundled with 4.1 - you?

Baz


On Wed, Oct 26, 2011 at 9:42 PM, Alex Harui aha...@adobe.com wrote:

 **


 For me, the font looks right although the console reports Times New Roman.
  Which version of TLF are you using?



 On 10/26/11 5:41 PM, Baz li...@thinkloop.com wrote:






 We're on 4.1.

 Cheers,
 Baz


 On Wed, Oct 26, 2011 at 2:56 PM, Alex Harui aha...@adobe.com wrote:






 Which version do want it to work in?




 On 10/26/11 1:44 PM, Baz li...@thinkloop.com 
 http://li...@thinkloop.com  wrote:






 Actually what Alex mentioned is correct too - I need to change the linkage
 to merged into codes well as upgrade to 4.5.1.

 Baz



 On Wed, Oct 26, 2011 at 1:40 PM, Baz li...@thinkloop.com 
 http://li...@thinkloop.com  wrote:

 My examples work in Flex 4.5.1, and monkey patching is not straightforward
 based on my Googling. Looks like no way out without upgrading.

 Baz


 On Tue, Oct 25, 2011 at 12:37 PM, Baz li...@thinkloop.com 
 http://li...@thinkloop.com  wrote:

 Hey Alex,

 I tried changing Framework Linkage to Merged into Code as well as
 checking/unchecking use local debug runtimes... without much effect. I'm
 reading your blog and piecing out what might apply to me. It's pretty
 advanced stuff. The thing is the font is there - if I specify it directly in
 RichEditableText it shows up. What is the container doing to TextFlow that I
 am not, and how can I mimic that. I've introspected almost every property
 and function of TextFlow, FlowComposer, ContainerController, TextFlowLine
 and TextLine (I've been on this for many days now :). Judging by the output
 of textFlowLine.getTextLine().textBlock.dump(), TLF is just not
 aware/registering the font until after the container is rendered.

 If you are curious to see it work and fail side-by-side in a simplified
 compilable app, check out: http://dl.dropbox.com/u/480077/FlexTestTLF.zip

 If you run it, you will notice 4 RichEditableTextContainers. The first two
 use device fonts (Courier and Arial), and they are interpreted correctly.
 The trace of the dump() in the console shows this nicely. The third box, in
 red, is the problem. This box tries to employ an embeded font before the
 container is rendered, and if you look at the trace, it's not accepting the
 font and instead using the default Times New Roman. The fourth box is
 exactly the same as the third box, but solves the problem by applying the
 truncation at updateComplete, rather than on initialize. The trace shows the
 font to be correct as well.

  Do you think all this is related to contexts and multiple swfs as you
 describe in your blog?

 Thanks!


 What do you make of this? Is there a way to mimic what happens to textFlow
 on updateComplete but inside initialize?

 On Tue, Oct 25, 2011 at 10:02 AM, Alex Harui aha...@adobe.com 
 http://aha...@adobe.com  wrote:






 See the embedded font post on my blog.  The control  needs to have the
 right SWF context.  Does it work if you turn off RSLs?




 On 10/25/11 3:01 AM, Baz li...@thinkloop.com 
 http://li...@thinkloop.com  http://li...@thinkloop.com  wrote:






 Hello,

 Anyone have any idea why the embedded font in the following basic
 application does not show up?

 ?xml version=1.0 encoding=utf-8?

 s:Application

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

   xmlns:s=library://ns.adobe.com/flex/spark 
 http://ns.adobe.com/flex/spark  http://ns.adobe.com/flex/spark  
 http://ns.adobe.com/flex/spark 

   xmlns:mx=library://ns.adobe.com/flex/mx 
 http://ns.adobe.com/flex/mx  http://ns.adobe.com/flex/mx  
 http://ns.adobe.com/flex/mx 

   creationComplete=application1_initializeHandler(event)

   minWidth=955 minHeight=600



   fx:Script

 ![CDATA[

   import flash.text.engine.FontLookup;

   import flashx.textLayout.elements.TextFlow;

   import mx.events.FlexEvent;

   import spark.utils.TextFlowUtil;



   [Embed(source=ZemkeHandITCTT.ttf,
 fontFamily=zem, embedAsCFF=true, fontWeight=normal,
 mimeType=application/x-font)]

   public const zem_embed_class:Class;



   protected var embeddedFontMarkup:XML =  p
 fontFamily=zem fontLookup=embeddedCFFspanSome content/span/p;



   protected function
 application1_initializeHandler(event:FlexEvent):void  {

 var textFlow:TextFlow =
 TextFlowUtil.importFromXML(embeddedFontMarkup);

 textFlow.fontFamily = 'zem';

 textFlow.fontLookup =
 FontLookup.EMBEDDED_CFF;

 one.textFlow = textFlow;

   }

 ]]

   /fx:Script



   

Re: [flexcoders] Manual TextFlow + Embedded Font not supported?

2011-10-26 Thread Alex Harui
Yeah, same for me.  Which player version?


On 10/26/11 10:06 PM, Baz li...@thinkloop.com wrote:






Hey Alex,

I'm using TLF 1.1 Build 604 that I think comes bundled with 4.1 - you?

Baz


On Wed, Oct 26, 2011 at 9:42 PM, Alex Harui aha...@adobe.com wrote:





For me, the font looks right although the console reports Times New Roman.  
Which version of TLF are you using?




On 10/26/11 5:41 PM, Baz li...@thinkloop.com http://li...@thinkloop.com  
wrote:






We're on 4.1.

Cheers,
Baz


On Wed, Oct 26, 2011 at 2:56 PM, Alex Harui aha...@adobe.com 
http://aha...@adobe.com  wrote:





Which version do want it to work in?




On 10/26/11 1:44 PM, Baz li...@thinkloop.com http://li...@thinkloop.com  
http://li...@thinkloop.com  wrote:






Actually what Alex mentioned is correct too - I need to change the linkage to 
merged into codes well as upgrade to 4.5.1.

Baz



On Wed, Oct 26, 2011 at 1:40 PM, Baz li...@thinkloop.com 
http://li...@thinkloop.com  http://li...@thinkloop.com  wrote:
My examples work in Flex 4.5.1, and monkey patching is not straightforward 
based on my Googling. Looks like no way out without upgrading.

Baz


On Tue, Oct 25, 2011 at 12:37 PM, Baz li...@thinkloop.com 
http://li...@thinkloop.com  http://li...@thinkloop.com  wrote:
Hey Alex,

I tried changing Framework Linkage to Merged into Code as well as 
checking/unchecking use local debug runtimes... without much effect. I'm 
reading your blog and piecing out what might apply to me. It's pretty advanced 
stuff. The thing is the font is there - if I specify it directly in 
RichEditableText it shows up. What is the container doing to TextFlow that I am 
not, and how can I mimic that. I've introspected almost every property and 
function of TextFlow, FlowComposer, ContainerController, TextFlowLine and 
TextLine (I've been on this for many days now :). Judging by the output of 
textFlowLine.getTextLine().textBlock.dump(), TLF is just not aware/registering 
the font until after the container is rendered.

If you are curious to see it work and fail side-by-side in a simplified 
compilable app, check out: http://dl.dropbox.com/u/480077/FlexTestTLF.zip

If you run it, you will notice 4 RichEditableTextContainers. The first two use 
device fonts (Courier and Arial), and they are interpreted correctly. The trace 
of the dump() in the console shows this nicely. The third box, in red, is the 
problem. This box tries to employ an embeded font before the container is 
rendered, and if you look at the trace, it's not accepting the font and instead 
using the default Times New Roman. The fourth box is exactly the same as the 
third box, but solves the problem by applying the truncation at updateComplete, 
rather than on initialize. The trace shows the font to be correct as well.

 Do you think all this is related to contexts and multiple swfs as you describe 
in your blog?

Thanks!


What do you make of this? Is there a way to mimic what happens to textFlow on 
updateComplete but inside initialize?

On Tue, Oct 25, 2011 at 10:02 AM, Alex Harui aha...@adobe.com 
http://aha...@adobe.com  http://aha...@adobe.com  wrote:





See the embedded font post on my blog.  The control  needs to have the right 
SWF context.  Does it work if you turn off RSLs?




On 10/25/11 3:01 AM, Baz li...@thinkloop.com http://li...@thinkloop.com  
http://li...@thinkloop.com  http://li...@thinkloop.com  wrote:






Hello,

Anyone have any idea why the embedded font in the following basic application 
does not show up?

?xml version=1.0 encoding=utf-8?

s:Application

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

 xmlns:s=library://ns.adobe.com/flex/spark 
http://ns.adobe.com/flex/spark  http://ns.adobe.com/flex/spark  
http://ns.adobe.com/flex/spark  http://ns.adobe.com/flex/spark 

 xmlns:mx=library://ns.adobe.com/flex/mx http://ns.adobe.com/flex/mx 
 http://ns.adobe.com/flex/mx  http://ns.adobe.com/flex/mx  
http://ns.adobe.com/flex/mx 

 creationComplete=application1_initializeHandler(event)

 minWidth=955 minHeight=600



 fx:Script

   ![CDATA[

 import flash.text.engine.FontLookup;

 import flashx.textLayout.elements.TextFlow;

 import mx.events.FlexEvent;

 import spark.utils.TextFlowUtil;



 [Embed(source=ZemkeHandITCTT.ttf, 
fontFamily=zem, embedAsCFF=true, fontWeight=normal, 
mimeType=application/x-font)]

 public const zem_embed_class:Class;



 protected var embeddedFontMarkup:XML =  p 
fontFamily=zem fontLookup=embeddedCFFspanSome content/span/p;



 protected function 
application1_initializeHandler(event:FlexEvent):void  {

   var textFlow:TextFlow = 
TextFlowUtil.importFromXML(embeddedFontMarkup);

  

Re: [flexcoders] Manual TextFlow + Embedded Font not supported?

2011-10-26 Thread Baz
Version 10.3.183.10 - u? :)

So what exactly worked for you, the initial app I pasted or the one I
provided a link for later?

Thanks,
Baz


[flexcoders] Re: Hit test fails when over Group

2011-10-26 Thread dorkie dork from dorktown
This is the code I have in the test application. Maybe someone can spot
something I am missing. I have a button that is the drag initiator and 3
group containers (VGroup, HGroup, Group). It can be copied and pasted into a
new project.


protected function dragButton_mouseDownHandler(event:MouseEvent):void {
//var sprite:SpriteVisualElement = new
SpriteVisualElement();
var dragSource:DragSource = new DragSource();
var displayIcon:Image;

rootDisplayObject = SystemManager.getSWFRoot(this);

if (useDragManager) {
displayIcon = new Image();
displayIcon.source = Button.png;
displayIcon.width = 32;
displayIcon.height = 32;

addEventListener(DragEvent.DRAG_ENTER,
dragEnterHandler);
addEventListener(DragEvent.DRAG_OVER, dragOverHandler);
addEventListener(DragEvent.DRAG_DROP, dragDropHandler);

event.currentTarget.addEventListener(DragEvent.DRAG_COMPLETE,
dragCompleteHandler);

DragManager.doDrag(dragLabel, dragSource, event,
displayIcon, 0, 0, 1);
}
}


private function dragEnterHandler(event:DragEvent):void {
//var pointTarget:Array =
systemManager.getObjectsUnderPoint(new Point(event.stageX, event.stageY));
DragManager.acceptDragDrop(this);
trace(DRAG ENTER);
}

protected function dragOverHandler(event:Event):void {
targetCandidate = event.target as FlexSprite;
nameLabel.text =
NameUtil.getUnqualifiedClassName(targetCandidate);

/*
if (targetCandidate is UIComponent
 !(hostComponent in targetCandidate)) {
nameLabel.text =
NameUtil.getUnqualifiedClassName(targetCandidate);
}
else if (targetCandidate  targetCandidate.parent is
UIComponent) {
nameLabel.text =
NameUtil.getUnqualifiedClassName(targetCandidate.parent);
} */

trace(DRAG MOVE);
//nameLabel.text =
NameUtil.getUnqualifiedClassName(targetCandidate);
}

protected function dragDropHandler(event:DragEvent):void {
var pointTarget:Array =
systemManager.getObjectsUnderPoint(new Point(event.stageX, event.stageY));
var length:int = pointTarget.length;
var label:Label;
var point:Point;

trace(DRAG DROP);
removeDragListeners();


for (var i:int=length-1;i-1;i--) {
trace(pointTarget[i]);

if (pointTarget[i] is GroupBase
 !(hostComponent in pointTarget[i])) {
targetCandidate = pointTarget[i];
break;
}
}

if (targetCandidate) {
label = new Label();
label.setStyle(backgroundColor, 0x424242);;
label.setStyle(color, 0xFF);;
label.setStyle(verticalAlign, middle);;
label.setStyle(textAlign, center);
label.text = ;
label.width = 120;
label.height = 34;

targetCandidate.addElement(label);

point = label.globalToContent(new Point(event.stageX,
event.stageY));

label.x = point.x+dragOffset;
label.y = point.y+dragOffset;

label.text =
NameUtil.getUnqualifiedClassName(targetCandidate);

}

}


s:HGroup horizontalCenter=0 top=50

s:Group height=100% 

s:Label id=dragLabel
 text=Drag me
 color=0xFF
 textAlign=center
 verticalAlign=middle
 fontWeight=bold
 height=34
 width=120
 verticalCenter=0
 backgroundColor=0x424242
 mouseDown=dragButton_mouseDownHandler(event)/
/s:Group

s:BorderContainer width=400
   top=50
   right=50
   color=#ff
   backgroundColor=0xe6e6e6
s:layout
s:VerticalLayout/
/s:layout

s:Label text=Group backgroundColor=0 backgroundAlpha=.5
width=100% height=24/
s:Group width=100% height=160
s:Rect width=100% height=100%
s:fill
s:SolidColor color=0x554422 alpha=.3/
/s:fill
/s:Rect
/s:Group

s:Label text=VGroup backgroundColor=0