Re: [Flashcoders] Mailing Lists and Tools
For what I do phpStorm looks perfect - it supports JS/jQuery and SASS, and it has FTP/SVN client. I'll try it out. Thanks guys. Kenneth Kawamoto http://www.materiaprima.co.uk/ On 23 May 2013, at 23:35, Rick Hassen wrote: if you really like Webstorm, some understand it to be a stripped down version of phpStorm (both by JetBrains): http://www.jetbrains.com/phpstorm/ From: kennethkawam...@gmail.com To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Mailing Lists and Tools Date: Thu, 23 May 2013 23:23:53 +0100 CC: Webstorm doesn't support PHP :( Kenneth Kawamoto http://www.materiaprima.co.uk/ On 23 May 2013, at 17:35, Jon Bradley wrote: There are many better alternatives for professional coding that include automated building, unit testing, support for SCSS and LESS, grunt, etc. I wouldn't consider Dreamweaver a serious platform for building web applications. Useful for some, certainly, but there are many better options out there. Probably the best for those that aren't vested in the Visual Studio platform: http://www.jetbrains.com/idea/ Second best (by the same company): http://www.jetbrains.com/webstorm/ For just text editor usage, for the most part: http://www.sublimetext.com/ http://macrabbit.com/espresso/ I'd personally stay way away from Dreamweaver. It keeps you bound to a low quality workflow that's not scalable or efficient. -j On May 23, 2013, at 12:15 PM, Kenneth Kawamoto kennethkawam...@gmail.com wrote: I know it's a long tradition to laugh at Dreamweaver as substandard tool, but I actually use it daily, for two reasons: 1. Comprehensive jQuery auto-completion/code-hint as well as PHP 2. Built-in FTP SVN client Obviously never touch the WYSIWYG editor. Please let me know if there are alternative with above equipped. I don't like to be laughed at. But I know none. Kenneth Kawamoto http://www.materiaprima.co.uk/ On 23 May 2013, at 16:17, James Merrill wrote: I've been moving to StackOverflow for questions, and Reddit's coding subreddits for general programming discussion Here's a URL that bundles a bunch of good programming subreddits: http://www.reddit.com/r/webdev+web_design+html+css+programming+learnprogramming+design+ProgrammerHumor+html5 As for an IDE, I would highly discourage you from using Dreamweaver. There are much better tools that are cheap/free. I am currently using Aptana, which is Eclipse based and contains tons of helpful features. I am moving towards using SublimeText as my primary IDE. It's extremely streamlined and elegant, and I highly suggest checking it out. Adobe has been working on an IDE called Brackets that looks pretty cool too. On Thu, May 23, 2013 at 11:06 AM, Kerry Thompson al...@cyberiantiger.biz wrote: I've found Dreamweaver to be a good tool for HTML5. when you get JavaScript under your belt, take a look at JQuery. it will save you a lot of development time. Mailing lists are pretty quiet these days. I don't know where the programmers congregate, but my colleagues in the French Horn world have moved to a Facebook group. Cordially, Kerry Thompson On May 23, 2013 9:52 AM, Bryan Thompson br...@swfmagic.com wrote: I know many developers are migrating towards HTML5/CSS/ JavaScript. Google reveals a multitude of results for mailing lists. I hope to take advantage of the experience on this list to get some advice on good quality lists like this one. I also would like recommendations for (Windows) IDE's for JavaScript, or general HTML5 development including all the supporting languages. I have Dreamweaver, but that seems a bit of overkill for a developer. Thanks in advance guys! Bryan Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- James Merrill ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list
Re: [Flashcoders] Mailing Lists and Tools
I know it's a long tradition to laugh at Dreamweaver as substandard tool, but I actually use it daily, for two reasons: 1. Comprehensive jQuery auto-completion/code-hint as well as PHP 2. Built-in FTP SVN client Obviously never touch the WYSIWYG editor. Please let me know if there are alternative with above equipped. I don't like to be laughed at. But I know none. Kenneth Kawamoto http://www.materiaprima.co.uk/ On 23 May 2013, at 16:17, James Merrill wrote: I've been moving to StackOverflow for questions, and Reddit's coding subreddits for general programming discussion Here's a URL that bundles a bunch of good programming subreddits: http://www.reddit.com/r/webdev+web_design+html+css+programming+learnprogramming+design+ProgrammerHumor+html5 As for an IDE, I would highly discourage you from using Dreamweaver. There are much better tools that are cheap/free. I am currently using Aptana, which is Eclipse based and contains tons of helpful features. I am moving towards using SublimeText as my primary IDE. It's extremely streamlined and elegant, and I highly suggest checking it out. Adobe has been working on an IDE called Brackets that looks pretty cool too. On Thu, May 23, 2013 at 11:06 AM, Kerry Thompson al...@cyberiantiger.bizwrote: I've found Dreamweaver to be a good tool for HTML5. when you get JavaScript under your belt, take a look at JQuery. it will save you a lot of development time. Mailing lists are pretty quiet these days. I don't know where the programmers congregate, but my colleagues in the French Horn world have moved to a Facebook group. Cordially, Kerry Thompson On May 23, 2013 9:52 AM, Bryan Thompson br...@swfmagic.com wrote: I know many developers are migrating towards HTML5/CSS/JavaScript. Google reveals a multitude of results for mailing lists. I hope to take advantage of the experience on this list to get some advice on good quality lists like this one. I also would like recommendations for (Windows) IDE's for JavaScript, or general HTML5 development including all the supporting languages. I have Dreamweaver, but that seems a bit of overkill for a developer. Thanks in advance guys! Bryan Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- James Merrill ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Mailing Lists and Tools
Thanks for suggestions gentlemen. I don't think Sublime does jQuery? Jetbrains editors look good. Dreamweaver doesn't do SASS well so that's something I will definitely like in these editors :) Kenneth Kawamoto http://www.materiaprima.co.uk/ On 23 May 2013, at 17:39, Marco Terrinoni wrote: Think Sublime Text 2 has a lot of those functions in the packages repo. You can also version control via github as well as SVN. Reason I switched from DW was due to the CSS pre-processor packages for SASS and LESS, and LiveReload makes authoring css so much easier. Tis an amazing text editor, but it's horses for courses really. I still use DW to setup sites and configure localhost server settings, but that's about it. Marco Terrinoni - Director MULARAM PRODUCTIONS web design // animation // illustration uk: +44 7876 652 643 e: ma...@mularam.com w: www.mularam.com -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kenneth Kawamoto Sent: 23 May 2013 17:15 To: Flash Coders List Subject: Re: [Flashcoders] Mailing Lists and Tools I know it's a long tradition to laugh at Dreamweaver as substandard tool, but I actually use it daily, for two reasons: 1. Comprehensive jQuery auto-completion/code-hint as well as PHP 2. Built-in FTP SVN client Obviously never touch the WYSIWYG editor. Please let me know if there are alternative with above equipped. I don't like to be laughed at. But I know none. Kenneth Kawamoto http://www.materiaprima.co.uk/ On 23 May 2013, at 16:17, James Merrill wrote: I've been moving to StackOverflow for questions, and Reddit's coding subreddits for general programming discussion Here's a URL that bundles a bunch of good programming subreddits: http://www.reddit.com/r/webdev+web_design+html+css+programming+learnpr ogramming+design+ProgrammerHumor+html5 As for an IDE, I would highly discourage you from using Dreamweaver. There are much better tools that are cheap/free. I am currently using Aptana, which is Eclipse based and contains tons of helpful features. I am moving towards using SublimeText as my primary IDE. It's extremely streamlined and elegant, and I highly suggest checking it out. Adobe has been working on an IDE called Brackets that looks pretty cool too. On Thu, May 23, 2013 at 11:06 AM, Kerry Thompson al...@cyberiantiger.bizwrote: I've found Dreamweaver to be a good tool for HTML5. when you get JavaScript under your belt, take a look at JQuery. it will save you a lot of development time. Mailing lists are pretty quiet these days. I don't know where the programmers congregate, but my colleagues in the French Horn world have moved to a Facebook group. Cordially, Kerry Thompson On May 23, 2013 9:52 AM, Bryan Thompson br...@swfmagic.com wrote: I know many developers are migrating towards HTML5/CSS/JavaScript. Google reveals a multitude of results for mailing lists. I hope to take advantage of the experience on this list to get some advice on good quality lists like this one. I also would like recommendations for (Windows) IDE's for JavaScript, or general HTML5 development including all the supporting languages. I have Dreamweaver, but that seems a bit of overkill for a developer. Thanks in advance guys! Bryan Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- James Merrill ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders - No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3343 / Virus Database: 3162/6348 - Release Date: 05/22/13 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Mailing Lists and Tools
Webstorm doesn't support PHP :( Kenneth Kawamoto http://www.materiaprima.co.uk/ On 23 May 2013, at 17:35, Jon Bradley wrote: There are many better alternatives for professional coding that include automated building, unit testing, support for SCSS and LESS, grunt, etc. I wouldn't consider Dreamweaver a serious platform for building web applications. Useful for some, certainly, but there are many better options out there. Probably the best for those that aren't vested in the Visual Studio platform: http://www.jetbrains.com/idea/ Second best (by the same company): http://www.jetbrains.com/webstorm/ For just text editor usage, for the most part: http://www.sublimetext.com/ http://macrabbit.com/espresso/ I'd personally stay way away from Dreamweaver. It keeps you bound to a low quality workflow that's not scalable or efficient. -j On May 23, 2013, at 12:15 PM, Kenneth Kawamoto kennethkawam...@gmail.com wrote: I know it's a long tradition to laugh at Dreamweaver as substandard tool, but I actually use it daily, for two reasons: 1. Comprehensive jQuery auto-completion/code-hint as well as PHP 2. Built-in FTP SVN client Obviously never touch the WYSIWYG editor. Please let me know if there are alternative with above equipped. I don't like to be laughed at. But I know none. Kenneth Kawamoto http://www.materiaprima.co.uk/ On 23 May 2013, at 16:17, James Merrill wrote: I've been moving to StackOverflow for questions, and Reddit's coding subreddits for general programming discussion Here's a URL that bundles a bunch of good programming subreddits: http://www.reddit.com/r/webdev+web_design+html+css+programming+learnprogramming+design+ProgrammerHumor+html5 As for an IDE, I would highly discourage you from using Dreamweaver. There are much better tools that are cheap/free. I am currently using Aptana, which is Eclipse based and contains tons of helpful features. I am moving towards using SublimeText as my primary IDE. It's extremely streamlined and elegant, and I highly suggest checking it out. Adobe has been working on an IDE called Brackets that looks pretty cool too. On Thu, May 23, 2013 at 11:06 AM, Kerry Thompson al...@cyberiantiger.biz wrote: I've found Dreamweaver to be a good tool for HTML5. when you get JavaScript under your belt, take a look at JQuery. it will save you a lot of development time. Mailing lists are pretty quiet these days. I don't know where the programmers congregate, but my colleagues in the French Horn world have moved to a Facebook group. Cordially, Kerry Thompson On May 23, 2013 9:52 AM, Bryan Thompson br...@swfmagic.com wrote: I know many developers are migrating towards HTML5/CSS/ JavaScript. Google reveals a multitude of results for mailing lists. I hope to take advantage of the experience on this list to get some advice on good quality lists like this one. I also would like recommendations for (Windows) IDE's for JavaScript, or general HTML5 development including all the supporting languages. I have Dreamweaver, but that seems a bit of overkill for a developer. Thanks in advance guys! Bryan Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- James Merrill ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X XML manipulation
Here's one way: var xml:XML = my_xml row id=a parent=a / row id=b parent=a / row id=c parent=a / row id=d parent=d / row id=e parent=d / row id=f parent=d / /my_xml; var ids:Array = [a, d]; for each (var s:String in ids){ xml.row.(@id == s).children = xml.row.(@parent == s @id != s); while(xml.row.(@parent == s @id != s).length()) delete xml.row.(@parent == s @id != s)[0]; } trace(xml); // trace my_xml row id=a parent=a row id=b parent=a/ row id=c parent=a/ /row row id=d parent=d row id=e parent=d/ row id=f parent=d/ /row /my_xml Kenneth Kawamoto http://www.materiaprima.co.uk/ On 14/10/2011 17:34, Paul Andrews wrote: On 12/10/2011 21:49, Kenneth Kawamoto wrote: Not sure if this is the best way but you can do: var xml:XML = my_xml row id=a / row id=b / row id=c / /my_xml; xml.row.(@id == a).children = xml.row.(@id != a); xml.setChildren(xml.row.(@id == a)); trace(xml); // trace my_xml row id=a row id=b/ row id=c/ /row /my_xml Kenneth Kawamoto http://www.materiaprima.co.uk/ Thanks - that works well and I hadn't considered using setChildren. It's a great solution that shows my simplification was too simple! If I have my_xml row id=a parent=a / row id=b parent=a / row id=c parent=a / row id=d parent=d / row id=e parent=d / row id=f parent=d / /my_xml but want my_xml row id=a parent=a row id=b parent=a/ row id=c parent=a/ /row row id=d parent=d row id=e parent=d/ row id=f parent=d/ /row /my_xml then it's closer to the real-life scenario and a bit harder. Thanks for the solution. Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X XML manipulation
It's getting rather interesting :D var xml:XML = my_xml row id=a parent=a / row id=b parent=a / row id=c parent=a / row id=d parent=d / row id=e parent=d / row id=f parent=d / row id=g parent=e / row id=h parent=e / row id=i parent=h / /my_xml; for each (var row:XML in xml.row){ if(row.@id != row.@parent){ xml..row.(@id == row.@parent).appendChild(row.copy()); delete xml.row.(@id == row.@id)[0]; } } trace(xml); // trace my_xml row id=a parent=a row id=b parent=a/ row id=c parent=a/ /row row id=d parent=d row id=e parent=d row id=g parent=e/ row id=h parent=e row id=i parent=h/ /row /row row id=f parent=d/ /row /my_xml Kenneth Kawamoto http://www.materiaprima.co.uk/ On 16/10/2011 13:25, Paul Andrews wrote: On 16/10/2011 13:01, Paul Andrews wrote: On 16/10/2011 10:06, Kenneth Kawamoto wrote: Here's one way: var xml:XML = my_xml row id=a parent=a / row id=b parent=a / row id=c parent=a / row id=d parent=d / row id=e parent=d / row id=f parent=d / /my_xml; var ids:Array = [a, d]; for each (var s:String in ids){ xml.row.(@id == s).children = xml.row.(@parent == s @id != s); while(xml.row.(@parent == s @id != s).length()) delete xml.row.(@parent == s @id != s)[0]; } trace(xml); Thanks Kenneth. That works very nicely. I appreciate you taking the time to do my little puzzle! I made one change: for each (var s:String in xml.row.(@id == @parent).@id){ xml.row.(@id == s).children = xml.row.(@parent == s @id != s); while(xml.row.(@parent == s @id != s).length()) delete xml.row.(@parent == s @id != s)[0]; } Thank you! Ah, I went one stage further, which breaks the necessity for the parent to have @id == @parent: var xml:XML = my_xml row id=a parent=a / row id=b parent=a / row id=c parent=a / row id=d parent=d / row id=e parent=d / row id=f parent=d / row id=g parent=e / row id=h parent=e / row id=i parent=h / /my_xml; Scratching my head again.. ! Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X XML manipulation
Not sure if this is the best way but you can do: var xml:XML = my_xml row id=a / row id=b / row id=c / /my_xml; xml.row.(@id == a).children = xml.row.(@id != a); xml.setChildren(xml.row.(@id == a)); trace(xml); // trace my_xml row id=a row id=b/ row id=c/ /row /my_xml Kenneth Kawamoto http://www.materiaprima.co.uk/ On 11/10/2011 14:53, Paul Andrews wrote: What's the best way to turn this: myXMLNode = my_xml row id=a / row id=b / row id=c / /my_xml; into: my_xml row id=a row id=b / row id=c / /row /my_xml Using some E4X? It's not so much a case of adding b and c as children of a, but of removing them so I don't end up with: my_xml row id=a row id=b / row id=c / /row row id=b / row id=c / /my_xml Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Vector.map()
private function arrayMapper(item:uint, index:uint, array:Array):uint { return item + 30; } trace([1, 2, 3, 4, 5].map(arrayMapper)); // traces 31,32,33,34,35 Array.map() does what it says it does. private function vectorMapper(item:uint, index:uint, vector:Vector.uint):uint { return item + 30; } trace(new uint[1, 2, 3, 4, 5].map(vectorMapper)); // traces undefined Vector.map() does, well, f-all. I can use forEach() to get what I want but this doesn't look right. Thanks for testing MM! Kenneth Kawamoto http://www.materiaprima.co.uk/ On 19/08/2011 13:36, Mendelsohn, Michael wrote: You're right Kenneth. var g:Vector.uint = Vector.uint([1,2,3,4,5]); var hh:Vector.uint = g.slice(); var h:Vector.uint = g.map(mapper); var a = 5; function mapper(item:uint,ind:uint,g:Vector.uint):Vector.uint{ trace(g[ind]+30); return g; } In this case, hh returns the vector, and h still returns null. - MM -Original Message- From: Kenneth Kawamoto [mailto:kennethkawam...@gmail.com] Sent: Thursday, August 18, 2011 5:15 PM To: Flash Coders List Cc: Mendelsohn, Michael Subject: Re: [Flashcoders] Vector.map() What do you get for h? Kenneth Kawamoto http://www.materiaprima.co.uk/ On 18/08/2011 21:08, Mendelsohn, Michael wrote: Hi Kenneth... This is working for me: var g:Vector.uint = Vector.uint([1,2,3,4,5]); var h:Vector.uint = g.map(mapper); function mapper(item:uint,ind:uint,g:Vector.uint):void{ trace(g[ind]+30); } Hope that helps, - Michael M. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kenneth Kawamoto Sent: Thursday, August 18, 2011 9:27 AM To: Flash Coders List Subject: [Flashcoders] Vector.map() Dear coders, Vector.map() is supposed to return a new Vector but it appears to return nothing (undefined). Is this working for you? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Vector.map()
Dear coders, Vector.map() is supposed to return a new Vector but it appears to return nothing (undefined). Is this working for you? Regards, Kenneth -- Kenneth Kawamoto http://www.materiaprima.co.uk/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Vector.map()
What do you get for h? Kenneth Kawamoto http://www.materiaprima.co.uk/ On 18/08/2011 21:08, Mendelsohn, Michael wrote: Hi Kenneth... This is working for me: var g:Vector.uint = Vector.uint([1,2,3,4,5]); var h:Vector.uint = g.map(mapper); function mapper(item:uint,ind:uint,g:Vector.uint):void{ trace(g[ind]+30); } Hope that helps, - Michael M. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kenneth Kawamoto Sent: Thursday, August 18, 2011 9:27 AM To: Flash Coders List Subject: [Flashcoders] Vector.map() Dear coders, Vector.map() is supposed to return a new Vector but it appears to return nothing (undefined). Is this working for you? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] contract/FT position (Paris/Europe)
That's not valid XML Kenneth Kawamoto http://www.materiaprima.co.uk/ On 22/07/2011 19:06, Mendelsohn, Michael wrote: Hi list... The second line returns an XMLList only if the first line (bug) isn't commented out. If the first line is commented out, the second line returns null. How can it be possible that the second line's result depends on the first line running? Thanks, - Michael M. var bug:XMLList = topic..asset.(hasOwnProperty(@title)); var xmlList:XMLList = topic.descendants(*).(hasOwnProperty(@title) (@title == Presentation)); topic title=my topic menu section type=pubs asset id=i type=doc fileName=doc.pdf//section section type=media asset id=a title=Presentation fileName=pres.pptx/ asset id=b title=animation fileName=flash.swf/ section type=info asset id=c title=questions/ asset id=d title=something/ /section /menu /topic ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Stage video
oops sorry John 10.2 playerglobal.swc are in these places (under OS X) /Applications/Adobe Flash CS5/Common/Configuration/ActionScript 3.0/FP10.2 /Applications/Adobe Flash Builder 4/sdks/flex_sdk_4.5.0.20967/frameworks/libs/player/10.2 10.3 or other FP versions are in the similar locations. Kenneth Kawamoto http://www.materiaprima.co.uk/ On 17/06/2011 00:06, John R. Sweeney Jr wrote: Well Mister Winkie :) what is the proper name? Thanks, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Stage video
FP10.3 SWC http://download.macromedia.com/pub/labs/flashplatformruntimes/flashplayer10-3/flashplayer10-3_playerglobal_052011.swc Kenneth Kawamoto http://www.materiaprima.co.uk/ On 17/06/2011 00:06, John R. Sweeney Jr wrote: Well Mister Winkie :) what is the proper name? Thanks, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Stage video
That's not the correct name! ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ On 16/06/2011 18:05, John R. Sweeney Jr wrote: I currently have CS3, CS4 and CS5 on my system and a global search for playerglobals.swc comes up with nothing. If that is the correct name, it is not anywhere on my Mac Book Pro. Thanks, John on 6/16/11 10:46 AM, Henrik Andersson at he...@henke37.cjb.net wrote: He isn't looking hard enough then. All versions of flash comes with several playerglobals.swc files, one for each player version. John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X question: finding parent
var xml:XML = root pets group=A pet name=Rover/ pet name=Buffy/ /pets pets group=B pet name=Spot/ pet name=Sugar/ /pets /root; trace(xml.pets.pet.(@name == Sugar).parent().@group); // B Perhaps you don't want to call your XML pets as it's a node name as well. Kenneth Kawamoto http://www.materiaprima.co.uk/ On 05/05/2011 16:32, Mendelsohn, Michael wrote: Hi list... I'm trying to find some xml's parent attribute. I havepet name=Sugar/ and I want to find B. var pets:XML =pets group=A pet name=Rover/ pet name=Buffy/ /pets pets group=B pet name=Spot/ pet name=Sugar/ /pets; I can't seem to find it. Anyone know how? Thanks, - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X question: finding parent
trace(xml.pets.pet.(toXMLString() == 'pet name=Sugar/').parent().@group); // B -- Kenneth Kawamoto http://www.materiaprima.co.uk/ On 05/05/2011 17:06, Mendelsohn, Michael wrote: Thanks everyone. I don't want to find thepet node by using just @name. I need to match a node in xml.pets, given a full node, like so: xml.pets.(pet.toXMLString() == myPet.toXMLString()); I can't seem to get part that working. I think it should be easy to use parent() once I have that bit, right? - Michael M. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kenneth Kawamoto Sent: Thursday, May 05, 2011 11:54 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] E4X question: finding parent var xml:XML =root pets group=A pet name=Rover/ pet name=Buffy/ /pets pets group=B pet name=Spot/ pet name=Sugar/ /pets /root; trace(xml.pets.pet.(@name == Sugar).parent().@group); // B Perhaps you don't want to call your XML pets as it's a node name as well. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X question: finding parent
This may be slightly more elegant than using toXMLString(): trace(xml.pets.pet.(contains(pet name=Sugar/)).parent().@group); // B Kenneth Kawamoto http://www.materiaprima.co.uk/ On 05/05/2011 17:06, Mendelsohn, Michael wrote: Thanks everyone. I don't want to find thepet node by using just @name. I need to match a node in xml.pets, given a full node, like so: xml.pets.(pet.toXMLString() == myPet.toXMLString()); I can't seem to get part that working. I think it should be easy to use parent() once I have that bit, right? - Michael M. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kenneth Kawamoto Sent: Thursday, May 05, 2011 11:54 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] E4X question: finding parent var xml:XML =root pets group=A pet name=Rover/ pet name=Buffy/ /pets pets group=B pet name=Spot/ pet name=Sugar/ /pets /root; trace(xml.pets.pet.(@name == Sugar).parent().@group); // B Perhaps you don't want to call your XML pets as it's a node name as well. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] loop to delete XML nodes WAS: Getting bitmap data after successfully loading a swf file
I have this (rather ugly) solution: var i:uint = 0; while(i xml.dog.length()){ if(xml.dog[i].attribute(id) != 2){ delete xml.dog[i]; } else { ++i; } } My preferred way would be though, is doing it vise versa, i.e. add the qualifying nodes instead of deleting not qualifying nodes: var xml2:XML = pack /; xml2.appendChild(xml.dog.(attribute(id) == 2)); Kenneth Kawamoto http://www.materiaprima.co.uk/ On 01/12/2010 05:33, Mendelsohn, Michael wrote: Sorry list! I didn't properly title that post! :-( - MM Hi list... I want loop through to delete certain nodes, but can't figure out how to do it. I've tried a conventional loop, for...in and for...each...in, and I must be missing something. pack dog id=1/ dog/ dog id=2/ dog/ dog id=3/ /pack I'd like to delete all instances of dog that don't have an @id, or @id==2. Any thoughts? Thanks, - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Actionscript 4?
What?! I don't know which Kenneth Kawamoto you're referring to, Kerry, but I do not work for Adobe and I'm definitely not an ECMA Script Committee member either! May be you got mixed up with someone else from my Director-list days? Anyway it's good to be confused with someone better than I, rather than someone worse than I... ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ On 09/11/2010 18:01, Kerry Thompson wrote: I think we have at least one ECMA Script committee member on the list, Kenneth Kawamoto (I think he works for Adobe). Maybe he'll chime in and tell us what he's allowed to say :-) Cordially, Kerry Thompson Thanks Kerry - yeah, I have seen that Moock article, but I'm looking for something more recent. Jason Merrill Instructional Technology Architect Bank of America Global Learning -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kerry Thompson Sent: Tuesday, November 09, 2010 11:47 AM To: Flash Coders List Subject: Re: [Flashcoders] Actionscript 4? Jason Merrill wrote: Anyone heard or know anything about Actionscript 4? I know I can look at the latest ECMA specs to get an idea of what may be coming, but I'm curious about what Adobe's doing and when. -- Colin Moock talked about it at FIT in Amsterdam, in 2008. A bit dated, but there are some tantalizing tidbits: http://moock.org/lectures/newInECMAScript4/ Or, if you want it straight from the horse's mouth, here's a 40-page pdf, also a couple of years old: http://www.ecmascript.org/es4/spec/overview.pdf Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Left shifting input text as user types is unreliable
Some testers had reported that they were unable to enter a '@' symbol because when the tried to they got an '' (double quote). This is usually caused by wmode set to transparent. Kenneth Kawamoto http://www.materiaprima.co.uk/ On 24/09/2010 15:36, Paul Andrews wrote: On 22/09/2010 20:25, Paul Andrews wrote: On 22/09/2010 19:18, Cédric Muller wrote: And, by any chance, are any fonts not embedded ? (another halfy dumb question) No, they are embedded. It's not that the text is not accepted it's just that typing more text doesn't cause the text to move left when the field is filled. It's not a case of typing characters that aren't embedded. It really is odd. OK, I spotted what is making a difference. The field in question is being used to enter an email address. Some testers had reported that they were unable to enter a '@' symbol because when the tried to they got an '' (double quote). After a lot of discussion with the project manager where i explained this was certainly down to incorrectly configured keyboard/language settings (most likely UK English/US English), I needed a solution, so for that field I attached a CHANGE listener and substituted any typed character with @ . This works nicely, but has clearly introduced another problem on some machines. Scratched head for the moment. Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] fl.controls.Label.textField.textColor not working
If you cancel the TextFormat you should be able to apply textColor, i.e. _label.setStyle(textFormat, new TextFormat(null, null, null)); _label.textField.textColor = 0xff; But then you may as well just do: _label.setStyle(textFormat, new TextFormat(null, null, 0xff)); ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ On 21/09/2010 10:21, Alexander Farber wrote: Hello, does anybody please know, why I can only set the background color here? var _label:Label = new Label(); _label.text = 'should be red'; _label.textField.background = true; _label.textField.backgroundColor = 0x00FF00; _label.textField.textColor = 0xFF; addChild(_label); Thank you Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X question: counting number of subnodes
You can use elements() (and attributes()) to avoid getting the error, i.e. trace(Full games: + games.game.(elements(user).length() == 3).length()); Kenneth Kawamoto http://www.materiaprima.co.uk/ On 26/08/2010 11:00, Alexander Farber wrote: Hello fellow flashcoders, I'm still struggling with my e4x problem. With Kenneth's help I've got it partly working for the cases where each game has at least 1 user node: var games:XML = games game user/ user/ user/ /game game user/ user/ /game game user/ user/ /game /games; trace(All games: + games.game.length()); trace(Full games: + games.game.user.(length() == 3).length()); trace(Vacant games: + games.game.user.(length() 3).length()); This works well. But once I have a game with no user's, i.e.game/game or justgame/ it fails with runtime error: ReferenceError: Error #1065: Variable user is not defined. I know, that when using e4x you're first supposed to test for a game.user.length()!=0 before referencing a user node. But how do you do it in this case, when I'm trying to count total numbers? Thank you Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X question: counting number of subnodes
I meant attribute() - attribute() and attributes() are quite different things ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ On 26/08/2010 11:41, Kenneth Kawamoto wrote: You can use elements() (and attributes()) to avoid getting the error, i.e. trace(Full games: + games.game.(elements(user).length() == 3).length()); Kenneth Kawamoto http://www.materiaprima.co.uk/ On 26/08/2010 11:00, Alexander Farber wrote: Hello fellow flashcoders, I'm still struggling with my e4x problem. With Kenneth's help I've got it partly working for the cases where each game has at least 1 user node: var games:XML = games game user/ user/ user/ /game game user/ user/ /game game user/ user/ /game /games; trace(All games: + games.game.length()); trace(Full games: + games.game.user.(length() == 3).length()); trace(Vacant games: + games.game.user.(length() 3).length()); This works well. But once I have a game with no user's, i.e.game/game or justgame/ it fails with runtime error: ReferenceError: Error #1065: Variable user is not defined. I know, that when using e4x you're first supposed to test for a game.user.length()!=0 before referencing a user node. But how do you do it in this case, when I'm trying to count total numbers? Thank you Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X question: counting number of subnodes
May be this is what you after? trace(Full games: + games.game.(user.length() == 3).length()); trace(Vacant games: + games.game.(user.length() 3).length()); // Trace Full games: 1 Vacant games: 2 Kenneth Kawamoto http://www.materiaprima.co.uk/ Alexander Farber wrote: Hello, my server delivers XML data over socket, representing games, with up to 3 players in each. In my custom component I'd like to display a summary: total number of games, number of full games (3 players) number of vacant games (joinable, because less than 3 players). I've prepared a reduced test case demonstrating my problem: var games:XML = games game user/ user/ user/ /game game user/ user/ /game game user/ user/ /game /games; trace(All games: + games.game.length()); trace(Full games: + games.game.user.(length() == 3).length()); trace(Vacant games: + games.game.user.(length() 3).length()); It prints wrong results for the 2 last calculations: All games: 3 Full games: 0 Vacant games: 7 And a warning: Warning: 1060: Migration issue: The method length is no longer supported. Use the length property of the argument instead.. Please advise me Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] XML Question
If I understood you correctly, you want to filter the XML data according to a variable passed to the SWF. If so you'd do something like: var pageDetails:String = xmlData.PAGE.(@pg_name == loaderInfo.parameters.page).DETAILS; // page is the name of the var passed to the SWF here But I strongly recommend you to have a look at SWFAddress, which is absolutely indispensable framework if you are creating a site driven by dynamic data ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ John Singleton wrote: - Original Message From: kennethkawam...@gmail.com kennethkawam...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wed, May 5, 2010 12:48:28 PM Subject: Re: [Flashcoders] XML Question Say for example you are in the home section and obtaining the data for it, you'd do: var pageData:XML = xmlData.PAGE.(@pg_name == index)[0]; Then build the page based on pageData XML. k. Now, how can I build a switch statement to determine which page? I plan to pass a var to my swf, then call the data based on the value of the var (in this case, index). As stated previously, my switch statement, for reasons I don't understand, is giving me the value indexcontent; that is, all the values of pg_name: function completeXMLListener(e:Event):void { var xmlData:XML = XML (e.target.data); trace(xmldata.pa...@pg_name.tostring()) switch (xmldata.pa...@pg_name.tostring()) { case index: pageDetails = xmlData.PAGE.DETAILS.toString(); break; case contact: pageDetails = xmlData.PAGE.DETAILS.toString(); break; default: pageDetails = xmlData.PAGE.DETAILS.toString(); trace(pageDetails); break; } MyTextBlock(); } TIA, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 FLVPlayback buffering state never ends bug
Well the idea is if playheadUpdate is fired it means the buffering has ended even if it says still buffering. (You can monitor playheadTime/playheadPercentage as well for the same effects, as others suggested.) Another option is to use NetStream instead. You can monitor the buffering status NetStream.Buffer.Full/Empty/Flush - which *may* give you more accurate info. Kenneth Kawamoto http://www.materiaprima.co.uk/ patrick [insert last name here] wrote: Hey, thanks for your response. I didn't set a playheadupdate listener yet so i'm not sure if it fires once the video starts playing again. I'll set one up and let you know. One thing I am pretty sure of though is that even if the playheadupdate event does fire when the video starts playing again the buffering will still be true and the state will still equal buffering during this particular bug. Any ideas? Thanks again for your help with this ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 FLVPlayback buffering state never ends bug
If you set up a listener for playheadUpdate when bufferingStateEntered occurs, do you receive playheadUpdate event when the video starts playing again? Kenneth Kawamoto http://www.materiaprima.co.uk/ patrick [insert last name here] wrote: Ok, so I've spent a lot of time trying to figure this one out but so far nothing. It seems like it should be a known issue but I can't find any documentation on it. Any insight you might be able to give me would be greatly appreciated. Here's the problem: I'm using the FLVPlayback to load a streaming video from a FMS. The bug that I'm running into is with the buffering state. Most of the time it works fine, but certain times the video will enter a buffering state that never ends. The last video event that's fired in this scenario is the BUFFERING_STATE_ENTERED and then the video will start playing again but it won't fire the PLAYING_STATE_ENTERED event, and to go even further the video.state won't even change at all. My back up was to check on an interval if the video.state is buffering or not but even the video.state says buffering constantly at this point. The video is clearly playing but since the state is buffering it's causing me huge problems in my application. Is this something you have ever heard of? Like I said, I can't seem to find any information on this and it's becoming a huge problem for me. Any info you can give me would be greatly appreciated. Thanks, Patrick ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] container w/ text
multiline wordWrap ? Kenneth Kawamoto http://www.materiaprima.co.uk/ John Singleton wrote: Hi; I have this code: function Text() { parent_container5 = new Sprite(); addChild(parent_container5); //parent_container5.width = stage.stageWidth/2; //parent_container5.height = stage.stageWidth/4; parent_container5.x = 50; parent_container5.y = 350; var myText:TextField = new TextField(); var format:TextFormat = new TextFormat(); format.font = 'Arial'; format.size = 12; myText.textColor = 0x00; myText.autoSize = TextFieldAutoSize.LEFT; myText.x = 0; myText.y = 0; myText.htmlText = Lorem ipsum dolor sit amet; myText.setTextFormat(format); parent_container5.addChild(myText); } All works well except when I uncomment the width and height lines. How do I set the width and height so that I can contain my text within it? Also, when I add br / or p.../p to my htmlText it doesn't have any effect. TIA, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Variables in E4X ?
You can also do: var myNode:String = background; var myAttr:String = url; var foo:XMLList = customxml.config[mynod...@[myattr]; You almost got it ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ Steven Loe wrote: In E4X we use dot notation to access a node in an XML: var foo = customxml.config.backgrou...@url Is it possible to substitute variables in portions of the path above? Something like this: var myNode = background; var myAttr = @url; var foo = customXML.config.[myNode].[myAttr]; Possible? Thanks very much ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Fwd: Dynamically superimposing image onto video
The server load is not a concern but it will not need to be live streaming at all, so I am planning to do the dynamic image overlay - triggered by cue points and animated by script with possibly frame-by-frame hand drawn mask - at the client side. Thinking about it, there's no need to upload the user image to the server - just do everything at the client ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ Anthony Pace wrote: For the first sentence I meant to say that applying an overlay at the client is fine, if you are not concerned with your stream being ripped without branding, possible cnn style news events, or captions being included. If things need to be live and targeted you will want to do things at the server; otherwise, if server load is a concern, and you do not need to be changing graphics live, then doing it during encoding and prior to uploading the content to the server might be the way to go. On 3/12/2010 1:48 PM, Anthony Pace wrote: If you don't mind your stream being downloaded without the required branding or possible news event embedded into the video, plus the added bandwidth overhead is not a concern, than an overlay is perfect. If there are branding concerns, or you work for a site that would like to reduce bandwidth and send news events cnn style, then you will have to know how to modify the stream before you send it to the client. If new events aren't required, but the branding is, then you really only need to do a separate encoding that includes the content. Ads at cue point, using a number of methods, can easily be told to fire based on the time per frame. On 3/12/2010 12:15 PM, kennethkawam...@gmail.com wrote: Steady camera motion when shooting initial video would create script friendly sequence and should save a lot of time later - notes to myself :) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Passing Call To Child
If I understand you correctly you want to trace index.html? One funky way is... trace(new XML(a href='index.html'Home/a)@href); // traces index.html ...therefore if your e.currentTarget.getChildAt(0).htmlText is giving you a href='index.html'Home/a you can do: trace(new XML(e.currentTarget.getChildAt(0).htmlText)@href); Or you can use RegExp to extract the string without using XML. But this is crazy, really ;) You should not need to use getChildByName/getChildAt at all for this. Just extend Sprite and create public property, so that you can for example just do trace(e.target.href); Kenneth Kawamoto http://www.materiaprima.co.uk/ Susan Day wrote: On Wed, Mar 10, 2010 at 2:20 PM, Susan Day suzieprogram...@gmail.comwrote: On Wed, Mar 10, 2010 at 1:21 PM, kennethkawam...@gmail.com kennethkawam...@gmail.com wrote: If you trace e.currentTarget what do you get? [object Sprite] 1 The 1 is from this line, which follows: trace(e.currentTarget.numChildren); So lo and behold, apparently currentTarget does indeed have a child (I'm vindicated!). So I changed the line which used getChildByName to getChildAt and entered the value 0 and now all works well. But why didn't getChildByName work? How can I find the name of the child? Well, correction. getChildAt(0).htmlText gives me, of course, the full html text: a href='index.html'Home/a which, obviously, is not what I want. I tried to change htmlText to just the link, but of course that screwed up the display of the name of the nav widget (which should be Home not the whole blooming link). So I tried to cheat and use the name property and assign the url to it, but it didn't assign and chose its own name. What do? TIA, Susan ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Preloader, Pt. 2
Loader is used to load SWF or images. loader3.load(new URLRequest(index.py)); Is your Python script meant to return SWF/image? If you want to load a data, use URLLoader instead. But I think what you want is to go to another page, if so use navigateToURL(). Kenneth Kawamoto http://www.materiaprima.co.uk/ Victor Subervi wrote: Hi; I had another idea on how to tackle this problem of wanting to load two different swfs at the same time. (Please read thread if you don't understand what I mean.) Then I want to call/load an URL. I get no errors, however, it doesn't surf to the desired page, either. (Yes, I've loaded it on the server.) Here's the complete code: package { import flash.display.Bitmap; import flash.events.Event; import flash.events.MouseEvent; import flash.display.MovieClip; import com.greensock.*; import com.greensock.easing.*; import flash.display.Loader; import flash.events.ProgressEvent; import flash.text.TextField; import flash.text.TextFormat; import flash.text.TextFieldAutoSize; import flash.net.URLRequest; public class Preloader extends MovieClip { var loader:Loader = new Loader(); var loader2:Loader = new Loader(); var loader3:Loader = new Loader(); private var myTextField:TextField = new TextField(); var imgFlag1:Boolean = new Boolean(false); var imgFlag2:Boolean = new Boolean(false); public function Preloader() { addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); } private function init(e:Event) { loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded); // loader.load(new URLRequest(images/logo.png)); loader2.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded2); // loader.load(new URLRequest(images/map.png)); loader2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop); removeEventListener(Event.ADDED_TO_STAGE, init); addChild(myTextField); myTextField.width = 250; myTextField.x = stage.stageWidth/2 - 50; myTextField.y = stage.stageHeight/2; myTextField.selectable = false; myTextField.border = false; myTextField.borderColor = 0xAA; myTextField.autoSize = TextFieldAutoSize.LEFT; var myFormat:TextFormat = new TextFormat(); myFormat.color = 0xAA; myFormat.size = 24; myFormat.italic = true; //myTextField.setTextFormat(myFormat); myTextField.defaultTextFormat = myFormat; } private function imageLoaded(event:Event):void { var image:Bitmap = new Bitmap(event.target.content.bitmapData); addChild(image); imgFlag1 = true; if (imgFlag2 == true) { completePreloader(); } } private function imageLoaded2(event:Event):void { var image:Bitmap = new Bitmap(event.target.content.bitmapData); addChild(image); imgFlag2 = true; if (imgFlag1 == true) { completePreloader(); } } function completePreloader() { loader3.load(new URLRequest(index.py)); addChild(loader3); } function loop(e:ProgressEvent):void { var perc:Number = e.bytesLoaded/e.bytesTotal; myTextField.text = Math.ceil(perc*100).toString() + %; } } } Please advise. TIA, V ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] 404 page not showing with .htaccess
Is your embedding URL to your SWF in your 404.html specified as site-root relative? i.e. /errorPages/your.swf Kenneth Kawamoto http://www.materiaprima.co.uk/ Cor wrote: Hi List, I don't know if this is cross-posting, if so I apologize. I have this in my .htaccess: ErrorDocument 404 /errorPages/404.html The 404.html and the 404.swf is on my site in the directory errorPages. When I type in the url: www.mysite.com/errorPages/404.html is runs as expected. But when I force an error, like www.mysite.com/bla.html, it shows the 404.html page. I can tell this by View Source. But it doesn't run the swf in it? Any ideas?? Kind regards Cor van Dooren ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] 404 page not showing with .htaccess
When you view your 404 page as non existing page www.mysite.com/bla.html, relative URLs in your 404 HTML are treated as relative to bla.html Kenneth Kawamoto http://www.materiaprima.co.uk/ Cor wrote: Thanks for replying! No, I solved it with the help of Henrik by using BASE in my head section of the 404.html. I don’t understand why it would need /errorPages/404.swf because the 404.html is at the same place as the swf. My thought is that my .htaccess calls the /errorPages/404.html, regardless from the location it is called, and when this get loaded it plays the 404.swf. If I call it directly it works OK. So, however it works, I don't understand completely why it needs the BASE element -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kenneth Kawamoto Sent: maandag 28 december 2009 14:06 To: Flash Coders List Subject: Re: [Flashcoders] 404 page not showing with .htaccess Is your embedding URL to your SWF in your 404.html specified as site-root relative? i.e. /errorPages/your.swf Kenneth Kawamoto http://www.materiaprima.co.uk/ Cor wrote: Hi List, I don't know if this is cross-posting, if so I apologize. I have this in my .htaccess: ErrorDocument 404 /errorPages/404.html The 404.html and the 404.swf is on my site in the directory errorPages. When I type in the url: www.mysite.com/errorPages/404.html is runs as expected. But when I force an error, like www.mysite.com/bla.html, it shows the 404.html page. I can tell this by View Source. But it doesn't run the swf in it? Any ideas?? Kind regards Cor van Dooren ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] how do i say string + anything?
Or you could just use indexOf(). Kenneth Kawamoto http://www.materiaprima.co.uk/ strk wrote: On Wed, Sep 23, 2009 at 12:40:55PM +0100, thomas horner wrote: what i need to know if how to say is ; if(event.validBranch == index/nav/his + anything else that might follow){ Compare a substring of event.validBranch, from start to length of index/nav/his. --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] empty XML Attributes..
I think that's not exactly correct. You can use @ to access non-existence attributes but cannot use it for filtering. With the OP example, trace(_co...@instance); ...should not generate an error but you'd get an error with: trace(_conf.(@instance == boo)); ...so instead this should be used: trace(_conf.(attribute(instance) == boo)); Kenneth Kawamoto http://www.materiaprima.co.uk/ Steven Sacks wrote: You will get runtime errors when attempting to access an attribute that isn't there. The proper way to check for existence and length of an attribute is to use the .attributes() syntax as such: if (node.attribute(instance).length() 0) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] empty XML Attributes..
XMLList, and you can check its length(). Kenneth Kawamoto http://www.materiaprima.co.uk/ Glen Pike wrote: Hi, I am having problems parsing some XML config files and testing for empty attributes. There is an example xml below. Problem is that I am asking for the following: _co...@instance Which is returning a value, but I am not sure what type of value. Should this return null, or an empty string or something?? var _conf:XML =screen name=Library swf=LibraryScreenTest.swf symbol=com.robothespian.screen.LibraryScreen config=library.xml / Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Duplicate multiple lines in FlashDevelop?
No, it won't work on Macs ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ Sidney de Koning wrote: Yeah it is, they call it copy-pasting ;-) The key command is CTRL-C to copy and CTRL-V to paste... Think it even works on a mac too... One extra key command, but still incredibly usefull! ;-) Sorry couldn't help it ... :-) On Aug 18, 2009, at 4:46 PM, Joel Stransky wrote: Seems like it'd be an incredibly useful feature. On Tue, Aug 18, 2009 at 9:40 AM, Pedro Taranto ptara...@gmail.com wrote: don't know about multiple lines, but to duplicate a simple line just use CTRL+D -- Pedro Taranto Joel Stransky wrote: Anyone know how? Like if I want to dupe an entire function sig. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- --Joel Stransky stranskydesign.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] bookmarking a dynamic flash page
SWFAddress? Kenneth Kawamoto http://www.materiaprima.co.uk/ Andrew Sinning wrote: How could I let the user bookmark the current state of a dynamic flash page? I know how to save the current state of the movie and then just load that as the default, but what if the user should be able to bookmark multiple states, each with its own address? Can javascript tell the browser to change the address in the address bar without actually loading a new page, so that if the user creates a bookmark there is a reliable address? Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Filtering xml with E4X
You may want to try: projectsXML.project.(tags.tag.contains(Website)) Kenneth Kawamoto http://www.materiaprima.co.uk/ Mark Burvill wrote: Hello flashcoders, I'm trying to work out how to filter the below XML (loaded into a var called projectsXML) by the contents of the tag nodes, but can't quite get it working. So for instance, how would I use an E4X expression to return an XMLList that contained only those projects which have a tag of Website? Here's the xml: projects project titleMy project/title tags tagWebsite/tag /tags /project project titleAnother project/title tags tagGame/tag /tags /project project titleYet another one/title tags tagWebsite/tag tagGame/tag tagApplication/tag /tags /project project titleAnd another/title tags tagGame/tag tagWebsite/tag /tags /project /projects Thanks, Mark. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] no more mac ppc for adobe?
Officially Adobe CS4's system requirements specify Intel chip set; Adobe has dropped PPC support long time ago. http://www.adobe.com/products/creativesuite/mastercollection/systemreqs/ In reality many of CS4 programs do run on PPC but things like After Effects you cannot even install. I have Intel but I also have dual G5, so this makes me sad... :) Kenneth Kawamoto http://www.materiaprima.co.uk/ Gustavo Duenas wrote: Is adobe dropping the making of programs for the mac g5 ppc machines? I'm asking this because I've just downloaded the coldfusion builder beta and the flash builder beta(gumbo) and those are not going to run on g5 ppc machines , only for mac intel, is that the new direction of adobe or juts because of the beta releases? Regards, Gustavo ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Equivalent of setCharAt to change a character in a string
trace((Flash).replace(/(.{2}).(.*)/, $1e$2)); // Flesh Perhaps not the answer, I know ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ Paul Steven wrote: Probably something really simple but can't for the life of me recall the syntax to change a particular character of a string. For example if I have the word Flash and want to change the letter a to an e, I was hoping there was a function like setCharAt(2, e); Btw I am coding in AS3. Thanks paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Distributing Fonts in a standalone application
I remember Macromedia used to say: Because embedded fonts are available only to the movie, there are no legal obstacles to distributing fonts in Director movies or Director modify the font slightly so it's no longer the original font type thing. I'd have thought Adobe's stance is the same, but if you want to play safe you can use Adobe fonts :) http://www.adobe.com/type/browser/legal/embeddingeula.html Kenneth Kawamoto http://www.materiaprima.co.uk/ Sumeet Kumar wrote: Hi All, I am developing a desktop application in AS 2.0, in which user can design(add text, change text font or add image on the Tshirt for printing) his/her T-Shirts. Also, i have to give certain templates to user, out of these templates user can pick any template and design the T-Shirts using the selected template. For designing the templates, I am using windows default fonts like verdana, arial etc. My questions is, can i distribute these fonts by creating swf files(shared library)? Any help on this would be great. Regards Sumeet kumar ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Strange characters added to file when saving from AIR using fileStream
I may be wrong but that could be BOM? If you use writeUTF() and open the resulting file in a Unicode editor do you still see it? Kenneth Kawamoto http://www.materiaprima.co.uk/ Cheetham, Marcus wrote: I'm using fileStream to save a text file. This works OK, but introduces some strange characters at the beginning of the saved text. I'm saving XML data. I've kept this as an XML object and also converted it to string -- same thing always happens. Any idea how I can get rid of these characters? Thanks, This is what I end up with (note the 'g at the beginning) : 'gorder item id=1 menuNameburger/menuName price3.95/price /item item id=2 menuNamefries/menuName price1.45/price /item /order This is the Flex 3 code: ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute activate=createXML() mx:Script ![CDATA[ import flash.events.Event; import flash.filesystem.*; public function createXML():void { x1 = order !--This is a comment. -- ?PROC_INSTR sample ? item id='1' menuNameburger/menuName price3.95/price /item item id='2' menuNamefries/menuName price1.45/price /item /order } public var file:File; public function saveToFile() :void { file = new File(/filename.xml); file.addEventListener(Event.SELECT, dirSelected); file.browseForSave(''); } public function dirSelected(e:Event) :void { // this object will get saved to the file var dat:String = new String; var str:String = new String; str = x1.toXMLString(); dat = str; var fileStream:FileStream = new FileStream(); fileStream.open(file, FileMode.WRITE); fileStream.writeObject(dat); fileStream.close(); } ]] /mx:Script mx:Button x=102 y=320 label=Save XML click=saveToFile()/ mx:XML id=x1 format=e4x/ /mx:WindowedApplication ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Aaargh - how to put an image into a fl.controls.List?!
It should work if you create a MovieClip in the Library and place your PNG inside, then use the MovieClip Class name as icon. Kenneth Kawamoto http://www.materiaprima.co.uk/ Roman Blöth wrote: Hello folks, since hours now I'm trying to put an image into my List... I have built some small AS3-app that reads some data frorm an external source and populates the DataProvider for my List. One of the fields of each entry is called iconSource and contains the link name of a small PNG graphics included in the FLAs library (I used export to Flash of course) - like so: dp.addItem( { iconSource:btn_download, label:someText, src:decodeURIComponent(aArray[0]) } ); I tell the list that iconSource is the iconField to use: playList.iconField = iconSource; I also do not replace the iconFunction. Within my external AS class file (where the List and it's DataProvider are created/initialized) I also declared the link name of the PNG graphics like public var btn_download:BitmapData. But everything that happens is that - like before I have tried to add some graphics to the list - the label-part of my list data is displayed, but not the PNG graphics. Has anyone before desparately tried to achieve this and maybe could tell me what I might be missing?! Any comment welcome, best regards, Roman. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] accessing embedded cue point names
cuePoint event object has info property, which is an object contains properties such as name, time, and type. In your situation you would just fire some actions depending on the name of the cue point. Kenneth Kawamoto http://www.materiaprima.co.uk/ Sam Brown wrote: Hi list, Quick question that should be straightforward, but I'm having trouble finding the answer in the help docs: I've got a video with embedded event cue points in it.This is an FLV component with instance name myVid. I can fire events via myVid.addEventListner(MetadataEvent.CUE_POINT, doSomething); which works fine, but I want to listen directly for the individual cue points by name. Is there a CUE_POINT.NAME property or something similar that will allow me to fire events based on the cue point name:string? Any advice is greatly appreciated. Sam PS. should I embed the cue point as Navigation cue point as opposed to Event cue points? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] swfaddress help needed
You should not create your NewWindow in the newClick function. Do so on SWFAddressEvent.CHANGE event instead. Kenneth Kawamoto http://www.materiaprima.co.uk/ Gustavo Duenas LRS wrote: Hi Friends. I have seen the tutorial for the swfaddress in gotoandlearn.com, but I want to use it on a project I have which is a quite different situation, 1. the website is dynamic the parts of it are me on runtime, are not present on the stage at the moment, are just called and assembly depending of the name of the button that click the call. 2. the swfaddress works good when it comes to show the address in the address bar of the browser, but when I try to use the directional arrows of the browser I'm shooting at the dark totally. Because I don't know how to make it work, since he tutorial never mention about this particular. here is the code to create the different parts. //the part of the import the swfAddress is here, no problem at all //the part of the set value// switch(e.value){ case /contact //here I don't know how to going forward since all my past intents were so frustrating...any ideas?// } this.contact.addEventListener(MouseEvent.CLICK, newClick); function newClick(e:MouseEvent):void{ //here is the swfAddress// swfAddress.setValue(e.currentTarget.name); var newWindow:NewWindow = new NewWindow(); newWindow.name=e.currentTarget.name; an so on the structures that are in the windows ///the part of the addchild that works good// } I hope someone could help me...any advice welcome. Gustavo ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3: Inserting text into textInput field via code... can't do it?
You should be able to set the text of a TextFieldType.INPUT type TextField using text property as you are doing. Kenneth Kawamoto http://www.materiaprima.co.uk/ Carl Welch wrote: Hi, I need to place some text into a input text field - the user needs to be able to edit some text (from a database) and submit it back to a database. So far, though, I've been unable to pass any vars to the input textfield like this: datatext.text = database_vars; do I need to handle input textfields differently than a dynamic textfield? thanks. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: CS4 on non intel
Cheers for the heads up Steve. I got to the bottom of this CS4 crash issue on my G5 last night. The culprit - FONTS. I went through every single fonts I had in my machine (god knows how many - some of them were originally installed on my various ancient Macs before even you were born) in Font Book and deleted all the fonts did not pass the validation test. That was it. After got lid of all the dodgy fonts and duplicates, CS4 runs on my G5 as it should do - no crash whatsoever. Just to let you know I did save the FLA as CS3, just in time before CS4 crashes (I had about 20 seconds to play before the crash) but noticed my FLA didn't compile in CS3 because of ColorMatrix etc not available in CS3. Not a workaround there. Funny thing is the same set of fonts have no issues on my Quad Intel Mac. Kenneth Kenneth Kawamoto http://www.materiaprima.co.uk/ Stephen Matthews wrote: Hi mate, You sound as stressed as me. I am sure that CS4 was designed to be run better on Intel Macs. I would reinstall CS3 and back-save your flash files to CS3 if you are on a deadline. Also the online help is not online on CS3 - which is much better. You'll probably get better performance out of CS3 on a G5 anyway. If this is not an option - turn off Spaces. Try and work locally and back up stable versions regularly. Make sure your hard drive has at least 10-15GB free - that always affects me. I wish you good luck and fortune. From a fellow flash coder who is also going through hell. :( Regards Steve M ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: CS4 on non intel
I have in my Trash: Font Suitcase, PostScript Type 1, Windows TrueType, Datafork TrueType (even these were fucked) Let me reiterate that only Flash CS4 on Leopard on PPC complained about my (then) font collection. Neither Flash CS4 on Tiger on PPC, nor Flash CS4 on Leopard on lintel had any issues with my fonts ever. Kenneth Kawamoto http://www.materiaprima.co.uk/ Karl DeSaulniers wrote: Are they True Type fonts? Karl DeSaulniers Design Drumm http://designdrumm.com On May 5, 2009, at 5:21 PM, Kenneth Kawamoto wrote: Cheers for the heads up Steve. I got to the bottom of this CS4 crash issue on my G5 last night. The culprit - FONTS. I went through every single fonts I had in my machine (god knows how many - some of them were originally installed on my various ancient Macs before even you were born) in Font Book and deleted all the fonts did not pass the validation test. That was it. After got lid of all the dodgy fonts and duplicates, CS4 runs on my G5 as it should do - no crash whatsoever. Just to let you know I did save the FLA as CS3, just in time before CS4 crashes (I had about 20 seconds to play before the crash) but noticed my FLA didn't compile in CS3 because of ColorMatrix etc not available in CS3. Not a workaround there. Funny thing is the same set of fonts have no issues on my Quad Intel Mac. Kenneth Kenneth Kawamoto http://www.materiaprima.co.uk/ Stephen Matthews wrote: Hi mate, You sound as stressed as me. I am sure that CS4 was designed to be run better on Intel Macs. I would reinstall CS3 and back-save your flash files to CS3 if you are on a deadline. Also the online help is not online on CS3 - which is much better. You'll probably get better performance out of CS3 on a G5 anyway. If this is not an option - turn off Spaces. Try and work locally and back up stable versions regularly. Make sure your hard drive has at least 10-15GB free - that always affects me. I wish you good luck and fortune. From a fellow flash coder who is also going through hell. :( Regards Steve M ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: CS4 on non intel
Font Suitcase as in .suit (FFIL) like AGaramond-Semibold.suit. I am not referring to Extensis product. Kenneth Kawamoto http://www.materiaprima.co.uk/ Karl DeSaulniers wrote: You had trouble with SUITCASE! The program or just a Font Suitcase? I'm in trouble if its the program then. lol Karl DeSaulniers Design Drumm http://designdrumm.com On May 5, 2009, at 5:42 PM, Kenneth Kawamoto wrote: I have in my Trash: Font Suitcase, PostScript Type 1, Windows TrueType, Datafork TrueType (even these were fucked) Let me reiterate that only Flash CS4 on Leopard on PPC complained about my (then) font collection. Neither Flash CS4 on Tiger on PPC, nor Flash CS4 on Leopard on lintel had any issues with my fonts ever. Kenneth Kawamoto http://www.materiaprima.co.uk/ Karl DeSaulniers wrote: Are they True Type fonts? Karl DeSaulniers Design Drumm http://designdrumm.com On May 5, 2009, at 5:21 PM, Kenneth Kawamoto wrote: Cheers for the heads up Steve. I got to the bottom of this CS4 crash issue on my G5 last night. The culprit - FONTS. I went through every single fonts I had in my machine (god knows how many - some of them were originally installed on my various ancient Macs before even you were born) in Font Book and deleted all the fonts did not pass the validation test. That was it. After got lid of all the dodgy fonts and duplicates, CS4 runs on my G5 as it should do - no crash whatsoever. Just to let you know I did save the FLA as CS3, just in time before CS4 crashes (I had about 20 seconds to play before the crash) but noticed my FLA didn't compile in CS3 because of ColorMatrix etc not available in CS3. Not a workaround there. Funny thing is the same set of fonts have no issues on my Quad Intel Mac. Kenneth Kenneth Kawamoto http://www.materiaprima.co.uk/ Stephen Matthews wrote: Hi mate, You sound as stressed as me. I am sure that CS4 was designed to be run better on Intel Macs. I would reinstall CS3 and back-save your flash files to CS3 if you are on a deadline. Also the online help is not online on CS3 - which is much better. You'll probably get better performance out of CS3 on a G5 anyway. If this is not an option - turn off Spaces. Try and work locally and back up stable versions regularly. Make sure your hard drive has at least 10-15GB free - that always affects me. I wish you good luck and fortune. From a fellow flash coder who is also going through hell. :( Regards Steve M ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: CS4 on non intel
I thought about this last night - I use PC as well, you see :) Leopard's Font Book is great that you can verify fonts. On PC I'd do the usual: remove half the fonts, restart, test, then remove another half, restart, test, etc, etc. Get a Mac :P Kenneth Kawamoto http://www.materiaprima.co.uk/ Glen Pike wrote: Hi, Is there any way of testing the validity of fonts on PC's? I ask as we have a similar problem with Adobe Premiere Pro 2 where fonts are causing the program to crash... Not sure how you validate on a Mac, but if there is some kind of tool to do this... Googling shows what looks like a lot of complaints about Adobe stuff suffering from dodgy font crashes - it seems ironic that a company dealing mainly in graphics software can't seem to write a program that fails gracefully when something graphical goes wrong ;| Any tips on fonts are most appreciated as we have about 700 or more installed (and never used...) Glen Kenneth Kawamoto wrote: Cheers for the heads up Steve. I got to the bottom of this CS4 crash issue on my G5 last night. The culprit - FONTS. I went through every single fonts I had in my machine (god knows how many - some of them were originally installed on my various ancient Macs before even you were born) in Font Book and deleted all the fonts did not pass the validation test. That was it. After got lid of all the dodgy fonts and duplicates, CS4 runs on my G5 as it should do - no crash whatsoever. Just to let you know I did save the FLA as CS3, just in time before CS4 crashes (I had about 20 seconds to play before the crash) but noticed my FLA didn't compile in CS3 because of ColorMatrix etc not available in CS3. Not a workaround there. Funny thing is the same set of fonts have no issues on my Quad Intel Mac. Kenneth Kenneth Kawamoto http://www.materiaprima.co.uk/ Stephen Matthews wrote: Hi mate, You sound as stressed as me. I am sure that CS4 was designed to be run better on Intel Macs. I would reinstall CS3 and back-save your flash files to CS3 if you are on a deadline. Also the online help is not online on CS3 - which is much better. You'll probably get better performance out of CS3 on a G5 anyway. If this is not an option - turn off Spaces. Try and work locally and back up stable versions regularly. Make sure your hard drive has at least 10-15GB free - that always affects me. I wish you good luck and fortune. From a fellow flash coder who is also going through hell. :( Regards Steve M ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] What's the dollar symbol for?
I always thought $ stands for scaler, which is basically a variable in PERL, which PHP inherited (PHP was originally a PERL module ?) Kenneth Kawamoto http://www.materiaprima.co.uk/ Muzak wrote: What does the dollar symbol do? It shows that the developer broke the underscore key on his keyboard :) And that he's most likely a PHP developer.. or both. gd$rating -- gdRating -- gd_rating And I assume gd stands for Google Data -- Google Data API http://code.google.com/intl/nl-BE/apis/gdata/overview.html gd is also a namespace in the GData XML in the YouTube Data API http://code.google.com/intl/nl-BE/apis/youtube/2.0/reference.html#GData_elements_reference - Original Message - From: Stephen Matthews st...@gingerman.co.uk To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, May 05, 2009 10:42 AM Subject: [Flashcoders] What's the dollar symbol for? Hi, I am working with Martin Legris's great Youtube API class and wondered what this was ( _data.gd$rating ) What does the dollar symbol do? Here is a link to the particular class- http://as3-youtube-data-api.googlecode.com/svn/trunk/ca/newcommerce/youtube/data/VideoData.as This is the getter- public function get rating():RatingData { return new RatingData(_data.gd$rating); } PS I looked at Adobe's online help but could not find a reference to it. Thanks Steve ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] What's the dollar symbol for?
Yes you are right, Dave. Lerdorf initially created these Personal Home Page Tools [in C] to replace a small set of Perl scripts he had been using to maintain his personal homepage. - Wikipedia Kenneth Kawamoto http://www.materiaprima.co.uk/ Dave Watts wrote: (PHP was originally a PERL module ?) I don't think that is correct. PHP was initially released as a binary, or as source that would compile to a binary, implementing the CGI API. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] CS4 crashes on Leopard/G5
Just installed Leopard 10.5.6 on 2x2GHz G5, and CS4 started crashing all over - it lasts about 20 seconds on launch and quits. Anyone running CS4 on Leopard on PPC had any issues like this? I've had problems with neither Tiger on the same hardware, nor the same software combination on a Quad Intel. Needless to say, needless because these things only happens on deadlines, I have this deadline so any insights are appreciated! TIA, Kenneth -- Kenneth Kawamoto http://www.materiaprima.co.uk/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] [OT] Help needed in Bratislava
I need someone who can help me in Bratislava urgently. I need a voice recorded for a corporate Flash piece I am working on. If you have a microphone and can record voice digitally in Bratislava, please contact me off-list. The job is straightforward and the recording should not take long. TIA, Kenneth -- Kenneth Kawamoto http://www.materiaprima.co.uk/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: A very simply question of XML toString()
This is shorter: for(var i:uint = 0, len:uint = myXML.book.title.length(); i len; i++){ arr.push(myXML.book.title[i]); } Kenneth Kawamoto http://www.materiaprima.co.uk/ ACE Flash wrote: I was using this script, is there any short way to push them into an array? Thank you. var myXML:XML = order book titleDictionary 1/title /book book titleDictionary 2/title /book /order; var arr:Array = new Array(); var childLength:uint = myXML.children().length(); for ( var k:uint = 0 ; k childLength ; k++ ) { arr.push( myXML.children()[k].title.toString() ); trace( myXML.children()[k].title.toString() ) } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: A very simply question of XML toString()
Shorter: for each(var item:XML in myXML.book.title){ arr.push(item.toString()); } Kenneth Kawamoto http://www.materiaprima.co.uk/ ACE Flash wrote: I was using this script, is there any short way to push them into an array? Thank you. var myXML:XML = order book titleDictionary 1/title /book book titleDictionary 2/title /book /order; var arr:Array = new Array(); var childLength:uint = myXML.children().length(); for ( var k:uint = 0 ; k childLength ; k++ ) { arr.push( myXML.children()[k].title.toString() ); trace( myXML.children()[k].title.toString() ) } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] play sound via linkage
var snd:LinkedSound = new LinkedSound(); snd.play(); Kenneth Kawamoto http://www.materiaprima.co.uk/ Mendelsohn, Michael wrote: Hi list... Silly AS3 question: how do you play a sound with a linkage identifier? public function playSound(linkageID:String):void{ // these don't work var snd:Sound = new Sound(linkageID); var snd:* = new Class(linkageID); snd.play(); } Thanks! - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] play sound via linkage
There are no Linkage IDs in AS3. Class names you are talking about? :) May be you can do something like: private function playSound(className:String):void { var ClassRef:Class = getDefinitionByName(className) as Class; var snd:Object = new ClassRef(); snd.play(); } Kenneth Kawamoto http://www.materiaprima.co.uk/ Mendelsohn, Michael wrote: Thanks for responding Ken, but I'm passing a String (linkage id). My question is really how to create a new instance of the sound when I only have the linkage identifier as a string? I can't seem to cast it to a Class. - MM -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kenneth Kawamoto Sent: Friday, February 13, 2009 10:18 AM To: Flash Coders List Subject: Re: [Flashcoders] play sound via linkage var snd:LinkedSound = new LinkedSound(); snd.play(); Kenneth Kawamoto http://www.materiaprima.co.uk/ Mendelsohn, Michael wrote: Hi list... Silly AS3 question: how do you play a sound with a linkage identifier? public function playSound(linkageID:String):void{ // these don't work var snd:Sound = new Sound(linkageID); var snd:* = new Class(linkageID); snd.play(); } Thanks! - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Strange XML parsing thing
trace(myXML.children().(localName() == Outcome)); -- Kenneth Kawamoto http://www.materiaprima.co.uk/ Eric E. Dolecki wrote: Maybe it's Friday and I'm tired, but this just seems so weird. Something I have done 8 billions times before and now things are acting up. Code couldn't be much more simple. var myLoader:URLLoader = new URLLoader(); myLoader.addEventListener( Event.COMPLETE, onLoadXML ); myLoader.load( new URLRequest( http://www.xignite.com/xquotes.asmx/GetQuote?Symbol=AAPL; )); function onLoadXML( e:Event ):void { var myXML:XML = new XML( e.target.data ); trace( myXML); } I get this: ExtendedQuote xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns=http://www.xignite.com/services/; OutcomeSuccess/Outcome MessageDelay times are 15 mins for NASDAQ, NYSE and AMEX./Message IdentityCookie/Identity Delay0.515625/Delay NameApple Inc./Name ExchangeNASDAQ/Exchange Quote SymbolAAPL/Symbol Previous_Close99.27/Previous_Close Open99.11/Open High99.80/High ... In a browser I get this (for the URL): ?xml version=1.0 encoding=utf-8? ExtendedQuote xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns=http://www.xignite.com/services/; OutcomeSuccess/Outcome MessageDelay times are 15 mins for NASDAQ, NYSE and AMEX./Message IdentityCookie/Identity Delay0.515625/Delay NameApple Inc./Name ExchangeNASDAQ/Exchange Quote SymbolAAPL/Symbol Previous_Close99.27/Previous_Close Open99.11/Open High99.80/High Note the red definition there. I don't get that in my XML in AS3. Anyway, When I try to trace out myXML.ExtendedQuote, I get nothing. When I trace out myXML.Name, I get nothing. I don't see namespaced nodes anywhere, so what exactly is going on? I just want to get at some of that data sitting in simple nodes. So freaking weird. Thanks for any insight, Eric ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Strange XML parsing thing
You can extract it like this as well: var ns:Namespace = myXML.namespace(); -- Kenneth Kawamoto http://www.materiaprima.co.uk/ Eric E. Dolecki wrote: I ended up with this 1. function onLoadXML( e:Event ):void 2. { 3. var ns:Namespace = new Namespace(http://www.xignite.com/services/;); 4. var myXML:XML = new XML( e.target.data ); 5. 6. trace( Name + myXML.ns::Name ); 7. trace( Last + myXML.ns::Quote.ns::Last ); 8. trace( Price Earnings + myXML.ns::Statistics.ns::Price_Earnings ); 9. trace( myXML.ns::News.ns::StockNews.ns::Headline[0] ); 10. var len:Number = myXML.ns::News.ns::StockNews.ns::Headline.length(); 11. trace( myXML.ns::News.ns::StockNews.ns::Headline[len-1]); 12. } On Fri, Feb 13, 2009 at 5:10 PM, Kenneth Kawamoto kennethkawam...@gmail.com mailto:kennethkawam...@gmail.com wrote: trace(myXML.children().(localName() == Outcome)); -- Kenneth Kawamoto http://www.materiaprima.co.uk/ Eric E. Dolecki wrote: Maybe it's Friday and I'm tired, but this just seems so weird. Something I have done 8 billions times before and now things are acting up. Code couldn't be much more simple. var myLoader:URLLoader = new URLLoader(); myLoader.addEventListener( Event.COMPLETE, onLoadXML ); myLoader.load( new URLRequest( http://www.xignite.com/xquotes.asmx/GetQuote?Symbol=AAPL; )); function onLoadXML( e:Event ):void { var myXML:XML = new XML( e.target.data ); trace( myXML); } I get this: ExtendedQuote xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns=http://www.xignite.com/services/; OutcomeSuccess/Outcome MessageDelay times are 15 mins for NASDAQ, NYSE and AMEX./Message IdentityCookie/Identity Delay0.515625/Delay NameApple Inc./Name ExchangeNASDAQ/Exchange Quote SymbolAAPL/Symbol Previous_Close99.27/Previous_Close Open99.11/Open High99.80/High ... In a browser I get this (for the URL): ?xml version=1.0 encoding=utf-8? ExtendedQuote xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns=http://www.xignite.com/services/; OutcomeSuccess/Outcome MessageDelay times are 15 mins for NASDAQ, NYSE and AMEX./Message IdentityCookie/Identity Delay0.515625/Delay NameApple Inc./Name ExchangeNASDAQ/Exchange Quote SymbolAAPL/Symbol Previous_Close99.27/Previous_Close Open99.11/Open High99.80/High Note the red definition there. I don't get that in my XML in AS3. Anyway, When I try to trace out myXML.ExtendedQuote, I get nothing. When I trace out myXML.Name, I get nothing. I don't see namespaced nodes anywhere, so what exactly is going on? I just want to get at some of that data sitting in simple nodes. So freaking weird. Thanks for any insight, Eric ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Strange XML parsing thing
You can reduce one more line :) default xml namespace = myXML.namespace(); Kenneth Kawamoto http://www.materiaprima.co.uk/ Eric E. Dolecki wrote: Thanks for all of this!! So this should work: var myLoader:URLLoader = new URLLoader(); myLoader.addEventListener( Event.COMPLETE, onLoadXML ); myLoader.load( new URLRequest( http://www.xignite.com/xquotes.asmx/GetQuote?Symbol=AAPL; )); myLoader.dataFormat = XML; //var ns:Namespace = new Namespace( http://www.xignite.com/services/;); function onLoadXML( e:Event ):void { var myXML:XML = new XML(e.target.data); //trace( myXML); var ns:Namespace = myXML.namespace(); default xml namespace = ns; trace(Outcome: , myXML.Outcome); trace(Delay: , myXML.Delay); } On Fri, Feb 13, 2009 at 5:25 PM, Muzak p.ginnebe...@telenet.be wrote: There is a default namespace, namely: http://www.xignite.com/services/ The following should work: var myLoader:URLLoader = new URLLoader(); myLoader.addEventListener( Event.COMPLETE, onLoadXML ); myLoader.load( new URLRequest( http://www.xignite.com/xquotes.asmx/GetQuote?Symbol=AAPL; )); myLoader.dataFormat = XML; var ns:Namespace = new Namespace(http://www.xignite.com/services/;); function onLoadXML( e:Event ):void { var myXML:XML = new XML(e.target.data); //trace( myXML); default xml namespace = ns; trace(Outcome: , myXML.Outcome); trace(Delay: , myXML.Delay); } regards, Muzak - Original Message - From: Eric E. Dolecki edole...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Friday, February 13, 2009 10:08 PM Subject: [Flashcoders] Strange XML parsing thing Maybe it's Friday and I'm tired, but this just seems so weird. Something I have done 8 billions times before and now things are acting up. Code couldn't be much more simple. var myLoader:URLLoader = new URLLoader(); myLoader.addEventListener( Event.COMPLETE, onLoadXML ); myLoader.load( new URLRequest( http://www.xignite.com/xquotes.asmx/GetQuote?Symbol=AAPL; )); function onLoadXML( e:Event ):void { var myXML:XML = new XML( e.target.data ); trace( myXML); } Anyway, When I try to trace out myXML.ExtendedQuote, I get nothing. When I trace out myXML.Name, I get nothing. I don't see namespaced nodes anywhere, so what exactly is going on? I just want to get at some of that data sitting in simple nodes. So freaking weird. Thanks for any insight, Eric ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] passing on ... args
You can accept them as an Array, e.g.: public function passingArgs(argsB:Array):void { trace(#args_B:,argsB.length); for(var i:int=0;iargsB.length;i++) { trace(argsB[i]); } } Kenneth Kawamoto http://www.materiaprima.co.uk/ Latcho wrote: Hi List, How can I pass a variable amount off function arguments to a next function ? Below the way I tried and which fails. While passing them they get combined I'd like to remain 5 variables for args_B and not a single string. Stijn CODE: testargs( a,b,{z:'zz'},[1,2,3],c ) private function testargs(... argsA):void { trace(#args_A:, argsA.length) /// traces: #args_A: 5 passingArgs(argsA) } public function passingArgs(... argsB):void { trace(#args_B:,argsB.length) /// traces: #args_B: 1for(var i:int=0;iargsB.length;i++) { trace(argsB[i]); } // which traces a string: a,b,[object Object],1,2,3,c }; Latcho ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Controlling Sound in the timeline - AS3
I don't think so. If the sound was Stream you could control the sound's playtime by sending the playhead to the desired frame. Kenneth Kawamoto http://www.materiaprima.co.uk/ karim beyrouti wrote: This worked - thanks - however - my sound is triggered on the timeline ( event - loop ) , is there a way i can control the sound position - i.e. restart the sound or skip to a certain position in the audio? Or maybe this is asking a little too much from timeline triggered sounds. Many thanks... On 14 Nov 2008, at 21:30, Kenneth Kawamoto wrote: Shouldn't it be more like: var stfm:SoundTransform = theMC.soundTransform; stfm.volume = 0; theMC.soundTransform = stfm; Kenneth Kawamoto http://www.materiaprima.co.uk/ Karim Beyrouti wrote: Hi ! Another simple AS3 question - well at least I hope so. I am trying to set the volume of a sound that has been embedded in the 'root' timeline of a loaded movieclip (as3). So I tried: Themc.soundTransform.volume = 0; But nothing happened - no mute or anything in AS2 we used to be able to do: s:Sound = new Sound( themc ). s.volume = 0; but this does not work in AS3... It's probably something simple but I am really scratching my head with this one. Also, it's a little odd, but there is no chapter on Sound in Colin Mook's Essential ActionScript 3.0 book... Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Controlling Sound in the timeline - AS3
Shouldn't it be more like: var stfm:SoundTransform = theMC.soundTransform; stfm.volume = 0; theMC.soundTransform = stfm; Kenneth Kawamoto http://www.materiaprima.co.uk/ Karim Beyrouti wrote: Hi ! Another simple AS3 question - well at least I hope so. I am trying to set the volume of a sound that has been embedded in the 'root' timeline of a loaded movieclip (as3). So I tried: Themc.soundTransform.volume = 0; But nothing happened - no mute or anything in AS2 we used to be able to do: s:Sound = new Sound( themc ). s.volume = 0; but this does not work in AS3... It's probably something simple but I am really scratching my head with this one. Also, it's a little odd, but there is no chapter on Sound in Colin Mook's Essential ActionScript 3.0 book... Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] XML transformation
This should work: private function rearrengeXML(original:XML):XML { var rearrenged:XML = new XML(tree /); for each (var node:XML in original.node){ if(rearrenged.target.(@id == node.target).length()){ rearrenged.target.(@id == node.target).appendChild(node.data) } else { rearrenged.appendChild(target id={node.target}{node.data}/target); } } return rearrenged; } Kenneth Kawamoto http://www.materiaprima.co.uk/ Glen Pike wrote: Hi, I have a load of data loaded from a server as XML which is essentially a flat list. Nodes in the list have a child node defining a target and many nodes have the same target. list nodetarget1/targetdatablah1/data/node nodetarget1/targetdatablah2/data/node nodetarget2/targetdatablah3/data/node nodetarget3/targetdatablah4/data/node nodetarget1/targetdatablah5/data/node /list I want to re-arrange this list into a tree structure to group the nodes by target and use as a data provider to a tree control. tree target id=1 datablah1/data datablah2/data datablah5/data /target target id=2 datablah3/data /target target id=3 datablah4/data /target /tree The list can have large numbers of entries - in the order of 1000's - are there sneaky / fast ways of manipulating the list into my tree structure? Thanks Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] TextField Selection Colour
As you know the TextField selection colour is always white text on black background, which works very nice if you have a white text on black background :) I have tried few things like applying ColorTransform/ColorMatrixFilter to the TextField, but those are not good unless your text has uniform colour. Do you have any good ideas? Kenneth -- Kenneth Kawamoto http://www.materiaprima.co.uk/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MP4
H.264 playback capability was added in Flash Player 9 Update 3, Version 9.0.115.0 - a.k.a. MovieStar Kenneth Kawamoto http://www.materiaprima.co.uk/ Karim Beyrouti wrote: Hello ! - just wondering what is the lowest version of flash that plays MP4?... Kind regards Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MP4
You ARE the Movie Star, John. Kenneth Kawamoto http://www.materiaprima.co.uk/ John R. Sweeney Jr wrote: I've done 4 projects, using tons of H.264 videos and they work great and look beautiful. ;) on 11/4/08 11:33 AM, Kenneth Kawamoto at [EMAIL PROTECTED] wrote: H.264 playback capability was added in Flash Player 9 Update 3, Version 9.0.115.0 - a.k.a. MovieStar ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] TextInput highlight color when set to blend layer mode
Embed fonts. Or if you set the blendMode of the TextInput and fade the TextInput itself instead of container MovieClip, you shouldn't get those side effects. Kenneth Kawamoto http://www.materiaprima.co.uk/ Preston Parris wrote: I have a MovieClip with a text input component on top of a white box with grey border. In order to get the text inside of the Text Input component to be able to fade in and out I had to set the entire movie clip to blend mode layer. After doing this, when I click on the text input field the text cursor does not show up, and the highlight color of the text is white, everything is white actually. I'm wondering if there is a way to get this back to the default highlight color, or if there is another way to fade in and out the text input, the actual text input fades out but not the text inside if I don't set it to layer. Thank you! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 - Code problem, can anyone help?
The other thing caught my eye is this bit: mobileNumber.text != NaN mobileNumber.text != undefined text property is ALWAYS String, therefore it cannot be a Number or undefined. The code should not compile. Kenneth Kawamoto http://www.materiaprima.co.uk/ - Original Message - From: FlashDev [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, October 22, 2008 8:32 PM Subject: [Flashcoders] AS3 - Code problem, can anyone help? Hi Guys Im trying to write a little piece of code to stop the submit button of a form be active until the form fields have been completely filled in, its a really simple for consisting of 1 form field and 1 checkbox, ive had a go at writing some code of my own but for some reason flash quits on export. Whats wrong with my code? What do you think could be causing it to crash? here is my stab at it... submit_btn.useHandCursor = false; submit_btn.mouseEnabled = false; submit_btn.addEventListener(MouseEvent.CLICK, submit_btn_CLICK); this.addEventListener(Event.ENTER_FRAME, ENTERFRAME); function ENTERFRAME(ev:Event):void { if((mobileNumber.text != ) || (mobileNumber.text != NaN) || (mobileNumber.text != undefined) (terms.selected != false)){ submit_btn.useHandCursor = true; submit_btn.mouseEnabled = true; }else{ var frame:int = 0; trace(EnterFrame+(frame+)); } } function submit_btn_CLICK(ev:Event):void { var url:String = formSubmit.php; var request:URLRequest = new URLRequest(url); var variables:URLVariables = new URLVariables(); variables.mobile = mobileNumber.text; request.data = variables; request.method = URLRequestMethod.POST; try { navigateToURL(request, _blank); } catch (err:Error) { trace(err); } } Thanks SJM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] open word document from flash
You could use fscommand exec to run a BAT file/Apple Script (in fscommand subdirectory) which opens the file (...in theory. I haven't done this for many years :) Kenneth Kawamoto http://www.materiaprima.co.uk/ Bassam M wrote: Hi guy Is there anyway that I can open word-excel files from flash Thanks Basam ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RTMP H.264 and FLVPlayback
OK I change the question: has anyone managed to play RTMP H.264 through FLVPlayback??? Kenneth -- Kenneth Kawamoto http://www.materiaprima.co.uk/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] RTMP H.264 and FLVPlayback
Thanks Muzak. I didn't know about this mp4:file source string - it's not documented by Adobe is it...? How strange ;) Will ask my colleague to test again on Monday. Kind regards, Kenneth Kawamoto http://www.materiaprima.co.uk/ Muzak wrote: Works fine here. Make sure to use the following syntax to stream any compatible MPEG-4 file: .mov, .avi, .mp4, etc.. rtmp://[domain]/[app]/mp4:streamname.mp4 The following code works with an FLVPlayback instance named _vpb and an MPEG-4 file named r4_unlock.mov import fl.video.FLVPlayback; _vpb.source = rtmp://muzakserver/vod/mp4:r4_unlock.mov; regards, Muzak - Original Message - From: Kenneth Kawamoto [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, September 06, 2008 12:09 PM Subject: [Flashcoders] RTMP H.264 and FLVPlayback OK I change the question: has anyone managed to play RTMP H.264 through FLVPlayback??? Kenneth -- Kenneth Kawamoto http://www.materiaprima.co.uk/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RubyIzumi and FLVPlayback
Has anyone successfully played RTMP H.264 from RubyIzumi on FLVPlayback? I can play the video through NetStream but I get VideoError: 1004: Invalid source when I assign the source for the FLVPlayback... Kenneth -- Kenneth Kawamoto http://www.materiaprima.co.uk/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Using fscommand in AS 3 still legal??
Have you done: import flash.system.fscommand; ? Kenneth Kawamoto http://www.materiaprima.co.uk/ BOYD SPEER wrote: I often use the fscommand feature to help debug but when I use this in AS 3 I get an error message --1061: Call to a possibly undefined method fscommand through a reference with static type flash.display:DisplayObject. the offending line-- fscommand(Loading +target); any suggestions as to how to get fscommand working greatly appreciated...! Thanks to all! -Boyd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 for each loop / splice issue
If you post your XML as well that'll help, but this: cue_points[cue].splice(1,1,cueIn); ...looks dodgy to me. cue needs to be an uint for this to work but it's an XML, also you set cueIn = cue ??? Kenneth Kawamoto http://www.materiaprima.co.uk/ noentourage wrote: Hey flashcoders... I'm parsing an xml doc and building an array then later trying to stuff a value in to each object in the array at the second part of each object. [code] //at the top of my class I have the variable for the cue_points array // create array with text prompts and a dummy value for each (var prmpt:XML in xmlData.prompt) { //this works fine cue_points.push([prmpt.text,2]); } // now add cue points to the previously created array for each (var cue:XML in xmlData..step.training.cuein){ var cueIn = cue; //following line returns the correct values from the xml nodes trace(cueIn -- +cueIn); //the following line does not splice in the cueIn value to the previously created // array. cue_points[cue].splice(1,1,cueIn); } [/code] I'm trying to first push the text prompts into the array and build it with to values in the one object so that I can later come in and splice in new values to go along with the prompt text. I've tried to trace this out and can't seem to find the issue and can't find anyone else that has done this. So since it's new AS3 code I figured that maybe someone would have a tip. Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Xml menu recursion - AS3
Shouldn't it be trace(child.title); instead? Kenneth Kawamoto http://www.materiaprima.co.uk/ Vayu Robins wrote: Hi. I am trying to build a dynamic menu system with unlimited submenus. I have this from Colin Moock's book (Essential AS3) and it works fine. var xml:XML = course section titleMenu1/title section titleMenu1 - Sub/title section titleMenu1 Sub Sub/title /section /section /section /course; var xmlList:XMLList = xml.children(); parseStructure(xmlList); function parseStructure(xml:XMLList):void { for each (var child:XML in xml) { trace(xml.title); if (child.section != null) parseStructure(child.section); } } The problem for me arises when I add another section of menus like this: var xml:XML = course section titleMenu1/title section titleMenu1 - Sub/title section titleMenu1 Sub Sub/title /section /section /section section titleMenu2/title section titleMenu2 - Sub/title section titleMenu2 Sub Sub/title /section /section /section /course; Is it the xml that is wrong? Thanks Vayu ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] is there a recognised date format for xml?
If so I'd ask my PHP coder to generate formatted string so that I need to code less ;) e.g. var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 / var targetDate:Date = new Date([EMAIL PROTECTED]()); ...a lot less code than yours! Kenneth Kawamoto http://www.materiaprima.co.uk/ Cor wrote: In PHP you can do whatever you want: see http://nl.php.net/date I think it can also depend on your server. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of allandt bik-elliott (thefieldcomic.com) Sent: dinsdag 26 augustus 2008 11:48 To: Flash Coders List Subject: [Flashcoders] is there a recognised date format for xml? hi guys i'm speccing an xml file for a server side dev that needs to return a target date and time and i wanted to make sure i wasn't doing anything stupid what would a php dev be expecting to use for time / date and how would that be supplied in an xml file? And what would the best way of converting the return string for flash to use? I was thinking something along the lines of data date=2008,08,26 time=12,0,0 / and using something like var sDate:String = node.attributes.date; var sTime:String = node.attributes.time; var arDate:Array = sDate.split(,); var nYear:Number = Number(arDate[0]); var nMonth:Number = Number(arDate[1]-1); // months start at 0 var nDate:Number = Number(arDate[2]); var arTime:Array = sTime.split(,); var nTimeHours:Number = Number(arTime[0]); var nTimeMinutes:Number = Number(arTime[1]); var nTimeSeconds:Number = Number(arTime[2]); var targetDate:Date = new Date(nYear, nMonth, nDate, nTimeHours, nTimeMinutes, nTimeSeconds); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] is there a recognised date format for xml?
Isn't that always the case no matter how you construct the date object? Kenneth Kawamoto http://www.materiaprima.co.uk/ Cor wrote: Yes, but still it is depending of the localtime. Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00 GMT+0200 2008 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth Kawamoto Sent: dinsdag 26 augustus 2008 12:22 To: Flash Coders List Subject: Re: [Flashcoders] is there a recognised date format for xml? If so I'd ask my PHP coder to generate formatted string so that I need to code less ;) e.g. var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 / var targetDate:Date = new Date([EMAIL PROTECTED]()); ...a lot less code than yours! Kenneth Kawamoto http://www.materiaprima.co.uk/ Cor wrote: In PHP you can do whatever you want: see http://nl.php.net/date I think it can also depend on your server. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of allandt bik-elliott (thefieldcomic.com) Sent: dinsdag 26 augustus 2008 11:48 To: Flash Coders List Subject: [Flashcoders] is there a recognised date format for xml? hi guys i'm speccing an xml file for a server side dev that needs to return a target date and time and i wanted to make sure i wasn't doing anything stupid what would a php dev be expecting to use for time / date and how would that be supplied in an xml file? And what would the best way of converting the return string for flash to use? I was thinking something along the lines of data date=2008,08,26 time=12,0,0 / and using something like var sDate:String = node.attributes.date; var sTime:String = node.attributes.time; var arDate:Array = sDate.split(,); var nYear:Number = Number(arDate[0]); var nMonth:Number = Number(arDate[1]-1); // months start at 0 var nDate:Number = Number(arDate[2]); var arTime:Array = sTime.split(,); var nTimeHours:Number = Number(arTime[0]); var nTimeMinutes:Number = Number(arTime[1]); var nTimeSeconds:Number = Number(arTime[2]); var targetDate:Date = new Date(nYear, nMonth, nDate, nTimeHours, nTimeMinutes, nTimeSeconds); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Full Screen issue on a Mac
By the way your HTML closing tags are wrong. Kenneth Kawamoto http://www.materiaprima.co.uk/ http://venturawave.com/fs/fullscreen.html This site crashed on my client's Mac. The problem was likely that I didn't include or nest the the embed tags within the object tags in my html page when I modified for full screen. Here's my new code in the html (which hopefully works) ... object data=fullscreen.swf type=application/x-shockwave-flash width=640 height=510 param name=movie value=fullscreen.swf / param name=allowFullScreen value=true / embed src=fullscreen.swf quality=high bgcolor=#ff width=640 height=510 name=stage align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage= http://www.macromedia.com/go/getflashplayer; / / carlos ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 accessing functions from other classes
You should be able to do access the parent by using, parent. Kenneth Kawamoto http://www.materiaprima.co.uk/ SJM - Flash wrote: Hi guys, im having some trouble accessing a function from another class and I would like to know how its done. In my project i have 2 FLAs 'gallery.fla' and 'main_site.fla', each of the FLAs has its own document class 'gallery.as' and 'main_site.as'. When compiled the second SWF(main_site) is loaded into the first SWF(gallery). In the same class that loads the SWF there is a number of other functions i want to access from buttons located within the loaded SWF (main_site). The SWF is loaded using this code... // CODE from within FUNCTION var swfLoader:Loader = new Loader(); var swfURL:URLRequest = new URLRequest(filename); swfLoader.load (swfURL); swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoadComplete); // CODE from within 'swfLoadComplete' FUNCTION addChild(ev.target.content); var loader:LoaderInfo = LoaderInfo(ev.target); loader.content.x = 0; loader.content.y = 0; SJM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 accessing functions from other classes
What do you get if you do trace(parent);? Kenneth Kawamoto http://www.materiaprima.co.uk/ SJM - Flash wrote: Again another solution i tried but this too does not work! Thanks SJM - Original Message - *From:* Kenneth Kawamoto mailto:[EMAIL PROTECTED] *To:* Flash Coders List mailto:flashcoders@chattyfig.figleaf.com *Sent:* Thursday, August 14, 2008 1:36 PM *Subject:* Re: [Flashcoders] AS3 accessing functions from other classes You should be able to do access the parent by using, parent. Kenneth Kawamoto http://www.materiaprima.co.uk/ SJM - Flash wrote: Hi guys, im having some trouble accessing a function from another class and I would like to know how its done. In my project i have 2 FLAs 'gallery.fla' and 'main_site.fla', each of the FLAs has its own document class 'gallery.as' and 'main_site.as'. When compiled the second SWF(main_site) is loaded into the first SWF(gallery). In the same class that loads the SWF there is a number of other functions i want to access from buttons located within the loaded SWF (main_site). The SWF is loaded using this code... // CODE from within FUNCTION var swfLoader:Loader = new Loader(); var swfURL:URLRequest = new URLRequest(filename); swfLoader.load (swfURL); swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoadComplete); // CODE from within 'swfLoadComplete' FUNCTION addChild(ev.target.content); var loader:LoaderInfo = LoaderInfo(ev.target); loader.content.x = 0; loader.content.y = 0; SJM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 accessing functions from other classes
No, I mean when you trace it from the button. Kenneth Kawamoto http://www.materiaprima.co.uk/ SJM - Flash wrote: Kenneth i get... [object Loader] when tracing parent SJM - Original Message - *From:* Kenneth Kawamoto mailto:[EMAIL PROTECTED] *To:* Flash Coders List mailto:flashcoders@chattyfig.figleaf.com *Sent:* Thursday, August 14, 2008 2:11 PM *Subject:* Re: [Flashcoders] AS3 accessing functions from other classes What do you get if you do trace(parent);? Kenneth Kawamoto http://www.materiaprima.co.uk/ SJM - Flash wrote: Again another solution i tried but this too does not work! Thanks SJM - Original Message - *From:* Kenneth Kawamoto mailto:[EMAIL PROTECTED] *To:* Flash Coders List mailto:flashcoders@chattyfig.figleaf.com *Sent:* Thursday, August 14, 2008 1:36 PM *Subject:* Re: [Flashcoders] AS3 accessing functions from other classes You should be able to do access the parent by using, parent. Kenneth Kawamoto http://www.materiaprima.co.uk/ SJM - Flash wrote: Hi guys, im having some trouble accessing a function from another class and I would like to know how its done. In my project i have 2 FLAs 'gallery.fla' and 'main_site.fla', each of the FLAs has its own document class 'gallery.as' and 'main_site.as'. When compiled the second SWF(main_site) is loaded into the first SWF(gallery). In the same class that loads the SWF there is a number of other functions i want to access from buttons located within the loaded SWF (main_site). The SWF is loaded using this code... // CODE from within FUNCTION var swfLoader:Loader = new Loader(); var swfURL:URLRequest = new URLRequest(filename); swfLoader.load (swfURL); swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoadComplete); // CODE from within 'swfLoadComplete' FUNCTION addChild(ev.target.content); var loader:LoaderInfo = LoaderInfo(ev.target); loader.content.x = 0; loader.content.y = 0; SJM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: Flash - cross-platform? really?
This post from Tinic Uro sounds promising: http://www.craftymind.com/guimark/#comment-1032 Kenneth Kawamoto http://www.materiaprima.co.uk/ Matt S. wrote: Mac has always been inferior to PC when it comes to Flash performance (and I say that as a dedicated Mac user). It's improved alot with Flash 9+ and newer Macs, but nonetheless there seems to be a frustratingly persistent performance hit on the Mac which I've never seen a good explanation for. .m On Wed, Aug 13, 2008 at 4:21 AM, Ashim D'Silva [EMAIL PROTECTED] wrote: Hate to push this around again, but I've been searching heaps for this to no avail. I found one random post about performance differences but it didn't hint at any solutions.Are more people facing this problem, and does anybody know why? 2008/8/10 Ashim D'Silva [EMAIL PROTECTED] We've been developing a flash game over the last few weeks, and we're finding more and more that the flash player on PC and Mac run terrifyingly differently. In my previous experience, website I've built have run far better on my Mac than on other PCs, but this time its the opposite. The PC version runs great, but on Mac, there's a nasty nasty chug. It seems to get better if I compile it on a Mac. And gets far better if I compile to a Mac self executable. We're trying to find out what's causing it, and thinking it may be the animated sprites, although all they're doing is reassigning bitmapData. All processing sprite sheets is done at initial setup. So, is there anything people know about or have experienced? The WIP is here: http://raws.adc.rmit.edu.au/~s3155488/ Thanks for the help in advance... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X question in regards to ill-formed node
One way is: trace(foo.descendants(P-E).toXMLString()); Kenneth Kawamoto http://www.materiaprima.co.uk/ eric e. dolecki wrote: I am getting XML from a WSDL and one of the nodes is like so: P-E26.95/P-E now, how can I address this node? trace( foo..P-E ); won't work, how can I use E4X to reliably get that node's value if the index of it (child index) could move around within the parent nodes? Eric ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Detecting Stage width and height after refresh
It works fine for me every time. What is your code look like? Kenneth Kawamoto http://www.materiaprima.co.uk/ Helmut Granda wrote: Hello all, I have a small dilema, my application is working properly and I am relying on Stage width and height to position some elements. FOr some odd reason when I refresh my movie the stage width and height render 0. Is there any specific reason why this usually happens? OSX FF ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Detecting Stage width and height after refresh
If you output stageWidth/stageHeight to a TextField I think you can verify they are not zero. Kenneth Kawamoto http://www.materiaprima.co.uk/ Helmut Granda wrote: Yeah, that is the first setting in my Document's class constructor, specially since i need that info through out the application. Thanks for the help. I will keep debugging... On Tue, Jul 22, 2008 at 12:06 PM, Kenneth Kawamoto [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: If you monitor stageWidth/stageHeight in your Document Class constructor it should tell you the stage size every time you refresh your browser. Kenneth Kawamoto http://www.materiaprima.co.uk/ Helmut Granda wrote: DATA = Data.instance;// Holds Data information for the app DATA.stageWidth = stage.stageWidth; DATA.stageHeight = stage.stageHeight; On Tue, Jul 22, 2008 at 11:33 AM, Kenneth Kawamoto [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: It works fine for me every time. What is your code look like? Kenneth Kawamoto http://www.materiaprima.co.uk/ Helmut Granda wrote: Hello all, I have a small dilema, my application is working properly and I am relying on Stage width and height to position some elements. FOr some odd reason when I refresh my movie the stage width and height render 0. Is there any specific reason why this usually happens? OSX FF ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X filtering strange behaviour
I could be wrong but that (user input validation) should be done prior to RegExp construction. Kenneth Kawamoto http://www.materiaprima.co.uk/ Merrill, Jason wrote: That was it, it works now, thanks. Funny, I didn't notice that, I had it in my code before, but somewhere along the line of messing with things, it just switched back over to .toString() and I hadn't noticed. Thanks everyone! One more question if I may - how can I exclude certain things like blank spaces? I mean, I could check the textfield, but it would seem there is an easier way. If I put a blank space (or nothing for that matter) in the input text field and search for that, it returns all nodes. I could check the input text field, but I'd rather do it with a regular expression (both for elegance and to learn). The help docs are skimpy, so excuse so many questions here. It's also such a huge subject, it's very hard to Google exactly what you need. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X filtering strange behaviour
Yes that's that :) Anyway in your case you know the incoming XML schema so you shouldn't use wildcard * - I think wildcards have serious performance hits. i.e. theXML.topics.topic. should be used rather than theXML..*. Kenneth Kawamoto http://www.materiaprima.co.uk/ Merrill, Jason wrote: Ah, I know where the confusion came from, you said the code was based on my example, but that was actually Wagner's example, where he put var test:XML = data...etc. (it was based on my example, but he used test as an instance of the XML when requoting my original question) The use of test as the XML name threw me, because it was mixed in with the regex method, re.test - I never realized you meant test as the XML not test as some regex method I wasn't aware of. So when you wrote var xmlListSearch:XMLList = test..*.(re[test](attribute(*)) || re[test](child(*))); You meant var xmlListSearch:XMLList = theXML..*.(re[test](attribute(*)) || re[test](child(*))); Got it, I'll give it a shot, thanks. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X filtering strange behaviour
I don't think you need g (Global flag) for this. Kenneth Kawamoto http://www.materiaprima.co.uk/ Merrill, Jason wrote: Wait, think I got it: var re:RegExp = new RegExp(searchInput.text, g,i); var xmlListSearch:XMLList = testXML..*.( re[test]( attribute(title))); trace(result: +xmlListSearch.toString()); seems to work for me. Thanks eveyrone! Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal GTO Innovative Learning Blog subscribe. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Leisle Sent: Monday, July 21, 2008 3:54 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] E4X filtering strange behaviour Hi Jason, This works for me: var testXML:XML = data topics topic title=Coldplays New Album / topic title=The Dark Knight / topic title=Arrested Development: The Movie / /topics /data; var re:RegExp = new RegExp(searchInput.text, g); var xmlListSearch:XMLList = testXML.topics.topic.(re[test](@title)); trace(result: +xmlListSearch.toXMLString()); Hth, Bob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Monday, July 21, 2008 12:27 PM To: Flash Coders List Subject: RE: [Flashcoders] E4X filtering strange behaviour OK, so this is almost there, but not quite. If I do as Kenneth suggested (and this should be able to be reproduced), var testXML:XML = data topics topic title=Coldplays New Album / topic title=The Dark Knight / topic title=Arrested Development: The Movie / /topics /data; var re:RegExp = new RegExp(^+searchInput.text); var xmlListSearch:XMLList = testXML.topics.topic.(re[test](@title)); trace(result: +xmlListSearch.toXMLString()); (Assuming there is a TextInput text field on the stage and a function run when a button is clicked to run the regex search), if I enter the search term, The, it only returns the second node containing The Dark Knight, not the third topic node, which has a The in it's title attribute as well. If I put Dark, it doesn't return anything. So it seems it's only searching nodes where the search term is the first item. How can I modify the regular expression above to find all nodes containing an element of the search term? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X filtering strange behaviour
If I may repeat myself I don't think you need g (Global flag) for this. :) The reason is, I quote from the doc, If the g (global) flag is set for the regular expression, then the search starts at the index position specified by the lastIndex property of the regular expression. If the search matches a substring, the lastIndex property changes to match the position of the end of the match. To prove this point, if I do something like: // var re:RegExp; re = new RegExp(The, gi); // with global flag for each(var prop1:XML in testXML.topics.topic){ trace(re.lastIndex, - , [EMAIL PROTECTED], - , re[test]([EMAIL PROTECTED])); } trace(***); re = new RegExp(The, i); // without global flag for each(var prop2:XML in testXML.topics.topic){ trace(re.lastIndex, - , [EMAIL PROTECTED], - , re[test]([EMAIL PROTECTED])); } // I'd get: 0 - Coldplay's New Album, Viva La Vida Or Death And All His Friends - false 0 - The Dark Knight - true 3 - Arrested Development, The Movie - true 25 - Band Of Horses: Everything All The Time - true 34 - Master And Commander: The Far Side Of The World - true 41 - The Quick Brown Fox Jumped Over The Lazy Dog - false 0 - Violet Hill - false *** 0 - Coldplay's New Album, Viva La Vida Or Death And All His Friends - false 0 - The Dark Knight - true 0 - Arrested Development, The Movie - true 0 - Band Of Horses: Everything All The Time - true 0 - Master And Commander: The Far Side Of The World - true 0 - The Quick Brown Fox Jumped Over The Lazy Dog - true 0 - Violet Hill - false With global flag RegExp will not find the in The Quick Brown Fox Jumped Over The Lazy Dog because it looks for the from the character 41 onwards, namely Dog, which has no the. Kenneth Kawamoto http://www.materiaprima.co.uk/ Merrill, Jason wrote: OK, I'm like 95% there, but there is still some kind of bug - here is how to reproduce: var testXML:XML = data topics topic title=Coldplay's New Album, Viva La Vida Or Death And All His Friends / topic title=The Dark Knight / topic title=Arrested Development, The Movie / topic title=Band Of Horses: Everything All The Time / topic title=Master And Commander: The Far Side Of The World / topic title=The Quick Brown Fox Jumped Over The Lazy Dog / topic title=Violet Hill / /topics /data; var re:RegExp = new RegExp(The, g,i); var xmlListSearch:XMLList = testXML..*.topic.( re[test]( attribute(title))); trace(result: +xmlListSearch.toString()); If you search for the word, the, as I do when I construct the regular expression, you should get 5 nodes returned into the XMLList, but I only get these four: topic title=The Dark Knight/ topic title=Arrested Development, The Movie/ topic title=Band Of Horses: Everything All The Time/ topic title=Master And Commander: The Far Side Of The World/ I don't get this node: topic title=The Quick Brown Fox Jumped Over The Lazy Dog / ? Any idea why? Does it fail if there is more than one the in the string? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X filtering strange behaviour
I just run a quick and dirty test, and I think I can confirm that. The following test for 10,000 times each: testXML..*.( re[test](attribute(title))); testXML..topic.( re[test](attribute(title))); testXML.topics.topic.( re[test](attribute(title))); testXML.topics.topic.( re[test](@title)); testXML.topics.topic.((re as RegExp).test(@title)); The result: 1114ms 1047ms 993ms 868ms 1087ms So the wildcard * is indeed slower, which is logical. But also attribute() is slower than @, moreover (re as RegExp).test() is slower than re[test]() - well they are all logical too, you may say :) Kenneth Kawamoto http://www.materiaprima.co.uk/ Merrill, Jason wrote: OK good to know, thanks! Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal GTO Innovative Learning Blog subscribe. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth Kawamoto Sent: Monday, July 21, 2008 12:52 PM To: Flash Coders List Subject: Re: [Flashcoders] E4X filtering strange behaviour Yes that's that :) Anyway in your case you know the incoming XML schema so you shouldn't use wildcard * - I think wildcards have serious performance hits. i.e. theXML.topics.topic. should be used rather than theXML..*. Kenneth Kawamoto http://www.materiaprima.co.uk/ Merrill, Jason wrote: Ah, I know where the confusion came from, you said the code was based on my example, but that was actually Wagner's example, where he put var test:XML = data...etc. (it was based on my example, but he used test as an instance of the XML when requoting my original question) The use of test as the XML name threw me, because it was mixed in with the regex method, re.test - I never realized you meant test as the XML not test as some regex method I wasn't aware of. So when you wrote var xmlListSearch:XMLList = test..*.(re[test](attribute(*)) || re[test](child(*))); You meant var xmlListSearch:XMLList = theXML..*.(re[test](attribute(*)) || re[test](child(*))); Got it, I'll give it a shot, thanks. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X filtering strange behaviour
The code was based on your example and therefore we know the XML schema, i.e. we know the node name and they all have the attribute title. If we don't know anything about the XML we could do something like: var xmlListSearch:XMLList = test..*.(re[test](attribute(*)) || re[test](child(*))); Kenneth Kawamoto http://www.materiaprima.co.uk/ Merrill, Jason wrote: Thanks. However, I have been told using @title is not good in most situations because it will return an error if a node doesn't have the attribute, wheras attribute(title) will not. Also this is shorter: var xmlListSearch:XMLList = test..topic.(re.test(@title)); But you still need to specify what XML to search through, no? How would the above know what XML object topic is within using the code above? Jason Merrill ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X filtering strange behaviour
I get the correct node (although I also get Warning 3594). If you are tracing, you must do trace(xmlListSearch.toXMLString()); Also this is shorter: var xmlListSearch:XMLList = test..topic.(re.test(@title)); Kenneth Kawamoto http://www.materiaprima.co.uk/ Wagner Amaral wrote: I was doing some tests here using code from Jason Merril (see previous thread today), and something has brought my attention. Here's the xml: var test:XML = data topics topic title=Coldplays New Album / topic title=The Dark Knight / topic title=Arrested Development: The Movie / /topics /data; I tried two cases: var re:RegExp = new RegExp(^Cold); var xmlListSearch:XMLList = test..*.topic.( re.test(attribute('title').toString()) ); and: var re:RegExp = new RegExp(^Cold); var xmlListSearch:XMLList = test..*.topic.( !re.test(attribute('title').toString()) ); // this one just negates the RegExp.test() inside topic.() so I should get the nodes NOT matching Well, when I run the first case, I get an empty XMLList, so I was thinking well, that doesn't work. However, when I run the second test, I get the XMLList with all elements EXCEPT the one filtered out, so it actually works! But what is going on that when the regexp returns true, my XMLList is empty? This seems a bit strange. Note: after writing all this, I tried something else: // this does not work var xmlListSearch:XMLList = test..*.topic.( attribute('title').toString() == The Dark Knight ); // this DO work var xmlListSearch:XMLList = test..*.topic.( attribute('title').toString() != The Dark Knight ); Now, THAT's bizarre! (BTW, I'm quite new to this E4X thing, I'm more of a XPath guy, so bear with me if I did something completely wrong ;) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: loaderURL from child object
I probably misunderstood your question, but since you are loading MyFileGoesHere.SWF you must know the path to it...? Kenneth Kawamoto http://www.materiaprima.co.uk/ Helmut Granda wrote: hello all, I just wanted to re-write my question in case I didnt make sense. So what I want to know is the path of where the file is located on the server. Say you have html -loaderFileSWF -sub1 ---sub2 sub3 /MyFileGoesHere.SWF if loaderFileSWF loads MyFileGoesHere.SWF is there anway to know the path of /sub1/sub2/sub2/MyFileGoesHere.SWF? as you know if I try to get the URL or loaderURL i will get the path to the file that loaded the MyFileGoesHere but not the path to the file itself. TIA... On Wed, Jul 9, 2008 at 10:55 AM, Helmut Granda [EMAIL PROTECTED] wrote: Hello, Is there anyway to get the address of the child swf loaded into the parent? for example if I load FILEB.SWF into FILEA.SWF and FILEA.SWF lives in blah/blah/blah... is there anyway to get blah/blah/blah/FILEA.SWF instead of the parent address witht loaderURL? TIA ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] variable in e4x filtering
You can do something like this as well - you don't need to know the node name at all: _officesXML.descendants().(hasOwnProperty(@name) @name == NJ Agency) Kenneth Kawamoto http://www.materiaprima.co.uk/ Pavel Kru*šek wrote: Hi, Unfortunately this solution is out of action: 1084: Syntax error: expecting identifier before leftbracket. On Jul 9, 2008, at 3:50 PM, Christoffer Enedahl wrote: Try this: var nodeName:String = agency; _officesXML.[ nodeName ].(@name == NJ Agency) HTH Christoffer Pavel Kru*šek skrev: Hi List, please is possible to substitute node name in e4x with variable? Anywhere in XML: agency name=NJ Agency namemyAgency/name phone123456/phone /agency _officesXML..agency.(@name == NJ Agency) return: agency name=NJ Agency namemyAgency/name phone123456/phone /agency But i don't know node name 'agency' in this time. I need some like: _officesXML..here_is_my_variable_with_value_for_exampleagency.(@name == NJ Agency) thanks, pavel ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] variable in e4x filtering
Slightly shorter: _officesXML..*.(hasOwnProperty(@name) @name == NJ Agency) Kenneth Kawamoto http://www.materiaprima.co.uk/ On Jul 9, 2008, at 4:51 PM, Kenneth Kawamoto wrote: You can do something like this as well - you don't need to know the node name at all: _officesXML.descendants().(hasOwnProperty(@name) @name == NJ Agency) Kenneth Kawamoto http://www.materiaprima.co.uk/ Pavel Kru*šek wrote: Hi, Unfortunately this solution is out of action: 1084: Syntax error: expecting identifier before leftbracket. On Jul 9, 2008, at 3:50 PM, Christoffer Enedahl wrote: Try this: var nodeName:String = agency; _officesXML.[ nodeName ].(@name == NJ Agency) HTH Christoffer Pavel Kru*šek skrev: Hi List, please is possible to substitute node name in e4x with variable? Anywhere in XML: agency name=NJ Agency namemyAgency/name phone123456/phone /agency _officesXML..agency.(@name == NJ Agency) return: agency name=NJ Agency namemyAgency/name phone123456/phone /agency But i don't know node name 'agency' in this time. I need some like: _officesXML..here_is_my_variable_with_value_for_exampleagency.(@name == NJ Agency) thanks, pavel ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] variable in e4x filtering
I don't think that will not work unless every single node in the XML has the attribute called name. hasOwnProperty(@name) checks if the node has the attribute. Kenneth Kawamoto http://www.materiaprima.co.uk/ Romuald Quantin wrote: This will search through everything if you need: _officesXML..*.(@name == NJ Agency) Romu www.soundstep.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christoffer Enedahl Sent: 09 July 2008 15:51 To: Flash Coders List Subject: Re: [Flashcoders] variable in e4x filtering oh sorry, email code. it got a dot too much, here this works: _officesXML[ nodeName ].(@name == NJ Agency) Pavel Kru*šek skrev: Hi, Unfortunately this solution is out of action: 1084: Syntax error: expecting identifier before leftbracket. On Jul 9, 2008, at 3:50 PM, Christoffer Enedahl wrote: Try this: var nodeName:String = agency; _officesXML.[ nodeName ].(@name == NJ Agency) HTH Christoffer Pavel Kru*šek skrev: Hi List, please is possible to substitute node name in e4x with variable? Anywhere in XML: agency name=NJ Agency namemyAgency/name phone123456/phone /agency _officesXML..agency.(@name == NJ Agency) return: agency name=NJ Agency namemyAgency/name phone123456/phone /agency But i don't know node name 'agency' in this time. I need some like: _officesXML..here_is_my_variable_with_value_for_exampleagency.(@name == NJ Agency) thanks, pavel ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders