[flexcoders] Re: Problem sorting AdvancedDataGrid

2010-04-22 Thread tntomek
I'm not 100% certain even the main sort works via initial programmatic setting 
(it does after you click on grid header)

This is the class in question. If you are making your grouping collection via 
code you must be using this already.

frameworks\projects\datavisualisation\src\mx\collections\GroupingCollection.as

Follow the code in 
public function refresh(async:Boolean = false):Boolean

It eventually gets to:
private function makeGroupedCollection():Boolean

then buildGroups

... have fun :) it takes a WHILE to absorb all this.

See if u can find your sort actually being used, note that to create a group 
Flex internally sets your collection to another sort (grouping one), it then 
just sets yours back without actually having sorted it (95% sure about last 
statement).

--- In flexcoders@yahoogroups.com, Tom McNeer tmcn...@... wrote:

 Hi Tom,
 
 Thanks for the reply.
 
 On Wed, Apr 21, 2010 at 10:18 AM, tntomek tnto...@... wrote:
 
   the part where it actually creates the subgrouped nodes (or leaf nodes),
  you will notice sort is not used on those sub array collections.
 
 
 Actually, though, my sort is breaking down earlier - on the main nodes of
 the group. It's the absolute top level of grouping where the sort is being
 ignored.
 
 Any thoughts about that?
 
 
  GC is a really worthwhile class to understand if you are dealing with
  hierarchical data, it's overwhelming at first but stick to it. You might
  have to tweak it a bit to force it to sort the sub collections.
 
 
  I'm using quite large groups at times and actually took GC2 from Flex 4. So
  far so good, there is nothing Flex 4 specific about that class.
 
 So using that class creates correct sorting?
 
 As I say, the part that I don't understand is why the main groups aren't
 sorted correctly. Similar sorts have worked for me in other ADGs.
 
 -- 
 Thanks,
 
 Tom
 
 Tom McNeer
 MediumCool
 http://www.mediumcool.com
 1735 Johnson Road NE
 Atlanta, GA 30306
 404.589.0560





[flexcoders] Flex 4 and StyleManager

2010-04-22 Thread bobby_world
Hi! I have a Flex4 based Application and I'm trying to load Styles from a swf 
file.

StyleManager.loadStyleDeclarations(styles/BlueBackground.swf, true);

I get an error saying this is deprecated in Flex4.

Bobby




[flexcoders] spark Itemrenderer....

2010-04-22 Thread cuttenv
Anyone know if it's possible to reuse a custom item renderer in another 
component that just only needs one reference of this item?? Specifically I am 
extending a group and would like to addElement( customItemRender); to the group 
in the createChildren method but I am getting 0 luck... any thoughts??? I also 
tried implementing the IItemrendererOwner and using that to set the data... 0 
luck... spark seems to be more of  fizzle...



[flexcoders] Re: Problem sorting AdvancedDataGrid

2010-04-22 Thread cuttenv
You should check out some of the examples at the ilog exilir page.. i've said 
this before they have some good examples... are you adding a collectionEvent to 
your collection? You should be adding an eventListener so that when your 
collection refreshes you can do everything you need to. You can see if the 
collection has refreshed properly by checking the return value from the refresh 
method

var bool:Boolean = collec.refresh()

--- In flexcoders@yahoogroups.com, tntomek tnto...@... wrote:

 I'm not 100% certain even the main sort works via initial programmatic 
 setting (it does after you click on grid header)
 
 This is the class in question. If you are making your grouping collection via 
 code you must be using this already.
 
 frameworks\projects\datavisualisation\src\mx\collections\GroupingCollection.as
 
 Follow the code in 
 public function refresh(async:Boolean = false):Boolean
 
 It eventually gets to:
 private function makeGroupedCollection():Boolean
 
 then buildGroups
 
 ... have fun :) it takes a WHILE to absorb all this.
 
 See if u can find your sort actually being used, note that to create a group 
 Flex internally sets your collection to another sort (grouping one), it then 
 just sets yours back without actually having sorted it (95% sure about last 
 statement).
 
 --- In flexcoders@yahoogroups.com, Tom McNeer tmcneer@ wrote:
 
  Hi Tom,
  
  Thanks for the reply.
  
  On Wed, Apr 21, 2010 at 10:18 AM, tntomek tntomek@ wrote:
  
the part where it actually creates the subgrouped nodes (or leaf nodes),
   you will notice sort is not used on those sub array collections.
  
  
  Actually, though, my sort is breaking down earlier - on the main nodes of
  the group. It's the absolute top level of grouping where the sort is being
  ignored.
  
  Any thoughts about that?
  
  
   GC is a really worthwhile class to understand if you are dealing with
   hierarchical data, it's overwhelming at first but stick to it. You might
   have to tweak it a bit to force it to sort the sub collections.
  
  
   I'm using quite large groups at times and actually took GC2 from Flex 4. 
   So
   far so good, there is nothing Flex 4 specific about that class.
  
  So using that class creates correct sorting?
  
  As I say, the part that I don't understand is why the main groups aren't
  sorted correctly. Similar sorts have worked for me in other ADGs.
  
  -- 
  Thanks,
  
  Tom
  
  Tom McNeer
  MediumCool
  http://www.mediumcool.com
  1735 Johnson Road NE
  Atlanta, GA 30306
  404.589.0560
 





[flexcoders] Re: as 2 to as 3 question

2010-04-22 Thread cuttenv
addChildAt

--- In flexcoders@yahoogroups.com, Oleg Sivokon olegsivo...@... wrote:

 You have already found a tool to decompile it, try finding an tool that will
 code that for you too ;)





[flexcoders] Re: Images not getting reloaded when source changes?

2010-04-22 Thread cuttenv
you should have your source as a bindable variable then you can just change 
that variable when you need to and the source of the image should change.

I didn't look that closesly at the code... but it also looks like you are 
trying to load the same source into the image? If the image already has the 
source value set it won't reload the image you'll have to call unloadAndStop() 
on the image first
 table1.load(String(table1.source))


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Simplify the test case further.  Just press a button and change the image 
 source.  Then set a breakpoint in Image.as or SWFLoader.as and see what it is 
 doing.
 
 
 On 4/21/10 12:20 PM, Peter Davis p...@... wrote:
 
 
 
 
 
 
 I'm trying to fix a *very* simply app. that just displays some images, and is 
 supposed to refresh the images when their URL parameters change.  In 
 particular, these are supposed to be images of data tables, and the query 
 string specifies a table style, a text color and a border color.  The tables 
 display correctly when loaded, but they don't respond when I change the 
 source URLs.  I've verified that the sourceChange event is triggered.  I even 
 put the new URL into a TextInput control, and verified that this URL works 
 (display the correct table) in another browser tab.  But the images in the 
 Flex app don't ever change.
 
 Thanks for any suggestions.
 
 Here's the whole thing:
 
 
 ?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  minWidth=800 minHeight=600
 fx:Script
 ![CDATA[
 import mx.events.ColorPickerEvent;
 import mx.controls.Alert;
 
 private function imgInit(s:int):void
 {
 switch (s)
 {
 case 1:
 table1.addEventListener(
 sourceChanged, image_sourceChanged);
 break;
 
 case 3:
 table3.addEventListener(sourceChanged, 
 image_sourceChanged);
 break;
 
 case 5:
 table5.addEventListener(sourceChanged, 
 image_sourceChanged);
 break;
 
 default:
 }
 }
 
 private function image_sourceChanged(evt:Event):void
 {
 Alert.show(evt.toString() + \nSrc:  + 
 Image(evt.target).source, evt.type);
 }
 
 public var colorArr:Array =[0x231F20, 0x9E280E, 0x8A713C, 
 0x007236, 0x007D97,
 2E3092, 0x5D1E79, 0x4C4C4E, 0x88191C, 0xF5821F, 
 0x727C28, 0x1E9860,
 00837D, 0x0071BC, 0x7C51A1, 0x939598, 0xED1C24, 
 0xFCAF17, 0xA5A85A,
 57BD7C, 0x57C5C7, 0x00AEEF, 0xAA4A9C, 0xA7A9AC, 
 0xEC008C, 0xFFCE71,
 FFF200, 0xBED630, 0x95D5D1, 0x42C7F4, 0xBC7BB5, 
 0xDCDDDE, 0xF49AC1,
 FEDCC6, 0xFFF78F, 0xE5F0CB, 0xE2F3F4, 0x9FC9EB, 
 0xC7B2D6, 0xFF];
 var urlBase:String = http://localhost.us/viewtable.aspx;;
 var textColorIndex:uint = 0;
 var textColor:String = 00;
 var borderColorIndex:uint = 0;
 var borderColor = 00;
 
 protected function updateTables():void
 {
 //url1.text = urlBase + ?styleIndex=1textColor=%23 + 
 textColor + borderColor=%23 + borderColor;
 table1.source = urlBase + ?styleIndex=1textColor=%23 + 
 textColor + borderColor=%23 + borderColor;
 url1.text = String(table1.source);
 table1.load(String(table1.source));
 table3.source = urlBase + ?styleIndex=3textColor=%23 + 
 textColor + borderColor=%23 + borderColor;
 table3.load(String(table3.source));
 table5.source = urlBase + ?styleIndex=5textColor=%23 + 
 textColor + borderColor=%23 + borderColor;
 table5.load(String(table5.source));
 }
 
 protected function 
 textColor_changeHandler(event:ColorPickerEvent):void
 {
 textColorIndex = ColorPicker(event.target).selectedIndex;
 var fullName:String = colorArr[textColorIndex];
 textColor = fullName.substr(2);
 updateTables()
 }
 
 protected function 
 borderColor_changeHandler(event:ColorPickerEvent):void
 {
 borderColorIndex = ColorPicker(event.target).selectedIndex;
 var fullName:String = colorArr[borderColorIndex];
 borderColor = fullName.substr(2);
 updateTables();
 }
 
 ]]
 /fx:Script
 fx:Declarations
 !-- Place non-visual elements (e.g., services, value objects) 

