Re: [flexcoders] Re: PrintJob & print dialog box

2008-06-11 Thread Frederico Garcia
You must handle page range by yourself... meaning? you don't send to the 
printjob what you don't want printed. Take a look at the way we did it 
with flexreport (http://www.kemelyon.com/flexreport/0_2rc1/). More info 
on the blog (http://www.kemelyon.com/bts).

Kind Regards,

Frederico Garcia
Dmitri Girski escreveu:
> AFAIK, you can't do this.
> Also, FlexPrintJob does not have page support. I'd say more  - it does
> not support printing at all except some trivial one page layouts.
>
> Cheers,
> Dmitri.
>
> http://mitek.id.au/whingingpom
>
>
> --- In flexcoders@yahoogroups.com, Yochikoh Haruomi
> <[EMAIL PROTECTED]> wrote:
>   
>> Dear list,
>>
>> I'm using PrintJob object to print multiple pages .
>> When the print dialog ( on pc)  opens, under Page Range, the Current
>> 
> Page and Pages radio buttons are greyed out.
>   
>> Is there a way to enable them so that users can specify what page to
>> 
> print directly from this print dialog box?
>   
>> Any suggestion is appreciated,
>> Thanks!
>>
>> 
>
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>
> __ NOD32 3179 (20080611) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   



Re: [flexcoders] word highlighting

2008-05-22 Thread Frederico Garcia
ibo escreveu:
> Have anyone worked on something like this before? What I want is to 
> highlight the word by changing the background color of each keyword 
> from a sentence/paragraph.
>
> Here is my code so far:
>
>   private function applyTextHighlight(textField:UIComponent, 
> listOfWordPositions:Array):void {
>var textArea:TextArea = TextArea(textField);
>var tr:TextRange = new TextRange(textArea);
>   
>tr.htmlText = textArea["htmlText"];
>   
>for (var i:int=0; i {   
>   var metaWord:WordPositions = listOfWordPositions[i];
>   tr.beginIndex = metaWord.startIndex;
>   tr.endIndex = metaWord.endIndex;
>   tr.htmlText = formattedText(tr.text, 
> metaWord.color);  
>  //tr["color"] = metaWord.color;
>  //tr["fontWeight"] = "bold";
>  //tr["fontSize"] = 12;
>} 
>   }
>  
> private function formattedText(text:String, color:uint):String {
> return "" + 
> text + "";   
> }
>
>
> TextRange seems to be very limited on how much you can format your 
> html text so I'm not surprised it doesnt really fully support HTML. 
> Any workaround to get a similar behavior?
> Changing the text color, size and weight works though (see commented 
> out lines).
>
> -Stephen
>
> 
>
> __ NOD32 3118 (20080521) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
hi,

have you tried the highlighter from flexlib? take a look at:

http://flexlib.googlecode.com/svn/trunk/examples/Highlighter/Highlighter_Sample.swf

kind regards,

Frederico Garcia


Re: [flexcoders] Re: a simple question of BitmapData

2008-05-17 Thread Frederico Garcia
flexawesome escreveu:
> thanks for reply,
>
> but I don't know how to use in my file, any example?
>
> thanks
>
> --- In flexcoders@yahoogroups.com, Frederico Garcia <[EMAIL PROTECTED]> 
> wrote:
>   
>> flexawesome escreveu:
>> 
>>> Hi there,
>>>
>>> do you know how can I use it to duplicate the image? It seems 
>>>   
> doesn't 
>   
>>> work. any ideas?
>>>
>>> Thank you
>>>
>>> loader = new SWFLoader();
>>> loader.addEventListener(Event.COMPLETE, Bitmapdata) 
>>>   
>   
>   
>>> 
>>> loader.source 
>>>   
> = "http://us.i1.yimg.com/us.yimg.com/i/us/nt/ma/ma_tech-
>   
>>> grp_1.gif"
>>> //addChild(loader);
>>>
>>>
>>> private function oBitmapdata(e:Event):void
>>> {
>>> 
>>> var img:Image = new Image();
>>> var data:BitmapData = Bitmap(loader.content).bitmapData;
>>> var bitmap:Bitmap = new Bitmap(data);
>>> 
>>> img.addChild(bitmap)
>>> 
>>> addChild(img);
>>>
>>> }
>>>
>>>
>>> 
>>>
>>> --
>>> Flexcoders Mailing List
>>> FAQ: 
>>>   
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>   
>>> Search Archives: http://www.mail-archive.com/flexcoders%
>>>   
> 40yahoogroups.comYahoo! Groups Links
>   
>>>
>>>
>>> __ NOD32 3106 (20080516) Information __
>>>
>>> This message was checked by NOD32 antivirus system.
>>> http://www.eset.com
>>>
>>>
>>>
>>>   
>>>   
>> Hi,
>>
>> you can use this method:
>>
>> public static function clone(value:ByteArray):ByteArray {
>> var myBA:ByteArray = new ByteArray();
>> myBA.writeObject(value);
>> myBA.position = 0;
>>
>> return myBA.readObject();
>> }
>>
>> kind regards,
>>
>> Frederico Garcia
>>
>> 
>
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>
> __ NOD32 3106 (20080516) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Sorry, there's an easier way. BitmapData already implements clone(). 
Here's an example from the Flex Language Reference:

import flash.display.Bitmap;
import flash.display.BitmapData;

var bmd1:BitmapData = new BitmapData(100, 80, false, 0x);
var bmd2:BitmapData = bmd1.clone();

bmd1.setPixel32(1, 1, 0x);

trace(bmd1.getPixel32(1, 1).toString(16)); // 
trace(bmd2.getPixel32(1, 1).toString(16)); // ff00

var bm1:Bitmap = new Bitmap(bmd1);
this.addChild(bm1);

var bm2:Bitmap = new Bitmap(bmd2);
bm2.x = 110;

this.addChild(bm2);


Hope this helps you.

Frederico Garcia


Re: [flexcoders] a simple question of BitmapData

2008-05-17 Thread Frederico Garcia
flexawesome escreveu:
> Hi there,
>
> do you know how can I use it to duplicate the image? It seems doesn't 
> work. any ideas?
>
> Thank you
>
> loader = new SWFLoader();
> loader.addEventListener(Event.COMPLETE, Bitmapdata)   
>   
> loader.source = "http://us.i1.yimg.com/us.yimg.com/i/us/nt/ma/ma_tech-
> grp_1.gif"
> //addChild(loader);
>
>
> private function oBitmapdata(e:Event):void
> {
>   
>   var img:Image = new Image();
>   var data:BitmapData = Bitmap(loader.content).bitmapData;
>   var bitmap:Bitmap = new Bitmap(data);
>   
>   img.addChild(bitmap)
>   
>   addChild(img);
>
> }
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>
> __ NOD32 3106 (20080516) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi,

you can use this method:

public static function clone(value:ByteArray):ByteArray {
var myBA:ByteArray = new ByteArray();
    myBA.writeObject(value);
myBA.position = 0;
   
return myBA.readObject();
}

kind regards,

Frederico Garcia


Re: [flexcoders] Re: FlexPrintJob: print image AND text [SOLVED]

2008-05-08 Thread Frederico Garcia
Hi,

I forgot posting that I'd found the reason to my problems. After some 
hours struggling with my code trying to understand why sometimes images 
got printed and sometimes they didn't I've found that the issue was in 
Flash Player (got to the same bug report you mention).

I believe the only solution is make users  update Flash.

Kind Regards,

Frederico Garcia

toofah_gm escreveu:
> It seems that I am seeing the same problems described in this bug:
>
> http://bugs.adobe.com/jira/browse/SDK-7698
>
> I am using the latest FlashPlayer: 9,0,115.
>
> --- In flexcoders@yahoogroups.com, Frederico Garcia <[EMAIL PROTECTED]>
> wrote:
>   
>> mitek17 escreveu:
>> 
>>> Hi Frederico,
>>>
>>> printAsBitmap is not related to the problem, as images/charts/whatever
>>> simply don't have enough time to be rendered.
>>>
>>> You should add event listeners to all your images/charts and wait for
>>> the creationComplete & updateComplete events.
>>>
>>> Cheers,
>>> Dmitri.
>>>
>>>
>>>  
>>>
>>> --- In flexcoders@yahoogroups.com, Frederico Garcia 
>>> wrote:
>>>   
>>>   
>>>> Hi,
>>>>
>>>> I'm trying to print Image and Text, and I want the text to be
>>>> 
> clear, so 
>   
>>>> I set printAsBitmap = false. The problem is, sometimes it prints the 
>>>> images, sometimes it doesn't.
>>>>
>>>> Any help?
>>>>
>>>> Regards,
>>>>
>>>> Frederico Garcia
>>>>
>>>> 
>>>> 
>>>
>>>
>>> --
>>> Flexcoders Mailing List
>>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>>> Search Archives:
>>>   
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
>   
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>> __ NOD32 2787 (20080112) Information __
>>>
>>> This message was checked by NOD32 antivirus system.
>>> http://www.eset.com
>>>
>>>
>>>
>>>   
>>>   
>> Hi,
>>
>> This was due to a player bug. Updating to version 9.0.r115 solved the 
>> problem.
>>
>> http://bugs.adobe.com/jira/browse/SDK-7698
>>
>> Regards,
>>
>> Frederico Garcia
>>
>> 
>
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>
> __ NOD32 3085 (20080508) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   



Re: [flexcoders] Re: FlexPrintJob not printing multiple formatted lines successf

2008-05-08 Thread Frederico Garcia
Hi,

Have you tried iterate through each visible line (you can know how many 
lines are visible from verticalScrollPosition) and sum all heights? I've 
been using this method and it's the only reliable way I've found to 
measure the text height.

Also, as John said, you can only make this work with embedded fonts. 
Flash doesn't render text for printing the same way it renders for 
screen (unless the fonts are embedded) and the calculations used the 
screen render, that's why lines get cut off.

You might want to take a look at PrintTextArea which does what you want. 
You can find it here:

http://code.google.com/p/flexreport/source/browse/trunk/flexreport/org/print/PrintTextArea.mxml

Hope this helps,

Frederico Garcia

toofah_gm escreveu:
> I am seeing the same problem...I am using embedded fonts and turning
> anti-aliasing off...the last line of text is often cut off.
>
> --- In flexcoders@yahoogroups.com, John Mark Hawley <[EMAIL PROTECTED]> wrote:
>   
>> In order for Flash to know how much room it needs to print an
>> 
> autosized text field, the font must be embedded. There's no way 'round
> it. The _height of an autosized text field without embedded fonts will
> not be correct (for printing).
>   
>> 
>>> From: "scott_flex" <[EMAIL PROTECTED]>
>>> Date: 2007/05/01 Tue AM 08:19:08 CDT
>>> To: flexcoders@yahoogroups.com
>>> Subject: [flexcoders] Re: FlexPrintJob not printing multiple
>>>   
> formatted lines successfully
>   
>>> Geneva, Tahoma and Verdana are 3 problematic fonts i have isolated to 
>>> not print correctly.  I never get the last line of text to print.
>>>
>>> These 3 fonts are installed on my pc.
>>>
>>> The height of my text area is not set, it grows with the amount of 
>>> html text and this has worked very well.  Always showing all text on 
>>> screen but these 3 fonts never want to print the last line.
>>>
>>> However, for these 3 fonts if I set the height of my text control to 
>>> 2 pixels larger that what it would normally grow to when the height 
>>> is not set, everything prints out ok... but I can't set the height of 
>>> my text controls because I don't know ahead of time how much text 
>>> they will contain.
>>>
>>> At this time i plan to remove these 3 fonts from my selection list. 
>>> It's odd since these are pretty common fonts.
>>>
>>> Maybe i need to embed the fonts in the app itself, probably the 
>>> safest since other users may not have the same font list as I but 
>>> that's why i was sticking with common fonts.
>>>
>>> Any other insight would be helpful
>>>
>>> --Scott
>>>
>>>
>>>
>>>
>>> --- In flexcoders@yahoogroups.com, "scott_flex"  wrote:
>>>   
>>>> Well i have determined that it really doesn't matter what font 
>>>> family or size it is it just won't print the last line even 
>>>> though all lines appear on screen with no scroll bars.
>>>>
>>>> The html text of my mx:text object is:
>>>> >>> SIZE="12" COLOR="#00" LETTERSPACING="0" KERNING="0">When i try 
>>>> 
>>> to 
>>>   
>>>> print this text from a mx:text control and the text wraps to more 
>>>> than one line, the last line will not print.  It just prints a 
>>>> 
>>> white 
>>>   
>>>> blank line intstead.  My mx:text component is set to 400 width 
>>>> 
>>> which 
>>>   
>>>> is inside a grid item which inside a grid row which is inside  
>>>> 
>>> mx:gid 
>>>   
>>>> object.
>>>>
>>>> The width of my mx:text object is set to 400... and even though the 
>>>> first few lines print they don't line break exactly as they do on 
>>>> screen... just thought that was odd but probably has something to 
>>>> 
>>> do 
>>>   
>>>> with the scaling when it prints.  I just want it to print the last 
>>>> line.
>>>>
>>>>
>>>> Any help would be greatly appreciated... i'm desperate for ideas of 
>>>> what might be the issue.
>>>>
>>>> --Scott
>>>>
>>>>
>>>> --- In flexcoders@yahoogroups.com, "scott_flex"  wrote:
>>>>   

Re: [flexcoders] Re: printAsBitmap true vs. false

2008-04-26 Thread Frederico Garcia
Just another annoyance from the "not so great" Flash printing API. 
You're not missing anything, you actually have to choose between vector 
text or transparency. printAsBitmap=false can also give some unpleasant 
surprises since in some versions of Flash Player images just don't show 
at all.
For FlexReport the choice was obvious... Reports are mostly text, and 
it's not a big deal not being able to use transparent backgrounds. If 
you really need transparency you'll have to live with crappy text.
By the way, why do you need the transparency... there are some 
workarounds you can try (such as getting a imagesnapshot of the 
container holding the image)

Kind Regards,

Frederico Garcia

Dmitri Girski escreveu:
> And? 
>
> It sets printAsBitmap = false.
> So what? It does not answer the question.
>
>
>
> --- In flexcoders@yahoogroups.com, "nathanpdaniel" <[EMAIL PROTECTED]> wrote:
>   
>> Have you looked into FlexReport?  http://code.google.com/p/flexreport
>>
>> --- In flexcoders@yahoogroups.com, "toofah_gm"  wrote:
>> 
>>> I am working on printing for my application.  It seems that if I
>>> choose raster printing by setting 'printAsBitmap=true' then my text
>>> looks terrible, but my images with transparency print correctly.
>>>
>>> If I choose vector printing by setting 'printAsBitmap=false' then my
>>> text looks great...even with very very small fonts, but the
>>> transparency on my images turns completely BLACK, which is totally
>>> unacceptable.
>>>
>>> Am I missing something here that could give me the best of both
>>> worlds?  I hate to be forced to offer two printing options, both of
>>> which are not very good.  It is also not an option for us to give 
>>>   
>> the
>> 
>>> user a PDF or JPEG.
>>>
>>> Thanks!
>>>
>>>   
>
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>
> __ NOD32 3056 (20080426) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   



Re: [flexcoders] Re: Looking for a website . . .

2008-04-18 Thread Frederico Garcia
Nate Pearson escreveu:
> I'm not sure if this is the one you were looking for but it's pretty dope.
>
> http://www.alex-uhlmann.de/flash/adobe/blog/distortionEffects/effectCube/
>
>
> --- In flexcoders@yahoogroups.com, "srieger_1" <[EMAIL PROTECTED]> wrote:
>   
>> Hi All,
>>
>> I found a website that had an example of a Flex application that
>> displayed a form with data. If you clicked on a field it would rotate
>> and give the user an editable field. When you stepped off the field it
>> would rotate back to read mode.
>>
>> Does anyone know about this site and where I can find it again?
>>
>> Thanks so much for any help you can provide!!!
>>
>> 
>
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>
> __ NOD32 3038 (20080418) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
I believe you're asking about IPEControls by Ely Greenfield.

http://demo.quietlyscheming.com/IPE/index.html

http://demo.quietlyscheming.com/IPE/srcview/index.html

Kind Regards,

Frederico Garcia


Re: [flexcoders] Re: How do I print in Flex?

2008-03-26 Thread Frederico Garcia
Paul Andrews escreveu:
> - Original Message - 
> From: "coolz22in" <[EMAIL PROTECTED]>
> To: 
> Sent: Wednesday, March 26, 2008 6:42 AM
> Subject: [flexcoders] Re: How do I print in Flex?
>
>
>   
>> Hi,
>>
>> I want to print only the data and not the UI.
>> But the FlexPrintJob.addObject() method takes only the UIComponent to
>> print.
>> 
>
> You can add a datagrid to the print job and style it as you wish to try and 
> get the correct appearance. Alternatively you could loop throught your data 
> adding individual fields to the print job.
>
> Flex printing is dissappointingly primitive, based on a bitmap render.
>
> Paul
>
>   
>> Thanks in advance.
>>
>> ~ Sundar ~
>>
>> --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>> 
>>> FlexPrintJob
>>>
>>>
>>>
>>> 
>>>
>>> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
>>> Behalf Of coolz22in
>>> Sent: Tuesday, March 25, 2008 10:35 PM
>>> To: flexcoders@yahoogroups.com
>>> Subject: [flexcoders] How do I print in Flex?
>>>
>>>
>>>
>>> Hi,
>>> I want to print some data obtained from data grid & text input from
>>> flex. How can I print data which i wanted in flex? What are the API's
>>> available for printing?
>>>
>>> Thanks.
>>>
>>> ~ Sundar ~
>>>
>>>   
>>
>> 
>>
>> --
>> Flexcoders Mailing List
>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>> Search Archives: 
>> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
>> Links
>>
>>
>>
>>
>> 
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>
> __ NOD32 2974 (20080326) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi,

As Paul said the Flash printing API is rather primitive but there are 
only a few limitations we can't overcome (being selecting printer one of 
them).
You can take a look at FlexReport at http://www.kemelyon.com/bts It's a 
small framework to make the usage of the Flash printing API a bit easier.

If you feel FlexReport isn't what you need here are some resources which 
might help you getting into printing in Flex.

http://flexrays.wordpress.com/2007/08/08/printing-datagrid-in-flex/
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=1965.html
http://livedocs.adobe.com/flex/2/langref/flash/printing/PrintJob.html

Kind Regards,

Frederico Garcia


Re: [flexcoders] Flex 3 can save chart as image

2008-03-06 Thread Frederico Garcia
Josh McDonald escreveu:
> That can't be done from Flex unfortunately due to security 
> restrictions on the Flash player. You'll need some sort of server-side 
> support for that.
>
> -J
>
> On Fri, Mar 7, 2008 at 10:27 AM, coder3 <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>
> is there a sample to download chart?
>
> C
>
>
>
> coder3 wrote:
> >
> > Hi,
> >
> > I have heard that you can save the chart as image in flex3, with
> some
> > built-in features, is that true?
> >
> > or is it pretty easy to do in flex2 too? how?
> >
> > -C
> >
>
> -- 
> View this message in context:
> 
> http://www.nabble.com/Flex-3-can-save-chart-as-image-tp15885511p15885520.html
>
>
> Sent from the FlexCoders mailing list archive at Nabble.com
> <http://Nabble.com>.
>
>
>
>
> -- 
> "Therefore, send not to know For whom the bell tolls, It tolls for thee."
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
> 
>
> __ NOD32 2928 (20080306) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Hi,

Actually it's possible =)

http://dougmccune.com/blog/2007/06/03/save-a-snapshot-image-of-a-flex-app-without-a-server/

And, what you probably heard of similar to "save the chart as image in 
flex3" is the new ImageSnapshot. From the same blog:

http://dougmccune.com/blog/2007/06/11/imagesnapshot-class-in-flex-3-sdk/

Hope this helps,

Frederico Garcia


Re: [flexcoders] Is there any way to use customized RemoteObject in mxml with ?

2008-02-07 Thread Frederico Garcia
Which RemoteObject are you extending? mx.rpc.remoting.RemoteObject or 
mx.rpc.remoting.mxml.RemoteObject? Try extending the latter.

Regards,

Frederico Garcia
den.orlov escreveu:
> I wrote RemoteObject's sublcass that contains functionality common 
> for all my appp's RemoteObjects:
>
> public dynamic class MyRemoteObject extends RemoteObject {
>
> public function MyRemoteObject()
> {
> super();
> this.showBusyCursor = true;
> this.requestTimeout=10;
>
> addEventListener(FaultEvent.FAULT, onFault);
> }
>
> ...
> }
>
> When I use it in my mxml files:
>
> 
> 
> 
>
> compiler can't recognize mx:method tag. Is there any way to 
> workaround this?
>
> Den
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2854 (20080206) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   



Re: [flexcoders] Printing very long textarea

2008-01-23 Thread Frederico Garcia
Rabib escreveu:
> Hi !
>
> Thanks for your posts. It's been a long long time that I am looking for a
> good solution to this similar problem: create a printVbox component, that
> could print html text or whatever else on multiple pages without line
> cutting... exactly like the FlexPrintDatagrid Component.
> Printing text is the first step, and the most difficult one. Thanks for
> that.
>
> Your solution I working properly, except the line duplication beetween two
> pages. 
>
> Frederico, You are talking about the reset() method. Can you explain it a
> bit more clearly. How can we use it in the PrintTextArea component ?
>
> I keep going from my side. If I find something interesting, I will share it.
>
> Thanks very much again.
>
> Ju
>
>
> Frederico Garcia wrote:
>   
>> Otto escreveu:
>> 
>>> --- In flexcoders@yahoogroups.com, Frederico Garcia <[EMAIL PROTECTED]> 
>>> wrote:
>>>   
>>>   
>>>> I'm making a PrintTextArea component wich is basically a TextArea 
>>>> 
>>>> 
>>> with 
>>>   
>>>   
>>>> simillar behaviour to PrintDatagrid. Still has some bugs, so I'll 
>>>> 
>>>> 
>>> repost 
>>>   
>>>   
>>>> has soon has I corrected them.
>>>>
>>>> Read the documentation on PrintDatagrid to learn how to use this.
>>>>
>>>> By the way, if someone has corrections or suggestions on this 
>>>> 
>>>> 
>>> please let 
>>>   
>>>   
>>>> me know.
>>>> 
>>>> 
>>> Hi Frederico,
>>>
>>> that's very useful. While waiting for your solution which sounds like 
>>> a more proper way if doing things I'll try to hack something together 
>>> for my app with the help of numLines and getLineMetrics.
>>>
>>> thanks,
>>> Otto
>>>
>>>
>>>
>>> --
>>> Flexcoders Mailing List
>>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>>> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>> __ NOD32 2769 (20080107) Information __
>>>
>>> This message was checked by NOD32 antivirus system.
>>> http://www.eset.com
>>>
>>>
>>>
>>>   
>>>   
>> You can use PrintTextArea as is. The bugs are related to screen display 
>> and the reset() method (for printing twice the same PrintTextArea)
>> missing.
>>
>> Regards,
>>
>> Frederico Garcia
>>
>>
>> 
>
>   
Hi,

I've released PrintTextArea included in FlexReport. You can see a demo 
(with sources) at www.kemelyon.com/bts
To use PrintTextArea you have to do nextPage() while validNextPage. When 
you finish printing you will be at the last page. If you want to print 
again you need to tell PrintTextArea to go again to the first page. This 
is done using reset().
Let me know if yu have any problems.

Regards,

Frederico Garcia


Re: [flexcoders] Re: Text shift during printing

2008-01-23 Thread Frederico Garcia
Muhammad Ahmed Ullah escreveu:
> Thanks for the response, but I'm already using validateNow().
> I think that in any case the browser windows scroll should not have
> any impact on flex application.
>
> Regards,
> Ahmed
>
> --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>   
>> You might need to call validateNow() before adding the page
>>
>>  
>>
>> 
>>
>> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
>> Behalf Of Muhammad Ahmed Ullah
>> Sent: Tuesday, January 22, 2008 6:11 AM
>> To: flexcoders@yahoogroups.com
>> Subject: [flexcoders] Text shift during printing
>>
>>  
>>
>> Hi,
>>
>> On a canvas derived class, I have few controls.
>> Before taking this canvas object's print, If move the scrollbars of
>> the browser window, then all the text, displayed over controls,
>> appears shifted in the print, but appears fine in the view. 
>>
>> Any comments?
>>
>> Regards,
>> Ahmed
>>
>> 
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2816 (20080123) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
It only happens when you move the scrollbars? Otherwise it could be 
related to aliasing (with antialias what you see isn't what you print).

Regards,

Frederico Garcia


[flexcoders] FlexReport Beta - Public Release

2008-01-21 Thread Frederico Garcia
I'm releasing the first beta of FlexReport, a client-side open source 
(LGPL) report generation library for Flex. You can see a demo (and 
sources) at www.kemelyon.com/bts

Hope you find FlexReport useful and contribute with any improvements you 
make.

Regards,

Frederico Garcia


Re: [flexcoders] How i can change the style of TextArea ScrollBar

2008-01-17 Thread Frederico Garcia
NileAge, Mail escreveu:
>
> Hello All,
>
>  
>
> *I want to change the TextArea style and remove the upper and down 
> arrows.*
>
>  
>
> Plz reply me.
>
> 
>
> __ NOD32 2799 (20080116) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Hi,

Before posting questions you should see if anyone has asked them (or 
related) before.

http://www.nabble.com/Scrollbar-Thumb-turn-off-stretch--td11168854.html#a11168854

Here you have exactly the solution for you question (remove arrows).

As I replied in your previous question, check the documentation on 
programmatic skinning:

http://www.adobe.com/devnet/flex/quickstart/skinning_components/

In the doc's they show how to create a borderSkin in actionscript and 
apply it in mxml. Combine the two examples (instead of a border you have 
to create thumbDownSkin, thumbOverSkin, thumbUpSkin and trackSkin) and 
you have your scrollbar with no arrows and changed width.

If you read my previous answer and googled "flex programmatic skin" you 
would already know this. Please don't expect people to always give you 
ready to use code.

Regards,

Frederico Garcia




Re: [flexcoders] Print Preview in Flex

2008-01-17 Thread Frederico Garcia
jitendra jain escreveu:
> Hi Everybody,
>
>How can we show print preview in Flex? Before printing , i want the 
> user to see print preview of the printing document.
>
>   Thanks,
>
> with regards,
> JJain
>
> 
> Looking for last minute shopping deals? Find them fast with Yahoo! 
> Search. 
> <http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
>  
> 
>
> __ NOD32 2799 (20080116) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Hi,

Flex does not provide any way of doing print preview. You can see a demo 
of FlexReport http://www.kemelyon.com/flexreport/
I will make this project public during the next days.

Regards,

Frederico Garcia



Re: [flexcoders] Re: Application protection

2008-01-17 Thread Frederico Garcia
t;> based service, having a logon to a remote server will help since
>>>> 
> it will 
>   
>>>> at
>>>> lease make them 'call home'. Is this the only way to protect Flex
>>>> applications?
>>>>
>>>> Presumably the only way to really protect an AIR App is to make
>>>> 
> it 'call
>   
>>>> home' too? If the calling home feature became disabled, it would
>>>> 
> leave 
>   
>>>> the
>>>> AIR app prone to missappropriation.
>>>>
>>>> Finally, potentially some of the data involved will be sensitive. It
>>>> doesn't
>>>> have to be sent to the client, but would be good if it was. That
>>>> 
> would 
>   
>>>> then
>>>> raise the spectre of data confidentiality on a remote server.
>>>>
>>>> My usual experience is with corporate intranets or websites where
>>>> piracy/security isn't a big issue (at least not my specific problem).
>>>>
>>>> So any advice on security issues surrounding Flex/Air apps would be 
>>>> welcome
>>>> before I finalise my architecture.
>>>>
>>>> Paul
>>>>
>>>> 
>>>
>>> --
>>> Flexcoders Mailing List
>>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>>> Search Archives:
>>>   
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
>   
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>   
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2781 (20080110) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi, there's a post by Ted Patrick at onflex.org which might help

http://www.onflex.org/ted/2008/01/loaderload-vs-loaderloadbytes.php

Regards,

Frederico Garcia


Re: [flexcoders] Re: Move effect

2008-01-17 Thread Frederico Garcia

Sherif Abdou escreveu:
I am not sure but you can have the x={this.unscledWidth} so that will 
always update and do what you want. I think.


- Original Message 
From: jovialrandor <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, January 16, 2008 11:48:56 PM
Subject: [flexcoders] Re: Move effect

how does the 'component.width+ Application. application. 
unscaledWidth' work? 

i do not know the screen resolution, so i would like it so I do not 
need to speciy an exact x,y coordinate.  


eg.

if screen size is 1028x768 or 1600x1200, the component should move off 
the screen.


take a look at this image description of what I'm trying to do.

http://thedarkcity. ws/transition. gif 
<http://thedarkcity.ws/transition.gif>


let me know if i need to further clarify.

thanks


--- In [EMAIL PROTECTED] ups.com <http://ups.com/>, Sherif Abdou 
<[EMAIL PROTECTED] .> wrote:

>
> you could just use i guess (component.width+ Application. 
application. unscaledWidth) and that should take it off the screen, i 
have no idea what the apple Ipod menu does so...

>
>
> - Original Message 
> From: jovialrandor jovialrandor@ ...
> To: [EMAIL PROTECTED] ups.com <http://ups.com/>
> Sent: Wednesday, January 16, 2008 4:20:04 PM
> Subject: [flexcoders] Re: Move effect
>
> What I am trying to accomplish is the Apple Ipod menu for Flex: Sliding
> out/in menues.
>
> --- In [EMAIL PROTECTED] ups.com <http://ups.com/>, "jovialrandor" 


> wrote:
> >
> > How can I specify any Flex component to move out of the screen if i
> do
> > not know the screen resoluction of the end user beforehand?
> >
> > Is there some Move value like '-1' that indicates to move out of any
> > size screen?
> >
> >
> > Thanks
> >
>
>
>
>
>
>  _ _ _ _ _ 
_ _ _

> Never miss a thing. Make Yahoo your home page.
> http://www.yahoo. com/r/hs
>




Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try 
it now. 
<http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20> 



__ NOD32 2799 (20080116) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com
What do you need the screen resolution for? Unless you could make sure 
the app is always fullscreen (wich you can't) the screen resolution 
would almost always be different from the application size.


What matters to you is the application size. And you can easily get that 
value (as Sherif said, component.width+Application.application.width).


Then you just have to trigger a Move effect (by AS or transition):


  
  
  xFrom="{component.x}" 
xTo="{component.width+Application.application.width}"}/> 
  

  

  
  xFrom="{component.x}" xTo="{0}"}/>

  




Now, you need to make sure the component gets off the screen AND it 
stays there if the application is resized. There are a few ways to do 
that, I'll tell you how to do it with Binding.


First, the Binding only should be set when the component is off the screen:


  
  
  xFrom="{component.x}" 
xTo="{component.width+Application.application.width}"} 
*onTweenEnd="bindX()"*/> 
  

  

  
  xFrom="{component.x}" xTo="{0}"}/>

  




