Re: [Flashcoders] Reliable way to split a string into an array of lines?

2007-09-14 Thread jtgxbass
I find this fast and reliable... var lines:Array = str.split (\r\n).join(\n).split(\r).join(\n).split(\n); On 9/13/07, Mark Winterhalder [EMAIL PROTECTED] wrote: var lines : Array = (str.indexOf( \r\n ) -1) ? str.split( \r\n ) : str.split( \n ); Or, if you want to take MacOS 9 into

Re: [Flashcoders] Convert URLs in a string to links

2007-06-26 Thread jtgxbass
Well, simplest is to use one of the many regex classes out there, failing that 8--8--8--8--8--8--8--8-- var test = Some link http://test.com and another http://www.berty.co.uklets test.; var markedUp = ; var h =

Re: [Flashcoders] Re: Asynchronous ExternalInterface Calls From Javascript, possible?

2007-06-21 Thread jtgxbass
I suspect the first call delay is to do with flash getting a wsdl file (if its a SOAP service). Once it has the wsdl, it needs not d/load it again. On 6/21/07, elibol [EMAIL PROTECTED] wrote: Hmm, I think it checks for the crossdomain.xml file when the webservice attempts to load/connect.

Re: [Flashcoders] how to get CDATA into an XML object

2007-06-20 Thread jtgxbass
trace(nodeType :+child.nodeType); trace(nodeValue :+child.nodeValue); should read trace(nodeType :+child.firstChild.nodeType); trace(nodeValue :+child.firstChild.nodeValue); On 6/20/07, Charles Parcell [EMAIL PROTECTED] wrote: I believe the entire thing has to be inside the CDATA. var

Re: [Flashcoders] Asynchronous ExternalInterface Calls From Javascript, possible?

2007-06-20 Thread jtgxbass
You could make use of ExternalInterface.addCallback. Therefore the JS function you call with ExternalInterface.call starts some process off then returns straight away. When your process is done it calls your registered flash callback. Therefore you end up with asynchronous. All said and done,

Re: [Flashcoders] AS3 new Class from string

2007-06-18 Thread jtgxbass
In AS3 is done like this... import flash.utils.getDefinitionByName; var ObClass:Class = getDefinitionByName( fully.qualified.class.name ) as Class; var instance = new ObClass(); On 6/18/07, elibol [EMAIL PROTECTED] wrote: Not sure since eval() is gone. Try keeping a reference for each

Re: [Flashcoders] AS3 new Class from string

2007-06-18 Thread jtgxbass
Jim: getDefinitionByName(flash.display::Sprite); Should read: getDefinitionByName(flash.display.Sprite); I think. On 6/18/07, jtgxbass [EMAIL PROTECTED] wrote: In AS3 is done like this... import flash.utils.getDefinitionByName; var ObClass:Class = getDefinitionByName

Re: [Flashcoders] How can we sum to dates???

2007-06-16 Thread jtgxbass
Just use flash's Date class and work with milliseconds... var startDate = new Date(2007,0,14,11,30,0,0); var duration = 50 * 60 * 1000; // in milliseconds var endDate = new Date(startDate.getTime() + duration); On 6/16/07, eka [EMAIL PROTECTED] wrote: Hello :) i have update my SVN

Re: [Flashcoders] examples of scripting the Flash application?

2007-06-07 Thread jtgxbass
Show a browse for file dialog: var fileURL = fl.browseForFileURL(open, Select file); Suggest you read the docs: http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part7_Extending.html as already mentioned by Muzak On 6/7/07, Roy Pardi [EMAIL PROTECTED] wrote: At

Re: [Flashcoders] [OT] desktop file searching utility

2007-05-30 Thread jtgxbass
You can use grep on windows. Install cygwin. On 5/29/07, Hairy Dog Digital [EMAIL PROTECTED] wrote: Windows dude... not Linux! -Original Message- From: jtgxbass [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 29, 2007 2:20 PM To: flashcoders@chattyfig.figleaf.com Subject: Re

Re: [Flashcoders] [OT] desktop file searching utility

2007-05-30 Thread jtgxbass
Thats why we have google ;) On 5/30/07, Hairy Dog Digital [EMAIL PROTECTED] wrote: Okay. But, I'm not a mindreader. -Original Message- From: jtgxbass [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 4:42 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] [OT

Re: [Flashcoders] [OT] desktop file searching utility

2007-05-29 Thread jtgxbass
grep -rl --include='*.as' 'class NonGUI' . On 5/29/07, Hairy Dog Digital [EMAIL PROTECTED] wrote: Thanks Bojil, I was looking at their web page and see that one of the features is file comparison/synching. Their feature list is rather impressive: search, compare, synch, reg expressions, etc.

Re: [Flashcoders] Flex question : setting listeners and component parameters from the class

2007-03-25 Thread jtgxbass
in mxml: ... lcModel = new DirectoryBrowser(this) ... in class: ... public class DirectoryBrowser{ private var btn:Button; private var txt:Text; public function DirectoryBrowser(owner):void{ btn = owner.btn; txt = owner.txt; setStuff() Alert.show(class loaded,class debug) } ... that said, ugly