RE: [flexcoders] display row index in DataGrid

2009-02-27 Thread Alex Harui
Try something like:

Public class MyIndexItemRenderer extends DataGridItemRenderer
{
Override public function validateProperties():void
{
super.validateProperties();
text =(listData.rowIndex + 
DataGrid(owner).verticalScrollPosition).toString();
}
}

You'll have to fix up capitalization and add imports statements.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of nylarch
Sent: Friday, February 27, 2009 2:16 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] display row index in DataGrid


this seems like it should be easy but

I have a DataGrid with 3000+ rows - an XML object is the dataprovider.
Need to show a row index both on the initial display and after
various filters the user can run (by state name, county name, etc.) I
always want the row index to start at "1" i.e. show the number of rows
in the grid.

I'm seeing some blog posts where the dataprovider is an
ArrayCollection and then the labelFunction can return
arrayname.indexOf(item) but this doesn't apply for me.

Do I have to go with an ItemRenderer just to use listData.rowIndex()?
Is there something easier I'm missing?

thanks



RE: [flexcoders] Re: Detecting iterations in item render

2009-02-27 Thread Alex Harui
In theory, you can know if the row is odd or even given the calculation I 
showed and choose your backgroundImage accordingly.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Amy
Sent: Friday, February 27, 2009 2:04 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Detecting iterations in item render


--- In flexcoders@yahoogroups.com, 
"rob_mcmichael" 
wrote:
>
> Thanks for the response Alex, but I don't think that will help.
>
> I need to change the background image, not a mere color.
>
> Unless you are suggesting that I can detect the current color from
inside the render and
> from that tell if I am in an odd or even row. If that is the case I
will see if I can get that
> working. Seems like another hack though :(

Check out the Datagrid_withStyleFunction at flexdiary.blogspot.com.



[flexcoders] HTMLLoader Problem

2009-02-27 Thread lehaianh1986
Hi all, I have a AIR desktop app that use to login to 1 website and
download data from it. I use HTMLLoader component to display this
website and authenticate before download data because this website
include Recaptcha Authentication.

Now, I want to embed it to my website but I know I can't use
HTMLLoader in Flash. What is the solution I can use in this case? 

Thank in advance any advice!

Hai Anh



Re: [flexcoders] When is Gumbo expiration date?

2009-02-27 Thread Matt Chotin
Hi,

March 31 I believe.  We are not going to have the new beta out by then either.

Matt


On 2/27/09 2:46 PM, "djhatrick"  wrote:




Hope it's not March 1?  Just checking...  In case.

Thanks,
Patrick







Re: [flexcoders] Question about how to draw a line connecting two UIComponent

2009-02-27 Thread Maciek Sakrejda
It's not a drop-in library, but you may want to take a look at Simon
Gladman's node-based UI:

http://flexmonkey.blogspot.com/2008/10/visual-node-based-calculator-in-flex.html

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: carlo giordano 
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Question about how to draw a line connecting two
UIComponent
Date: Fri, 27 Feb 2009 17:42:10 +0100

Hi,
I would connect two UIComponent like mx:Panel or flexmdi:MDIWindow
with a line in such a way that the line continues to connect the two
UIComponent when one or both get dragged around. Anyone has idea on
how to implement it ?
I try to use the Flex Wires
library(http://code.google.com/p/flexwires/) but is not very useful to
me because my goal is to develop a Flex based UML tool. However Flex
Wires contains the right principles to start with my tool.

Anyone have some tips suggest to me ?

Thanks. Carlo.








[flexcoders] Re: MaskedTextInput

2009-02-27 Thread markgoldin_2000
Yes, yes, it does and it works!!!

--- In flexcoders@yahoogroups.com, "huu...@..."  wrote:
>
> When you deploy, you need to mirror this code in the HTML file that
> users will access to reach the SWF file.  One thought is to simply
> copy the file in its entirety and make that your "index.html" for 
your
> website.
> 
> Does that make sense?
> 
> --- In flexcoders@yahoogroups.com, "markgoldin_2000"
>  wrote:
> >
> > Well, it only works for me when I run it from Builder.
> > Here is my code:
> > ...
> > );
> >   document.tasktracking.focus();
> >   } else {  // flash is too old or we can't detect the plugin
> > var alternateContent = 'Alternate HTML content should be 
placed 
> > here. '
> > + 'This content requires the Adobe Flash Player. '
> > + 'http://www.adobe.com/go/getflash/>Get Flash';
> > document.write(alternateContent);  // insert non-flash content
> >   }
> > 
> > 
> > I have set stage as well.
> > --- In flexcoders@yahoogroups.com, "huuuze@"  wrote:
> > >
> > > This *is* possible.
> > > 
> > > In your html-template directory, locate the index.template.html 
> > file.
> > >  In the file, locate these lines of code (should be around Lines
> > > 90-thru-100, assuming you haven't modified this file):
> > > 
> > > == CODE ===
> > >   } else {  // flash is too old or we can't detect the plugin
> > > var alternateContent = 'Alternate HTML content should be 
placed
> > > here. '
> > > == /CODE ==
> > > 
> > > Immediately before the line with the " } else {", add the 
following:
> > > 
> > > == CODE ===
> > >   document.THE_NAME_OF_YOUR_MAIN_MXML_FILE.focus();
> > > == /CODE ===
> > > 
> > > In your main MXML file, add the following to the 
creationComplete
> > > attribute:
> > > 
> > > == CODE ===
> > > stage.focus = YOUR_MASKED_INPUT;
> > > == /CODE ===
> > > 
> > > That should do it.  Your users won't be forced to click in the 
> > browser
> > > to begin typing.
> > > 
> > > --- In flexcoders@yahoogroups.com, "markgoldin_2000"
> > >  wrote:
> > > >
> > > > I am trying to implement that control into my application.
> > > > When an application starts I want to have a control that is 
based 
> > on 
> > > > MaskedTextInput seleted. So, in my init I am saying:
> > > > badgeid.setFocus();
> > > > badgeid would get its border highlighted but a mouse pointer 
will 
> > not 
> > > > be inside of MaskedTextInput and to start entering data the 
user 
> > has to 
> > > > click on badgeid. Is it possible to position mouse pointer 
into 
> > the 
> > > > MaskedTextInput text input control without licking on it?
> > > > 
> > > > Thanks
> > > >
> > >
> >
>




[flexcoders] Retrieve column name from a DataProvide r -please advice

2009-02-27 Thread yossi.baram
Hi guys,
I have a dataGrid and using RemoteObject to create a TreeGrid.
My problem is retrieving the column names from a DataProvider,
I know its a collection of Objects (HashMap style) but I couldnt find a 
way to get the names of the columns, just their values
please advice,
Thanks
Jo




[flexcoders] When is Gumbo expiration date?

2009-02-27 Thread djhatrick
Hope it's not March 1?  Just checking...  In case.

Thanks,
Patrick



[flexcoders] display row index in DataGrid

2009-02-27 Thread nylarch
this seems like it should be easy but

I have a DataGrid with 3000+ rows - an XML object is the dataprovider.
 Need to show a row index both on the initial display and after
various filters the user can run (by state name, county name, etc.)  I
always want the row index to start at "1" i.e. show the number of rows
in the grid.

I'm seeing some blog posts where the dataprovider is an
ArrayCollection and then the labelFunction can return
arrayname.indexOf(item) but this doesn't apply for me.

Do I have to go with an ItemRenderer just to use listData.rowIndex()?
 Is there something easier I'm missing?

thanks



[flexcoders] Re: Detecting iterations in item render

2009-02-27 Thread Amy
--- In flexcoders@yahoogroups.com, "rob_mcmichael"  
wrote:
>
> Thanks for the response Alex, but I don't think that will help.
> 
> I need to change the background image, not a mere color.
> 
> Unless you are suggesting that I can detect the current color from 
inside the render and 
> from that tell if I am in an odd or even row. If that is the case I 
will see if I can get that 
> working. Seems like another hack though :(

Check out the Datagrid_withStyleFunction at flexdiary.blogspot.com.



RE: [flexcoders] RE: Breaking up large array processing

2009-02-27 Thread Ryan Graham

Nice, this looks like a good approach too. I'll give it a shot as well.

 

Thank you much,

Ryan

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jonathon Stierman
Sent: Friday, February 27, 2009 2:34 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] RE: Breaking up large array processing

 

Only process a certain number of indexes per ENTER_FRAME event.  I
usually set a getTimer() at the start of my processing function, and
loop until the difference is greater than my threshold:

 

Function onEnterFrame(event:Event):void

{

 var startTime:int = getTimer();

 while( getTimer() - startTime < THRESHOLD && !done)

 {

  /* Process data */

 }

 

 If (done)

 {

  this.removeEventListener(Event.ENTER_FRAME, onEnterFrame,
false); // Stop processing data

  this.dispatchEvent(new Event(Event.COMPLETE, false, false));
// Tell listeners that we're done

 }

}

 

Jonathon

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ryan Graham
Sent: Friday, February 27, 2009 2:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Breaking up large array processing

 

Hi All,

 

I currently have 2 separate collections that I need to sync up based on
ids. One has 25000 elements and the other has 4000. A typical nested for
loop structure gives me the 1502 script time limit exception after 60
seconds. I've tried all the performance optimizations on Alex's blog,
but it's still taking too long. Does anyone have a sample or tips on how
to break up this type of processing? Maybe do 4 passes, each processing
1000 of my 4000 input elements?  Any help is much appreciated!

 

Thanks,

Ryan

This message is private and confidential. If you have received it in
error, please notify the sender and remove it from your system.





This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.

[flexcoders] RE: Breaking up large array processing

2009-02-27 Thread Jonathon Stierman
Only process a certain number of indexes per ENTER_FRAME event.  I usually set 
a getTimer() at the start of my processing function, and loop until the 
difference is greater than my threshold:

Function onEnterFrame(event:Event):void
{
 var startTime:int = getTimer();
 while( getTimer() - startTime < THRESHOLD && !done)
 {
  /* Process data */
 }

 If (done)
 {
  this.removeEventListener(Event.ENTER_FRAME, onEnterFrame, false); // 
Stop processing data
  this.dispatchEvent(new Event(Event.COMPLETE, false, false)); // Tell 
listeners that we're done
 }
}

Jonathon


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Ryan Graham
Sent: Friday, February 27, 2009 2:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Breaking up large array processing

Hi All,

I currently have 2 separate collections that I need to sync up based on ids. 
One has 25000 elements and the other has 4000. A typical nested for loop 
structure gives me the 1502 script time limit exception after 60 seconds. I've 
tried all the performance optimizations on Alex's blog, but it's still taking 
too long. Does anyone have a sample or tips on how to break up this type of 
processing? Maybe do 4 passes, each processing 1000 of my 4000 input elements?  
Any help is much appreciated!

Thanks,
Ryan
This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.


<><>

RE: [flexcoders] RE: Breaking up large array processing

2009-02-27 Thread Ryan Graham

Ahh... I had just tuned my loops that were iterating over the
collections. 

 

The pseudo-threading example is exactly what I need, thanks!

 

For the archives:

 

http://blogs.adobe.com/aharui/2008/01/threads_in_actionscript_3.html

 

Thanks,

Ryan

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alex Harui
Sent: Friday, February 27, 2009 2:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] RE: Breaking up large array processing

 