Now the actual binding:

private var watcher:ChangeWatcher;
private function bindX():void {
   watcher = 
BindingUtils.bindSetter(_applicationWidht,Application.application,"width");

}

private function unbindX():void {
   if(watcher!=null) {
   watcher.unwatch();  
   }

}

private function set applicationWidht(value:Number):void {
   this.x = component.width+Application.application.width;
}

And that's it. I didn't test this but I think it's at least enough to 
show you a way.


Hope it helps, regards

Frederico Garcia


Re: [flexcoders] TextArea ScrollBa

2008-01-16 Thread Frederico Garcia
NileAge, Mail escreveu:
>
> I want to change the ScrollBar style for TextArea control like this :
>
>  
>
> ScrollBar.bmp
>
>  
>
> Plz give me the answer .
>
>  
>
> Thanks
>
> Abdullah Abdelhay
>
> 
>
> __ NOD32 2794 (20080115) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Take a look at the documentation about programmatic skinning.

Regards,

Frederico Garcia


Re: [flexcoders] Re: FlexPrintJob: print image AND text [SOLVED]

2008-01-13 Thread Frederico Garcia
mitek17 escreveu:
> Hi Frederico,
>
> printAsBitmap is not related to the problem, as images/charts/whatever
> simply don't have enough time to be rendered.
>
> You should add event listeners to all your images/charts and wait for
> the creationComplete & updateComplete events.
>
> Cheers,
> Dmitri.
>
>
>  
>
> --- In flexcoders@yahoogroups.com, Frederico Garcia <[EMAIL PROTECTED]>
> wrote:
>   
>> Hi,
>>
>> I'm trying to print Image and Text, and I want the text to be clear, so 
>> I set printAsBitmap = false. The problem is, sometimes it prints the 
>> images, sometimes it doesn't.
>>
>> Any help?
>>
>> Regards,
>>
>> Frederico Garcia
>>
>> 
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2787 (20080112) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi,