Re: [flexcoders] Flex 4 and StyleManager

2010-04-22 Thread Haykel BEN JEMIA
Hi,

Flax 4 supports per-module style management and the StyleManager is not a
singleton anymore. Each module has its own StyleManage and you have to
reference that one. For UIComponent and subclasses (all visual Flex
components), the style manager is available in the styleManager property.
For your example, simple change the uppercase 'S' of StyleManager to a
lowercase 's':

styleManager.loadStyleDeclarations(styles/BlueBackground.swf, true);


Bye,

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com




On Thu, Apr 22, 2010 at 9:25 AM, bobby_world bobby_wo...@yahoo.com wrote:



 Hi! I have a Flex4 based Application and I'm trying to load Styles from a
 swf file.

 StyleManager.loadStyleDeclarations(styles/BlueBackground.swf, true);

 I get an error saying this is deprecated in Flex4.

 Bobby

  



[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-22 Thread James
Hi Steve. That's so excellent mate. I simply added in your code and then the 
only thing I needed to do was add in a variable to my main app called 
categoryid and set it to a default of 1. I then replaced the line:-

Alert.show(event.currentItem.categoryid);

with:-

categoryid=event.currentItem.categoryid;

and it works just like that. I've bound the categoryid var in my main app to a 
label component and it changes to the correspoding categoryid of each item that 
is clicked so it shows it works.

Now I can simply edit my filter function which filters my links tilelist in the 
main app so that it uses my new category id var as the filter paramater and I 
think I'll be set :-) Is that how you'd do it?

Thanks so much for this. I'd probably be using a crappy tilelist as the 
navigation if it weren't for you. You're a lifesaver.

I'm from Liverpool in England (like the beatles). I suppose I've said the word 
mate before and that made you wonder :-) I'm currently studying flex on my 
web development masters degree course at uni and want to go into making 
ecommerce websites using php/mysql/flex. I have no experience in web dev before 
this course and only have a degree in I.T. so I got thrown in the deep end 
really and had to teach myself how to swim but I'm addicted to it now and am 
constantly trying to perfect things which I think is my problem. :-)

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Ooops. That should have been MyImageComponent.mxml instead of 
 MyCustomComponent.mxml.
 
 BTW, where are you from? I am an ex pat Kiwi now living in the states.
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  The way I would do it is to have a click event listener in the custom
  component that would dispatch a custom bubbling event that the
  application can listen for and handle. Modified example follows:
  
  Application:
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=vertical verticalAlign=top
   horizontalAlign=center
  backgroundGradientColors=[0x00,0x323232] paddingTop=0
   xmlns:components = * initialize=onInit()
   mx:Script
   ![CDATA[
   import mx.controls.Alert;
  
   [Bindable] private var dp:Array = [
   {text: First, image: helmet},
   {text: Second, image: helmet},
   {text: Third, image: helmet},
   {text: Fourth, image: helmet},
   {text: Fifth, image: helmet}
   ];
  
   private function onInit():void
   {
  
  addEventListener(MyCustomEvent.WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT\
  , MyCustomEventHndler);
   }
  
   private function
  MyCustomEventHndler(event:MyCustomEvent):void
   {
   // Do what you need to here
   event.stopImmediatePropagation();
   Alert.show(event.currentItem.text);
   }
   ]]
   /mx:Script
   mx:HBox
   mx:Repeater id=myImages dataProvider={dp}
   components:MyImageComponent
  theItem={myImages.currentItem}/
   /mx:Repeater
   /mx:HBox
  /mx:Application
  
  MyCustomComponent.mxml
  ?xml version=1.0 encoding=utf-8?
  mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
  horizontalAlign=center width=200 height=200
   creationComplete=onCreationComplete()
   mx:Script
   ![CDATA[
   public var theItem:Object;
   [Bindable] private var imageLocation:String;
  
   private function onCreationComplete():void
   {
   thisText.text = theItem.text;
   thisImage.source = images/ + theItem.image + .png;
   }
  
   private function handleClick(event:MouseEvent):void
   {
   event.stopImmediatePropagation();
   dispatchEvent(new
  MyCustomEvent(MyCustomEvent.WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT,
  theItem));
   }
   ]]
   /mx:Script
   mx:Image id=thisImage rollOverEffect={glowImage}
  rollOutEffect={unglowImage}
   autoLoad=true click=handleClick(event)/
   mx:Text id=thisText fontSize=24 click=handleClick(event)/
   mx:Glow id=glowImage duration=1000 alphaFrom=1.0
  alphaTo=0.3 blurXFrom=0.0
   blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 color=0x22A050/
   mx:Glow id=unglowImage duration=1000 alphaFrom=0.3
  alphaTo=1.0 blurXFrom=50.0
   blurXTo=0.0 blurYFrom=50.0 blurYTo=0.0 color=0x3380DD/
  /mx:VBox
  
  MyCustomEvent.as
  package
  {
   import flash.events.Event;
  
   public class MyCustomEvent extends Event
   {
   public static const
  WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT:String = blahblah;
  
   private var _currentItem:Object;
  
   public function MyCustomEvent(type:String, 

[flexcoders] Potential Bug in Flash Builder 4?

2010-04-22 Thread Wally Kolcz
Anyone else notice that when you use code hint to choose an external 
itemrenderer that it, not only adds the full dot note path in the 
itemRender property, but also imports it? But my error inquiry is that 
it imports it inbetween two Script tags and not fx:Script

To replicate. Create a itemRender in one 'folder' and then create a 
s:Tile. When you add the itemRender property, it should pop up the 
option to create a new one or use an existing. Click on the existing and 
then look towards the top of the MXML document. I keep getting a 
Script block.

Can anyone else reproduce this? Is this a bug?



[flexcoders] Flex 4 HGroup and Group background colour

2010-04-22 Thread bhaq1972

Why does this work 

s:Group width=100% height=28
   s:Rect top=0 right=0 bottom=0 left=0
s:fill
  s:SolidColor color=0x4960a6 /
/s:fill
   /s:Rect
/s:Group

But this doesnt?
s:HGroup width=100% height=28
  s:Rect
s:fill
  s:SolidColor color=0x4960a6 /
/s:fill
   /s:Rect
/s:HGroup

thanks




[flexcoders] Simple Flex 3 Question.

2010-04-22 Thread johnvid
Last noght I had tooltips everywhere(without coding them on everything), on 
every tab  linkbar...then I changed something and now its back to normal.

Does anyone know whats happened, if its anything to do with button mode,focus, 
or something else? or because my tab  link bars where to narrow for the size 
of font???

ANyone know of some setting to get this back?

Cheers for the Help.

johnvid



Re: [flexcoders] Simple Flex 3 Question.

2010-04-22 Thread Jake Churchill
all UI Components have a tooltip property.  It probably had something to do
with the bars being too narrow for the font.

On Thu, Apr 22, 2010 at 7:16 AM, johnvid john...@rocketmail.com wrote:



 Last noght I had tooltips everywhere(without coding them on everything), on
 every tab  linkbar...then I changed something and now its back to normal.

 Does anyone know whats happened, if its anything to do with button
 mode,focus, or something else? or because my tab  link bars where to narrow
 for the size of font???

 ANyone know of some setting to get this back?

 Cheers for the Help.

 johnvid

  



[flexcoders] Re: How to clear cache for all major browsers (IE, Mozilla, Safari and Chrome)

2010-04-22 Thread valdhor
I tried your code on my machine using Flash Player WIN 10,0,45,2 Debug. 
Compiled using Flex SDK 3.5.

I do not see the problem you describe.

Perhaps you are using an older version of the SDK?

--- In flexcoders@yahoogroups.com, vijay chaudhary vijayk.chaudh...@... wrote:

 Following code when run with flash 9.0.24 shows ADG grid lines properly.
 Scroll to the very end horizontally.
 Same code run with 10.0.0 and up makes the grid lines disappear towards the
 end. Scroll to the very end horizontally.
 
 Is this a bug with newer flash version(s). If so how could this be fixed.
 
 
 
 
 
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application width=100% height=100%
 xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 creationComplete=init()
 mx:Canvas width=100% height=100%
 mx:Script
 ![CDATA[
 import mx.controls.advancedDataGridClasses.AdvancedDataGridColumnGroup;
 import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
 private function init() : void {
 var colsReportGrid:Array = reportGrid.groupedColumns;
 var arr1:Array = [Test1, Test2, Test3];
 var arr2:Array = [Sample1, Sample2, Sample3];
 for each (var test:String in arr1) {
 var colTest:AdvancedDataGridColumnGroup = new
 AdvancedDataGridColumnGroup(test);
 for each(var sample:String in arr2) {
 var colSample:AdvancedDataGridColumnGroup = new
 AdvancedDataGridColumnGroup(sample);
 colSample.children = getDataColumns();
 colTest.children.push(colSample);
 }
 colsReportGrid.push(colTest);
 }
 reportGrid.groupedColumns = colsReportGrid;
 
 }
 private function getDataColumns() : Array {
 
 var colMed:AdvancedDataGridColumn = new AdvancedDataGridColumn(Medium);
 
 var colClientMed:AdvancedDataGridColumn = new AdvancedDataGridColumn(Client
 Medium);
 
 var colHigh:AdvancedDataGridColumn = new AdvancedDataGridColumn(High);
 
 var colClientHigh:AdvancedDataGridColumn = new
 AdvancedDataGridColumn(Client High);
 
 var colLow:AdvancedDataGridColumn = new AdvancedDataGridColumn(Low);
 
 var colClientLow:AdvancedDataGridColumn = new AdvancedDataGridColumn(Client
 Low);
 
 return [colMed, colHigh, colLow, colClientMed, colClientHigh,
 colClientLow];
 }
 
 ]]
 /mx:Script
 mx:AdvancedDataGrid id=reportGrid width=100% height=100%
 verticalScrollPolicy=auto horizontalScrollPolicy=auto
 mx:groupedColumns
 mx:AdvancedDataGridColumn headerText=Column 1 /
 mx:AdvancedDataGridColumn headerText=Column 2 /
 mx:AdvancedDataGridColumn headerText=Column 3/
 /mx:groupedColumns
 /mx:AdvancedDataGrid
 /mx:Canvas
 /mx:Application
 
 
 





[flexcoders] DataGrid | ItemRenderers | Validation

2010-04-22 Thread Neil Webb
Hi, just looking for advice on the most appropriate way to approach this (or
links to existing examples) :)

I've got a DataGrid, and the items use a subclass of NumericStepper. This
stepper validates itself depending on the total of *all *items in that
column  (i.e. it styles itself green if the column-total adds up to, say,
100, or red if the column-total is  100). In other words, a single
itemRenderer needs knowledge of the values of ALL renderers in that column.

I'm aware that itemRenderers should only take care of setting themselves,
due to recycling -  (ie Adobe don't intend developers to get hold of a list
of all renderers, cycle over them and set properties on them externally).

In this case however, in order to validate a *single *renderer I need to
know about the total of all renderers within a single column. Currently I
have things working - I give each renderer knowledge of its owner's
dataProvider - then, in the renderer's validation method I loop through all
items in the dp, total them up and set the style accordingly.

However, this feels wrong. Also, it's not so bad if I have a
PercentageStepper, where I could hardcode the total as 100, but what about
columns where the user has a set amount of cash, and the total of all
Steppers must equal that cash-value? In that case, using my setup,
*each *renderer
also needs to know the total cash amount, which means setting it on each
renderer (easy to do, but again it feels wrong).

So in a nutshell I guess I'm saying, what's the preferred way of validating
an itemRenderer, when the validation of that renderer depends on properties
of all the itemRenderers in that column?

Thanks


[flexcoders] Issue with truncateToFit behavior of Label while scaling

2010-04-22 Thread msrilatha_reddy
Hi,

I am facing an issue while scaling a Label with truncateToFit property as true. 
While zooming in/out, sometimes the text which is truncated is displayed 
without ellipses or 1 or 2 ellipses sometimes. I tried setting 
fontAntiAliasType=animation thinking that it might solve the issue.
But it didnt :-(

Please find the code below:
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute 
xmlns:local=*
mx:Script
![CDATA[
private function zoom():void
{
c.scaleY = slider.value / 100;
c.scaleX = slider.value / 100;
}

]]
/mx:Script
mx:Canvas id=c x=109#8243; y=111#8243; width=156#8243; 
height=41#8243; scaleX=0.5#8243; scaleY=0.5#8243;
mx:Label id=l1#8243; x=28#8243; y=10#8243; 
text=Labelgettingtruncatedd width=100#8243; truncateToFit=true 
fontAntiAliasType=animation/
/mx:Canvas
mx:VSlider id = slider
minimum = 5#8243;
maximum = 200#8243;
value = 100#8243;
snapInterval = .001#8243;
liveDragging = true
change = zoom()/
/mx:Application

Could anyone of you help me finding whats going wrong here?

Thanks in Advance,
Srilatha



Re: [flexcoders] Potential Bug in Flash Builder 4?

2010-04-22 Thread Haykel BEN JEMIA
Can not reproduce. Check your namespaces, are you defining the fx namespace
or is it set as the default namespace?

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com




On Thu, Apr 22, 2010 at 12:48 PM, Wally Kolcz wko...@isavepets.com wrote:



 Anyone else notice that when you use code hint to choose an external
 itemrenderer that it, not only adds the full dot note path in the
 itemRender property, but also imports it? But my error inquiry is that
 it imports it inbetween two Script tags and not fx:Script

 To replicate. Create a itemRender in one 'folder' and then create a
 s:Tile. When you add the itemRender property, it should pop up the
 option to create a new one or use an existing. Click on the existing and
 then look towards the top of the MXML document. I keep getting a
 Script block.

 Can anyone else reproduce this? Is this a bug?

  



Re: [flexcoders] itemRollOver and itemDoubleClick not firing on datagrid

2010-04-22 Thread DevSachin

The problem is this undocumented property of ADG..

ADG.useRollOver = true;

i spoiled my 4-5 hours to findout this..-(-(..what the hell is the
doumentation of ADG?


seb556 wrote:
 
 My code :
 
  mx:Script 
 ![CDATA[ 
 import mx.events.ListEvent; 
   
   private function rollOverADG(e:ListEvent):void 
  { 
  trace(e.columnIndex); 
  }]] 
  /mx:Script 
   
  mx:AdvancedDataGrid id=dg borderColor=#769bac borderThickness=12
 alpha=.5

 itemClick=itemClicked(event) width=100% height=100%  
  initialize=gc.refresh()  
  sortFontSize=0 
  sortableColumns=true 
  sortFontWeight=bold 
  groupRowHeight=20 
  selectionMode=multipleCells 
  headerHeight=28 borderStyle=inset 
  indentation=0 
  openDuration=2 
  creationCompleteEffect={moveEffect} 
  itemRollOver={rollOverADG(event)} 
  
  mx:rowHeight27/mx:rowHeight
  mx:dataProvider 
  mx:GroupingCollection id=gc
 source={model.ListTaches} 
  mx:grouping 
  mx:Grouping 
  mx:GroupingField name=nomLot/ 
  /mx:Grouping 
  /mx:grouping 
  /mx:GroupingCollection 
  /mx:dataProvider 
  mx:columns 
  mx:AdvancedDataGridColumnGroup id=nomLot headerText=Lot
 dataField=nomLot minWidth=50/ 
  mx:AdvancedDataGridColumn id=nomTache headerText=Tâches
 dataField=title minWidth=80/ 
  mx:AdvancedDataGridColumn id=info headerText=  dataField=infoLien 
 width=26 itemRenderer=renderer.info / 
  mx:AdvancedDataGridColumn id=etat headerText=  dataField=et
 width=26 itemRenderer=renderer.etat/ 
   
  /mx:columns 
   /mx:AdvancedDataGrid 
 
 

-- 
View this message in context: 
http://old.nabble.com/itemRollOver-and-itemDoubleClick-not-firing-on-datagrid-tp15846943p28329042.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: Images not getting reloaded when source changes?

2010-04-22 Thread PFD Studio

Thanks!  

--- In flexcoders@yahoogroups.com, cuttenv cutt...@... wrote:

 you should have your source as a bindable variable then you can just change 
 that variable when you need to and the source of the image should change.

Good point, but it still should work the way I have it, I think.

 
 I didn't look that closesly at the code... but it also looks like you are 
 trying to load the same source into the image? If the image already has the 
 source value set it won't reload the image you'll have to call 
 unloadAndStop() on the image first

I'm changing the source URL somewhat, by changing the arguments in the query 
string.  Just to check, though, I tried calling unloadAndStop() on each image 
first.  No difference in behavior:

protected function updateTables():void
{
//url1.text = urlBase + 
?styleIndex=1textColor=%23 + textColor + borderColor=%23 + borderColor;
table1.unloadAndStop();
table1.source = urlBase + 
?styleIndex=1textColor=%23 + textColor + borderColor=%23 + borderColor;
url1.text = String(table1.source);
table1.load(String(table1.source));
table3.unloadAndStop();
table3.source = urlBase + 
?styleIndex=3textColor=%23 + textColor + borderColor=%23 + borderColor;
table3.load(String(table3.source));
table5.unloadAndStop();
table5.source = urlBase + 
?styleIndex=5textColor=%23 + textColor + borderColor=%23 + borderColor;
table5.load(String(table5.source));
}






Re: [flexcoders] Potential Bug in Flash Builder 4?

2010-04-22 Thread Wally Kolcz
Hope so, its a stock itemRender and Component generated from FB4



[flexcoders] Flex App Resize

2010-04-22 Thread Jeff
I have a flex application embedded within an HTML page.  I've been trying to 
resize the html element dynamically via an ExternalInterface call to a 
javascript function in the host page.  Unfortunately, listening to Resize 
events and/or overriding the updateDisplayList method on the Application doesnt 
seem to give me the correct height (measuredHeight property).  Any ideas on how 
to calculate the complete application height?



[flexcoders] Embedding a dynamic image OR changing the source of a s:BitMapImage in a skin

2010-04-22 Thread Wally Kolcz
I am creating a coloring book app and I have an image in a skin that can 
be colored on. It works fine when I set the skin's background fill to:
s:BitmapImage source=@Embed('assets/img/drawings/alien.png') 
fillMode=scale top=1 bottom=1 left=1 right=1/

But i want to change the source image when kids pick different images to 
color. I can't use binding or a variable in an @Embed due to a metadata 
issue. I can't change the source to 
source=assets/img/drawings/alien.png or it won't render. Any ideas on 
how I can make the source dynamic?

Thanks!



Re: [flexcoders] DataGrid | ItemRenderers | Validation

2010-04-22 Thread gabriel montagné
Hi Neil,

On 22/04/2010, Neil Webb nwebb.co...@gmail.com wrote:

[...]
 So in a nutshell I guess I'm saying, what's the preferred way of validating
 an itemRenderer, when the validation of that renderer depends on properties
 of all the itemRenderers in that column?

Why don't you validate at least at the grid level, or even outside the grid,
instead of the renderer level?  Subscribe to the itemEditEnd, ... validate
when you hear that event and, because you'd have  the renderer there from the
event, you could show the validation results on it, maybe even cancel the
change, etc.

That event packs info about column indices, etc. so you can do your maths.

hth,
Gabriel

-- 
gabriel montagné láscaris comneno
http://rojored.com
+44 (0) 7500 709 209


[flexcoders] Re: Datagrid measureHeightOfItems wrong - DG harbors items that shouldn't be the

2010-04-22 Thread atomilux
Ok kids, this is the latest - I just put a loop on that fires a recalculation 
every 3 seconds or so. Yes, there's a lag but I'd rather have a delayed resize 
than no resize at all. Having too many event listeners to catch and resize 
multiple datagrids based on one dragDrop event doesn't work well and starts to 
short circuit DataGrid's rendering. We're looking into adding a mechanism to 
toggle the loop and avoid memory leaks from leaving it on when it's not needed.


--- In flexcoders@yahoogroups.com, atomilux atomi...@... wrote:

 I did post a clean version, look at older posts. Take out the event listeners 
 if you need something clearer. Otherwise, every other bit of code (XML data, 
 XML processing, MXML) should allow you to get the gist of it (allow resizing 
 of DataGrids on drag/drop GUI events).
 
 For other developers: there has been a bug corollary to the number of hacks 
 we put on the mx:DataGrid. As in, we added the hacks and the DataGrid started 
 having serious rendering issues.





Re: [flexcoders] Re: Problem sorting AdvancedDataGrid

2010-04-22 Thread Tom McNeer
Hi,

Again, thanks to everyone for their replies.

On Thu, Apr 22, 2010 at 3:00 AM, tntomek tnto...@yahoo.com wrote:

 See if u can find your sort actually being used,


Unfortunately , this is proving a little problematic. I don't know why this
is happening, but when I control-click on GroupingCollection to open the
file and set a breakpoint, Flex Builder/Eclipse just gives me a message
saying it can't open the file from the datavisualization.swc.

I can go to the as file in the SDK in another editor. But since Flex Builder
is identifying the swc as the source of the class, I can't set a breakpoint.

If anyone has any thoughts on this, please let me know. Meanwhile:

You should check out some of the examples at the ilog exilir page.. i've
 said this before they have some good examples...


Any way you could be a little more specific? There's a lot of stuff around
ilog elixir. What page do you mean?


 You should be adding an eventListener so that when your collection
 refreshes you can do everything you need to.


I'm kinda lost here. What would I need to do _after_ the collection
refreshes? If I set the sort and refresh the collection, shouldn't that be
enough?


 You can see if the collection has refreshed properly by checking the return
 value from the refresh method


Yes. I can see that the collection has been refreshed. And I can see that
the objects in the grouping collection are in the correct order. But as soon
as I step past that breakpoint and view the application, the objects are
sorted in a completely different (apparently random) order.


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


Re: [flexcoders] Simple Sound Player

2010-04-22 Thread Mark Lapasa
You could write a very rudimentary app using the flash.media.Sound to load
and play the file and flash.media.SoundChannel to stop and pause the file.

On Mon, Apr 19, 2010 at 2:51 PM, simcola jobs...@gmail.com wrote:



 Hi

 I have several podcasts in wma (I could change to mp3 if needed) and I need
 a simple player that will list all the podcasts and then have a play, pause,
 fwd, rwnd, stop and download button. Does anyone know of anything like this
 that I can use in flex..

 thanks

  



[flexcoders] How to clear cached RSL programmatically?

2010-04-22 Thread handitan
Hi all,

I posted one of this question on a thread that's related to caching but since 
it got hijacked by a totally different topic, I decided to create a new thread. 
If you're going to talk different stuff, please make a new thread.

The issue that was raised because client doesn't load the newest and greatest 
of your deployed app because it loads from the browser cache.

To resolve this issue, please read this stackOverfow thread:
http://stackoverflow.com/questions/300757/preventing-flex-application-caching-in-browser-multiple-modules

Now that solution works for the main swf and module swfs but what about RSL?

How do you guarantee that the loaded RSL is the latest one?

Thank you.



[flexcoders] Hiring for senior flex developer

2010-04-22 Thread Aaron Hardy
Rain in American Fork, Utah is currently looking for a senior-level Flex
developer. This is for a full-time employee or contractor (but must be
local).  There are a lot of great benefits and it's an awesome company to
work for.

Rain's website: http://mediarain.com
Job Listing: http://www.authenticjobs.com/jobs/5244

Aaron
http://mediarain.com/us/employment/flexdeveloper


Re: [flexcoders] Simple Sound Player

2010-04-22 Thread gabriel montagné
On 22/04/2010, Mark Lapasa ma...@hitgrab.com wrote:
 You could write a very rudimentary app using the flash.media.Sound to load
 and play the file and flash.media.SoundChannel to stop and pause the file.

Yes.  A couple of years ago I'd packed a component like that, chromless but
you can very easily set buttons to it, and bind to sliders for scrubbing and
progress...

http://rojored.googlecode.com/svn/trunk/docs/flex/com/rojored/view/controls/Audio.html
http://rojored.com/code/simple-flex-audio-player/AudioTest.swf

You'd need these two classes,
http://code.google.com/p/rojored/source/browse/trunk/src/com/rojored/view/controls/Audio.as
http://code.google.com/p/rojored/source/browse/trunk/src/com/rojored/view/controls/audioClasses/AudioEvent.as

G.


 On Mon, Apr 19, 2010 at 2:51 PM, simcola jobs...@gmail.com wrote:



 Hi

 I have several podcasts in wma (I could change to mp3 if needed) and I need
 a simple player that will list all the podcasts and then have a play,
 pause, fwd, rwnd, stop and download button. Does anyone know of anything
 like this that I can use in flex..

 thanks






-- 
gabriel montagné láscaris comneno
http://rojored.com
+44 (0) 7500 709 209


[flexcoders] Re: DataGrid | ItemRenderers | Validation

2010-04-22 Thread valdhor
I would be inclined to extend the datagrid and add a variable to handle
this. You can compute the total from the dataprovider when it arrives
from the server and pass that in as a bound variable to the custom
datagrid. Example follows...

Application:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
 xmlns:local=*
 mx:Script
 ![CDATA[
 [Bindable] private var total:int = 101;
 private var dp:Array = [
 {symbol: ADBE, name: Adobe Systems Inc.,
dateIncorporated: 3/1/50},
 {symbol: MACR, name: Macromedia Inc.,
dateIncorporated: 1/1/84},
 {symbol: MSFT, name: Microsoft Corp.,
dateIncorporated: 11/24/71},
 {symbol: IBM, name: IBM Corp., dateIncorporated:
9/14/63}
 ];
 ]]
 /mx:Script
 local:MyExtendedDataGrid id=dg initialize=dg.dataProvider = dp
verticalAlign=middle
 total={total}
 local:columns
 mx:DataGridColumn headerText=Name dataField=name
width=140/
 mx:DataGridColumn headerText=Symbol dataField=symbol
width=60 /
 mx:DataGridColumn headerText=Date
dataField=dateIncorporated width=100
itemRenderer=ItemRenderers.TotalRenderer /
 /local:columns
 /local:MyExtendedDataGrid
/mx:Application

MyExtendedDataGrid.as
package
{
 import mx.controls.DataGrid;

 public class MyExtendedDataGrid extends DataGrid
 {
 private static var _total:int;

 public function MyExtendedDataGrid()
 {
 super();
 }

 public function set total(totalToSet:int):void {_total =
totalToSet}

 public function get total():int {return _total}
 }
}

TotalRenderer.as
?xml version=1.0 encoding=utf-8?
mx:Label xmlns:mx=http://www.adobe.com/2006/mxml;
 mx:Script
 ![CDATA[
 import mx.controls.dataGridClasses.DataGridListData;

 override public function set data(value:Object):void
 {
 if(value != null)
 {
 super.data = value;
 text = value[DataGridListData(listData).dataField];
 if(MyExtendedDataGrid(listData.owner).total == 100)
 {
 setStyle(color, #FF);
 }
 else
 {
 setStyle(color, #FF);
 }
 }
 }
 ]]
 /mx:Script
/mx:Label



HTH




Steve


--- In flexcoders@yahoogroups.com, Neil Webb nwebb.co...@... wrote:

 Hi, just looking for advice on the most appropriate way to approach
this (or
 links to existing examples) :)

 I've got a DataGrid, and the items use a subclass of NumericStepper.
This
 stepper validates itself depending on the total of *all *items in that
 column  (i.e. it styles itself green if the column-total adds up to,
say,
 100, or red if the column-total is  100). In other words, a single
 itemRenderer needs knowledge of the values of ALL renderers in that
column.

 I'm aware that itemRenderers should only take care of setting
themselves,
 due to recycling -  (ie Adobe don't intend developers to get hold of a
list
 of all renderers, cycle over them and set properties on them
externally).

 In this case however, in order to validate a *single *renderer I need
to
 know about the total of all renderers within a single column.
Currently I
 have things working - I give each renderer knowledge of its owner's
 dataProvider - then, in the renderer's validation method I loop
through all
 items in the dp, total them up and set the style accordingly.

 However, this feels wrong. Also, it's not so bad if I have a
 PercentageStepper, where I could hardcode the total as 100, but what
about
 columns where the user has a set amount of cash, and the total of all
 Steppers must equal that cash-value? In that case, using my setup,
 *each *renderer
 also needs to know the total cash amount, which means setting it on
each
 renderer (easy to do, but again it feels wrong).

 So in a nutshell I guess I'm saying, what's the preferred way of
validating
 an itemRenderer, when the validation of that renderer depends on
properties
 of all the itemRenderers in that column?

 Thanks




RE: [flexcoders] Flex 4 HGroup and Group background colour

2010-04-22 Thread Peter DeHaan
Try setting the Rect's width/height to 100%:

?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
   xmlns:mx=library://ns.adobe.com/flex/mx
s:layout
s:VerticalLayout /
/s:layout

s:Group width=100% height=28
s:Rect top=0 right=0 bottom=0 left=0
s:fill
s:SolidColor color=green /
/s:fill
/s:Rect
/s:Group

s:HGroup width=100% height=28
s:Rect width=100% height=100%
s:fill
s:SolidColor color=red /
/s:fill
/s:Rect
/s:HGroup

/s:Application


Not exactly sure why using left/right/top/bottom constraints didn't work on the 
bottom HGroup, but feel free to file a bug at http://bugs.adobe.com/flex/ and 
Adobe can look into it.

Peter



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of bhaq1972
Sent: Thursday, April 22, 2010 4:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 4 HGroup and Group background colour



Why does this work

s:Group width=100% height=28
s:Rect top=0 right=0 bottom=0 left=0
s:fill
s:SolidColor color=0x4960a6 /
/s:fill
/s:Rect
/s:Group

But this doesnt?
s:HGroup width=100% height=28
s:Rect
s:fill
s:SolidColor color=0x4960a6 /
/s:fill
/s:Rect
/s:HGroup

thanks



Re: [flexcoders] How to clear cached RSL programmatically?

2010-04-22 Thread Alex Harui
I don’t think there is support for that because the framework never revs RSLs.  
You can do what we do and publish new ones or use modules and load into the 
main applicationdomain.


On 4/22/10 9:15 AM, handitan handi@gmail.com wrote:






Hi all,

I posted one of this question on a thread that's related to caching but since 
it got hijacked by a totally different topic, I decided to create a new thread. 
If you're going to talk different stuff, please make a new thread.

The issue that was raised because client doesn't load the newest and greatest 
of your deployed app because it loads from the browser cache.

To resolve this issue, please read this stackOverfow thread:
http://stackoverflow.com/questions/300757/preventing-flex-application-caching-in-browser-multiple-modules

Now that solution works for the main swf and module swfs but what about RSL?

How do you guarantee that the loaded RSL is the latest one?

Thank you.






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


Re: [flexcoders] Embedding a dynamic image OR changing the source of a s:BitMapImage in a skin

2010-04-22 Thread Alex Harui
You can embed several images separately and assign those variables to the 
source.


On 4/22/10 7:18 AM, Wally Kolcz wko...@isavepets.com wrote:






I am creating a coloring book app and I have an image in a skin that can
be colored on. It works fine when I set the skin's background fill to:
s:BitmapImage source=@Embed('assets/img/drawings/alien.png')
fillMode=scale top=1 bottom=1 left=1 right=1/

But i want to change the source image when kids pick different images to
color. I can't use binding or a variable in an @Embed due to a metadata
issue. I can't change the source to
source=assets/img/drawings/alien.png or it won't render. Any ideas on
how I can make the source dynamic?

Thanks!






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


Re: [flexcoders] Issue with truncateToFit behavior of Label while scaling

2010-04-22 Thread Alex Harui
I don’t see any embedded fonts.


On 4/22/10 1:54 AM, msrilatha_reddy msrilatha_re...@yahoo.co.in wrote:






Hi,

I am facing an issue while scaling a Label with truncateToFit property as true. 
While zooming in/out, sometimes the text which is truncated is displayed 
without ellipses or 1 or 2 ellipses sometimes. I tried setting 
fontAntiAliasType=animation thinking that it might solve the issue.
But it didnt :-(

Please find the code below:
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute 
xmlns:local=*
mx:Script
![CDATA[
private function zoom():void
{
c.scaleY = slider.value / 100;
c.scaleX = slider.value / 100;
}

]]
/mx:Script
mx:Canvas id=c x=109#8243; y=111#8243; width=156#8243; 
height=41#8243; scaleX=0.5#8243; scaleY=0.5#8243;
mx:Label id=l1#8243; x=28#8243; y=10#8243; 
text=Labelgettingtruncatedd width=100#8243; truncateToFit=true 
fontAntiAliasType=animation/
/mx:Canvas
mx:VSlider id = slider
minimum = 5#8243;
maximum = 200#8243;
value = 100#8243;
snapInterval = .001#8243;
liveDragging = true
change = zoom()/
/mx:Application

Could anyone of you help me finding whats going wrong here?

Thanks in Advance,
Srilatha






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


[flexcoders] RTMPS performance issue

2010-04-22 Thread sanjitcs
Hi everybody,

I am testing application which uses RTMPS protocol to connect with edge server 
and then to application server using amf socket. 

I have found operation takes double time in case of RTMPS protocol than RTMP 
protocol in server communication.

Does any body seen similar behavior for RTMPS protocol.
 
Do i missing any configuration for RTMPS. Or does LCDS have which can any 
configuration setting which improve the performance.

Following are the configuration detail which i am using for RTMPS 

channel-definition id=test-rtmp 
class=mx.messaging.channels.SecureRTMPChannel
endpoint url=rtmps://{server.name}:8443 
class=flex.messaging.endpoints.SecureRTMPEndpoint/
properties
idle-timeout-minutes10/idle-timeout-minutes

keystore-file/opt/tomcat/certs/servercert.jks/keystore-file
keystore-passwordchange/keystore-password
/properties
/channel-definition

I am using self signed certificate





[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-22 Thread valdhor

 Now I can simply edit my filter function which filters my links tilelist in 
 the main app so that it uses my new category id var as the filter paramater 
 and I think I'll be set :-) Is that how you'd do it?

Seems about right.

 I'm from Liverpool in England (like the beatles). I suppose I've said the 
 word mate before and that made you wonder :-) I'm currently studying flex 
 on my web development masters degree course at uni and want to go into making 
 ecommerce websites using php/mysql/flex. I have no experience in web dev 
 before this course and only have a degree in I.T. so I got thrown in the deep 
 end really and had to teach myself how to swim but I'm addicted to it now and 
 am constantly trying to perfect things which I think is my problem. :-)

Yep, I remember having that sink or swim feeling a couple of years ago when I 
jumped on the Flex wagon. I think it helped having a background in PHP and C++.

From an Antipodean to a Liverpudlian (Or should that be Scouse); Good on ya, 
mate.



[flexcoders] Re: How to clear cached RSL programmatically?

2010-04-22 Thread handitan
Hi Alex!

Great to hear from you as always.
I don't understand what do you mean by framework never revs RSLs? What's revs?

Proably it would be better for my understanding if I use this scenario:
1. The following have been deployed:
- Main_ver1.0.swf
- Module_ver1.0.swf
- RSL.swf

2. Our clients have loaded and cached thosed in their browser. 
 
3. Then all those got update, now it becomes:
- Main_ver1.1.swf
- Module_ver1.1.swf
- RSL.swf -- this got updated but it's still using the same filename.

4. And they all got deployed.

Now I know for sure our client will get the Main_ver1.1 and Module_ver1.1 
without having them clear the browser-cache manually but which RSL are they 
going to get?
Is it going to be the one from Step 1 or from Step 3?

Thank you!


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 I don't think there is support for that because the framework never revs 
 RSLs.  You can do what we do and publish new ones or use modules and load 
 into the main applicationdomain.
 
 
 On 4/22/10 9:15 AM, handitan handi@... wrote:
 
 
 
 
 
 
 Hi all,
 
 I posted one of this question on a thread that's related to caching but since 
 it got hijacked by a totally different topic, I decided to create a new 
 thread. If you're going to talk different stuff, please make a new thread.
 
 The issue that was raised because client doesn't load the newest and greatest 
 of your deployed app because it loads from the browser cache.
 
 To resolve this issue, please read this stackOverfow thread:
 http://stackoverflow.com/questions/300757/preventing-flex-application-caching-in-browser-multiple-modules
 
 Now that solution works for the main swf and module swfs but what about RSL?
 
 How do you guarantee that the loaded RSL is the latest one?
 
 Thank you.
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





Re: [flexcoders] Embedding a dynamic image OR changing the source of a s:BitMapImage in a skin

2010-04-22 Thread Wally Kolcz
The list of images is coming from a database. Can I dyanmically create 
the Embed and Class and then switch them out when the user click on them 
from a list?


On 4/22/2010 1:35 PM, Alex Harui wrote:


You can embed several images separately and assign those variables to 
the source.



On 4/22/10 7:18 AM, Wally Kolcz wko...@isavepets.com 
wko...@isavepets.com wrote:







I am creating a coloring book app and I have an image in a skin
that can
be colored on. It works fine when I set the skin's background fill to:
s:BitmapImage source=@Embed('assets/img/drawings/alien.png')
fillMode=scale top=1 bottom=1 left=1 right=1/

But i want to change the source image when kids pick different
images to
color. I can't use binding or a variable in an @Embed due to a
metadata
issue. I can't change the source to
source=assets/img/drawings/alien.png or it won't render. Any
ideas on
how I can make the source dynamic?

Thanks!






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




[flexcoders] Re: TitleWindow.title won't update from a setter

2010-04-22 Thread Amy


--- In flexcoders@yahoogroups.com, Nick Middleweek n...@... wrote:

 Alex,
 
 That has fixed it but has now made me realise I'm initialising my private
 var _iFormID : String = ;
 
 And the first time I was opening the Popup, I was setting the .iFormID = ,
 so the setter was *not* getting called. I'm now initialising it to null and
 it's working fine...

It might be _slightly_ better practice to call invalidateProperties() in the 
setter, rather than calling validateNow() from outside the component.

HTH;

Amy



Re: [flexcoders] Flex App Resize

2010-04-22 Thread Alex Harui
MeasuredHeight measures the content of the app, not its assigned height.


On 4/22/10 7:27 AM, Jeff britton.j...@gmail.com wrote:






I have a flex application embedded within an HTML page.  I've been trying to 
resize the html element dynamically via an ExternalInterface call to a 
javascript function in the host page.  Unfortunately, listening to Resize 
events and/or overriding the updateDisplayList method on the Application doesnt 
seem to give me the correct height (measuredHeight property).  Any ideas on how 
to calculate the complete application height?






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


[flexcoders] Re: DataGrid | ItemRenderers | Validation

2010-04-22 Thread Amy


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I would be inclined to extend the datagrid and add a variable to handle
 this. You can compute the total from the dataprovider when it arrives
 from the server and pass that in as a bound variable to the custom
 datagrid. Example follows...

Another approach is to use a ClassFactory for the renderer, and pass in a 
function to be used as a callback for validation.  Something like:

var cf:ClassFactory = new ClassFactory(someRendererClass);
cf.properties = {validationCallback:someFunction};
yourDG.itemRenderer = cf;

...

someFunction(dataItem:YourDataType):Boolean {

//validate dataItem against the collection
return true;//or false
}

Then in the renderer:

public function set validationCallBack(value:Function):void {
   _validationCallback=value;
}

private function onValueCommitOrWhatever(e:event):void {
  if (_validationCallback) {
  _isValid = _validationCallback(_data);
  }
}

n stuff.

HTH;

Amy



Re: [flexcoders] RTMPS performance issue

2010-04-22 Thread Oleg Sivokon
I'd think it is normal, since encoding and decoding data would take some
time, I don't know the numbers, but it would be only reasonable that it
would take longer...

Best.

Oleg


[flexcoders] Is there a tool to detect whether the loaded swf is from browser's cache?

2010-04-22 Thread handitan
Hi all,

I am just wondering if there's a tool to detect whether the loaded swf is from 
browser's cache or not?

Appreciate it.

Thx!



Re: [flexcoders] Re: TitleWindow.title won't update from a setter

2010-04-22 Thread Nick Middleweek
Thanks Amy...

I'm now doing that and silly me forgot to use super.commitProperties() after
the .title in commitProperties().

That took a while to work out :)


Cheers,
Nick




On 22 April 2010 20:05, Amy amyblankens...@bellsouth.net wrote:





 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick
 Middleweek n...@... wrote:
 
  Alex,
 
  That has fixed it but has now made me realise I'm initialising my private
  var _iFormID : String = ;
 
  And the first time I was opening the Popup, I was setting the .iFormID =
 ,
  so the setter was *not* getting called. I'm now initialising it to null
 and
  it's working fine...

 It might be _slightly_ better practice to call invalidateProperties() in
 the setter, rather than calling validateNow() from outside the component.

 HTH;

 Amy




[flexcoders] how to find redundant classes?

2010-04-22 Thread Nick Middleweek
Hi,

Is there a quick way to find Classes that I no longer need? I'm sure I've
asked this before but I can't find the thread... Unless I thought about
asking it but didn't  :-)

I'm going through a project, some of it was inherited and some I don't know
if I need anymore... Is there a good way of doing this from Eclipse or
otherwise?

I'm using the FB4 plugin with the 3.4 SDK.


Thanks,
Nick


[flexcoders] .mp3 files in video display component

2010-04-22 Thread Ganesh Suyampirakasam
Hi

Is it possible to run .mp3 files in videodisplay component in Flex.

Has any one tried this functionality

Thanks

ganesh




[flexcoders] Change width of tab character in text controls?

2010-04-22 Thread flexcoderimpl
I'm working on a Flex 3 app for keyboarding instruction. In many of the drills 
I need to work with the tab character.

Flash support for working with tabs in text controls is poor. For example, it 
was a work-around just to get an MX TextArea to accept tabs (by capturing 
FocusEvent.KEY_FOCUS_CHANGE events and manually inserting a tab). I realize TLF 
might be better, but we've committed to Flex 3 for this project.

I'm using an embedded monospace font in the TextArea. When I enter a tab ('\t') 
in the TextArea, I want it to be rendered five characters wide. Flash seems to 
render tabs about two and half characters wide by default.

I've tried inserting an embedded image via htmlText, using tab stops, inserting 
five spaces instead of an actual tab (a nightmare to stay on top of), and even 
creating my own custom glyph in an embedded font, all to no avail.

How can I change the width of tab characters in a TextArea? Any work-arounds?



[flexcoders] Re: Problem sorting AdvancedDataGrid

2010-04-22 Thread tntomek
Here is the exact bug I filed. Please vote for it if you plan to stay with Flex 
3 for a while.

https://bugs.adobe.com/jira/browse/FLEXDMV-2310


--- In flexcoders@yahoogroups.com, Tom McNeer tmcn...@... wrote:

 Hi,
 
 Again, thanks to everyone for their replies.
 
 On Thu, Apr 22, 2010 at 3:00 AM, tntomek tnto...@... wrote:
 
  See if u can find your sort actually being used,
 
 
 Unfortunately , this is proving a little problematic. I don't know why this
 is happening, but when I control-click on GroupingCollection to open the
 file and set a breakpoint, Flex Builder/Eclipse just gives me a message
 saying it can't open the file from the datavisualization.swc.
 
 I can go to the as file in the SDK in another editor. But since Flex Builder
 is identifying the swc as the source of the class, I can't set a breakpoint.
 
 If anyone has any thoughts on this, please let me know. Meanwhile:
 
 You should check out some of the examples at the ilog exilir page.. i've
  said this before they have some good examples...
 
 
 Any way you could be a little more specific? There's a lot of stuff around
 ilog elixir. What page do you mean?
 
 
  You should be adding an eventListener so that when your collection
  refreshes you can do everything you need to.
 
 
 I'm kinda lost here. What would I need to do _after_ the collection
 refreshes? If I set the sort and refresh the collection, shouldn't that be
 enough?
 
 
  You can see if the collection has refreshed properly by checking the return
  value from the refresh method
 
 
 Yes. I can see that the collection has been refreshed. And I can see that
 the objects in the grouping collection are in the correct order. But as soon
 as I step past that breakpoint and view the application, the objects are
 sorted in a completely different (apparently random) order.
 
 
 -- 
 Thanks,
 
 Tom
 
 Tom McNeer
 MediumCool
 http://www.mediumcool.com
 1735 Johnson Road NE
 Atlanta, GA 30306
 404.589.0560





[flexcoders] Re: Problem sorting AdvancedDataGrid

2010-04-22 Thread tntomek
I filed a bug for this, its pretty ridiculous that they cant get the path  
spelling right in Flex 3 even with FB4 release (it's been like this since 3.3/4 
release). Just copy paste the files from your datavisualization SDK folder into 
the path it expects them to be in (fbpro blah blah) (be mindful of exact 
spelling, sometimes they spell with Z sometimes with S). This will let you 
debug those files.

--- In flexcoders@yahoogroups.com, Tom McNeer tmcn...@... wrote:

 Hi,
 
 Again, thanks to everyone for their replies.
 
 On Thu, Apr 22, 2010 at 3:00 AM, tntomek tnto...@... wrote:
 
  See if u can find your sort actually being used,
 
 
 Unfortunately , this is proving a little problematic. I don't know why this
 is happening, but when I control-click on GroupingCollection to open the
 file and set a breakpoint, Flex Builder/Eclipse just gives me a message
 saying it can't open the file from the datavisualization.swc.
 
 I can go to the as file in the SDK in another editor. But since Flex Builder
 is identifying the swc as the source of the class, I can't set a breakpoint.
 
 If anyone has any thoughts on this, please let me know. Meanwhile:
 
 You should check out some of the examples at the ilog exilir page.. i've
  said this before they have some good examples...
 
 
 Any way you could be a little more specific? There's a lot of stuff around
 ilog elixir. What page do you mean?
 
 
  You should be adding an eventListener so that when your collection
  refreshes you can do everything you need to.
 
 
 I'm kinda lost here. What would I need to do _after_ the collection
 refreshes? If I set the sort and refresh the collection, shouldn't that be
 enough?
 
 
  You can see if the collection has refreshed properly by checking the return
  value from the refresh method
 
 
 Yes. I can see that the collection has been refreshed. And I can see that
 the objects in the grouping collection are in the correct order. But as soon
 as I step past that breakpoint and view the application, the objects are
 sorted in a completely different (apparently random) order.
 
 
 -- 
 Thanks,
 
 Tom
 
 Tom McNeer
 MediumCool
 http://www.mediumcool.com
 1735 Johnson Road NE
 Atlanta, GA 30306
 404.589.0560





[flexcoders] visible child within invisible parent?

2010-04-22 Thread tex_learning_flex
I want to create a container that will be invisible until the mouse moves into 
it, thus making it visible. Selected components within the container should 
remain visible at all times. Is this possible?



Re: [flexcoders] Re: Problem sorting AdvancedDataGrid

2010-04-22 Thread Tom McNeer
On Thu, Apr 22, 2010 at 5:59 PM, tntomek tnto...@yahoo.com wrote:



 I filed a bug for this, its pretty ridiculous that they cant get the path 
 spelling right in Flex 3 even with FB4 release (it's been like this since
 3.3/4 release). Just copy paste the files from your datavisualization SDK
 folder into the path it expects them to be in (fbpro blah blah) (be mindful
 of exact spelling, sometimes they spell with Z sometimes with S). This will
 let you debug those files.


But it's looking for them within a swc, not in a directory.


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


Re: [flexcoders] how to find redundant classes?

2010-04-22 Thread Oleg Sivokon
Not a real answer: document them with ASDocs - it will try to document
everything - will certainly find errors in unused classes - will argue
with you about those classes - you will know what to delete - bonus, you
will get documentation for the project :)


[flexcoders] State of the art JSON

2010-04-22 Thread Richard Rodseth
I've used AS3CoreLib's JSON encoding/decoding in the past, but some
code I'm maintaining now has custom JSON handling.
Note: we use ISO 8601 for Dates.

Looking at the Flashbuilder 4 data wizards (briefy), I see JSON
support and references to something call fiber, but am unclear
whether this is tied to LiveCycle, and whether it's Flex 4 specific.

So I guess I'm wondering what the best-practice is these days for JSON support
a) With Flex 3
b) With Flex 4

Thanks.


[flexcoders] ResultEvent from HttpService not parsing xml

2010-04-22 Thread Raymond Brown
I have an xml doc:

one
 two
  nameBob/name
 /two
/one

 I have a Httpservice tage with url, resulthandler, faulthandler and 
resultformat=e4x.  In my resulthandler, I have this:

var ourXML:XML = event.result as XML;
var name:String = ourXML.one.two.name;
var x:int = 0;

Here is the problem, I put a break point on the int assignment and look at the 
variables.  I see that event.result AND ourXML both have the xml document in 
them but my name variable is empty.  I even tried something like this -
if (event.result.one.two.name ==Bob) and it fails.  What are we missing?  The 
debugger clearly shows the data is there but I can never seem to get it out.


  

Re: [flexcoders] how to find redundant classes?

2010-04-22 Thread Aaron Hardy
FlexPMD would probably do the trick:
http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD

Aaron

On Thu, Apr 22, 2010 at 1:51 PM, Nick Middleweek n...@middleweek.co.ukwrote:



 Hi,

 Is there a quick way to find Classes that I no longer need? I'm sure I've
 asked this before but I can't find the thread... Unless I thought about
 asking it but didn't  :-)

 I'm going through a project, some of it was inherited and some I don't know
 if I need anymore... Is there a good way of doing this from Eclipse or
 otherwise?

 I'm using the FB4 plugin with the 3.4 SDK.


 Thanks,
 Nick

  



[flexcoders] Adobe Air Bug!

2010-04-22 Thread cuttenv
I have created an adobe Air application and it works perfectly fine when I run 
the application in debug mode using Flash Builder. I wanted to test out a 
release build so I created a temporary certificate. Then when I launch my 
application nothing happens! I gave the air file to several other people and 
the application worked perfectly fine. Then I gave the app to someone else who 
had adobe flex builder 4 installed and  they had the same problem as me. The 
app launches just nothing shows up. Is this a known adobe air issue??



[flexcoders] Re: spark Itemrenderer....

2010-04-22 Thread cuttenv
I have the log install file on this computer. I tried on another computer and 
it's still not working...

--- In flexcoders@yahoogroups.com, cuttenv cutt...@... wrote:

 Anyone know if it's possible to reuse a custom item renderer in another 
 component that just only needs one reference of this item?? Specifically I am 
 extending a group and would like to addElement( customItemRender); to the 
 group in the createChildren method but I am getting 0 luck... any thoughts??? 
 I also tried implementing the IItemrendererOwner and using that to set the 
 data... 0 luck... spark seems to be more of  fizzle...





[flexcoders] Re: Problem sorting AdvancedDataGrid

2010-04-22 Thread tntomek
SWC message is wrong

Make sure you have the following:
C:\Program Files\Adobe\Adobe Flash Builder 
4\sdks\3.5.0\fbpro\projects\datavisualization\src

Based on my previous post.

You can find this path if you click on 
Project propertiesbuild pathlibrary path
expand Flex  expand datavisualization and look at source attachment. 

This is how it matches the source code with SWC. Pretty funny how its broken 
isn't it :) this is not just you but everyone!!! for over a release now.

--- In flexcoders@yahoogroups.com, Tom McNeer tmcn...@... wrote:

 On Thu, Apr 22, 2010 at 5:59 PM, tntomek tnto...@... wrote:
 
 
 
  I filed a bug for this, its pretty ridiculous that they cant get the path 
  spelling right in Flex 3 even with FB4 release (it's been like this since
  3.3/4 release). Just copy paste the files from your datavisualization SDK
  folder into the path it expects them to be in (fbpro blah blah) (be mindful
  of exact spelling, sometimes they spell with Z sometimes with S). This will
  let you debug those files.
 
 
 But it's looking for them within a swc, not in a directory.
 
 
 -- 
 Thanks,
 
 Tom
 
 Tom McNeer
 MediumCool
 http://www.mediumcool.com
 1735 Johnson Road NE
 Atlanta, GA 30306
 404.589.0560





RE: [flexcoders] ResultEvent from HttpService not parsing xml

2010-04-22 Thread Tracy Spratt
ourXML is already at the one node. Try: var name:String =
ourXML.two.name.text();  //the text() is not always necessary

 

When in doubt view the xml by doing:

trace(ourXML.toXMLString());

 

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Raymond Brown
Sent: Thursday, April 22, 2010 8:44 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ResultEvent from HttpService not parsing xml

 

  

I have an xml doc:

 

one

 two

  nameBob/name

 /two

/one

 

 I have a Httpservice tage with url, resulthandler, faulthandler and
resultformat=e4x.  In my resulthandler, I have this:

 

var ourXML:XML = event.result as XML;

var name:String = ourXML.one.two.name;

var x:int = 0;

 

Here is the problem, I put a break point on the int assignment and look at
the variables.  I see that event.result AND ourXML both have the xml
document in them but my name variable is empty.  I even tried something like
this -

if (event.result.one.two.name ==Bob) and it fails.  What are we missing?
The debugger clearly shows the data is there but I can never seem to get it
out.

 





Re: [flexcoders] Re: spark Itemrenderer....

2010-04-22 Thread Alex Harui
Test with a really simple itemrenderer.  I’m pretty sure we never tested it so 
there may be a reason it won’t work, but none jumps to mind right now.


On 4/22/10 8:01 PM, cuttenv cutt...@yahoo.com wrote:






I have the log install file on this computer. I tried on another computer and 
it's still not working...

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
cuttenv cutt...@... wrote:

 Anyone know if it's possible to reuse a custom item renderer in another 
 component that just only needs one reference of this item?? Specifically I am 
 extending a group and would like to addElement( customItemRender); to the 
 group in the createChildren method but I am getting 0 luck... any thoughts??? 
 I also tried implementing the IItemrendererOwner and using that to set the 
 data... 0 luck... spark seems to be more of  fizzle...







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


Re: [flexcoders] visible child within invisible parent?

2010-04-22 Thread Alex Harui
Sort of.  You want to put the container’s visuals in a child that is the size 
of the container and is behind all the other children, and make that one child 
visible or invisible.


On 4/22/10 3:22 PM, tex_learning_flex tex.learning.f...@gmail.com wrote:






I want to create a container that will be invisible until the mouse moves into 
it, thus making it visible. Selected components within the container should 
remain visible at all times. Is this possible?






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


[flexcoders] Re: Adobe Air Bug!

2010-04-22 Thread cuttenv
I have noticed something more on this error.
When I install my air file to /Applications it works perfectly fine but when I 
install it to /Applications/Air Apps it doesn't work correctly. The app shows 
up in my dock and it says it's running but nothing there.

now on to win 64 bit... I haven't got anyone who got the app working there 
yet... any thoughts??

--- In flexcoders@yahoogroups.com, cuttenv cutt...@... wrote:

 I have created an adobe Air application and it works perfectly fine when I 
 run the application in debug mode using Flash Builder. I wanted to test out a 
 release build so I created a temporary certificate. Then when I launch my 
 application nothing happens! I gave the air file to several other people and 
 the application worked perfectly fine. Then I gave the app to someone else 
 who had adobe flex builder 4 installed and  they had the same problem as me. 
 The app launches just nothing shows up. Is this a known adobe air issue??