The pseudo-threading example should prevent the script time out.  You
sure you coded it correctly?

 

Alex Harui

Flex SDK Developer

Adobe Systems Inc.  

Blog: http://blogs.adobe.com/aharui

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ryan Graham
Sent: Friday, February 27, 2009 12:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Breaking up large array processing

 

Hi All,

 

I currently have 2 separate collections that I need to sync up based on
ids. One has 25000 elements and the other has 4000. A typical nested for
loop structure gives me the 1502 script time limit exception after 60
seconds. I've tried all the performance optimizations on Alex's blog,
but it's still taking too long. Does anyone have a sample or tips on how
to break up this type of processing? Maybe do 4 passes, each processing
1000 of my 4000 input elements?  Any help is much appreciated!

 

Thanks,

Ryan

This message is private and confidential. If you have received it in
error, please notify the sender and remove it from your system.





This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.

[flexcoders] Re: antiAliasType null exception with Text instances!

2009-02-27 Thread robbarreca
--- In flexcoders@yahoogroups.com, "Darron J. Schall"  wrote:
> 
> I've already file a bug against this, but hopefully one of those 2 
> solutions should work for you.

What is the JIRA issue number you filed this under at bugs.adobe.com?

-R



RE: [flexcoders] Image scaleContent="false" causes Security Sandbox Violation in AIR 1.5.x

2009-02-27 Thread Alex Harui
You can ignore any security warning in the console that does not result in an 
exception dialog  that halts the app in the debugger.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Shigeru Nakagaki
Sent: Thursday, February 26, 2009 8:38 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Image scaleContent="false" causes Security Sandbox 
Violation in AIR 1.5.x


Image is loaded, but Security Sandbox Violation log is outputted in
console. If scaleContent is "true", there is no Security Sandbox
Violation log.

crossdomain.xml is like this.







And app loads policy file on initialization like this.

Security.loadPolicyFile("http://localhost/crossdomain.xml";);

Cannot this Security Sandbox Violation log be avoided ?

Cannot we access context data of loaded image in AIR ??

thanks

Shigeru Nakagaki



[flexcoders] RE: Breaking up large array processing

2009-02-27 Thread Alex Harui
The pseudo-threading example should prevent the script time out.  You sure you 
coded it correctly?

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Ryan Graham
Sent: Friday, February 27, 2009 12:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Breaking up large array processing

Hi All,

I currently have 2 separate collections that I need to sync up based on ids. 
One has 25000 elements and the other has 4000. A typical nested for loop 
structure gives me the 1502 script time limit exception after 60 seconds. I've 
tried all the performance optimizations on Alex's blog, but it's still taking 
too long. Does anyone have a sample or tips on how to break up this type of 
processing? Maybe do 4 passes, each processing 1000 of my 4000 input elements?  
Any help is much appreciated!

Thanks,
Ryan
This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.




RE: [flexcoders] Re: Detecting iterations in item render

2009-02-27 Thread Alex Harui
If you implement IDropInListItemRenderer, then listData.rowIndex + 
owner.verticalScrollPosition should be your position

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of rob_mcmichael
Sent: Friday, February 27, 2009 12:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Detecting iterations in item render


Thanks for the response Alex, but I don't think that will help.

I need to change the background image, not a mere color.

Unless you are suggesting that I can detect the current color from inside the 
render and
from that tell if I am in an odd or even row. If that is the case I will see if 
I can get that
working. Seems like another hack though :(

--- In flexcoders@yahoogroups.com, 
"oneworld95"  wrote:
>
> The always dependable FlexExamples.com provides a great solution:
> http://blog.flexexamples.com/2008/03/06/setting-the-background-alpha-and\
> 
-background-color-of-a-datagrid-control-in-flex/#more-546
> > 
d-background-color-of-a-datagrid-control-in-flex/#more-546>
>
> - Alex C
>
> --- In flexcoders@yahoogroups.com, 
> "rob_mcmichael" 
> wrote:
> >
> > Hello,
> >
> > I am trying to create an item render for an MX list component.
> >
> > I have overridden the set data function to customize something things,
> but would like to
> > alternate the background image for each row.
> >
> > The problem is I can't fine a property that indicated which iteration
> I am on. I have had a
> > search through the var debugger window, but can't see anything that I
> can use.
> >
> > The only thing I can hack together at the moment is to put iteration
> information into the
> > data source, but that's not ideal.
> >
> > I am sure this has been done a lot before, but I can't find anything
> online. Perhaps there is
> > a simple way to do it I have missed, and am over engineering.
> >
> > Thanks
> >
> > Rob
> >
>



[flexcoders] Dynamically updated ToolTip on move

2009-02-27 Thread lanekelly5
I have a component that dispatches an event when it is being moved.  In 
that handler I wanted to pop up a ToolTip and display the current X/Y 
coordinates.  I must be missing some of the logistics behind ToolTip 
behavior because I'm just getting the static text.

Here's the code in my handler (which I've verified via the debugger is 
being called):

private function showLocation(event:ObjectHandleEvent):void {
event.currentTarget.toolTip = "x:" + event.currentTarget.x + " y:" 
+ event.currentTarget.y;
}

Anyone created this effect with a ToolTip?



[flexcoders] Re: VideoDisplay

2009-02-27 Thread spinglittery
For a complete example project you can use check out 
http://www.flashcomguru.com/index.cfm/2009/1/15/FLVPlayback-2_5-component-in-
Flex.

Maybe have a look at:

www.video-flash.de  for a good open source player.