This was due to a player bug. Updating to version 9.0.r115 solved the 
problem.

http://bugs.adobe.com/jira/browse/SDK-7698

Regards,

Frederico Garcia




Re: [flexcoders] Simulating a printed page

2008-01-13 Thread Frederico Garcia
John Nagle escreveu:
> Hello,
>
> I'm trying to figure out the best way to simulate a printed page.  I 
> want to display text on a "page" (currently a canvas), such that it has 
> the look and feel of printed type on paper.  I will have arrows at the 
> bottom of the page to switch to the next page, where hopefully the same 
> source text (originating from a remote resource) can flow into.
>
> Any suggestions on the best way to set this up?
>
> Thanks for any help,
>
> John
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2787 (20080112) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi,

Have been working on a similar component: FlexReport... you can see a 
demo at www.kemelyon.com/flexreport
I advise you that printing in flex isn't has simple has we might think 
at first (I'm trying to simplify that process).

If you're interested mail and I'll be glad to send you the source.

Regards,

Frederico Garcia


Re: [flexcoders] How to get text to rotate vertically?

2008-01-13 Thread Frederico Garcia
Dave escreveu:
> I am NOT using charts.  I am using beta3 release 3.  How can I get my
> text to draw vertically in a label or text control?  I tried rotate
> property.  When I use that my text doesn't show up at all.
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2781 (20080110) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi,

Have you embed your fonts? rotation only works with embedded fonts.

Regards,

Frederico Garcia


Re: [flexcoders] FlexPrintJob: print image AND text

2008-01-13 Thread Frederico Garcia
Alex Harui escreveu:
>
> Externally loaded images may not be done loading by the time you 
> submit the printed page.  It is best to preload all external images 
> and make bitmap copies
>
>  
>
> 
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Frederico Garcia
> *Sent:* Saturday, January 12, 2008 1:58 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] FlexPrintJob: print image AND text
>
>  
>
> Hi,
>
> I'm trying to print Image and Text, and I want the text to be clear, so
> I set printAsBitmap = false. The problem is, sometimes it prints the
> images, sometimes it doesn't.
>
> Any help?
>
> Regards,
>
> Frederico Garcia
>
> 
>
> __ NOD32 2781 (20080110) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Hi,

I'm not printing external images. I'm printing components (charts). If I 
set
printAsBitmap=true everything is printed but text is blurry. The issue 
only occurs with printAsBitmap set to false. I'll try to find the source 
of the problem and then repost.

Regards,

Frederico Garcia


[flexcoders] FlexPrintJob: print image AND text

2008-01-12 Thread Frederico Garcia
Hi,

I'm trying to print Image and Text, and I want the text to be clear, so 
I set printAsBitmap = false. The problem is, sometimes it prints the 
images, sometimes it doesn't.

Any help?

Regards,

Frederico Garcia


Re: [flexcoders] Stopping a DateValidator from showing the red border on the textbox

2008-01-10 Thread Frederico Garcia
Frederico Garcia escreveu:
> João escreveu:
>   
>> Hey, 
>>
>> I have a DateValidator defined on AS3:
>>
>> var dateValidator:DateValidator=new DateValidator();
>> dateValidator.source=dataDeNascimentoTxt;
>>
>> I am using this DateValidator to verify if the birth date was filled
>> correctly. The problem is that if the date is wrong, a red border and
>> a message will appear on the dataDeNascimentoTxt. Is there a way to
>> avoid this red border and message?
>>
>> Thanks, 
>>
>> João Saleiro
>> --
>> www.riapt.org
>> www.webfuel.pt
>>
>>
>>
>> --
>> Flexcoders Mailing List
>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
>> Yahoo! Groups Links
>>
>>
>>
>>
>> __ NOD32 2769 (20080107) Information __
>>
>> This message was checked by NOD32 antivirus system.
>> http://www.eset.com
>>
>>
>>
>>   
>> 
> Hi Joao,
>
> Try this (not sure if works):
>
> var dateValidator:DateValidator=new DateValidator();
> dateValidator.source=dataDeNascimentoTxt;
> dateValidator.addEventListener(FlexEvent.VALID,onValidatorValidEventHandler);
>
> private function onValidatorValidEventHandler(event:FlexEvent):void {
>   event.target.errorString = '';
> } 
>
> Tell me if it worked,
>
> Frederico Garcia
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Sorry, wrong event,  replace with

dateValidator.addEventListener(FlexEvent.INVALID,onValidatorInvalidEventHandler);


 Regards,

Frederico Garcia


Re: [flexcoders] Stopping a DateValidator from showing the red border on the textbox

2008-01-10 Thread Frederico Garcia
João escreveu:
> Hey, 
>
> I have a DateValidator defined on AS3:
>
> var dateValidator:DateValidator=new DateValidator();
> dateValidator.source=dataDeNascimentoTxt;
>
> I am using this DateValidator to verify if the birth date was filled
> correctly. The problem is that if the date is wrong, a red border and
> a message will appear on the dataDeNascimentoTxt. Is there a way to
> avoid this red border and message?
>
> Thanks, 
>
> João Saleiro
> --
> www.riapt.org
> www.webfuel.pt
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi Joao,

Try this (not sure if works):

var dateValidator:DateValidator=new DateValidator();
dateValidator.source=dataDeNascimentoTxt;
dateValidator.addEventListener(FlexEvent.VALID,onValidatorValidEventHandler);

private function onValidatorValidEventHandler(event:FlexEvent):void {
event.target.errorString = '';
} 

Tell me if it worked,

Frederico Garcia


Re: [flexcoders] Font rendering for print

2008-01-09 Thread Frederico Garcia
Jon Bradley escreveu:
>
> On Jan 9, 2008, at 8:35 AM, Frederico Garcia wrote:
>
>> Does anyone know how to make flash render fonts the same way for screen 
>> display and printing? I've tried embedding fonts, changing the settings 
>> for flashType and fontAntiAliasType but I just can't get fonts to 
>> display the same way. This is causing a lot of trouble since I can' get 
>> lineMetrics to give me accurate values.
>
> Good luck. Long response follows.
>
> Flash renders the line height of all text with an 
> incorrect (always) leading value. This is major apparent as you change 
> the font size of the text in the field.
>
> If you set the leading of a text field, that leading is not used for 
> all point sizes of text. I can only surmise that's because the 
> developers failed to use just the point size of the type to set 
> default leading value.
>
> The line height issue is not a bug - it's just straight up wrong.
>
> First the problems you will run into:
>
> 1. Leading of text is never right - the line heights vary within one 
> field (?!). It adds in some weird ass measure including the ascent and 
> descent (which varies as well).
>
> 2. Changing the font size and setting the leading to the same value 
> will lead you to madness. The leading of the field will change at 
> certain point sizes (sometimes more than 30% larger/smaller) - even if 
> you force a certain leading.
>
> 3. If you scale your text field, your character spacing AND individual 
> character baselines shift - they are not all aligned on the same 
> baseline. Imagine a word where groupings of the characters are shifted 
> down 4-5 pixels (again, [EMAIL PROTECTED]). If the text field is rotated 0.01 
> radians, the character spacing issue is fixed but the baseline issue 
> is not (wtf).
>
> #1 and #2 can be fixed. #3 is a bug in the font rendering in Flash. I 
> do not know how to fix this issue completely. Big prize to whoever can 
> figure that out.
>
> Now, to fix #1 and #2 and match the way Photoshop renders line heights:
>
> Photoshop renders text with a leading of 120% of the FONT SIZE. It 
> uses the max ascent and descent of the entire font outline with that 
> leading - rather than a dynamically adjusted ascent and descent, which 
> is what the player does.
>
> This process will render a text field almost identically to Photoshop:
>
> 1. Get the line metrics from every line of text
> 2. Find the average line height (fun)
> 3. Get the difference between what Flash, in it's confused mind, 
> thinks the leading should be and what you want it to be (== font size 
> *1.2)
> 4. Set the leading of a new text format object to this resulting 
> number minus the ascent and descent measurements of the text format in 
> question.
>
> This whole thing has annoyed me for years. What is driving me crazy 
> right now is the #3 problem I listed above (using embedded fonts).
>
> cheers,
>
> jon
>
> 
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Hi Jon,