Or google... There are lots out there. With examples of how to load the video 
(I use .flv's) 
via xml.

--- In flexcoders@yahoogroups.com, "christophe_jacquelin" 
 
wrote:
>
> Hello, 
> 
> VideoDiplay is not displaying the video. I have try .mp4, .flv, .avi
> and .swf files. I have a black square. 
> 
> Could you send me the minimum basic code to display a video ? 
> 
> Thank you,
> Christophe,
>





Re: [flexcoders] Help the Flex Team by taking our survey!

2009-02-27 Thread Maciek Sakrejda
If anyone is interested in the fate of Flex on Linux, please take the
survey--there are a number of Linux-related questions. Long live Flex
Builder Linux! Maybe in 277 days we'll actually get a beta instead of a
fifth alpha (or--God forbid--dropped support).

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: flex_coders 
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Help the Flex Team by taking our survey!
Date: Fri, 27 Feb 2009 19:01:29 -

Help the Flex team better understand who you are and what you're
working on. This information is incredibly valuable to us. Please take
20 minutes and fill out our survey:
http://www.surveymonkey.com/s.aspx?sm=vCfoIoZ0_2bLG6CTgVcntsVA_3d_3d 

Thanks for your time and help! 








Re: [flexcoders] Generate PDF files

2009-02-27 Thread Alan K
http://alivepdf.bytearray.org/


>Hello,

>How to generates PDF Files from a flex application ?

>Thank you,
>Christophe 



[flexcoders] Re: Detecting iterations in item render

2009-02-27 Thread rob_mcmichael
Thanks for the response Alex, but I don't think that will help.

I need to change the background image, not a mere color.

Unless you are suggesting that I can detect the current color from inside the 
render and 
from that tell if I am in an odd or even row. If that is the case I will see if 
I can get that 
working. Seems like another hack though :(


--- In flexcoders@yahoogroups.com, "oneworld95"  wrote:
>
> The always dependable FlexExamples.com provides a great solution:
> http://blog.flexexamples.com/2008/03/06/setting-the-background-alpha-and\
> -background-color-of-a-datagrid-control-in-flex/#more-546
>  d-background-color-of-a-datagrid-control-in-flex/#more-546>
> 
> - Alex C
> 
> --- In flexcoders@yahoogroups.com, "rob_mcmichael" 
> wrote:
> >
> > Hello,
> >
> > I am trying to create an item render for an MX list component.
> >
> > I have overridden the set data function to customize something things,
> but would like to
> > alternate the background image for each row.
> >
> > The problem is I can't fine a property that indicated which iteration
> I am on. I have had a
> > search through the var debugger window, but can't see anything that I
> can use.
> >
> > The only thing I can hack together at the moment is to put iteration
> information into the
> > data source, but that's not ideal.
> >
> > I am sure this has been done a lot before, but I can't find anything
> online. Perhaps there is
> > a simple way to do it I have missed, and am over engineering.
> >
> > Thanks
> >
> > Rob
> >
>




[flexcoders] Breaking up large array processing

2009-02-27 Thread Ryan Graham

Hi All,

 

I currently have 2 separate collections that I need to sync up based on
ids. One has 25000 elements and the other has 4000. A typical nested for
loop structure gives me the 1502 script time limit exception after 60
seconds. I've tried all the performance optimizations on Alex's blog,
but it's still taking too long. Does anyone have a sample or tips on how
to break up this type of processing? Maybe do 4 passes, each processing
1000 of my 4000 input elements?  Any help is much appreciated!

 

Thanks,

Ryan



This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.

[flexcoders] Gallery with Uploaded images

2009-02-27 Thread christophe_jacquelin
Hello,

I am seaching source code or the method to generate an image Gallery
with uploaded images. 

Thank you,
Christophe,





[flexcoders] Generate PDF files

2009-02-27 Thread christophe_jacquelin
Hello,

How to generates PDF Files from a flex application ? 

Thank you,
Christophe 



[flexcoders] Re: Define repeaters at runtime

2009-02-27 Thread smitade
--- In flexcoders@yahoogroups.com, Gordon Smith  wrote:
>
> So that the doc team understands... What is it that you found
surprising? That an Array can hold anything, including references to
components?
> 
> Gordon Smith
> Adobe Flex SDK Team
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of smitade
> Sent: Thursday, February 26, 2009 9:50 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Define repeaters at runtime
> 
> 
> It works - please ignore the previous post. Wow, the ability to push
> components into arrays like this opens up so many possibilities -
> especially when working with flex frameworks. I find it strange the
> documentation doesn't highlight this feature - otherwise I missed it.
> Thanks again!
>

Gordon - sorry for the confusion - I'm confused myself! When I started
this thread I was looking for a way to dump components into an Array
e.g. 64 Images into an array ImageArray so that I could set the
properties of the images by setting the array directly e.g. 
for (i=0;i<64;i++)
{
  ImageArray[i].source="some.png";
}

I mistakenly thought it was working as initially all of the 64 images
have the same source and this was showing up correctly. What I found
out that this is not the case (and probably why I didn't find it in
the docs). I understand that arrays can hold references to components
so I've recoded to push and pop the images from ImageArray to set the
properties on the individual Images. I liked the functionality of
using a repeater defined in MXML where I could reference my
"ImageArray" directly. I haven't found a way to define this repeater
at runtime though. 

Sorry for the long reply - hope it makes sense. 








[flexcoders] Re: MaskedTextInput

2009-02-27 Thread huu...@ymail.com
When you deploy, you need to mirror this code in the HTML file that
users will access to reach the SWF file.  One thought is to simply
copy the file in its entirety and make that your "index.html" for your
website.

Does that make sense?

--- In flexcoders@yahoogroups.com, "markgoldin_2000"
 wrote:
>
> Well, it only works for me when I run it from Builder.
> Here is my code:
> ...
>   );
>   document.tasktracking.focus();
>   } else {  // flash is too old or we can't detect the plugin
> var alternateContent = 'Alternate HTML content should be placed 
> here. '
>   + 'This content requires the Adobe Flash Player. '
>   + 'http://www.adobe.com/go/getflash/>Get Flash';
> document.write(alternateContent);  // insert non-flash content
>   }
> 
> 
> I have set stage as well.
> --- In flexcoders@yahoogroups.com, "huuuze@"  wrote:
> >
> > This *is* possible.
> > 
> > In your html-template directory, locate the index.template.html 
> file.
> >  In the file, locate these lines of code (should be around Lines
> > 90-thru-100, assuming you haven't modified this file):
> > 
> > == CODE ===
> >   } else {  // flash is too old or we can't detect the plugin
> > var alternateContent = 'Alternate HTML content should be placed
> > here. '
> > == /CODE ==
> > 
> > Immediately before the line with the " } else {", add the following:
> > 
> > == CODE ===
> >   document.THE_NAME_OF_YOUR_MAIN_MXML_FILE.focus();
> > == /CODE ===
> > 
> > In your main MXML file, add the following to the creationComplete
> > attribute:
> > 
> > == CODE ===
> > stage.focus = YOUR_MASKED_INPUT;
> > == /CODE ===
> > 
> > That should do it.  Your users won't be forced to click in the 
> browser
> > to begin typing.
> > 
> > --- In flexcoders@yahoogroups.com, "markgoldin_2000"
> >  wrote:
> > >
> > > I am trying to implement that control into my application.
> > > When an application starts I want to have a control that is based 
> on 
> > > MaskedTextInput seleted. So, in my init I am saying:
> > > badgeid.setFocus();
> > > badgeid would get its border highlighted but a mouse pointer will 
> not 
> > > be inside of MaskedTextInput and to start entering data the user 
> has to 
> > > click on badgeid. Is it possible to position mouse pointer into 
> the 
> > > MaskedTextInput text input control without licking on it?
> > > 
> > > Thanks
> > >
> >
>




Re: [flexcoders] Question about how to draw a line connecting two UIComponent

2009-02-27 Thread Fotis Chatzinikos
I have made something similar in flash, but it was ages ago...

I would recommend, creating a new custom container that knows how to draw /
redraw connection lines whenever a child component is dragged...

On Fri, Feb 27, 2009 at 6:42 PM, carlo giordano wrote:

>   Hi,
> I would connect two UIComponent like mx:Panel or flexmdi:MDIWindow
> with a line in such a way that the line continues to connect the two
> UIComponent when one or both get dragged around. Anyone has idea on
> how to implement it ?
> I try to use the Flex Wires
> library(http://code.google.com/p/flexwires/) but is not very useful to
> me because my goal is to develop a Flex based UML tool. However Flex
> Wires contains the right principles to start with my tool.
>
> Anyone have some tips suggest to me ?
>
> Thanks. Carlo.
>  
>



-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,


[flexcoders] Not able to send Data in URLRequest

2009-02-27 Thread Dharmendra Chauhan

Hi ,
   I am accessing flex application running on JBOSS server from Dot
Net Client.Everything is working fine except i am NOT able to send
data in http post.
 var variables:URLVariables = new URLVariables(); 
 variables.htmltable= convertDGToHTMLTable(dg);
 var u:URLRequest = new URLRequest("ExcelExport.jsp");
 u.data = variables; //Pass the variables
 u.method = URLRequestMethod.POST; /
   
ExcelExport.jsp  resides in same server directory where app is running 

It opens a blank excel file when I access my flex datagrid from dot
net container 

However ,I am able to pass data in http post when I run flex
application from browser.

In Nutsell , data is not being passed when application accessed from
dot net client.

Please help me to find solution of this issue.









   



[flexcoders] Re: ToolTip stay until closed

2009-02-27 Thread flexaustin
So my issue, I think, is that Puremvc keeps things in memory longer
because it keeps references to your objects.  I was removing objects
from the screen then creating new ones but the old object were getting
hung up so it was referencing old objects.  So I name my objects
object.name="someSpecificNameBasedOnItsData" in my call to removeChild
I reference the objects name, then it knows specifically which one to
remove, rather than removeChild(objectReferencedByAVar);


Thanks, Jason

--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> Alex, no they are not popups. I am building an app like google maps so
> the slider needs to remain on top and not be covered by a popup. 
> 
> I am trying to go back to creating component on screen instead of a
> popup, but getting a   DisplayObject not being removed from memory
> getting Error #2025
> 
> So I have on my main Application page 3 components:
> 
> Graph: displaylist[0]
> Menu: displaylist[1]
> vslider: displaylist[2]
> 
> I am trying to create a callout (can't use popup manager because popup
> needs to be between Graph and Menu (see above).
> 
> 
>  
> --- In flexcoders@yahoogroups.com, Alex Harui  wrote:
> >
> > Hopefully the "always on top" components are also popups.  If not,
> they should be.  Then you can use
> systemManager.popUpChildren.setChildIndex to order them
> > 
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.
> > Blog: http://blogs.adobe.com/aharui
> > 
> > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
> On Behalf Of flexaustin
> > Sent: Wednesday, February 25, 2009 7:17 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: ToolTip stay until closed
> > 
> > 
> > Ok ran into an issue. FIG Callout works great as a Popup, but the
> > issue is I have two components on the stage that need to stay on top
> > at all times. Is there a way to push the popup down 2 levels on the
> > DisplayList?
> > 
> > TIA
> > 
> > --- In
> flexcoders@yahoogroups.com,
> "flexaustin"  wrote:
> > >
> > > Yes very very nice! Thanks, for the link.
> > >
> > >
> > >
> > > --- In
> flexcoders@yahoogroups.com, "Cato
> Paus"  wrote:
> > > >
> > > > Here is a Nice one :)
> > > > http://www.adobe.com/devnet/flex/samples/fig_callout/
> > > >
> > > >
> > > >
> > > >
> > > > --- In
> flexcoders@yahoogroups.com,
> "flexaustin"  wrote:
> > > > >
> > > > > Is it possible to make a tooltip stay on until its closed?
> > Maybe put
> > > > > an "x" in the top right corner or something.
> > > > >
> > > > > I don't see any properties that allow it to remain, guessing I
> will
> > > > > need to customize it? Maybe tooltip won't let you do this at
all?
> > > > >
> > > > > TIA
> > > > >
> > > >
> > >
> >
>




[flexcoders] Re: Adding verticalaxis(es) via actionscript

2009-02-27 Thread Trefalgar Bain
--- In flexcoders@yahoogroups.com, "Amy"  wrote:
> Have you checked out this example?
> http://flexdiary.blogspot.com/2008/08/charting-example.html

I most certainly have ;)

It's where I came up with ...

var ar:AxisRenderer=new AxisRenderer();
var la:LinearAxis = new LinearAxis();
la.title = 'SCC KPI';
la.baseAtZero = false;
ar = new AxisRenderer();
ar.axis=la;
linechart1.verticalAxisRenderers.push(ar);

The example creates a new axis for each data point, not one new axis
for a specific line. I think I'll try rewriting my entire block of
code for generating the lines with what's in the example and see if I
can make heads or tails of it ... 

Tref



Re: [flexcoders] Help the Flex Team by taking our survey!

2009-02-27 Thread Matt Chotin
And tell your friends to take the survey too!


On 2/27/09 11:01 AM, "Vera Carr"  wrote:




Help the Flex team better understand who you are and what you're
working on. This information is incredibly valuable to us. Please take
20 minutes and fill out our survey:
http://www.surveymonkey.com/s.aspx?sm=vCfoIoZ0_2bLG6CTgVcntsVA_3d_3d

Thanks for your time and help!






[flexcoders] Help the Flex Team by taking our survey!

2009-02-27 Thread flex_coders
Help the Flex team better understand who you are and what you're
working on. This information is incredibly valuable to us. Please take
20 minutes and fill out our survey:
http://www.surveymonkey.com/s.aspx?sm=vCfoIoZ0_2bLG6CTgVcntsVA_3d_3d


Thanks for your time and help!



[flexcoders] Re: Adding verticalaxis(es) via actionscript

2009-02-27 Thread Amy
--- In flexcoders@yahoogroups.com, "Trefalgar Bain"  
wrote:
>
> I'm having a rough time getting data to auto-scale to multiple 
vertical
> axises. If I use a single axis, the data is graphed without a 
problem -
> all the lines show up exactly as they should. The problem I'm trying 
to
> solve is that one of the lines is ~100, while the others are less than
> 20. I'd like to get the ~100 line (I know which one it is ahead of 
time)
> on its own axis, so it doesn't skew the graph. I can add a second 
axis,
> but no matter what I try, or what examples I scrape off of, I can't 
seem
> to get the data to 'bind' to the second axis. 

Have you checked out this example?
http://flexdiary.blogspot.com/2008/08/charting-example.html



RE: [flexcoders] Re: Converting strings to numbers before sorting?

2009-02-27 Thread Gordon Smith
Yes, sorting is something that happens on entire data items ("rows"). This lets 
you handle the case where there are multiple cells in a column with the same 
value and you want to subsort them based on another column:

California   | Los Angeles
California   | San Francisco
NewYork   | NewYork

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Keith Hughitt
Sent: Friday, February 27, 2009 8:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Converting strings to numbers before sorting?


> var a:Number = obj1.number;
> var b:Number = obj2.number;

That made things much more clear.

The reason things weren't working for me was because I expected the sort
function to receive only the variable mapped to the column (i.e.
"number") and not the entire row. The above worked perfectly for me.

Thanks for the help :)

Take care,
Keith



RE: [flexcoders] Re: Define repeaters at runtime

2009-02-27 Thread Gordon Smith
So that the doc team understands... What is it that you found surprising? That 
an Array can hold anything, including references to components?

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of smitade
Sent: Thursday, February 26, 2009 9:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Define repeaters at runtime


It works - please ignore the previous post. Wow, the ability to push
components into arrays like this opens up so many possibilities -
especially when working with flex frameworks. I find it strange the
documentation doesn't highlight this feature - otherwise I missed it.
Thanks again!



[flexcoders] Re: Detecting iterations in item render

2009-02-27 Thread oneworld95
The always dependable FlexExamples.com provides a great solution:
http://blog.flexexamples.com/2008/03/06/setting-the-background-alpha-and\
-background-color-of-a-datagrid-control-in-flex/#more-546


- Alex C

--- In flexcoders@yahoogroups.com, "rob_mcmichael" 
wrote:
>
> Hello,
>
> I am trying to create an item render for an MX list component.
>
> I have overridden the set data function to customize something things,
but would like to
> alternate the background image for each row.
>
> The problem is I can't fine a property that indicated which iteration
I am on. I have had a
> search through the var debugger window, but can't see anything that I
can use.
>
> The only thing I can hack together at the moment is to put iteration
information into the
> data source, but that's not ideal.
>
> I am sure this has been done a lot before, but I can't find anything
online. Perhaps there is
> a simple way to do it I have missed, and am over engineering.
>
> Thanks
>
> Rob
>



Re: [flexcoders] Reduce the speed of a .SWF

2009-02-27 Thread Alain Thibodeau
I think you are going to want to reduce the frame rate of either your main app 
or the loaded swf..
Check the help files for frameRate, there are some examples
 
cheers
a






From: christophe_jacquelin 
To: flexcoders@yahoogroups.com
Sent: Friday, February 27, 2009 12:50:19 PM
Subject: [flexcoders] Reduce the speed of a .SWF


Hello, 

I use SWFLoader to draw a SWF movie file. But the speed of the movie
playing is too fast. How to reduce it ?

Thank you,
Christophe, 





  __
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now at
http://ca.toolbar.yahoo.com.

Re: [flexcoders] FileReference save security

2009-02-27 Thread Alain Thibodeau
haha, point taken... I could of worded it differently

Thanks for the idea. :)


 




From: Gregor Kiddie 
To: flexcoders@yahoogroups.com
Sent: Friday, February 27, 2009 9:55:13 AM
Subject: RE: [flexcoders] FileReference save security


I don’t think asking “How can I get round security” is going to garner much in 
the way of replies!
However, once the rendering is done, you can throw up a dialog saying 
“Rendering Done, Save now?” or something, and work off that user event instead.
 
Gk.
Gregor Kiddie
Senior Developer
INPS
Tel:   01382 564343
Registered address: The Bread Factory, 1a Broughton Street, LondonSW8 3QJ
Registered Number: 1788577
Registered in the UK
Visit our Internet Web site at www.inps.co. uk
The information in this internet email is confidential and is intended solely 
for the addressee. Access, copying or re-use of information in it by anyone 
else is not authorised. Any views or opinions presented are solely those of the 
author and do not necessarily represent those of INPS or any of its affiliates. 
If you are not the intended recipient please contact is.helpdesk@ inps.co.uk



From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of thibodeau.alain
Sent: 27 February 2009 14:50
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] FileReference save security
 
Hi all,

I was wondering if anyone knows of a work around for the FileReference 
save security. More specifically that it must be a user event that 
drives the save otherwise it will not do it. I am using Cairngorm and 
long story short, but the time I am done rendering the image and 
wanting to save it, the user event is long gone and I get security 
error. For now I am using the old way of sending data to a server, 
however, I would like to be able to use the FileReference. save

any ideas?

thank-you



  __
Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! 
Canada Messenger at http://ca.beta.messenger.yahoo.com/

[flexcoders] Detecting iterations in item render

2009-02-27 Thread rob_mcmichael
Hello,

I am trying to create an item render for an MX list component.

I have overridden the set data function to customize something things, but 
would like to 
alternate the background image for each row.

The problem is I can't fine a property that indicated which iteration I am on. 
I have had a 
search through the var debugger window, but can't see anything that I can use.

The only thing I can hack together at the moment is to put iteration 
information into the 
data source, but that's not ideal.

I am sure this has been done a lot before, but I can't find anything online. 
Perhaps there is 
a simple way to do it I have missed, and am over engineering.

Thanks

Rob





[flexcoders] Adding verticalaxis(es) via actionscript

2009-02-27 Thread Trefalgar Bain
I'm having a rough time getting data to auto-scale to multiple vertical
axises. If I use a single axis, the data is graphed without a problem -
all the lines show up exactly as they should. The problem I'm trying to
solve is that one of the lines is ~100, while the others are less than
20. I'd like to get the ~100 line (I know which one it is ahead of time)
on its own axis, so it doesn't skew the graph. I can add a second axis,
but no matter what I try, or what examples I scrape off of, I can't seem
to get the data to 'bind' to the second axis. var
ar:AxisRenderer=new AxisRenderer();
for ( var o:Object in event.result ) {
var ls:LineSeries = new LineSeries();
ls.dataProvider = event.result[o];
ls.yField = "counter";
ls.xField = "dtime";
ls.displayName = o.valueOf();
// Create a verticle axis for SCC
var s:String = o.valueOf();
var index:int = s.indexOf("scc");
if ( index != -1 ) {
var la:LinearAxis = new LinearAxis();
la.title = 'SCC KPI';
la.baseAtZero = false;
ls.verticalAxis = la;
ar = new AxisRenderer();
ar.axis=la;
linechart1.verticalAxisRenderers.push(ar);
} else {
//ls.verticalAxis = ar1;
}
var currentSeries:Array = linechart1.series;
currentSeries.push(ls);
linechart1.series = currentSeries;

// Create a DateTimeAxis horizontal axis.
var hAxis:DateTimeAxis = new DateTimeAxis();
hAxis.dataUnits = "minutes";
//hAxis.labelUnits = "weeks";
// Set this to false to display the leftmost label.
hAxis.alignLabelsToUnits = false;
// Take the date in its current format and create a Date
// object from it.
hAxis.parseFunction = createDate;
hAxis.labelFunction = labelParser;
linechart1.horizontalAxis = hAxis;
}

Any suggestions?

Tref

ps. As a side question, if someone can fill me in on how to get the
style on an added axis to look like the 'default' flex axis it would be
a big help as well.


[flexcoders] Re: Reading compressed file in AS 3

2009-02-27 Thread ACasualObserver
It works now.

I changed my C++ code. Instead of using gzopen, gzwrite, and gzclose
functions is zlib, I used compress2 in zlib and write the compressed
data using fopen, fwrite, and fclose. 

Thanks for all the help.



[flexcoders] Reduce the speed of a .SWF

2009-02-27 Thread christophe_jacquelin
Hello, 

I use SWFLoader to draw a SWF movie file. But the speed of the movie
playing is too fast. How to reduce it ?

Thank you,
Christophe, 



[flexcoders] FB3 Debugger issue - cannot connect

2009-02-27 Thread Scott
Ok, this is driving me nuts...  I can't think of anything else to try...

 

My debugger just stopped working one day.  I think it was after I let
the flash auto-update install flash 10 but I'm not 100% sure.

 

It seems to be tied to this one project.  In the troubleshooting I
created a new project to show me the installed flex version to see if
the debugger was there.  Indeed, it's showing 9.0.151.0.  Just for grins
I set a break point in that app and amazingly it worked.  Went back to
the original project and it was still broken.

 

I've seen that many other people have this issue as well and their
issues seemed to be focused around browser plugins.  Problem is I don't
have any plugins installed.  I also installed Mozilla to test that
theory out as well and had the same issue.

 

Just now I renamed the project folder and re-created the project then
copied the source files only into the folder and have the same issue.

 

When I launch the program in debug mode, the breakpoints or traces never
work.  When I right click and select debugger, the first time the menu
doesn't come up.  The second time I select the menu and hit connect it
says that a debugger isn't installed.

 

Has anyone run into this??

 

Thanks!

   Scott



RE: {Disarmed} [flexcoders] FB program launch wants to install 10 when I only have 9

2009-02-27 Thread Scott
Something was corrupted in the file.  I exited FB3 and renamed the folder.  
Then created a new folder with the original name and copied the source files 
only into it.  After that I opened FB3 and did a new->project and set it up the 
same as it was before.  Once I did that; the error message went away but I 
still have the debugger issue...


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Scott
Sent: Friday, February 27, 2009 10:42 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] FB program launch wants to install 10 when I 
only have 9

I've been working on an issue where my debugger stopped working.
(although I can create a new application and the debugger works just
fine within the new app) I was thinking this problem appeared around the
time I installed Flash 10. So I used the adobe remove flash program and
re-installed Flex Builder 3 forcing version 9 of the player/debugger to
be installed again.

Now when I run the app I was creating it comes up and says this program
requires adobe flash 10 is installed, do you want to install it now?

When I look at my main.html I see this:

//
--
-
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 151;
//
--
-

And I don't see any references to version 10 of flash. Where is this
coming from? I also verified the properties are set to version 9.0.151
in FB3.

Thanks!
Scott



[flexcoders] Re: Reading compressed file in AS 3

2009-02-27 Thread ACasualObserver
I tried it in AIR with no success. I used both DEFLATE and ZLIB
arguments. To test, I created a SVG string (instead of plain XML) in
my code and used the same function to compress it. Adobe SVG viewer
could display it so the compression part is fine.

Is there any open source compression C/C++ Windows library which can
compress in such a way that ByteArray:uncompress can uncompress?

Thanks

--- In flexcoders@yahoogroups.com, David Adams  wrote:
>
> On Fri, Feb 27, 2009 at 12:42 PM, ACasualObserver  wrote:
> > Jim,
> >
> > I am using the zlib in a C program.
> 
> Just as an experiment, have you tried putting the code into an AIR
> application where you can specify a wider range of decompression
> methods? I'm struggling with the same error you've described using a
> zlib compressor. I've found that I _can_ decompress the ByteArray in
> an AIR app with code like the following, where ba contains my zipped
> data:
> 
> ba.uncompress(CompressionAlgorithm.DEFLATE)
> 
> I actually find this a bit confusing as my understanding is that Flex
> handles deflate...so I'm unclear what I'm doing/not doing in Flex that
> makes the compression fail. I've really got the same code - apart from
> the CompressionAlgorithm argument. Anyway, it's something else for you
> to try...not that I know what the results mean ;-) Perhaps someone
> else can offer a suggestion as to what this particular finding means.
> (I'm new to Flex.)
> 
> For background, what I'm trying to experiment with is compressing XML
> on the server-side and decompressing it on the client-side to see if I
> can improve performance. If anyone has thoughts or suggestions on this
> topic, I'm all ears. (AMF is not supported on the server I'm using, so
> AMF-over-HTTP is not an option.)
> 
> 
> 
> -
>  David Adams
>  dpad...@...
>  AU: (02) 6493-3250
>  US: 831 621-4585
>  Wallaga Lake 2546 NSW
> -
>