Thanks for the quick reply. You can see my posts on flexReport and 
PrintTextArea to see what I'm trying to do. Printing is killing me. 
People (specially in organizations) do like to print stuff, and more 
they do like to see what they are about to print before they waste 
paper. And I really don't like to waste countless hours every single 
time I want to print more than a few lines of text.

Now I'm trying to develop a reusable solution to prevew and print 
reports and the only (major) feature missing is printing multiple pages 
of text.

Would you bother to take a look at PrintTextArea 
(http://www.kemelyon.com/printtextarea/) and see if you can give me some 
help? In the meanwhile I'll try to make good use of your tips :)

Regards,

Frederico Garcia




[flexcoders] Font rendering for print

2008-01-09 Thread Frederico Garcia
Hi,

Does anyone know how to make flash render fonts the same way for screen 
display and printing? I've tried embedding fonts, changing the settings 
for flashType and fontAntiAliasType but I just can't get fonts to 
display the same way. This is causing a lot of trouble since I can' get 
lineMetrics to give me accurate values.

Regards,

Frederico Garcia


Re: [flexcoders] Re: Printing very long textarea

2008-01-08 Thread Frederico Garcia
Otto escreveu:
> --- In flexcoders@yahoogroups.com, Frederico Garcia <[EMAIL PROTECTED]> 
> wrote:
>   
>> I'm making a PrintTextArea component wich is basically a TextArea 
>> 
> with 
>   
>> simillar behaviour to PrintDatagrid. Still has some bugs, so I'll 
>> 
> repost 
>   
>> has soon has I corrected them.
>>
>> Read the documentation on PrintDatagrid to learn how to use this.
>>
>> By the way, if someone has corrections or suggestions on this 
>> 
> please let 
>   
>> me know.
>> 
>
> Hi Frederico,
>
> that's very useful. While waiting for your solution which sounds like 
> a more proper way if doing things I'll try to hack something together 
> for my app with the help of numLines and getLineMetrics.
>
> thanks,
> Otto
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
You can use PrintTextArea as is. The bugs are related to screen display 
and the reset() method (for printing twice the same PrintTextArea) missing.

Regards,

Frederico Garcia




Re: [flexcoders] ApplicationControlBar question

2008-01-08 Thread Frederico Garcia
markgoldin_2000 escreveu:
> I am using ApplicationControlBar to create a toolbar similar to desktop 
> applications. How can I bring buttons together as close as possible?
>
> Thanks
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
By setting horizontalGap=0

Regards,

Frederico Garcia


Re: [flexcoders] Printing very long textarea

2008-01-08 Thread Frederico Garcia
Gregor Kiddie escreveu:
>
> It all comes down to how you are printing the TextArea in the first place!
>
> PrintJob allows you to give a Rectangle along with the Sprite to 
> define the printing area.
>
> Once you’ve called PrintJob.start() you can get the pageWidth and 
> pageHeight of the paper and use these values along with the sizes of 
> your TextArea to create your print area. You can then call 
> PrintJob.addPage() as many times as required to cover all your TextArea.
>
> Does that make sense?
>
> 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 [EMAIL PROTECTED]
>
> 
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Otto
> *Sent:* 08 January 2008 14:40
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Printing very long textarea
>
> Hello,
> I've run into a small issue making a print feature for my application
> (flex3 beta3). I have a textarea that may contain lots of text,
> enough to wrap beyond the first page. The problem is that it doesn't
> wrap inbetween lines but it just cuts a line in two. See sample pdf
> here [1].
>
> Is there any way around this? Is it possible to split the textarea in
> two programmatically?
>
> cheers,
> Otto
>
> [1] http://themansion.mine.nu/otto/files/split.pdf 
> <http://themansion.mine.nu/otto/files/split.pdf>
>
> 
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Hi,

I'm making a PrintTextArea component wich is basically a TextArea with 
simillar behaviour to PrintDatagrid. Still has some bugs, so I'll repost 
has soon has I corrected them.

Read the documentation on PrintDatagrid to learn how to use this.

By the way, if someone has corrections or suggestions on this please let 
me know.


http://www.adobe.com/2006/mxml";
xmlns="*"
change="invalidateSize()"
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
creationComplete="initComponent()">







Regards,

Frederico Garcia


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] handCursor with Text & Label components

2008-01-08 Thread Frederico Garcia
duncan mcmillan escreveu:
> Hi flexcoders
>  
> When I'm using either a Text or Label and want the handcursor to 
> appear on Mouseover, it fails to activate. I have set true both 
> useHandCursor & buttonMode, still without success.
>  
> My Texts and Labels are within a composite component which extends 
> UIComponent. I addChild them during createChildren() and set the above 
> 2 properties during commitProperties().
>  
> Am I missing something simple here?
>  
> Thanks in advance
>  
> Duncan
>
> 
> Sent from Yahoo! 
> <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51949/*http://uk.docs.yahoo.com/mail/winter07.html>
>  
> - a smarter inbox. 
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Hi,

try this:



Regards,

Frederico Garcia


Re: [flexcoders] Re: use runtime image more than once

2008-01-08 Thread Frederico Garcia
joshuagatcke escreveu:
> We thought about having a flash assets file or something along those lines, 
> but we really 
> can't have this stuff in a compiled file as the types of icons changes all 
> the time on a per user 
> basis. It would be nearly impossible to track all the changes and update the 
> assets file to 
> meet requirements. Not to mention that it would be impossible for our users 
> to accomplish 
> that. 
>
> We are going to just rely on the browser cache for now until we have the 
> resources to write 
> something custom if possible. The idea would be that you could create an 
> image class that 
> you could use repeatedly from a runtime image source. I have a feeling I 
> might be asking for 
> too much though. 
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi,

What if you had a buffer, implemented by an array (or arraycollection) 
of Assets, beeing an Asset something like:

public class Asset {
   private var _source:BitmapData;
   private var _name:String;
   private var _url:String;

   public function Asset() {

   }

   public function set url(value:String):void {
  //load data
   }

   public function get url(value:String):void {
  return _url;
   }

   //getters and setters for name

   //getters and setter for bitmap
}


and the buffer something like:

public class Buffer {
   private var buffer:ArrayCollection = new ArrayCollection();
  
   public function getBitmap(url:String):void {
  //traverse buffer
  //if url is loaded (there is an Asset with that url) return 
buffer[i].bitmap
  //else create asset (asset:Asset = new Asset(); asset.url = 
url) and add to buffer;
   }
}

being Buffer a singleton.

Everytime you needed a image you requested (by url or by name) to the 
Buffer and your image would be loaded only once. Ofcourse you have the 
overhead of traversing the buffer looking for the image, but I think it 
would take an extremely large number of images to make this traversing 
slower than the network time needed to load an image.

Let me know what you think,

Regards,

Frederico Garcia



Re: [flexcoders] Re: use runtime image more than once

2008-01-07 Thread Frederico Garcia
joshuagatcke escreveu:
> Hello Thanks for the feedback. I did see the super image by Eli. 
>
> Yes the cache does handle this. It's not too bad, but I thought it might be 
> possible to make 
> this better and faster. Also, my logs show huge amounts of requests for those 
> images even 
> though they are suppose to be coming out of the browser cache after the first 
> request, so I'm 
> not sure. 
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi,

Did you consider having a singleton like AssetsController wich you 
filled with your assets and then bind to them?

Regards,

Frederico Garcia


Re: [flexcoders] Restarting Flex 2.01 application

2008-01-07 Thread Frederico Garcia
Gordon Smith escreveu:
> I think you need to use navigateToURL() to reload the web page with 
> the SWF.
>  
> Gordon Smith
> Adobe Flex SDK Team
>
> 
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *candysmate
> *Sent:* Monday, January 07, 2008 10:14 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Restarting Flex 2.01 application
>
> I have a Flex movie playing in a swf to exe. I need the user to be
> able to click on a button and restart the movie. How can I do this in
> AS3 please?
>
> 
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Or you can use ExternalInterface.call('window.location.reload()'); 
(navigateToURL sometimes is blocked by popup killers)

Frederico Garcia


Re: [flexcoders] Fading in photo gallery

2008-01-07 Thread Frederico Garcia
NileAge, Mail escreveu:
>
> Hi all
>
> I want to make a fading in photo 
> gallery mean when I click to an image in want the image appear in a 
> fading and when clicking to another image the previous one
>
> Disappear in a fading and the new one 
> appears in a fading
>
> 
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Hi,

I did this (www.kemelyon.com -> Características) by having 2 states, 
each having an Image. Do a transition from state1(fadeIn) to 
state2(fadeOut) and add onTweenEnd to state2. onTweenEnd turns 
currentState = state2 right after changing the source of image1.

Regards,

Frederico Garcia


Re: [flexcoders] Re: how to duplicate component

2008-01-07 Thread Frederico Garcia
Gus escreveu:
> Hi,
>
> I had a similar problem and resolved it by using the descriptor
> property and the createComponentFromDescriptor method from the
> Containers...
>
> here are some samples
>
> http://kb.adobe.com/selfservice/viewContent.do?externalId=45fc6cf2&sliceId=1
>
> in the flex help there is a lot of documentation too..
>
> HTH
> Gus
>
>
> --- In flexcoders@yahoogroups.com, Frederico Garcia <[EMAIL PROTECTED]>
> wrote:
>   
>> Hi,
>>
>> For my flexReport (www.kemelyon.com/flexreport) I need to make a 
>> duplicate of a component. For example, if I want to print a chart, I 
>> need to take that chart, resize it and add it to a page. My problem is 
>> that a component can only be draw inside a container at a time, so if I 
>> add it to the page it desapears from the original container. I don't 
>> want to use getBitmapData either because that way when I resize it will 
>> lose quality.
>>
>> What I want is having a method like:
>>
>> var chart2:ColumnChart = cloneComponent(chart1);
>>
>> or
>>
>> getVectorData(chart1);
>>
>> Hope someone can help me,
>>
>> Regards,
>>
>> Frederico Garcia
>>
>> 
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Thanks alot! I've been looking for this for a long time...

I've solved my problem (printing charts) by applying a scale matrix 
before I converted the component to BitmapData. My solution is not what 
I really looking for, because everytime I want to scale the capture I 
have do getBitmapData again (getVectorData would be so cool=).

I'll look into your answer.

Regards,

Frederico Garcia


Re: [flexcoders] Reliable timer technique

2008-01-07 Thread Frederico Garcia
YOGESH JADHAV escreveu:
> Hi Frederico,
> The Alert is pop uped after some time interval. 
> For first time it is ok, i.e. 3 seconds, but after that it vanishes 
> much before 3 seconds, many times less than 1 second and sometimes it 
> just flashes, can't be seen.
>   My concept of timer is not that clear, It will be great if u 
> provide some timing snipeet using On Enter Frame.
> On Jan 7, 2008 3:19 PM, Frederico Garcia < [EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> YOGESH JADHAV escreveu:
>
>
> > Hi all,
> > I want a reliable timer in my app to remove a alert
> > after say 3 seconds. Earlier I tried the normal setTimeOut but
> it is
> > not reliable and gives error in firefox. So i tried with
> onEnterFrame
> > technique, but it is also not working properly. I also tried by
> > setting application frame rate to some value ( like 99, 70 etc). I
> > have seen many application which are having perfect and reliable
> > timing events. Can anybody guide me to achieve perfect timing
> event.
> > Code snippets will be more than appreciated.
> > Here is my code
> >
> > private function showMyAlert():void
> > {
> > alert = Alert.show(" Test, shud be gone in 3
> > seconds");
> > //setTimeout(hideAlert, 3000);
> > onCreationComplete();
> > }
> >
> >
> > private function hideAlert():void
> > {
> > PopUpManager.removePopUp(alert);
> > }
> >
> > private function alertCloseHnadler(event:CloseEvent):void
> > {
> > if (event.detail == Alert.YES)
> > Alert.show("Yes");
> > }
> >
> > private function onCreationComplete() : void
> > {
> > timer = new Timer(3000);
> > timer.addEventListener( TimerEvent.TIMER, onTimerEvent );
> > timer.start ();
> > fps = 0;
> > this.addEventListener(Event.ENTER_FRAME, onFrameEnter);
> >
> > }
> >
> > private function onFrameEnter( event : Event ) : void
> > {
> > fps++;
> > trace("enterframe");
> > }
> >
> > private function onTimerEvent( event : Event ) : void
> > {
> > hideAlert();
> > }
> >
> >
> > --
> > There is no point in knocking the "closed Windows" when the door is
> > "Open". Open your eyes, use open source software.
> >
> >
> > Regards,
> > Yogesh
> >
> > __ NOD32 2760 (20080102) Information __
> >
> > This message was checked by NOD32 antivirus system.
> > http://www.eset.com
> Hi,
>
> The code for Timer should work. Not advisable to use at the same
> time as
> onEnterFrame. Either Timer or onEnterFrame are susceptible to CPU
> usage.
> But with such an interval (3secs) you should have no problem.
>
> I've used Timer to make a clock (www.kemelyon.com
> <http://www.kemelyon.com>) and it's exact in
> seconds.
>
> How big is the error for Timer (and it takes longer or less than
> expected)?
>
> Regards,
>
> Frederico Garcia
>
>
>
>
> -- 
> There is no point in knocking the "closed Windows" when the door is 
> "Open". Open your eyes, use open source software.
>
>
> Regards,
> Yogesh 
>
> __ NOD32 2769 (20080107) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Hi,

You got me in good mood so here's an example covering both the Timer and 
onEnterFrame timing techniques: http://www.kemelyon.com/timing_example/ 
(right click to view source).

Near the end of making you the example I figured out what was wrong in 
your code. Really simple, so simple I often forget it. STOPPING THE 
TIMER! :) imagine you set the timer to trigger every 3 seconds; after 
one second you close the alert; after half a second you open the alert 
again. After half a second the Timer would trigger and your new born 
alert would be closed.

Tell me if this helped,

Frederico Garcia


Re: [flexcoders] Reliable timer technique

2008-01-07 Thread Frederico Garcia
YOGESH JADHAV escreveu:
> Hi all,
>   I want a reliable timer in my app to remove a alert 
> after say 3 seconds. Earlier I tried the normal setTimeOut but it is 
> not reliable and gives error in firefox. So i tried with onEnterFrame  
> technique, but it is also not working properly. I also tried by 
> setting application frame rate to some value ( like 99, 70 etc). I 
> have seen many application which are having perfect and reliable 
> timing events. Can anybody guide me to achieve perfect timing event. 
> Code snippets will be more than appreciated.
> Here is my code
>
>   private function showMyAlert():void
>   {
> alert = Alert.show(" Test, shud be gone in 3 
> seconds");
> //setTimeout(hideAlert, 3000);
>onCreationComplete();
>  }
>
>
> private function hideAlert():void
> {
> PopUpManager.removePopUp(alert);
> }
>
> private function alertCloseHnadler(event:CloseEvent):void
> {
> if (event.detail == Alert.YES)
> Alert.show("Yes");
> }
>
> private function onCreationComplete() : void
> {
> timer = new Timer(3000);
> timer.addEventListener( TimerEvent.TIMER, onTimerEvent );
> timer.start ();
> fps = 0;
> this.addEventListener(Event.ENTER_FRAME, onFrameEnter);
>
> }
>
> private function onFrameEnter( event : Event ) : void
> {
> fps++;
> trace("enterframe");
> }
>
> private function onTimerEvent( event : Event ) : void
> {
>hideAlert();
> }
>
>
> -- 
> There is no point in knocking the "closed Windows" when the door is 
> "Open". Open your eyes, use open source software.
>
>
> Regards,
> Yogesh 
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Hi,

The code for Timer should work. Not advisable to use at the same time as 
onEnterFrame. Either Timer or onEnterFrame are susceptible to CPU usage. 
But with such an interval (3secs) you should have no problem.

I've used Timer to make a clock (www.kemelyon.com) and it's exact in 
seconds.

How big is the error for Timer (and it takes longer or less than expected)?

Regards,

Frederico Garcia


[flexcoders] how to duplicate component

2008-01-05 Thread Frederico Garcia
Hi,

For my flexReport (www.kemelyon.com/flexreport) I need to make a 
duplicate of a component. For example, if I want to print a chart, I 
need to take that chart, resize it and add it to a page. My problem is 
that a component can only be draw inside a container at a time, so if I 
add it to the page it desapears from the original container. I don't 
want to use getBitmapData either because that way when I resize it will 
lose quality.

What I want is having a method like:

var chart2:ColumnChart = cloneComponent(chart1);

or

getVectorData(chart1);

Hope someone can help me,

Regards,

Frederico Garcia


[flexcoders] Service Browser for GranitedDS

2008-01-04 Thread Frederico Garcia
Hi,

The thing I like the most on AMFPHP is the Service Browser. I'm using 
granite data services (POJO) now, and I'd like to use the Browser from 
AMFPHP. Can anyone tell me how to do it?

Regards,

Frederico Garcia


Re: [flexcoders] Re: print function code for $$ - anyone interested?

2008-01-04 Thread Frederico Garcia
anthony_morsey escreveu:
> This offer is still available -- anyone interested??
>
> --- In flexcoders@yahoogroups.com, "anthony_morsey" <[EMAIL PROTECTED]> wrote:
>   
>> Is anyone interested in building a print function for a small reward -
>> $100 ??
>>
>> I need a function that will take any objects from the current screen
>> (text areas of varying/dynamic size, labels, charts and legends) and
>> place them sequentialy on some type of invisible/hidden container that
>> then can be printed.  I want to arrange these objects in any order and
>> have them print out as if they were placed in a Word document.  I want
>> to either control page breaks or have the function decide based on the
>> object sizes where to break.
>>
>> FYI, This is a financial planning application that has a print option
>> for the user to take away a summary of the analysis which includes
>> descriptive text and bar/line/pie charts with legends.
>>
>> All I'm looking for is the function for printing these objects.  I
>> need this asap - this week.
>>
>> Thanks
>>
>> Tony
>>
>> 
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Ok, send me the dataProviders and I do it for you...

(No reward needed)

Regards,

Frederico Garcia


Re: [flexcoders] how to pass rollover event from label control position on a button to button?

2008-01-03 Thread Frederico Garcia
pfkellogg escreveu:
> i have a canvas with just a very wide button with a label component on
> top of the button. (Note: label is different from the label property
> of the button) i.e: Label is positioned over the right side of button
> when i rollover the button its color becomes brighter as it should,
> but when i rollover just on the label portion of the button, the
> button color doesn't become brighter.  the button isn't getting the
> mouse roll over event. The Label is probably getting it.  how do i
> pass mouse rollover event from label control to button, so it changes
> color?  any ideas that are easy??  I don't want to use states if at
> all possible.
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi,

I think this may be what you want.



Regards,

Frederico Garcia


Re: [flexcoders] scroll to the top of the page

2008-01-03 Thread Frederico Garcia
Vincent Rempp escreveu:
> In the flex app, I have a panel and that is set to a width and height 
> of 100%.  I'm also using states and on a state, I've built a really 
> long form.  When the user clicks the form, it goes to a different 
> state but the vertical scrollbar does not move.  I need to invoke or 
> force that scrollbar so that it moves to the top.  Does anyone knows 
> how to do that?
>
> Thanks,
> Vincent
>
> 
> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails 
> <http://fr.rd.yahoo.com/mail/mail_taglines/trueswitch/*http://www.trueswitch.com/yahoo-fr/>
>  
> vers Yahoo! Mail 
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Try this:

Application.application.verticalScrollPosition = 0;

Regards,

Frederico Garcia


Re: [flexcoders] Re: print function code for $$ - anyone interested?

2008-01-03 Thread Frederico Garcia
anthony_morsey escreveu:
> Frederico, 
>
> Can this easily be modified to arrange/combine different types of
> objects such as textareas and charts?  This looks like it is only
> printing 1 object.  I can print one object now.  What I need is to be
> able to arrange and print any number of different objects sequentialy
> without knowing the vertical sizes.
>
> I'd still be willing to pay for this added functionality if your
> interested.
>
> Either way, I would like to look at the source and I would certainly
> provide any enhancements I make back to you.
>
> Thanks
>
> Tony
>
>
> --- In flexcoders@yahoogroups.com, Frederico Garcia <[EMAIL PROTECTED]>
> wrote:
>   
>> anthony_morsey escreveu:
>> 
>>> Is anyone interested in building a print function for a small reward -
>>> $100 ??
>>>
>>> I need a function that will take any objects from the current screen
>>> (text areas of varying/dynamic size, labels, charts and legends) and
>>> place them sequentialy on some type of invisible/hidden container that
>>> then can be printed.  I want to arrange these objects in any order and
>>> have them print out as if they were placed in a Word document.  I want
>>> to either control page breaks or have the function decide based on the
>>> object sizes where to break.
>>>
>>> FYI, This is a financial planning application that has a print option
>>> for the user to take away a summary of the analysis which includes
>>> descriptive text and bar/line/pie charts with legends.
>>>
>>> All I'm looking for is the function for printing these objects.  I
>>> need this asap - this week.
>>>
>>> Thanks
>>>
>>> Tony
>>>
>>>
>>>
>>> --
>>> Flexcoders Mailing List
>>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>>> Search Archives:
>>>   
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
>   
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>> __ NOD32 2760 (20080102) Information ______
>>>
>>> This message was checked by NOD32 antivirus system.
>>> http://www.eset.com
>>>
>>>
>>>
>>>   
>>>   
>> You can have it for free =)
>>
>> Check this out :
>> http://www.kemelyon.com/flexreport/
>>
>> If this is what you need mail me at [EMAIL PROTECTED] and I'll 
>> send you the source code as long as you provide me any 
>> changes/improvements you do to it.
>>
>> Regards,
>>
>> Frederico Garcia
>>
>> 
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
This component works with templates. You have a canvas and add whatever 
you want to it. I tested it with images and graphics. The only problem 
with graphics is that labels get aliased (no way to prevent it) and if 
the text size is too small they get unreadable.

Mail me directly ([EMAIL PROTECTED]) so we can discuss more on it.

Regards,

Frederico Garcia


Re: [flexcoders] print function code for $$ - anyone interested?

2008-01-03 Thread Frederico Garcia
anthony_morsey escreveu:
> Is anyone interested in building a print function for a small reward -
> $100 ??
>
> I need a function that will take any objects from the current screen
> (text areas of varying/dynamic size, labels, charts and legends) and
> place them sequentialy on some type of invisible/hidden container that
> then can be printed.  I want to arrange these objects in any order and
> have them print out as if they were placed in a Word document.  I want
> to either control page breaks or have the function decide based on the
> object sizes where to break.
>
> FYI, This is a financial planning application that has a print option
> for the user to take away a summary of the analysis which includes
> descriptive text and bar/line/pie charts with legends.
>
> All I'm looking for is the function for printing these objects.  I
> need this asap - this week.
>
> Thanks
>
> Tony
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
You can have it for free =)

Check this out :
http://www.kemelyon.com/flexreport/

If this is what you need mail me at [EMAIL PROTECTED] and I'll 
send you the source code as long as you provide me any 
changes/improvements you do to it.

Regards,

Frederico Garcia



Re: [flexcoders] Re: Unwanted arguement?

2008-01-02 Thread Frederico Garcia
Tracy Spratt escreveu:
>
> You might want to examine that value:Object in the function to make 
> sure your theory is correct.
>
> Tracy
>
>  
>
> 
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *candysmate
> *Sent:* Wednesday, January 02, 2008 1:11 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Re: Unwanted arguement?
>
>  
>
>
> > Try this
> >
> > private function staffGridFocus(value:Object=null):void
> >
> > Regards,
> >
> > Frederico Garcia
> >
>
> Thanks Frederico, that nailed it!
>
> 
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Alex,

the value:Object is not intended to be used. It will be an event if 
called by Alert window, null if no argument passed. It's just a 
workaround to maintain current usage (no arguments) but accept 1 
argument of any kind.

Regards,

Frederico




Re: [flexcoders] Alert window position?

2008-01-02 Thread Frederico Garcia
Mark Shen escreveu:
> What is the  'your alert popup'?
>  
> Please give me a demo for this.Thanks
>  
> Mark
>
> - Original Message 
> From: Savan Patel <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Saturday, December 29, 2007 1:21:30 AM
> Subject: Re: [flexcoders] Alert window position?
>
> Hi Mark,
>  
> You can use following property :
> PopUpManager. centerPopUp( 'your alert popup');
>  
> Thanks & Regards,
> Savan
> - Original Message 
> From: Dominique Bessette - Halsema <[EMAIL PROTECTED] com>
> To: [EMAIL PROTECTED] ups.com <http://ups.com/>
> Sent: Saturday, 29 December, 2007 1:28:36 AM
> Subject: Re: [flexcoders] Alert window position?
>
> i created my own popup using TitleWindow and in there you can control 
> the placement.
>  
> //in the main class call the popup
>  private  function getAtomPopUp( ):void{
>   var helpWindow:IFlexDis playObject;  
>   helpWindow = PopUpManager. createPopUp( this, getPopUp, false);
> }
>
>  
> On 12/28/07, *markflex2007*  <mailto:[EMAIL PROTECTED]>> wrote:
>
> Hi,
>
> I have the Alert popup window(Alert. show) but it appear in the
> right side of
> the screen,I want to know how to make it popup at center of the
> screen.
>
> Thanks
>
> Mark
>
>
>
>
> 
> Explore your hobbies and interests. Click here to begin. 
> <http://in.rd.yahoo.com/tagline_groups_6/*http://in.promos.yahoo.com/groups> 
>
>
>
> 
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try 
> it now. 
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20>
>  
> 
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Could you please post the code you use to display the Alert? I've been 
trying to recreate your scenario with no success. Alert.show("text"); is 
always centered by default.

Regards,

Frederico Garcia


Re: [flexcoders] Unwanted arguement?

2008-01-02 Thread Frederico Garcia
candysmate escreveu:
> Focus can be a real pain, as we all know.  
>
> I have a function which re-focuses a datagrid so:
>
> private function staffGridFocus():void
> {
> salesStaffGrid.setFocus();
> salesStaffGrid.selectedIndex = gridSelectLine;
> editStaffCell = {columnIndex:0, rowIndex: gridSelectLine};
> salesStaffGrid.editedItemPosition = editStaffCell;
> }
>
> no arguements are expected or required.
>
> After my user saves data to MS SQL 2005, via Janus, I alert them that
> the action has been completed with:
>
> Alert.show("Staff data updated", 'Information:', 0, this,
> staffGridFocus, informationIcon);
>
> However, I get a runtime error:
>
> ArgumentError: Error #1063: Argument count mismatch on
> main/main::staffGridFocus(). Expected 0, got 1.
>
> I'm  *guessing* that the Alert windows's closeEvent is being passed as
> an arguement to the function for some reason.
>
> How can I prevent this, or have you guys any other ideas please?
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Try this

private function staffGridFocus(value:Object=null):void

Regards,

Frederico Garcia




Re: [flexcoders] Re: How do I print multiple objects with no page breaks??

2007-12-31 Thread Frederico Garcia
anthony_morsey escreveu:
> Have you done this?  Do you have a code sample?  I'm only a beginner
> with Flex, but this doesn't seem like the right way to do this.  
>
> Does anyone have a code sample for the issue I have described below? 
> Someone must have done this before?
>
> Tony
>
> --- In flexcoders@yahoogroups.com, "Johannes Nel" <[EMAIL PROTECTED]>
> wrote:
>   
>> create a bitmap, draw onto that bitmap the layout you want to print and
>> print that bitmap
>>
>> On Dec 31, 2007 8:41 AM, anthony_morsey <[EMAIL PROTECTED]> wrote:
>>
>> 
>>>   I'd like my application to print multiple objects without forced
>>>   
> page
>   
>>> breaks between them. If I use the PrintJob.addObject() method, there
>>> are forced page breaks. I have several textarea.htmltext objects,
>>> several graphs, and several legends that I would like to string
>>> together to form a document for printing. I want to have this come out
>>> paginated the way I want, not one object per page. Is there any way to
>>> do this in Flex 2 or 3 beta? Is there an example out there I can
>>>   
> look at?
>   
>>> Help would be much apprecaited - Thanks
>>> Tony
>>>
>>>  
>>>
>>>   
>>
>> -- 
>> j:pn
>> \\no comment
>>
>> 
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2758 (20071231) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Printing from bitmaps is not the best way, specially if you have text 
since it wil be aliased. To print multiple objects insert them inside a 
Canvas and print that Canvas.

Regards,

Frederico Garcia


Re: [flexcoders] function binding & toString !! Additional information

2007-12-29 Thread Frederico Garcia
Kevin escreveu:
>>
>> 1st; when i use function biding (> text="{myInstance.toString()}"/>) , function binding works fine
>>
> are you sure about that?  I could be wrong, but I would guess that if 
> you add a button under the TextInput tag your TextInput text value 
> will not update as expected on the button click.
>
> 
>
> (If in fact it does update for you, I would love to see your example 
> code since it's possible there is an aspect of binding that I am missing.)
>
> HOWEVER, the problem you are having with the item renderer is somewhat 
> related, but different, problem.  Item renderers use 'data'  as 
> generic object to hold the data passed to the item render.  That 
> object itself is bindable AND if the entire data object changes the 
> functions and properties will update.  However, changes to the 
> underlying properties or functions will not be detected without 
> setting up binding a little more explicitly.  (Usually you don't get 
> compiler warnings, but it you run in debug mode you should get run 
> time messages in the console)  My solution to this is to explicitly 
> bind the data property to an internal property of the item renderer 
> using MXML.  When I do this the binding works correctly.
>
> In my item renderer...
>
> 
> 
> 
> 
> 
>
> Hopefully that helps your item renderer problem.
>
> You are correct.  Functions can be "bound" BUT I think what Frederico 
> was pointing out is that there are some important things to understand 
> when binding with functions (which are stated in the document that you 
> referenced.)  It is not as easy as just putting the function in curly 
> braces.
>
> "You can use ActionScript functions as the source of data binding 
> expressions *when using a bindable property** as an argument* of the 
> function. "
>
> If you do not pass a parameter to the function then flex has no way of 
> knowing when to update the function.  You can do a quick test of this 
> by running this test:
>
> 
> http://www.adobe.com/2006/mxml"; 
> layout="vertical" horizontalAlign="center">
> 
> 
> 
> 
> 
> 
> 
> 
>
> as you can see the first two labels will update correctly because they 
> have a reference to some underlying data.  When that data changes Flex 
> knows to execute the function again.  The other option (as you pasted 
> in your last email) is to dispatch an event from a setter so that flex 
> will know to update the function that relies on the set data:
>
> 
> http://www.adobe.com/2006/mxml"; 
> layout="vertical" horizontalAlign="center">
> 
> 
> 
> 
> 
> 
> 
> 
>
> As you can see all the labels now update properly.
>
> - Kevin
>
> 
>
> __ NOD32 2755 (20071229) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Thanks Kevin,

Great post on function binding.

I believe function binding is quite cool, BUT troublesome and needless. 
Binding a property to a function with no parameters is the same as 
binding to a getter. Most Binding issues can be solved using the 
solution I first provided.

Regards,

Frederico Garcia


Re: [flexcoders] Child object disappear after be added to another object

2007-12-29 Thread Frederico Garcia
Larry Zhang escreveu:
>
> Hello all
>
> I find it strange when I try to add some display object in Flex 
> Canvas. This is the situation
>
> First, I have an Image named “img1” in a.mxml which is a Canvas; I 
> name it “ca”. Then I send the img1 out by some function to another 
> Canvas b.mxml; I name it “cb”. After I added the img1 to cb by 
> *cb.addChild(img1)*, I found the image showed up in cb but disappeared 
> in ca. Then I use *ca.contains(img1)* to check if ca still has the 
> img1, it returned *true*. But, where the img1 in ca went?
>
> Can anybody help me with the strange problem?
>
> Thanks very much.
>
> ==
>
> Make Every Day Count
>
> Larry Zhang
>
> 
>
> __ NOD32 2755 (20071229) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
I run into the same issue before. Variables in Flex are passed by 
reference, not by value. If you do something like fooFunction(fooVar) 
you'r just passing a reference to the content of fooVar.
In order to add the same component to different containers you have to 
make a clone, or in your case it's easier to just have the source of 
img1 as a parameter and create another Image with the same source.

Regards,

Frederico Garcia


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] Re: Solutions for provide a secure access to a Web-Service using Flex

2007-12-28 Thread Frederico Garcia
João escreveu:
> Good point. I wasn't aware that after decompiled it still would be
> hard to understand the code, except hardcoded strings.
>
> Frederico, since you are portuguese, are you aware of the Portuguese
> RIA community? -> www.riapt.org :)
>
> João Saleiro
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2752 (20071228) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi,

Though I'm no expert in security it's something that always interests 
me, since I mainly work on the health area and they are pretty concerned 
with it.

I already knew riapt, I just think it is too oriented to news on the ria 
world and since I read Ted Patrick's blog every day I usually get them 
first from there. It would be nice if you started posting tips and small 
tutorials.

Regards,

Frederico Garcia


Re: [flexcoders] Re: Centering an Application

2007-12-28 Thread Frederico Garcia
javaguru_uk escreveu:
> --- In flexcoders@yahoogroups.com, Frederico Garcia <[EMAIL PROTECTED]>
> wrote:
>
>   
>> Have a VBox as the top level container
>> 
> (top=0;bottom=0;left=0;right=0).  
>   
>> Insert  one empty Canvas, then an HBox, then another empty Canvas. The 
>> two Canvas' having width and height of 100% and the HBox the same
>> 
> height 
>   
>> as your "Application Canvas". Now, inside the Hbox have one empty 
>> canvas, your "Application Canvas" and finally another empty canvas. The 
>> empty Canvas' with width=100% and height=100%;
>>
>> The outline tree would look like:
>>
>> Applicaton
>> |-- VBox
>>   |-- Canvas top
>>   |-- HBox
>>   |  |-- Canvas centerLeft
>>   |  |-- Canvas main
>>   |  |-- Canvas centerRight
>>   |-- Canvas bottom
>>
>> I'd only advise you to do this if you want alot of flexibility in your 
>> layout. (I did this for http://www.sizemodels.com)
>>
>> For the most cases it would be enough to have all your content inside a 
>> Canvas, and set it's verticalCenter = 0 and horizontalCenter = 0.
>>
>> 
>
> Hi Garcia,
>
> Thanks a lot for the tip. Muito obrigado mesmo.
>
> I will give it a try. But that is a hell of a lot work for a simple
> solution. :D 
>
> Fidel.
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2752 (20071228) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Well,this is in fact a lot of work. I used this because I wanted to 
surround my main canvas with different colors (like a tile). If you just 
want your canvas centered you have to insert ALL you content inside a 
SINGLE container (canvas, panel, etc...) a center that container inside 
the Application (HorizontalCenter and VerticalCenter).

I think what you'r trying to do is center the application itself. Not 
possible (or at least inside flex, in order to do that you must change 
the html template and add the swf in the middle cell of a 3x3 table)

Regards,

Frederico Garcia


Re: [flexcoders] Filter typing characters

2007-12-27 Thread Frederico Garcia
markgoldin_2000 escreveu:
> I want to prevent some characters from being entered from the keyboard. 
> I want to have a generic solution that I can reuse in every keyboard 
> compitable UI: textInput, Combobox, and etc.
> Any tips? 
>
> Thanks
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2751 (20071227) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Hi,

Check the source code of NumericStepper. If this doesn't help let me know.

Frederico Garcia


Re: [flexcoders] Alternatives to LCDS

2007-12-27 Thread Frederico Garcia
Frederico Garcia escreveu:
> Guido escreveu:
>   
>> Thanks For the feedback!
>>  
>> We're planning on using a Java backend running on a simple Tomcat 
>> server, since the app will not be massivelly intended. I guess the 
>> wise choice would be either WebORB for Java or LCDS Express.
>>  
>> Do you have any commens on any of these technologies?
>>  
>> Thanks,
>>  
>> Guido.
>>
>> On Dec 27, 2007 5:42 PM, Frederico Garcia <[EMAIL PROTECTED] 
>> <mailto:[EMAIL PROTECTED]>> wrote:
>>
>> Guido escreveu:
>>
>>
>> > Hi guys,
>> >
>> > I'm starting a project and was wondering on using an alternative
>> for
>> > LCDS for remoting. I came across things like WebORB, GraniteDS or
>> > directly BlazeDS.
>> >
>> > I thought it would be wise to ask here for experiencies,
>> suggestions, etc.
>> >
>> > Any leads on good alternatives?
>> >
>> > Thanks in advance!
>> >
>> > Guido.
>> >
>> >
>> > __ NOD32 2751 (20071227) Information __
>> >
>> > This message was checked by NOD32 antivirus system.
>> > http://www.eset.com <http://www.eset.com/>
>> I've been using amfphp and graniteds. Both are quite easy to use.
>> Granite doesn't need J2EE, (see the POJO sections) but it requires
>> Tomcat or JBoss to deploy. amfphp as the advantage of being PHP
>> wich is
>> much easier to find hosting for.
>>
>> Soon I'll be posting a tutorial on preparing FB to better develop in
>> Java based Remoting frameworks.
>>
>> I can't help you with Blaze since I've been too busy to experiment
>> with
>> it, but the possibility of messaging (the ability to do callbacks)
>> FOR
>> FREE in Flash is one of it's coolest features.
>>
>> Hope I was helpful,
>>
>> Frederico Garcia
>>
>>
>>
>>
>> __ NOD32 2751 (20071227) Information __
>>
>> This message was checked by NOD32 antivirus system.
>> http://www.eset.com
>> 
> Well, here's an article about WebOrb.  I would go with BlazeDS though. 
> It's based on LCDS, and is in my opinion what most Flex developer using 
> Remoting were waiting for a long time.
>
> Regards,
>
> Frederico Garcia
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2751 (20071227) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Sorry, forgot the link to the article:

http://flex.sys-con.com/read/474885.htm


Re: [flexcoders] Alternatives to LCDS

2007-12-27 Thread Frederico Garcia
Guido escreveu:
> Thanks For the feedback!
>  
> We're planning on using a Java backend running on a simple Tomcat 
> server, since the app will not be massivelly intended. I guess the 
> wise choice would be either WebORB for Java or LCDS Express.
>  
> Do you have any commens on any of these technologies?
>  
> Thanks,
>  
> Guido.
>
> On Dec 27, 2007 5:42 PM, Frederico Garcia <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> Guido escreveu:
>
>
> > Hi guys,
> >
> > I'm starting a project and was wondering on using an alternative
> for
> > LCDS for remoting. I came across things like WebORB, GraniteDS or
> > directly BlazeDS.
> >
> > I thought it would be wise to ask here for experiencies,
> suggestions, etc.
> >
> > Any leads on good alternatives?
> >
> > Thanks in advance!
> >
> > Guido.
> >
> >
> > __ NOD32 2751 (20071227) Information __
> >
> > This message was checked by NOD32 antivirus system.
> > http://www.eset.com <http://www.eset.com/>
> I've been using amfphp and graniteds. Both are quite easy to use.
> Granite doesn't need J2EE, (see the POJO sections) but it requires
> Tomcat or JBoss to deploy. amfphp as the advantage of being PHP
> wich is
> much easier to find hosting for.
>
> Soon I'll be posting a tutorial on preparing FB to better develop in
> Java based Remoting frameworks.
>
> I can't help you with Blaze since I've been too busy to experiment
> with
> it, but the possibility of messaging (the ability to do callbacks)
> FOR
> FREE in Flash is one of it's coolest features.
>
> Hope I was helpful,
>
> Frederico Garcia
>
>
> 
>
> __ NOD32 2751 (20071227) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Well, here's an article about WebOrb.  I would go with BlazeDS though. 
It's based on LCDS, and is in my opinion what most Flex developer using 
Remoting were waiting for a long time.

Regards,

Frederico Garcia


Re: [flexcoders] Alternatives to LCDS

2007-12-27 Thread Frederico Garcia
Guido escreveu:
> Hi guys,
>  
> I'm starting a project and was wondering on using an alternative for 
> LCDS for remoting. I came across things like WebORB, GraniteDS or 
> directly BlazeDS.
>  
> I thought it would be wise to ask here for experiencies, suggestions, etc.
>  
> Any leads on good alternatives?
>  
> Thanks in advance!
>  
> Guido.
> 
>
> __ NOD32 2751 (20071227) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
I've been using amfphp and graniteds. Both are quite easy to use. 
Granite doesn't need J2EE, (see the POJO sections) but it requires 
Tomcat or JBoss to deploy. amfphp as the advantage of being PHP wich is 
much easier to find hosting for.

Soon I'll be posting a tutorial on preparing FB to better develop in 
Java based Remoting frameworks.

I can't help you with Blaze since I've been too busy to experiment with 
it, but the possibility of messaging (the ability to do callbacks) FOR 
FREE in Flash is one of it's coolest features.

Hope I was helpful,

Frederico Garcia


Re: [flexcoders] Centering an Application

2007-12-27 Thread Frederico Garcia
javaguru_uk escreveu:
> Hello Folks!
>
> Hope you guys have had a nice christmas.
>
> I am trying to solve something I hope you guys can help me with. I
> have looked all over the web and did not find any answer.
>
> What I want is to center my Application Canvas. So, if I maximize the
> application window (if using adobe air) or the browser (if using
> flex), the Canvas is always at the center.
>
> Can someone give me some hints? I have tried the horizontalAlign and
> verticalAlign, which I thought would solve my problem.
>
> I have opened the generated swf with the Flash Player and when I
> maximize the Flash Player, my Canvas stays at the top left corner. I
> would like to center it.
>
> Thanks in advance,
>
> Fidel.
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2749 (20071227) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Have a VBox as the top level container (top=0;bottom=0;left=0;right=0).  
Insert  one empty Canvas, then an HBox, then another empty Canvas. The 
two Canvas' having width and height of 100% and the HBox the same height 
as your "Application Canvas". Now, inside the Hbox have one empty 
canvas, your "Application Canvas" and finally another empty canvas. The 
empty Canvas' with width=100% and height=100%;

The outline tree would look like:

Applicaton
|-- VBox
  |-- Canvas top
  |-- HBox
  |  |-- Canvas centerLeft
  |  |-- Canvas main
  |  |-- Canvas centerRight
  |-- Canvas bottom

I'd only advise you to do this if you want alot of flexibility in your 
layout. (I did this for http://www.sizemodels.com)

For the most cases it would be enough to have all your content inside a 
Canvas, and set it's verticalCenter = 0 and horizontalCenter = 0.


Re: [flexcoders] File Upload question

2007-12-27 Thread Frederico Garcia
Dan escreveu:
> Hi,
>
> Does anyone tried implement a file upload to a server through servlet 
> while the server is sit behind a proxy? Will the crossdomain issue 
> becomes a problem? 
>
> I have set up a serlvet with upload function which works perfect, 
> however, when i deploy the servlet into another server, which i can 
> only reached through a proxy, the upload failed. Is there any setting i 
> need to take care of?
>
> Dan
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2747 (20071225) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
You must have a file .htaccess inside public_html containing:

SecFilterEngine Off
SecFilterScanPOST Off

If this doesn't work install ethereal and check for the error code 
you're getting from the server.

Hope this helps,

Frederico Garcia


Re: [flexcoders] function binding & toString !! Additional information

2007-12-27 Thread Frederico Garcia
yigit escreveu:
> i think i'm misunderstood; because your solution suggestions does not 
> fit my problem.
> first of all, functions can be binded. (with an event driven 
> architecture that triggers
> the function to be executed and all bindable references be updated)
> to see how it is done, take a look at the article in flex api :
> http://127.0.0.1:64744/help/index.jsp?topic=/com.adobe.flexbuilder.help/html/databinding_4.html
> (or search for "[Bindable] function" then click the second result)
>
> after this quick information, i want to refigure my problem.
> assume: myInstance:MyClass; //MyClass implements a bindable toString 
> method
>
> my problem has two parts:
> 1st; when i use function biding ( text="{myInstance.toString()}"/>) , function binding works fine
> except the itemRenderer ()
> why? what is the problem? can't the VM detect the binding mechanism? 
> (by the way there isn't any compile time
> warnings about the binding will not be able to run properly)
>
> 2nd: if i do not write toString (), 
> although it calls toString method to find the
> text value, function binding does never work (neither in itemRenderers 
> nor normal usage).
> why? why cant the compiler detect the binding?
>
> thnks in advance.
>
>
> Frederico Garcia wrote On 12/26/2007 05:38 PM:
>>
>> Jhonny Everson escreveu:
>> >
>> > I guess that your solution has a problem, the circular reference to
>> > toString.
>> >
>> > it could be something like:
>> >
>> > [Bindable] public var stringValue:String = "";
>> > public function toString():String {
>> >
>> > ... ( some processing that results in a string var 'string1')
>> >
>> > stringValue= string1;
>> > return stringValue;
>> > }
>> >
>> >
>> > On 12/26/07, * Frederico Garcia* <[EMAIL PROTECTED] 
>> <mailto:fmotagarcia%40kemelyon.com>
>> > <mailto:[EMAIL PROTECTED] 
>> <mailto:fmotagarcia%40kemelyon.com>>> wrote:
>> >
>> > yigit escreveu:
>> > > hi all;
>> > > i have a custom class which has a toString method; so i can
>> > directly use
>> > > it as a source to textInput's text field.
>> > > i want to make binding work, i mean when the result of the toString
>> > > changes, i want the view to update itself automatically.
>> > > nameID field of roleRef is an instance of my class that implements
>> > > toString with function biding.
>> > > when i use this way:
>> > > 
>> > > function binding on toString does not work
>> > > when i use this way:
>> > > 
>> > > function biding on toString works, but inside an item renderer,
>> > it does
>> > > not work.
>> > > 
>> > >
>> > >
>> > > is this a compiler bug or is this the normal behavior?
>> > >
>> > >
>> > > --
>> > > Flexcoders Mailing List
>> > > FAQ:
>> > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
>> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>
>> > <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
>> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>>
>> > > Search Archives:
>> > http://www.mail-archive.com/flexcoders%40yahoogroups.com 
>> <http://www.mail-archive.com/flexcoders%40yahoogroups.com>
>> > > Yahoo! Groups Links
>> > >
>> > >
>> > >
>> > >
>> > > __ NOD32 2747 (20071225) Information __
>> > >
>> > > This message was checked by NOD32 antivirus system.
>> > > http://www.eset.com <http://www.eset.com>
>> > >
>> > >
>> > >
>> > >
>> > I believe you can only bind vars and setters. By binding a function i
>> > think it will only execute the function once. An easy workaround
>> > is to
>> > have a var containg the result of the toString function and bind the
>> > property to that var. Something like:
>> >
>> > [Bindable] public var stringValue:String = "";
>> > public function toString():String {
>> > stringValue= this.toString();
>> > return stringValue;
>> > }
>> >
>> > 
>> >
>> > Regards
>> >
>> > Frederico Garcia
>> >
>> >
>> >
>&

Re: [flexcoders] Reusability question

2007-12-26 Thread Frederico Garcia
mark goldin escreveu:
> I think I understand what you are saying.
> But I am already extending Flex' s native DataGrid. I thought I could 
> have added a custom method somehow without creating as many classes as 
> many grids I am going to have in my project. Am I understanding you 
> correctly? I will need to extend my base DataGrid for each object in 
> my project?
>
> */Frederico Garcia <[EMAIL PROTECTED]>/* wrote:
>
> mark goldin escreveu:
> > Yes, I can create a generic method for my Grid:
> > public function doSomethingAfterRowIsAdded():void
> > {
> > }
> > But I can't have any code there because it is specific to an object
> > instatiation.
> >
> >
> > */Frederico Garcia <[EMAIL PROTECTED]
> <mailto:fmotagarcia%40kemelyon.com>>/* wrote:
> >
> > markgoldin_2000 escreveu:
> > > I am designing a custom ListGrid. Most of functionality will be
> > in the
> > > base class. But some will deppend on a specific instatiation. For
> > > example, when new row is added to the ListGrid I need to run
> > additional
> > > code for each object being instatiated from the base class. And
> > that
> > > code is unique for each object. Any idea how set this up properly
> > > meaning keeping everything as generic as possible.
> > >
> > > Thanks
> > >
> > >
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ:
> > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>
> >
> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>>
> > > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> <http://www.mail-archive.com/flexcoders%40yahoogroups.com>
> > <http://www.mail-archive.com/flexcoders%40yahoogroups.com
> <http://www.mail-archive.com/flexcoders%40yahoogroups.com>>
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > > __ NOD32 2747 (20071225) Information __
> > >
> > > This message was checked by NOD32 antivirus system.
> > > http://www.eset.com <http://www.eset.com/>
> <http://www.eset.com/ <http://www.eset.com/>>
> > >
> > >
> > >
> > >
> > Maybe you could create a function on every object always with the
> > same
> > name, and when you had a object to the list you check if th function
> > exists. If it does you execute it, else you do nothing. You can
> > see the
> > same principle in clonable objects (having a function called
> > /clone()/)
> >
> > Regards,
> >
> > Frederico Garcia
> >
> >
> >
> >
> > __ NOD32 2747 (20071225) Information __
> >
> > This message was checked by NOD32 antivirus system.
> > http://www.eset.com <http://www.eset.com/>
> What I meant was having a function on the Object added to the
> grid, not
> on the grid itself. Something like this:
>
> public class CustomGrid extends DataGrid {
>
> (...)
>
> override public function addElement(value:Object):void {
> super.addElement(value);
> executeCustomCode(value);
> }
>
> public function executeCustomCode(value:Object):void {
> try {
> value.customFunction();
> }
> catch(error:TypeError) {
> // ADD YOUR DEFAULT CODE HERE
> }
> }
> }
>
> The syntax is not correct but it gives you the big picture. To
> improve
> this you could had a listener on /added/ to the dataProvider that
> triggered the executeCustomCode function.
>
> Hope this helps,
>
> Frederico Garcia
>
>
> 
>
> __ NOD32 2747 (20071225) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Not really. You just create one datagrid component. And when you insert 
one object you try to execute a function (your custom code) in THE 
OBJECT. If the object has that function defined it executes it, else it 
fails (throwing a TypeError) and executes de default code.

Here's a sample Object you could had to the CustomDatagrid.

public class CustomObject {
private var fooCounter:int;

public function CustomObject() {
fooCounter = 0; 
}

public function customFunction():void {
   fooCounter++;
}
}

If you added this CustomObject to the previous CustomGrid it would 
execute the /CustomObject.customFunction() /incrementing the fooCounter.
If you added any other Object not implementing customFunction() the 
CustomGrid would execute the defaulte code (the one inside catch).

Hope I was clear enough,

Frederico Garcia


Re: [flexcoders] Reusability question

2007-12-26 Thread Frederico Garcia
mark goldin escreveu:
> Yes, I can create a generic method for my Grid:
> public function doSomethingAfterRowIsAdded():void
> {
> }
> But I can't have any code there because it is specific to an object 
> instatiation.
>
>
> */Frederico Garcia <[EMAIL PROTECTED]>/* wrote:
>
> markgoldin_2000 escreveu:
> > I am designing a custom ListGrid. Most of functionality will be
> in the
> > base class. But some will deppend on a specific instatiation. For
> > example, when new row is added to the ListGrid I need to run
> additional
> > code for each object being instatiated from the base class. And
> that
> > code is unique for each object. Any idea how set this up properly
> > meaning keeping everything as generic as possible.
> >
> > Thanks
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>
> > Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> <http://www.mail-archive.com/flexcoders%40yahoogroups.com>
> > Yahoo! Groups Links
> >
> >
> >
> >
> > __ NOD32 2747 (20071225) Information __
> >
> > This message was checked by NOD32 antivirus system.
> > http://www.eset.com <http://www.eset.com/>
> >
> >
> >
> >
> Maybe you could create a function on every object always with the
> same
> name, and when you had a object to the list you check if th function
> exists. If it does you execute it, else you do nothing. You can
> see the
> same principle in clonable objects (having a function called
> /clone()/)
>
> Regards,
>
> Frederico Garcia
>
>
> 
>
> __ NOD32 2747 (20071225) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
What I meant was having a function on the Object added to the grid, not 
on the grid itself. Something like this:

public class CustomGrid extends DataGrid {

(...)

override public function addElement(value:Object):void {
super.addElement(value);
executeCustomCode(value);
}

public function executeCustomCode(value:Object):void {
try {
value.customFunction();
}
    catch(error:TypeError) {
   // ADD YOUR DEFAULT CODE HERE
}
}
}

The syntax is not correct but it gives you the big picture. To improve 
this you could had a listener on /added/ to the dataProvider that 
triggered the executeCustomCode function.

Hope this helps,

Frederico Garcia


Re: [flexcoders] Reusability question

2007-12-26 Thread Frederico Garcia
markgoldin_2000 escreveu:
> I am designing a custom ListGrid. Most of functionality will be in the 
> base class. But some will deppend on a specific instatiation. For 
> example, when new row is added to the ListGrid I need to run additional 
> code for each object being instatiated from the base class. And that 
> code is unique for each object. Any idea how set this up properly 
> meaning keeping everything as generic as possible.
>
> Thanks
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2747 (20071225) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Maybe you could create a function on every object always with the same 
name, and when you had a object to the list you check if th function 
exists. If it does you execute it, else you do nothing. You can see the 
same principle in clonable objects (having a function called /clone()/)

Regards,

Frederico Garcia


Re: [flexcoders] ItemRenderer in TileList not redrawing?

2007-12-26 Thread Frederico Garcia
Matt Maher escreveu:
> Setup:
> I have a tilelist with a customer item renderer and an array 
> collection dataprovider. The array collection has 100 items. The list 
> can show 10 renerers on the screen.
>
> Problem:
> When I change (filter) the underlying array collection to 5 items the 
> list redraws correctly in that there are only 5 items in it, but it's 
> just the 1st 5 which were on the list before the filter.
>
> Basically, the array is changing, the list is changing, but the 1st 5 
> itemRenderers are not redrawing. Looking at the underlying array the 
> 5 elements are, in fact, different than what is being drawn on the 
> screen. It's as if they just are not being re-bound.
>
> Anonther example:
> Since only 10 can show in the list, when I filter the collection to 
> 50 the scroll bar changes size (showing me that the list has changed) 
> but the 10 items showing are the same as they were before the filter. 
>
> HOWEVER!
>
> If I scroll down, then back up (thus taking those 10 off the screen 
> and then bringing them back on) they are rendered correctly. In other 
> words, it is just that the items which were already drawn on the 
> screen are not being refreshed.
>
>
> I have triedlist.executeBindings();
> list.invalidateDisplayList(); 
> list.invalidateList(); 
> list.invalidateProperties();
>
> I have tried making a new array collection and changing the data 
> provider of the list, but nothing works. 
>
>
>
> Is there a way to go into the items of the list and "refresh" or "re-
> render" them? And what am I doing wrong to make this necesarry??
>
> Please help
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2747 (20071225) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
I've run into many problems concerning lists and datagrids not updating 
when the datasource changes. To prevent this kind of problems I usually 
use 2 ArrayCollections (arrays do not fir onUpdate events). One contains 
the data and the other the filtered data (and is the dataProvider). When 
I want to change the values in the list I do something like

[Bindable] private var dataProvider:ArrayCollection = new ArrayCollection();
private var _data:ArrayCollection = new ArrayCollection();
private function set data(value:ArrayCollection):void {
_data = new ArrayCollection();
_data = value;

dataProvider = new ArrayCollection();
dataProvider = applyFilter(value);
}

private function applyFilter(value:ArrayCollection):ArrayCollection{
// (...) apply some filter to value
return value;
}



Re: [flexcoders] Re: Solutions for provide a secure access to a Web-Service using Flex

2007-12-26 Thread Frederico Garcia
João escreveu:
> Frederico,
>
> we might end up with something like:
>
> 1- The client calls an "Hello" Web Service, and the server returns a
> random string starting a session with a state "not authenticated"
> 2- The client encodes the string using SHA1, and a shared "secret" key
> hardcoded on the client, and returns the result to an "Authenticate"
> Web-Service
> 3- The server makes the same process, and compares it to the string
> returned by the client on the Authenticate method, returning a true or
> false, and changing the session state to "authenticated"
> 4- The client can now call the remote web-services that will check if
> the session is set, and it's state is set to "authenticated".
>
> As i said, this is far from being secure, but for now it seems the
> "only" solution.
>
> BTW, Frederico, are you Portuguese?
>
> Thanks, 
>
> João Saleiro
>
> --- In flexcoders@yahoogroups.com, <[EMAIL PROTECTED]> wrote:
>   
>> you kept me thinking about this all day. What I suggested early was
>> basically what you're thinking on doing, but I believe I now have some
>> improvements.
>>
>> 1- The client communicates with a web-service requesting access
>> 2- The server initiates a session, returning a request for validation (a
>> string, a char, anything, only to say it's expecting for something)
>> 3- The Client converts the current timestamp (like: Date.getMilli())
>> 
> to a
>   
>> String, substitutes de milli, seconds and minutes digits with 0 (and the
>> result is the current hour) and encrypts that key using SHA (or whatever
>> one-way algorithm you choose)
>> 4- The server does the same, and compares the
>> result with the returned encrypted string. If they are the same, the
>> session changes it's state to validated, allowing access to the
>> web-services. If not, the session is terminated.
>>
>> This way you would get a semi-random String, only the encrypted version
>> would be transmited and that String would be valid for one hour. Plus no
>> hard coded key would be needed. I believe your need isn't for a full
>> security mechanism, only something that prevents other vendors of using
>> your web-service.
>>
>> Let me know what you think
>>
>> Frederico
>>
>> On Fri, 21 Dec 2007 21:47:20 -, João <[EMAIL PROTECTED]> wrote:
>> 
>>> We are dealing with one huge client that provides technological
>>> solutions based on SAP and .NET. They hired us for developing the
>>> presentation layer, and it's damn difficult to make them change the
>>> way they work, even if we know that they aren't making the best
>>> decisions.
>>> Anyway, i don't see how changing from web-services to flash remoting
>>> would solve the problem. It's still a SOA architecture, with exposed
>>> services, and the only difference is that the data is transferred in
>>> binary (but not difficult to be interpreted - even more now with the
>>> release of the AMF specification).
>>> PKI seems to be the solution, but our expertise is not security. Also,
>>> i  have doubts on:
>>>
>>> 1- Does Flex has tools to deal with this kind of things?
>>> 2- From what i recall, PKI needs a private key on both sides. This
>>> would mean that the key was hard-coded on the Flash Client.
>>>
>>> I am thinking on something simple like:
>>>
>>> 1- The client communicates with a web-service requesting access
>>> 2- The server initiates a session, returning a random string
>>> 3- The client runs some kind of algorithm, made by us, to "encrypt"
>>> the string, and returns it. Or, it uses a known algorithm that
>>> encrypts the string using a keyword.
>>> 4- The server runs the same algorithm on the string, and compares the
>>> result with the returned encrypted string. If they are the same, the
>>> session changes it's state to validated, allowing access to the
>>> web-services. If not, the session is terminated.
>>>
>>> This is far from being perfect, and far from being secure because the
>>> client could be decompiled and the "encryption" algorithm could be
>>> easily broken, but at least it would be a bit more reliable than
>>> having the web-service completely exposed. We are dealing here with
>>> probabilities...
>>>
>>> What do you think?
>>>
>>>
>>>
>>> --
>>> Flexcoders Mailing List
>>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>>> Search Archives:
>>>   
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
>   
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>   
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2747 (20071225) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Joao,

Why don't you use a string based on time instead of a hardcoded one? The 
system would become pretty secure. Even if someone decompiled the client 
it would be much harder to understa

Re: [flexcoders] function binding & toString

2007-12-26 Thread Frederico Garcia
Jhonny Everson escreveu:
>
> I guess that your solution has a problem, the circular reference to 
> toString.
>
> it could be something like:
>
> [Bindable] public var stringValue:String = "";
> public function toString():String {
>
> ... ( some processing that results in a string var 'string1')
>
> stringValue= string1;
> return stringValue;
> }
>
>
> On 12/26/07, * Frederico Garcia* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> yigit escreveu:
> > hi all;
> > i have a custom class which has a toString method; so i can
> directly use
> > it as a source to textInput's text field.
> > i want to make binding work, i mean when the result of the toString
> > changes, i want the view to update itself automatically.
> > nameID field of roleRef is an instance of my class that implements
> > toString with function biding.
> > when i use this way:
> > 
> > function binding on toString does not work
> > when i use this way:
> > 
> > function biding on toString works, but inside an item renderer,
> it does
> > not work.
> > 
> >
> >
> > is this a compiler bug or is this the normal behavior?
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>
> > Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> > __ NOD32 2747 (20071225) Information __
> >
> > This message was checked by NOD32 antivirus system.
> > http://www.eset.com
> >
> >
> >
> >
> I believe you can only bind vars and setters. By binding a function i
> think it will only execute the function once. An easy workaround
> is to
> have a var containg the result of the toString function and bind the
> property to that var. Something like:
>
> [Bindable] public var stringValue:String = "";
> public function toString():String {
> stringValue= this.toString();
> return stringValue;
> }
>
> 
>
> Regards
>
> Frederico Garcia
>
>
>
>
> -- 
> Jhonny Everson 
>
> __ NOD32 2747 (20071225) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Yes, indeed there was a circular reference to toString. Thanks for the 
correction. The general concept is the same though, and I think it's the 
best way to solve the "bind to function" problem.

Regards

Frederico Garcia


Re: [flexcoders] function binding & toString

2007-12-26 Thread Frederico Garcia
yigit escreveu:
> hi all;
> i have a custom class which has a toString method; so i can directly use 
> it as a source to textInput's text field.
> i want to make binding work, i mean when the result of the toString 
> changes, i want the view to update itself automatically.
> nameID field of roleRef is an instance of my class that implements 
> toString with function biding.
> when i use this way:
> 
> function binding on toString does not work
> when i use this way:
> 
> function biding on toString works, but inside an item renderer, it does 
> not work.
> 
>
>
> is this a compiler bug or is this the normal behavior?
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2747 (20071225) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
I believe you can only bind vars and setters. By binding a function i 
think it will only execute the function once. An easy workaround is to 
have a var containg the result of the toString function and bind the 
property to that var. Something like:

[Bindable] public var stringValue:String = "";
public function toString():String {
stringValue= this.toString();
return stringValue;
}



Regards

Frederico Garcia


Re: [flexcoders] Timer running fast in Firefox than in IE with same time interval?

2007-12-26 Thread Frederico Garcia
arpan srivastava escreveu:
> Hi All,
>
> I have a list with many items which moves automatically by using a 
> timer. Timer is set to 10 ms i.e. after every 10 ms second it fires an 
> event which moves the items in the list by some distance. In IE it 
> runs fine but in Firefox it runs very fast, i am not getting how can a 
> timer change it's time in firfox.
>
> thanks
> arpan
>
> 
> Chat on a cool, new interface. No download required. Click here. 
> 
>  
> 
>
> __ NOD32 2745 (20071224) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
The Timer is not exact, especially if fired on small intervals. If the 
VM is not able to execute the code it jumps (like flash jumpes frames).
If you are trying to emulate the time frame Timer is not the best method.

Instead create a class extending MovieClip and use onEnterFrame... 
something like this:

public class Effect extends MovieClip {
private var _currentFrame:uint = 0;
private function onEnterFrame(event:Event):void {
_currentFrame++;

//ADD YOUR CODE HERE
}
public function start():void {
this.addEventListener(Event.ENTER_FRAME,onEnterFrame);
}
   
public function end():void {
this.removeEventListener(Event.ENTER_FRAME,onEnterFrame);
}
}

Hope this helps.

Regards

Frederico


Re: [flexcoders] Flex 2.01 initial skin source?

2007-12-24 Thread Frederico Garcia
The default theme is located on:

C:\Program Files\Adobe\Flex Builder 2\Flex SDK 2\frameworks\themes

Regards,

Frederico Garcia
> I (rightly or wrongly) assume that Flex (2.10) obtains it's initial,
> blue/grey, skin from a CSS somewhere? If so, where can I locate this
> please? I wish to use it as a template to work from in order to create
> subsequent skins of my own. 
>
> Many thanks.
>
> Seasons greetings to all.
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2744 (20071223) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   




Re: Re[flexcoders] port building.

2007-12-24 Thread Frederico Garcia

Hi,

For a recent project I've developed a client-side template based report
generator with preview, zoom in, zoom out, print, export to pdf (AlivePDF).

If I see interest I'm thinking on releasing the code, and I'm looking
forward for contributers.

You can see a demo  http://www.kemelyon.com/flexreport here 

Frederico

aceoohay wrote:
> 
> In case anyone cares I found a tool that does what I want, no more 
> and no less. As an added benefit it is Open Source.
> 
> The tool is fyiReporting, at http://www.fyireporting.com it uses the 
> M$ "Report Definition Language" (rdl spec). It has a gui IDE and a 
> renderer that can be called from web apps.
> 
> I have begun using it, and it is very easy to use (a few hours and 
> you can crank out a decent looking report, after that, a simple 
> report can be done in minutes) reasonably bug free, and all it 
> requires is a couple of dll's and an .aspx file put on the server. 
> The only thing it doesn't have that would be nice is output to Excel, 
> but that is not high on my priority list.
> 
> The only thing that I would improve is the documentation, but the 
> good news it's pretty simple to setup and use.
> 
> My personal opinion is that someone should use the same M$ spec and 
> write a version of the renderer for PHP & Java. Since the IDE is 
> simple, to use and fairlyy robust, converting that could come later, 
> if ever.
> 
> Paul
> 
> --- In flexcoders@yahoogroups.com, Scott - FastLane  
> wrote:
>>
>> In case you are interested in programmatically generating PDFs... 
> you 
>> can find a .NET port of the iText library here 
>> .  A quick google 
> search 
>> also turned up C# and other versions as well.
>> 
>> hth
>> Scott
>> 
>> Scott Melby
>> Founder, Fast Lane Software LLC
>> http://www.fastlanesw.com
>> 
>> 
>> 
>> aceoohay wrote:
>> >
>> > Thanks for the replies.
>> >
>> > My backend is ASP.NET (Visual Web Developer Express Edition).
>> >
>> > I have contacted Yakov Fain of Farata Systems via e-mail, and 
> their
>> > product is a full blown report generator with user designed 
> reports
>> > etc. Their system ClearBI, unless something has changed, requires
>> > Apache/Tomcat for hosting the reports, and has more overhead than 
> I
>> > want.
>> >
>> > How difficult is it to implement Ruport for a non Ruby system?
>> >
>> > If there was something similar to the old FoxPro reporting tool 
> that
>> > was available for generating reports, that would satisfy most of 
> what
>> > I need.
>> >
>> > Paul
>> >
>> >
>>
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Report-building.-tp13376870p14438899.html
Sent from the FlexCoders mailing list archive at Nabble.com.


Re: [flexcoders] Solutions for provide a secure access to a Web-Service using Flex

2007-12-21 Thread Frederico Garcia

I think the best way would be implementing some kind of handshake protocol.
There are plenty of encryption algorithms available. You could save the
passwords encrypted (using sha1) on the DB and then just send it encrypted
on every request. On the server side you just had to check if there was any
matching password before you reply. Still subject to brute force attacks,
but enough for most cases.



João Saleiro wrote:
> 
> Hi, 
> 
> we are building an enterprise application using Flex. One module of
> the application will be accessible on the internet so users can access
> some data from the main system, without requiring a login.
> 
> This module communicates with a web-service. It is already finished
> and working fine, but the client needs to make sure that the
> web-service is only accessible to our specific Flash client. Other
> clients should not be able to request data from the web-service, since
> it might compromise the business behind it.
> 
> If there isn't a "perfect" solution, our client is not worried with
> the fact that SWF's can be decompiled, so there is a possibility to
> have something like a "key" hard-coded on the flash module, and a way
> to use encription to respond to a challenge made by the server -
> avoiding at least man on the middle attacks, i guess.
> Some years ago i have studied a bit of public key infrastructures, but
> never applied it on a project.
> 
> I am far from being expert on security, but this is really important,
> since without a rather reasonable solution a big part of the project
> will be useless.
> 
> What solutions do you propose? Does Flex have some kind of tools to
> solve this problems?
> 
> Thanks, 
> 
> João Saleiro
> 
> www.riapt.org
> www.webfuel.pt
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Solutions-for-provide-a-secure-access-to-a-Web-Service-using-Flex-tp14456430p14458004.html
Sent from the FlexCoders mailing list archive at Nabble.com.