[flexcoders] Re: form validation pop-up migrain

2009-02-27 Thread wakouaq
Fixed !
the solution was to stop further propagation of the event
(event.stopPropagation) when entering the OnButtonClickEventHandler
function.


--- In flexcoders@yahoogroups.com, "wakouaq"  wrote:
>
> Hello everyone,
> 
> I've been running into a pretty disturbing problem for the last few
days.
> 
> I am updating a login module so that it can handle user registration
> and password retrieval. 
> 
> I have various messages displayed depending on what the user did ( e.g
> : the password is incorrect ). And they all correctly appear IN FRONT
> of my login module.
> 
> When the user clicks on the submit button, a validation function is
> called to check if the fields have all correctly been filled and if
> not, a pop up message is displayed telling the user that he didn't
> fill correctly all the fields.
> So here comes my problem : this particular pop-up is displayed BEHIND
> my login module.
> 
> My guess would be that for some reason, the focus is given back to the
> login module, sending the pop-up behind it as fast as lightning. 
> 
> 
> Does anyone have any suggestion on how to fix this issue ? 
> 
> I can provide more detailled info if you wish, like bits of code.
>




[flexcoders] Question about how to draw a line connecting two UIComponent

2009-02-27 Thread carlo giordano
Hi,
I would connect two UIComponent like mx:Panel or flexmdi:MDIWindow
with a line in such a way that the line continues to connect the two
UIComponent when one or both get dragged around. Anyone has idea on
how to implement it ?
I try to use the Flex Wires
library(http://code.google.com/p/flexwires/) but is not very useful to
me because my goal is to develop a Flex based UML tool. However Flex
Wires contains the right principles to start with my tool.

Anyone have some tips suggest to me ?

Thanks. Carlo.


[flexcoders] Re: Converting strings to numbers before sorting?

2009-02-27 Thread Keith Hughitt
>  var a:Number = obj1.number;
>  var b:Number = obj2.number;

That made things much more clear.

The reason things weren't working for me was because I expected the sort
function to receive only the variable mapped to the column (i.e.
"number") and not the entire row. The above worked perfectly for me.

Thanks for the help :)

Take care,
Keith




[flexcoders] Re: MaskedTextInput

2009-02-27 Thread markgoldin_2000
Well, it only works for me when I run it from Builder.
Here is my code:
...
);
  document.tasktracking.focus();
  } else {  // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed 
here. '
+ 'This content requires the Adobe Flash Player. '
+ 'http://www.adobe.com/go/getflash/>Get Flash';
document.write(alternateContent);  // insert non-flash content
  }


I have set stage as well.
--- In flexcoders@yahoogroups.com, "huu...@..."  wrote:
>
> This *is* possible.
> 
> In your html-template directory, locate the index.template.html 
file.
>  In the file, locate these lines of code (should be around Lines
> 90-thru-100, assuming you haven't modified this file):
> 
> == CODE ===
>   } else {  // flash is too old or we can't detect the plugin
> var alternateContent = 'Alternate HTML content should be placed
> here. '
> == /CODE ==
> 
> Immediately before the line with the " } else {", add the following:
> 
> == CODE ===
>   document.THE_NAME_OF_YOUR_MAIN_MXML_FILE.focus();
> == /CODE ===
> 
> In your main MXML file, add the following to the creationComplete
> attribute:
> 
> == CODE ===
> stage.focus = YOUR_MASKED_INPUT;
> == /CODE ===
> 
> That should do it.  Your users won't be forced to click in the 
browser
> to begin typing.
> 
> --- In flexcoders@yahoogroups.com, "markgoldin_2000"
>  wrote:
> >
> > I am trying to implement that control into my application.
> > When an application starts I want to have a control that is based 
on 
> > MaskedTextInput seleted. So, in my init I am saying:
> > badgeid.setFocus();
> > badgeid would get its border highlighted but a mouse pointer will 
not 
> > be inside of MaskedTextInput and to start entering data the user 
has to 
> > click on badgeid. Is it possible to position mouse pointer into 
the 
> > MaskedTextInput text input control without licking on it?
> > 
> > Thanks
> >
>




[flexcoders] FB program launch wants to install 10 when I only have 9

2009-02-27 Thread Scott
I've been working on an issue where my debugger stopped working.
(although I can create a new application and the debugger works just
fine within the new app) I was thinking this problem appeared around the
time I installed Flash 10.  So I used the adobe remove flash program and
re-installed Flex Builder 3 forcing version 9 of the player/debugger to
be installed again.

Now when I run the app I was creating it comes up and says this program
requires adobe flash 10 is installed, do you want to install it now?

When I look at my main.html I see this:

//

-
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 151;
//

-

And I don't see any references to version 10 of flash.  Where is this
coming from?  I also verified the properties are set to version 9.0.151
in FB3.

Thanks!
   Scott


Re: [flexcoders] Add a video in a Flex Project Directory

2009-02-27 Thread Jeffry Houser

 Unless I misunderstood the question, you were not asking for a code 
related question, correct?

 I would just click and drag it from my OS into the Eclipse directory 
structure. 
 Or do it at the operating system level w/o involving eclipse at all.


christophe_jacquelin wrote:
> Hello, 
>
> How to add a video file in a directory of a flex project ? 
> I have tested the function Import/Artwork but it is not running.
>
> What is the procedure ?
>
> Thank you,
> Christophe, 
>
>   


-- 
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust




[flexcoders] Preventing HSlider from moving forward

2009-02-27 Thread Daman Dogra
Hi All,

I have this requirement in a project where I need to block a slider 
from moving forward after it reaches a certain value. The user should 
still be able to move the slider backwards though.

I could disbale the slider however, that wouldn't work because then 
user can't move it backwards either.

ANy help would be greatly appreciated.

Thanks
-Daman



[flexcoders] Tooltips don't scale to match content

2009-02-27 Thread Tom Chiverton
I've just logged http://bugs.adobe.com/jira/browse/SDK-19580 against the fact 
that if I scale my whole application, tool tips do not scale with it.

Anyone fancy thowing some votes behind the idea of fixing that ?
-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
“partner” to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

[flexcoders] Add a video in a Flex Project Directory

2009-02-27 Thread christophe_jacquelin
Hello, 

How to add a video file in a directory of a flex project ? 
I have tested the function Import/Artwork but it is not running.

What is the procedure ?

Thank you,
Christophe, 



[flexcoders] Adding new class definition to TEAFlexCustom.xml file

2009-02-27 Thread Andriy Panas
Hi all,

This is the question which is related to automated testing with HP
QuickTest 9.5 and Flash application built on top of Adobe Flex 3.2
SDK.

For example, I had created a new class that extends from HBox, say ExtendedHBox.

--
public class ExtendedHBox extends HBox
{
public function ExtendedHBox()
{
super();
dispatchEvent(new Event("customEvent"));
}

}
--

This class dispatches custom event that I would like to instrument,
typed as "customEvent".

In order to do so, I am adding to the class definition file for QTP
called "TEAFlex.xml file" a new entry titled "ExtendedHBox":



My question is

   Why should I specify again all instrumented events for parent HBox
component like flash.events.MouseEvent.CLICK and
flash.events.FocusEvent.KEY_FOCUS_CHANGE in newly added entry
 declaration for
QTP class definition file.

--
Testing to the metal (mental?),
JabbyPanda


[flexcoders] VideoDisplay

2009-02-27 Thread christophe_jacquelin
Hello, 

VideoDiplay is not displaying the video. I have try .mp4, .flv, .avi
and .swf files. I have a black square. 

Could you send me the minimum basic code to display a video ? 

Thank you,
Christophe,



Re: [flexcoders] Image Control inside custom component only shows sporadically

2009-02-27 Thread Jeffry Houser

 Try invalidating the display list in commitProperties to refresh the 
image component, something like this:

if (__sponsorPathChanged)
{
__sponsorImg.source = __sponsorPath;
__sponsorImg.addEventListener(Event.COMPLETE, 
__onSponsorImgLoadComplete);
__sponsorPathChanged = false;
invalidateDisplayList(); 
}



 You may have to invalidateSize also, but I'm unclear on that one. 

adamduro wrote:
> I'm extending a Panel component in Actionscript and adding an Image
> control to the titleBar.
>
> My problem is that for some god-forsaken reason, the image loads, but
> does not display, except for every once and a while. That's right,
> sometimes the image displays, sometimes it does not.
>
> I have it setup, properly overriding the nessisary methods. You can
> see an example of the code here:
>
> http://pastie.org/401744
>
> The above example shows the MXML component that instantiates the
> custom Panel. The image source is fed in via the 'sponsor' property.
>
> Any help is appreciated.
>
> Adam Duro
>
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location: 
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>
>   

-- 
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust




[flexcoders] flex datagrid problem

2009-02-27 Thread Gökhan
Hi,

i have a problem with datagrid when i try to show large amount of money values 
in datagrid.The problem occurs if the value bigger than 9 digits.
for ex:  i have value 25.000.000.000 but it seems -769803776 in datagrid. type 
of money value is Number on flex side and BigDecimal on java side.

thanks in advance.

Gokhan. 



  

RE: [flexcoders] FileReference save security

2009-02-27 Thread Gregor Kiddie
I don't think asking "How can I get round security" is going to garner
much in the way of replies!

However, once the rendering is done, you can throw up a dialog saying
"Rendering Done, Save now?" or something, and work off that user event
instead.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
http://www.inps.co.uk/> 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of thibodeau.alain
Sent: 27 February 2009 14:50
To: flexcoders@yahoogroups.com
Subject: [flexcoders] FileReference save security

 

Hi all,

I was wondering if anyone knows of a work around for the FileReference 
save security. More specifically that it must be a user event that 
drives the save otherwise it will not do it. I am using Cairngorm and 
long story short, but the time I am done rendering the image and 
wanting to save it, the user event is long gone and I get security 
error. For now I am using the old way of sending data to a server, 
however, I would like to be able to use the FileReference.save

any ideas?

thank-you





[flexcoders] FileReference save security

2009-02-27 Thread thibodeau.alain
Hi all,

I was wondering if anyone knows of a work around for the FileReference 
save security. More specifically that it must be a user event that 
drives the save otherwise it will not do it. I am using Cairngorm and 
long story short, but the time I am done rendering the image and 
wanting to save it, the user event is long gone and I get security 
error. For now I am using the old way of sending data to a server, 
however, I would like to be able to use the FileReference.save

any ideas?

thank-you



Re: [flexcoders] Re: image snapshot in flex

2009-02-27 Thread Anggie Bratadinata
I've never had any problems sending base64-encoded images to a server
(PHP). Could it be a server issue that you had?
-- 
Anggie Bratadinata | www.masputih.com | Indonesia

On Fri, Feb 27, 2009 at 6:44 PM, Rob Kunkle  wrote:

> i've had a lot of trouble trying to send jpeg to a server with base64
> encoding. It seems that flash only allows the first four bytes of the
> byte array to be sent when it is a jpeg.
>
> Anyone else come across this issue? I'd like to not base64
> encoded/decode if possible.
>
>
>
>
>
> --- In flexcoders@yahoogroups.com, "netdeep"  wrote:
> >
> >
> > Can the data not be passed simply as a ByteArray instead of a base64
> string?  This is from
> > the Adobe documentation for URLRequest:
> >
> >
> > -
> > data  property
> > An object containing data to be transmitted with the URL request.
> >
> > This property is used with the method property. In Adobe AIR, data
> is sent when any HTTP
> > method other than GET is used. In Flash Player, data is set when the
> POST HTTP method is
> > used.
> >
> > The URLRequest API offers binary POST support and support for
> URL-encoded variables,
> > as well as support for strings. The data object can be a ByteArray,
> URLVariables, or String
> > object.
> >
> > The way in which the data is used depends on the type of object used:
> >
> > If the object is a ByteArray object, the binary data of the
> ByteArray object is used as POST
> > data. For GET, data of ByteArray type is not supported.
> >
> > ---
> >
> > My problem is that I am also deficient in my experience with
> servlets and don't know how
> > to decode a byte array there, but this is how I send the byte array
> >
> >
> > var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(component);
> > var imageByteArray:ByteArray = imageSnap.data as ByteArray;
> > var request:URLRequest = new URLRequest(imgServURL);
> >   request.data =
> imageByteArray;
> >   request.method =
> URLRequestMethod.POST;
> >   navigateToURL(request);
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --- In flexcoders@yahoogroups.com, leds usop  wrote:
> > >
> > > without remoting, and using string param only, encode the image as
> jpeg or png
> > (depending on your requirement) . then convert it to base64 string
> which you can pass to
> > the serlvet via post (or get, whatever) . Then decode at the backend
> accordingly as a jpeg
> > file or png file which is you can make available to the user. This
> is not the fastest solution
> > performance-wise but it does get the job done expecially for snapshots.
> > >
> > > --- On Thu, 6/26/08, netdeep  wrote:
> > > From: netdeep 
> > > Subject: [flexcoders] image snapshot in flex
> > > To: flexcoders@yahoogroups.com
> > > Date: Thursday, June 26, 2008, 12:47 AM
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > I'd like to add a button so the user can snapshot a
> graph in my flex app.  I can do
> > this storing
> > >
> > > it on the server with Java, but I'd like for the user to have
> direct access to it.  Since I
> > don't
> > >
> > > think this can be done for instance saving to the desktop, I
> thought the next best
> > solution
> > >
> > > would be to send the image to say a new browser window, possibly
> via a servlet?  But
> > I'm not
> > >
> > > sure how to do this or if this is the best solution.  Any ideas or
> examples of how this
> > should
> > >
> > > be done?  Here is a little snippet of the method I use to encode
> the image into a
> > byteArray:
> > >
> > >
> > >
> > > private function saveImage(e: ImageUpdateEvent ):void {
> > >
> > > var comp:UIComponent = e.comp;
> > >
> > > var imageSnap:ImageSnap shot = ImageSnapshot.
> captureImage( comp);
> > >
> > > var imageByteArray: ByteArray = imageSnap.data as
> ByteArray;
> > >
> > > imgSave.saveImage( imageByteArray, e.name+"-img.
> png");
> > >
> > > }
> > >
> >
>
>
>
>


[flexcoders] Re: Reading compressed file in AS 3

2009-02-27 Thread bhaq1972
> For background, what I'm trying to experiment with is compressing 
> XML on the server-side and decompressing it on the client-side to 
> see if I can improve performance. If anyone has thoughts or 
> suggestions on this topic, I'm all ears. (AMF is not supported on 
> the server I'm using, so AMF-over-HTTP is not an option.)

if your interested, i've compressed an xml string in flex like this

var byteData:ByteArray = new ByteArray();
byteData.writeUTFBytes("");
byteData.position = 0;
byteData.compress();

Then passed this ByteArray to a c# webservice, where i uncompressed it 
(using sharpziplib library) like this.

// Unzip (c# code) - myBytes are the compressed bytes from flex 
byte[] writeData = new byte[4096];
Stream inStream = new InflaterInputStream(new MemoryStream(myBytes));
while (true)
{
   iSize = inStream.Read(writeData, 0, writeData.Length);
   if (iSize == 0)
   {
 break;
   }
stringXML += System.Text.Encoding.ASCII.GetString(writeData, 0, 
iSize);
}





Re: [flexcoders] Dynamic Advanced Datagrid

2009-02-27 Thread Ashish Verma
May be helpful to you

http://prosameer.googlepages.com/MasterGrid.html

Best,
Ashish
On Fri, Feb 27, 2009 at 7:22 PM, Adrian Williams
wrote:

>   Venkat,
>
> More details about what you want to do would help elicit a better
> response.
>
> Adrian
>
> venkat eswar wrote:
>
>How to do Dynamic tree inside advanced datagrid
>
>  
>


Re: [flexcoders] accessing flex functions from outside an app

2009-02-27 Thread Ashish Verma
You can take advantage of following things

1. navigateToURL() - fro calling javascript function from Flex check browser
comptability
2. flash.netExternalInterface - with call () and callable () to call
function flex to javascript and vis versa
3. FA Bridge - Flez AJAX bridge : wraped ExternalInterface to provide
simplicity to call function from flex java JS and JS to flex.


Best,
Ashish

On Fri, Feb 27, 2009 at 3:42 PM, el_koose  wrote:

>   hi guys,
>
> i'm fairly new to flex but ok with my as3. have built an app with all
> functionality enclosed but in the real life version part of the nav
> will not be flex, perhaps HTML. What, if any, are the best ways to
> trigger state changes and functions from outside a flex app? is this
> possible?
>
> i have looked around for answers but it seems to be a fuzzy thing to
> search for.
>
> hope you can help,
>
> el_koose
>
> 
>


[flexcoders] Re: Converting strings to numbers before sorting?

2009-02-27 Thread valdhor
This works for me:


http://www.adobe.com/2006/mxml";>
 
 
 

 
 
 
 
 




--- In flexcoders@yahoogroups.com, "Keith Hughitt" 
wrote:
>
> Hi all,
>
> I have a problem related to sorting type-casted numeric data, and was
> wondering if someone could help me out:
>
> Given some numeric data stored as strings ("11.5"), how can I populate
> it into a DataGrid and have it sort properly?
>
> From the Flex API docs
>
 taGridColumn.html#sortCompareFunction>  it appears that when you use a
> labelFunction instead of a dataField to specify what should be
displayed
> in a column, that the output of the label function is what is then
used
> for sorting:
>
> "If you specify a value of the labelFunction property,   you must
> also provide a function to the sortCompareFunction property,
> unless sorting is not allowed on this column."
>
> So my first attempt was to simply cast the strings to numbers within
the
> label function and hope that the default sorters would still be
> available:
>
> private function testLabel2(item:Object, col:DataGridColumn):Number {
>  return parseFloat(item.string);
> }
> ... I also tried using "Number(item.string)", however, neither worked
so
> I went to manually specifying the sort compare function:
>
>  public function sortAsIs(obj1:Object, obj2:Object):int {
>  if (obj1 < obj2)
>  return -1;
>  else if (obj1 == obj2)
>  return 0;
>  else
>  return 1;
>  }
>
> This didn't do the trick either. So finally, I decided to try doing
the
> conversion in the sortCompareFunction, just in case it was comparing
the
> original data fields and not the output of the label function. Again
no
> luck.
>
> Anyone have any suggestions? Any help would be greatly appreciated.
>
> Here is the full code for the test case I am describing:
>
> 
> http://www.adobe.com/2006/mxml";>
>  
>  
>  
>
>  
>  
>  
>  
>   labelFunction="testLabel1" sortCompareFunction="sortAsIs"/>
>  
>   labelFunction="testLabel1" sortCompareFunction="sortAfterCasting"/>
>   labelFunction="testLabel2" sortCompareFunction="sortAfterCasting"/>
>  
>  
> 
>
>
> Thanks!
> Keith
>



Re: [flexcoders] SWF in a Panel

2009-02-27 Thread Ashish Verma
And also if you want to access properties of Panel from the SWF use
parentApplication. from SWF file

On Fri, Feb 27, 2009 at 3:38 PM, christophe_jacquelin <
christophe_jacque...@yahoo.fr> wrote:

>   Hello,
>
> How to draw an existing SWF file into a Panel ?
>
> Thank you,
> Christophe,
>
> 
>


[flexcoders] Re: accessing flex functions from outside an app

2009-02-27 Thread el_koose
ok will do thanks! is the bread factory like the custard factory i
wonder? :)

thanks for taking the time to reply. 

e_k

--- In flexcoders@yahoogroups.com, "Gregor Kiddie"  wrote:
>
> Read up on ExternalInterface.
> 
> You can expose functions to the outside using it.
> 
>  
> 
> Gk.
> 
> Gregor Kiddie
> Senior Developer
> INPS
> 
> Tel:   01382 564343
> 
> Registered address: The Bread Factory, 1a Broughton Street, London SW8
> 3QJ
> 
> Registered Number: 1788577
> 
> Registered in the UK
> 
> Visit our Internet Web site at www.inps.co.uk
> http://www.inps.co.uk/> 
> 
> The information in this internet email is confidential and is intended
> solely for the addressee. Access, copying or re-use of information in it
> by anyone else is not authorised. Any views or opinions presented are
> solely those of the author and do not necessarily represent those of
> INPS or any of its affiliates. If you are not the intended recipient
> please contact is.helpd...@...
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of el_koose
> Sent: 27 February 2009 10:12
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] accessing flex functions from outside an app
> 
>  
> 
> hi guys, 
> 
> i'm fairly new to flex but ok with my as3. have built an app with all
> functionality enclosed but in the real life version part of the nav
> will not be flex, perhaps HTML. What, if any, are the best ways to
> trigger state changes and functions from outside a flex app? is this
> possible?
> 
> i have looked around for answers but it seems to be a fuzzy thing to
> search for. 
> 
> hope you can help,
> 
> el_koose
>




Re: [flexcoders] Dynamic Advanced Datagrid

2009-02-27 Thread Adrian Williams

Venkat,

   More details about what you want to do would help elicit a better 
response.


Adrian

venkat eswar wrote:


How to do Dynamic tree inside advanced datagrid





Re: [flexcoders] SWF in a Panel

2009-02-27 Thread Adrian Williams

Hi Christophe,

   var swf:swfLoader = new swfLoader();
   swf.source = //location of your swf file
   panel.addChild(swf);

HTH,
Adrain

christophe_jacquelin wrote:


Hello,

How to draw an existing SWF file into a Panel ?

Thank you,
Christophe,




[flexcoders]

2009-02-27 Thread A chuva imóvel - Campos de Carvalho
HI everyone,

A trickly problem is tricking my head. That's about the DataPush feature of
BlazeDS, but I think the problem is in the Flex Side.

Below there's a little piece of code:

http://www.adobe.com/2006/mxml"; width="400"
height="314"
   showCloseButton="true" close="PopUpManager.removePopUp(this)"
title="Monitoramento Sintético de Workflow"
   creationComplete="init()">

   private function init():void{
   var message:AsyncMessage = new
AsyncMessage();
   message.body = "new";
   producer.send(message);
   consumer.subscribe();
   }

   private function onMsg(event:MessageEvent):void{
   synteticTileList.dataProvider =
event.message.body as ArrayCollection;
   }

   private function ack(event:MessageEvent):void{
   synteticTileList.dataProvider =
event.message.body as ArrayCollection;
   }


Another piece of code:

   
   

When I create that window I receive the following error:

Destination 'WorkflowServicePush' either does not exist or the
destination has no channels defined (and the application does not
define any default channels.)']

What's wrong?

Thanks!


RE: [flexcoders] Question: Strategies for compiling individual modules into SWCs

2009-02-27 Thread Gregor Kiddie
"-- Is this what ANT is for?"

 

Yeah, once you get into more complicated compilation scenarios, ANT is
the way to go.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
http://www.inps.co.uk/> 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of David Adams
Sent: 27 February 2009 03:24
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Question: Strategies for compiling individual
modules into SWCs

 

I'm new to Flex so apologies in advance for what is probably a basic
question. I've been working on a code generator that spits out
MXML/ActionScript files and dumps them into a directory. For
simplicities sake, imagine that I'm dumping out three MXML files and
the goal is to produce an individual SWC for each. Is there any way to
do this using FlexBuilder short of creating an individual library
project for each module? I'd prefer to have a single project for all
of my generated modules yet have each compiled individually. At a
guess:

-- Is this not really possible?
-- Is there some kind of compiler setting or project property I can
exploit?
-- Is this the sort of thing where I should update my code generator
to interact with the command-line compiler instead of messing with
FlexBuilder? (I'd rather not go this route, honestly.)
-- Is this what ANT is for?

Any strategies or suggestions welcome. And, if I've stated my
question/problem poorly, I'll be happy to try and clarify.

Thanks in advance for any help,

-
David Adams
Wallaga Lake 2546 NSW
-





RE: [flexcoders] accessing flex functions from outside an app

2009-02-27 Thread Gregor Kiddie
Read up on ExternalInterface.

You can expose functions to the outside using it.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
http://www.inps.co.uk/> 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of el_koose
Sent: 27 February 2009 10:12
To: flexcoders@yahoogroups.com
Subject: [flexcoders] accessing flex functions from outside an app

 

hi guys, 

i'm fairly new to flex but ok with my as3. have built an app with all
functionality enclosed but in the real life version part of the nav
will not be flex, perhaps HTML. What, if any, are the best ways to
trigger state changes and functions from outside a flex app? is this
possible?

i have looked around for answers but it seems to be a fuzzy thing to
search for. 

hope you can help,

el_koose





Re: [flexcoders] Re: Reading compressed file in AS 3

2009-02-27 Thread David Adams
On Fri, Feb 27, 2009 at 12:42 PM, ACasualObserver  wrote:
> Jim,
>
> I am using the zlib in a C program.

Just as an experiment, have you tried putting the code into an AIR
application where you can specify a wider range of decompression
methods? I'm struggling with the same error you've described using a
zlib compressor. I've found that I _can_ decompress the ByteArray in
an AIR app with code like the following, where ba contains my zipped
data:

ba.uncompress(CompressionAlgorithm.DEFLATE)

I actually find this a bit confusing as my understanding is that Flex
handles deflate...so I'm unclear what I'm doing/not doing in Flex that
makes the compression fail. I've really got the same code - apart from
the CompressionAlgorithm argument. Anyway, it's something else for you
to try...not that I know what the results mean ;-) Perhaps someone
else can offer a suggestion as to what this particular finding means.
(I'm new to Flex.)

For background, what I'm trying to experiment with is compressing XML
on the server-side and decompressing it on the client-side to see if I
can improve performance. If anyone has thoughts or suggestions on this
topic, I'm all ears. (AMF is not supported on the server I'm using, so
AMF-over-HTTP is not an option.)



-
 David Adams
 dpad...@gmail.com
 AU: (02) 6493-3250
 US: 831 621-4585
 Wallaga Lake 2546 NSW
-


Re: [flexcoders] Re: Define repeaters at runtime

2009-02-27 Thread subeesh a
If you are adding the images to some container , you can get it as

var ImageArray:Array = yourContainer.getChildren();

Subeesh
http://subeesh.co.nr


[flexcoders] Image Control inside custom component only shows sporadically

2009-02-27 Thread adamduro
I'm extending a Panel component in Actionscript and adding an Image
control to the titleBar.

My problem is that for some god-forsaken reason, the image loads, but
does not display, except for every once and a while. That's right,
sometimes the image displays, sometimes it does not.

I have it setup, properly overriding the nessisary methods. You can
see an example of the code here:

http://pastie.org/401744

The above example shows the MXML component that instantiates the
custom Panel. The image source is fed in via the 'sponsor' property.

Any help is appreciated.

Adam Duro



[flexcoders] Re: Finding size of a DropShadowFilter (or other BitmapFilters)

2009-02-27 Thread flexpants
--- In flexcoders@yahoogroups.com, "dave_defusion" 
wrote:
>
> I'm trying to determine the width of pixels that the DropShadowFilter
> is adding to my component when I'm trying to save the BitmapData
> (including the drop shadow) - is there some easy to get that or would
> I have to calculate it myself based on the filters settings (angle,
> blur, etc.)
>

Did you ever get a solution to this? I'd be interested in finding out
if you did.

Thanks.



[flexcoders] accessing flex functions from outside an app

2009-02-27 Thread el_koose
hi guys, 

i'm fairly new to flex but ok with my as3. have built an app with all
functionality enclosed but in the real life version part of the nav
will not be flex, perhaps HTML. What, if any, are the best ways to
trigger state changes and functions from outside a flex app? is this
possible?

i have looked around for answers but it seems to be a fuzzy thing to
search for. 

hope you can help,

el_koose



[flexcoders] Question: Strategies for compiling individual modules into SWCs

2009-02-27 Thread David Adams
I'm new to Flex so apologies in advance for what is probably a basic
question. I've been working on a code generator that spits out
MXML/ActionScript files and dumps them into a directory. For
simplicities sake, imagine that I'm dumping out three MXML files and
the goal is to produce an individual SWC for each. Is there any way to
do this using FlexBuilder short of creating an individual library
project for each module? I'd prefer to have a single project for all
of my generated modules yet have each compiled individually. At a
guess:

-- Is this not really possible?
-- Is there some kind of compiler setting or project property I can exploit?
-- Is this the sort of thing where I should update my code generator
to interact with the command-line compiler instead of messing with
FlexBuilder? (I'd rather not go this route, honestly.)
-- Is this what ANT is for?

Any strategies or suggestions welcome. And, if I've stated my
question/problem poorly, I'll be happy to try and clarify.

Thanks in advance for any help,


-
 David Adams
 Wallaga Lake 2546 NSW
-


Re: [flexcoders] Hie

2009-02-27 Thread claudiu ursica
My on the fly thought on this would be have an item renderer for the repeater 
(eve though I'd go with a List for performance reasons), to override the data 
setter in your item renderer and check there if the value is valid leave the 
text alone or put it black and red if invalid. }>



This above code shows me all in black as I have not applied this empStatus to 
format. So how to do that?



Thankx and Regards

Vik
Founder
www.sakshum. com
www.sakshum. blogspot. com

   


  

[flexcoders] Re: image snapshot in flex

2009-02-27 Thread Rob Kunkle
i've had a lot of trouble trying to send jpeg to a server with base64
encoding. It seems that flash only allows the first four bytes of the
byte array to be sent when it is a jpeg. 

Anyone else come across this issue? I'd like to not base64
encoded/decode if possible.





--- In flexcoders@yahoogroups.com, "netdeep"  wrote:
>
> 
> Can the data not be passed simply as a ByteArray instead of a base64
string?  This is from 
> the Adobe documentation for URLRequest:
> 
> 
> -
> data  property 
> An object containing data to be transmitted with the URL request.
> 
> This property is used with the method property. In Adobe AIR, data
is sent when any HTTP 
> method other than GET is used. In Flash Player, data is set when the
POST HTTP method is 
> used.
> 
> The URLRequest API offers binary POST support and support for
URL-encoded variables, 
> as well as support for strings. The data object can be a ByteArray,
URLVariables, or String 
> object.
> 
> The way in which the data is used depends on the type of object used:
> 
> If the object is a ByteArray object, the binary data of the
ByteArray object is used as POST 
> data. For GET, data of ByteArray type is not supported.
> 
> ---
> 
> My problem is that I am also deficient in my experience with
servlets and don't know how 
> to decode a byte array there, but this is how I send the byte array
> 
> 
> var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(component);
> var imageByteArray:ByteArray = imageSnap.data as ByteArray;
> var request:URLRequest = new URLRequest(imgServURL);
>   request.data = imageByteArray;
>   request.method = 
> URLRequestMethod.POST;
>   navigateToURL(request);
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, leds usop  wrote:
> >
> > without remoting, and using string param only, encode the image as
jpeg or png 
> (depending on your requirement) . then convert it to base64 string
which you can pass to 
> the serlvet via post (or get, whatever) . Then decode at the backend
accordingly as a jpeg 
> file or png file which is you can make available to the user. This
is not the fastest solution 
> performance-wise but it does get the job done expecially for snapshots. 
> > 
> > --- On Thu, 6/26/08, netdeep  wrote:
> > From: netdeep 
> > Subject: [flexcoders] image snapshot in flex
> > To: flexcoders@yahoogroups.com
> > Date: Thursday, June 26, 2008, 12:47 AM
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > I'd like to add a button so the user can snapshot a
graph in my flex app.  I can do 
> this storing 
> > 
> > it on the server with Java, but I'd like for the user to have
direct access to it.  Since I 
> don't 
> > 
> > think this can be done for instance saving to the desktop, I
thought the next best 
> solution 
> > 
> > would be to send the image to say a new browser window, possibly
via a servlet?  But 
> I'm not 
> > 
> > sure how to do this or if this is the best solution.  Any ideas or
examples of how this 
> should 
> > 
> > be done?  Here is a little snippet of the method I use to encode
the image into a 
> byteArray:
> > 
> > 
> > 
> > private function saveImage(e: ImageUpdateEvent ):void {
> > 
> > var comp:UIComponent = e.comp; 
> > 
> > var imageSnap:ImageSnap shot = ImageSnapshot.
captureImage( comp);
> > 
> > var imageByteArray: ByteArray = imageSnap.data as
ByteArray;
> > 
> > imgSave.saveImage( imageByteArray, e.name+"-img.
png");
> > 
> > }
> >
>




[flexcoders] Re: show and createComplate event?

2009-02-27 Thread Tim Hoff

Me too, same as less.  Why no show when creation is complete?  I guess
it because verbs don't like verbs.

-TH

--- In flexcoders@yahoogroups.com, "markflex2007" 
wrote:
>
> My question is why the "show" event never be fired.
>
> Thanks
>





[flexcoders] Data Management Service: affecting several tables

2009-02-27 Thread k.sigiscar

Hello,

This is an architectural question.

We have a project where we have a process that uses EJB3 to
insert/update/delete to several tables at once when it receives data
from the client. But right now, we use Remote Object to trigger that
process. I would like to use an Assembler to use the Data Management
Service instead.

We have two JBoss servers, one for the front end and one for the back
end. The front end server holds the lightweight version of the
entities returned to Flex. The back end server holds the heavyweight
entities that are reflected in the database.

Is it possible to use the Data Management Service and affect several
tables at once ?

Regards,
Karl Sigiscar.




Re: [flexcoders] Re: Cursor Error: Bookmark no longer valid.

2009-02-27 Thread Rico Leuthold

Hi Luke,

I couldn't find any solution to this, but found a workaround.

Just filter the underlying ArrayCollection, set it as source for the  
grouping collection and refresh the collection.


ac.filterFunction = theFilterFunc;
gc.source = ac;
gc.refresh();
adg.expandAll();

This works for me.

_rico

On 25.02.2009, at 03:25, luke_lee1124 wrote:


Error: Bookmark no longer valid.
at
ListCollectionViewCursor/seek()[E:\dev\3.1.0\frameworks\projects 
\framework\src\m\

x\collections\ListCollectionView.as:2055]
at
mx.collections::HierarchicalCollectionViewCursor/ 
collectionChangeHandler()[C:\wo\
rk\flex\dmv_automation\projects\datavisualisation\src\mx\collections 
\Hierarchica\

lCollectionViewCursor.as:1116]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.collections::HierarchicalCollectionView/ 
nestedCollectionChangeHandler()[C:\wo\
rk\flex\dmv_automation\projects\datavisualisation\src\mx\collections 
\Hierarchica\

lCollectionView.as:1199]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.collections::ListCollectionView/dispatchEvent()[E:\dev 
\3.1.0\frameworks\proje\

cts\framework\src\mx\collections\ListCollectionView.as:833]
at
mx.collections::ListCollectionView/addItemsToView()[E:\dev 
\3.1.0\frameworks\proj\

ects\framework\src\mx\collections\ListCollectionView.as:931]
at
mx.collections::ListCollectionView/listChangeHandler()[E:\dev 
\3.1.0\frameworks\p\

rojects\framework\src\mx\collections\ListCollectionView.as:1051]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.collections::ArrayList/internalDispatchEvent()[E:\dev 
\3.1.0\frameworks\projec\

ts\framework\src\mx\collections\ArrayList.as:510]
at
mx.collections::ArrayList/addItemAt()[E:\dev\3.1.0\frameworks 
\projects\framework\

\src\mx\collections\ArrayList.as:311]
at
mx.collections::ListCollectionView/addItemAt()[E:\dev 
\3.1.0\frameworks\projects\\

framework\src\mx\collections\ListCollectionView.as:501]
at
components.section_page_manager::section_page_add_form/addPage()[D: 
\xampp\htdocs\
\flex\survey_builder_v3\src\components\section_page_manager 
\section_page_add_for\

m.mxml:206]
at
components.section_page_manager::section_page_add_form/doSave()[D: 
\xampp\htdocs\\
flex\survey_builder_v3\src\components\section_page_manager 
\section_page_add_form\

.mxml:93]
at
components.section_page_manager::section_page_editor/ 
__btnSave_click()[D:\xampp\\
htdocs\flex\survey_builder_v3\src\components\section_page_manager 
\section_page_e\

ditor.mxml:94]







[flexcoders] SWF in a Panel

2009-02-27 Thread christophe_jacquelin
Hello, 

How to draw an existing SWF file into a Panel ?

Thank you,
Christophe, 



[flexcoders] Hie

2009-02-27 Thread Vik
Hie
My xml is like this:


guan completing 9 years in 6 months and 5 days.
INVALID


kumar completing 4 years in 11 months and 18 days.
VALID


kies completing 4 years in 11 months and 26 days.
INVALID


roy completing 4 years in 11 months and 26 days.
VALID


I want to show it in my vbox as text boxes like

guan completing 9 years in 6 months and 5 days.
kumar completing 4 years in 11 months and 18 days.
kies completing 4 years in 11 months and 26 days.
roy completing 4 years in 11 months and 26 days.

Please note color is red for those whose empStatus in INVALID.

currently my code is like:
}>



This above code shows me all in black as I have not applied this empStatus
to format. So how to do that?




Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com


[flexcoders] Re: ToggleButtonBar xml based dataProvider (2)

2009-02-27 Thread bhaq1972
most definately, just loop thru the dataprovider during the 
ToggleButtonBar's initialize or creationComplete event and set 
each button's icon.

-- In flexcoders@yahoogroups.com, "markgoldin_2000" 
 wrote:
>
> Yeah, I see it now too.
> Do think it's possible to set an icon for a button at run time?
> 
> --- In flexcoders@yahoogroups.com, "bhaq1972"  wrote:
> >
> > i'm no expert but i'd suggest not using XML as the 
> > dataprovideronly because of what the docs say and looking at 
> the 
> > code prior to line 378 in NavBar.as
> > 
> > I modified your dataprovider to look like this
> > 
> > 
> >  
> >   
> > etc..
> >  
> > 
> > 
> > And it works fine.
> > 
> > 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "markgoldin_2000" 
> >  wrote:
> > >
> > > Still can't understand why the following does not work:
> > > code:
> > >  > > iconField="icon" 
> > >   horizontalGap="5" itemClick="clickHandler
> > > (event);" labelField="label"
> > >   creationComplete="floorLinesData();" 
> > >   height="100%" fontSize="8" fontWeight="bold"/>
> > > 
> > > data:
> > > 
> > >   
> > > 4
> > > G2
> > > true
> > > 
> > "@Embed('D:/projects/sfcs/assets/status_online.png')"
> > >   
> > >   
> > > 
> > > 
> > > code:
> > > floorlines.dataProvider = resultXML.lines;
> > > 
> > > error:
> > > Error: ERROR: The dataProvider of 'floorlines' must not contain 
> > > objects of type flash.display.DisplayObject.
> > >   at mx.controls::NavBar/set dataProvider()[C:\autobuild\3.2.0
> > > \frameworks\projects\framework\src\mx\controls\NavBar.as:378]
> > >   at tasktracking/floorLinesShowData()
> > > [D:\projects\sfcs\tasktracking\src\tasktracking.mxml:107]
> > >   at modulecode::Classes/httpResult()
> > > [D:\projects\sfcs\UFDCommonLib\src\modulecode\Classes.as:62]
> > >   at flash.events::EventDispatcher/dispatchEventFunction()
> > >   at flash.events::EventDispatcher/dispatchEvent()
> > >   at 
> > > 
> > 
> 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::di
> > > spatchRpcEvent()[C:\autobuild\3.2.0
> > > \frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170]
> > >   at 
> > > 
> > 
> 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::re
> > > sultHandler()[C:\autobuild\3.2.0
> > > \frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:193]
> > >   at mx.rpc::Responder/result()[C:\autobuild\3.2.0
> > > \frameworks\projects\rpc\src\mx\rpc\Responder.as:43]
> > >   at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0
> > > \frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
> > >   at DirectHTTPMessageResponder/completeHandler()
> > > [C:\autobuild\3.2.0
> > > 
> > 
> 
\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.a
> > > s:403]
> > >   at flash.events::EventDispatcher/dispatchEventFunction()
> > >   at flash.events::EventDispatcher/dispatchEvent()
> > >   at flash.net::URLLoader/onComplete()
> > > 
> > > Thanks
> > >
> >
>





Re: [flexcoders] Re: flash.events and flash.net library don't exist in Flex SDK 3.3.0.4852 ??

2009-02-27 Thread Tom Chiverton
On Thursday 26 Feb 2009, handitan wrote:
> Yikes!!!
> Man, I really hope that this is just a mistake and it will be fixed
> soon.

I don't see any evidence it's broken.
Simple test case code, example mxmlc invocation and version dump, etc.

-- 
Tom Chiverton
Helping to autoschediastically expedite best-of-breed bleeding-edge m-commerce



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

RE: [flexcoders] Re: parentDocument variables

2009-02-27 Thread Johan Öbrink
A bit short maybe J

 

I would suggest looking into some frame work like Cairngorm or MVC. The issue 
is not HOW to address parentDoument but WHY you shouldn't.

 

/Johan

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: den 24 februari 2009 23:28
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: parentDocument variables

 

Me personally?  Probably never.

 

Alex Harui

Flex SDK Developer

Adobe Systems Inc.  

Blog: http://blogs.adobe.com/aharui

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of oneworld95
Sent: Tuesday, February 24, 2009 10:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: parentDocument variables

 

Thanks, Alex. When would you use a custom event to connect the main
Application with an itemRenderer component?

- Alex C

--- In flexcoders@yahoogroups.com  , Alex 
Harui  wrote:
>
> parentDocument should be ready to go in your data setter. Test it
like this.
> 
> override public function set data(value:Object):void
> {
> trace(parentDocument);
> }
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com   
> [mailto:flexcoders@yahoogroups.com  ]
On Behalf Of oneworld95
> Sent: Tuesday, February 24, 2009 9:05 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: parentDocument variables
> 
> 
> By the way, if there's a better way to do it, please let me know.
> Thanks :)
> 
> - Alex C
> 
> --- In
flexcoders@yahoogroups.com  
,
"oneworld95"  wrote:
> >
> > Awhile back, someone on this group mentioned that a good way for a
> > component inside an itemRenderer to access variables in the
> > parentDocument was to use custom events. I've found some info on
> > custom events, but can't quite wrap my brains around how this would
> > work with the itemRenderer's set data() function, where the
> > parentDocument variable needs to be accessed. Your help is much
> > appreciated.
> >
> > - Alex C
> >
>