Re: [Flashcoders] pure AS3 app to use mx.* stuff
Thanks a lot, Cory, this helps, but only partially. //code in main class extending Application var triangle:FlexSprite = new FlexSprite( ); //draw triangle rawChildren.addChild(triangle); shows a triangle in SWF, but also shows an error: (output) [Fault] exception, information=ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. (Flash debug player) ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/getChildIndex() at mx.managers::SystemManager/getChildIndex()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\SystemManager.as:1270] at mx.managers::SystemManager/mouseDownHandler()[C:\dev\flex_201_ja\sdk\frameworks\mx\managers\SystemManager.as:2478] Any ideas? On 2/14/08, Cory Petosky wrote: Flex apps override addChild to only allow things that implement IUIComponent. If you need to add a child that's just a plain display object, manipulate the rawChildren property instead. -- Best regards, GregoryN http://GOusable.com Flash components development. Usability services. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 singleton not working across multiple loaded swf
I've never had that problem. To avoid conflicts between classes of loaded swf's, I usually set the loader context to the current domain of the loading SWF, maybe it helps in your case too. On Fri, Feb 15, 2008 at 2:22 AM, Patrick Matte | BLITZ [EMAIL PROTECTED] wrote: The only way I have been able to use a singleton across loaded swfs in AS3 is if it was first referenced in the main swf. Any other singleton I use that are not referenced in the main swf work only within the swf they are contained into. Is this a normal behavior in AS3 ? Does it have anything to do with ApplicationDomain? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- M.A. van't Kruis http://www.malatze.nl/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Question on garbage collection
Hello List, I have two classes Time and Clock, see below. To get good encapsulation, in the Time class I added a function called clone(). This returns a copy of the Time instance, instead of a reference to it. Now I run the code, using an interval that calls the Clock.getElepasedTime(). While watching the Memory I can see it build up. Does this mean that with every clone of the Time object it still holds a reference and therefore doesnt get deleted by the garbage collector. Hope somebody can enlighten me.. Jiri class Clock { private var startTime:Number; private var elapsedTime:Time; //constructor method function Clock(tTime:Time) { clockdata = new ClockData() startTime = getTimer(); } public function getElepasedTime() : Time { var elapsedMilliseconds:Number = getTimer() - startTime; var elapsedHours:Number = Math.floor( elapsedMilliseconds / 360); var elapsedSeconds:Number = Math.floor( elapsedMilliseconds / 1000); var elapsedMinutes:Number = Math.floor( elapsedSeconds / 60); elapsedSeconds = elapsedSeconds%60; elapsedMinutes = elapsedMinutes%60; if(elapsedTime == null){ elapsedTime = new Time(elapsedHours , elapsedMinutes , elapsedSeconds) }else{ elapsedTime.hour = elapsedHours; elapsedTime.minute = elapsedMinutes; elapsedTime.second = elapsedSeconds; } return elapsedTime.clone(); } } class Time { private var _hour:Number; private var _minute:Number; private var _second:Number; //constructor method public function Time(hour:Number , minute:Number , second:Number) { _hour = hour _minute = minute _second = second } public function get hour() : Number { return _hour } public function set hour(nHour:Number) : Void { _hour = nHour } public function get minute() : Number { return _minute } public function set minute(nMinute:Number) : Void { _minute = nMinute; } public function get second() : Number { return _second } public function set second(nSecond:Number) : Void { _second = nSecond; } public function serialize() : String { var minutePrefix:String = ( (_minute 10) ? '0' : ''); var secondPrefix:String = ( (_second 10) ? '0' : ''); var hourPrefix :String = ( (_hour10) ? '0' : ''); return String(hourPrefix+_hour+':'+minutePrefix+_minute+':'+secondPrefix+_second); } public function clone() : Time { return new Time(_hour , _minute , _second) } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] jsfl aligning movieclip symbols to top left
Does anybody know what the jsfl would look like to automate the process of aligning movieclips to the top left as opposed to centered? I have a cs3 fla with lots of symbols that need to be aligned top left. Thanks if anybody can help. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] jsfl aligning movieclip symbols to top left
Hey, I had it in a panel i made.. so just copied the specific lines.. fl.getDocumentDOM().selectAll(); fl.getDocumentDOM().align(alignType, alignStageType); With kind regards, Dennis Isioux - Original Message - From: Some Dude [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, February 15, 2008 3:13 PM Subject: [Flashcoders] jsfl aligning movieclip symbols to top left Does anybody know what the jsfl would look like to automate the process of aligning movieclips to the top left as opposed to centered? I have a cs3 fla with lots of symbols that need to be aligned top left. Thanks if anybody can help. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders __ NOD32 2878 (20080215) Informatie __ Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem. http://www.nod32.nl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] PHP and Flash weirdness...
I am unable to run any php scripts on this web site (teeka.ipower.com) after moving my client's files to the server. I have set the CGI scripting to Active and have chosen php4 as the default version. there is no error recorded in the error log (0 bytes) and the access log does not show any thing about the throwing of a 500 error. One should see a banner at the top of the page saying YOUR HEALTH IS YOUR WEALTH, and a Today's Specials button should show vitamin bottles all loaded with php scripts. The scripts are ok because they run on my own website which has just been moved to the new v.3 platform at ipowerweb.com yesterday. even a simple php script that just echos a one word string will not work on the teeka.ipower.com server. The message I see when trying to run a simple script is: The server encountered an unexpected condition which prevented it from fulfilling the request. The script had an error or it did not produce any output. If there was an error, you should be able to see it in the error log. I get the same error with IE and Firefox. But on different computer it seems to work!?!?. Why would the flash / php work on a different server when viewed on my computer but not on another, or on a different computer from the same server? (Works at boyd-speer.com/A1/a1ii.html) Any insights greatly appreciated. Thanks, -Boyd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] PHP and Flash weirdness...
Hi, Try uploading the ?php phpinfo(); ? script - if that works, check your code, their may be issues with parsing, etc. One problem I have had is short tags ?= $var ? not working - it's a setting in php.ini Also, check error_reporting and debug your script maybe - comment half, etc. Glen BOYD SPEER wrote: I am unable to run any php scripts on this web site (teeka.ipower.com) after moving my client's files to the server. I have set the CGI scripting to Active and have chosen php4 as the default version. there is no error recorded in the error log (0 bytes) and the access log does not show any thing about the throwing of a 500 error. One should see a banner at the top of the page saying YOUR HEALTH IS YOUR WEALTH, and a Today's Specials button should show vitamin bottles all loaded with php scripts. The scripts are ok because they run on my own website which has just been moved to the new v.3 platform at ipowerweb.com yesterday. even a simple php script that just echos a one word string will not work on the teeka.ipower.com server. The message I see when trying to run a simple script is: The server encountered an unexpected condition which prevented it from fulfilling the request. The script had an error or it did not produce any output. If there was an error, you should be able to see it in the error log. I get the same error with IE and Firefox. But on different computer it seems to work!?!?. Why would the flash / php work on a different server when viewed on my computer but not on another, or on a different computer from the same server? (Works at boyd-speer.com/A1/a1ii.html) Any insights greatly appreciated. Thanks, -Boyd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01736 759321 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] PHP and Flash weirdness...
Hi, Sorry, forgot to mention permissions - some servers with CGI get arsey about this. Usually PHP files should have permissions of 644 and directories containing them should be 755, but look at your support doc's to see anything. Glen BOYD SPEER wrote: I am unable to run any php scripts on this web site (teeka.ipower.com) after moving my client's files to the server. I have set the CGI scripting to Active and have chosen php4 as the default version. there is no error recorded in the error log (0 bytes) and the access log does not show any thing about the throwing of a 500 error. One should see a banner at the top of the page saying YOUR HEALTH IS YOUR WEALTH, and a Today's Specials button should show vitamin bottles all loaded with php scripts. The scripts are ok because they run on my own website which has just been moved to the new v.3 platform at ipowerweb.com yesterday. even a simple php script that just echos a one word string will not work on the teeka.ipower.com server. The message I see when trying to run a simple script is: The server encountered an unexpected condition which prevented it from fulfilling the request. The script had an error or it did not produce any output. If there was an error, you should be able to see it in the error log. I get the same error with IE and Firefox. But on different computer it seems to work!?!?. Why would the flash / php work on a different server when viewed on my computer but not on another, or on a different computer from the same server? (Works at boyd-speer.com/A1/a1ii.html) Any insights greatly appreciated. Thanks, -Boyd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01736 759321 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] PHP and Flash weirdness...
Thanks Glen. It was a server problem - needed a reboot to reflect my activating CGI while setting up. - Original Message - From: Glen Pike [EMAIL PROTECTED] Date: Friday, February 15, 2008 9:12 am Subject: Re: [Flashcoders] PHP and Flash weirdness... To: Flash Coders List flashcoders@chattyfig.figleaf.com Hi, Sorry, forgot to mention permissions - some servers with CGI get arsey about this. Usually PHP files should have permissions of 644 and directories containing them should be 755, but look at your support doc's to see anything. Glen BOYD SPEER wrote: I am unable to run any php scripts on this web site (teeka.ipower.com) after moving my client's files to the server. I have set the CGI scripting to Active and have chosen php4 as the default version. there is no error recorded in the error log (0 bytes) and the access log does not show any thing about the throwing of a 500 error. One should see a banner at the top of the page saying YOUR HEALTH IS YOUR WEALTH, and a Today's Specials button should show vitamin bottles all loaded with php scripts. The scripts are ok because they run on my own website which has just been moved to the new v.3 platform at ipowerweb.com yesterday. even a simple php script that just echos a one word string will not work on the teeka.ipower.com server. The message I see when trying to run a simple script is: The server encountered an unexpected condition which prevented it from fulfilling the request. The script had an error or it did not produce any output. If there was an error, you should be able to see it in the error log. I get the same error with IE and Firefox. But on different computer it seems to work!?!?. Why would the flash / php work on a different server when viewed on my computer but not on another, or on a different computer from the same server? (Works at boyd-speer.com/A1/a1ii.html) Any insights greatly appreciated. Thanks, -Boyd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01736 759321 www.glenpike.co.uk http://www.glenpike.co.uk ___ 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] Data protection running Flash content from a CD.
Does anybody know good methods to avoid content being copied from a CD with a Flash EXE? Thanks, Norm _ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] JSFL and Stringpanel
Hey, I have automated publishing of files (we have alot of those:) ). I was wondering though if someone found out a way to change the stage language in the stringpanel using jsfl.. Then i can publish swf`'s for every language with one press on the button aswell. With kind regards, Dennis P.s. i know working with external xml's at runtime is a nicer solution.. but that's not possible with this projects :) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Data protection running Flash content from a CD.
If you use zinc.. you could request the cd drive.. and check if you are playing from there.. as a security... With kind regards, Dennis Isioux - Original Message - From: Norman Cousineau [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, February 15, 2008 5:43 PM Subject: [Flashcoders] Data protection running Flash content from a CD. Does anybody know good methods to avoid content being copied from a CD with a Flash EXE? Thanks, Norm _ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders __ NOD32 2879 (20080215) Informatie __ Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem. http://www.nod32.nl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question on garbage collection
Thanks for your reply Bob, it is for AS2. I read a lot of articles about it and understand the general concept. That is why I post the question. If I understood correctly the posted code should not leave any objects unreferenced and therefor cleared for deleting. But the memory goes up anyway. I tested it with only this two classes instantiated and nothing else. I am hoping somebody can take a look at the code I posted and give me the reassurence that I am doing things correctly. Jiri Bob Leisle wrote: Hi Jiri, I'm not sure which AS version you're using but here are some good links on garbage collection in AS3. http://www.bit-101.com/blog/?p=783 http://gskinner.com/blog/archives/2006/06/as3_resource_ma.html http://board.flashkit.com/board/showthread.php?t=756290 32000+ more links can be found by googling, Flash AS3 garbage collection. hth, Bob Jiri Heitlager wrote: Hello List, I have two classes Time and Clock, see below. To get good encapsulation, in the Time class I added a function called clone(). This returns a copy of the Time instance, instead of a reference to it. Now I run the code, using an interval that calls the Clock.getElepasedTime(). While watching the Memory I can see it build up. Does this mean that with every clone of the Time object it still holds a reference and therefore doesnt get deleted by the garbage collector. Hope somebody can enlighten me.. Jiri class Clock { private var startTime:Number; private var elapsedTime:Time; //constructor method function Clock(tTime:Time) { clockdata = new ClockData() startTime = getTimer(); } public function getElepasedTime() : Time { var elapsedMilliseconds:Number = getTimer() - startTime; var elapsedHours:Number= Math.floor( elapsedMilliseconds / 360); var elapsedSeconds:Number= Math.floor( elapsedMilliseconds / 1000); var elapsedMinutes:Number= Math.floor( elapsedSeconds / 60); elapsedSeconds = elapsedSeconds%60; elapsedMinutes = elapsedMinutes%60; if(elapsedTime == null){ elapsedTime = new Time(elapsedHours , elapsedMinutes , elapsedSeconds) }else{ elapsedTime.hour = elapsedHours; elapsedTime.minute = elapsedMinutes; elapsedTime.second = elapsedSeconds; } return elapsedTime.clone(); } } class Time { private var _hour:Number; private var _minute:Number; private var _second:Number; //constructor method public function Time(hour:Number , minute:Number , second:Number) { _hour = hour _minute = minute _second = second } public function get hour() : Number { return _hour } public function set hour(nHour:Number) : Void { _hour = nHour } public function get minute() : Number { return _minute } public function set minute(nMinute:Number) : Void { _minute = nMinute; } public function get second() : Number { return _second } public function set second(nSecond:Number) : Void { _second = nSecond; } public function serialize() : String { var minutePrefix:String = ( (_minute 10)? '0' : ''); var secondPrefix:String = ( (_second 10)? '0' : ''); var hourPrefix:String= ( (_hour 10)? '0' : ''); return String(hourPrefix+_hour+':'+minutePrefix+_minute+':'+secondPrefix+_second); } public function clone() : Time { return new Time(_hour , _minute , _second) } } ___ 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] print function in AS2
Hi, I'm trying to print from Flash using the print function. I've created a print button to point to a movieClip that gets dynamically created e.g. a results page. What's weird is that it works as a standalone swf file and prints fine, but when it's in a browser I get one solid color and no images - no results. I've used bframe, bmax, and bmovie where I instantiated #p at the first frame and still no luck. Thanks for any help. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] solved :: tangozebra enhanced call function option
didn't get a reply on this from the board but found the answer you have to add the function you are calling with the component to _global - it'll work then On 8 Feb 2008, at 17:13, Allandt Bik-Elliott (Receptacle) wrote: i don't know if you guys have worked with tangozebra before but if so can you explain how the enhanced component works? there's an option to call a function which i assume is called after the webpage that the banner sits on is loaded but it doesn't seem to work for me i have the tz_enabled component and the tz_enhanced component on the stage got me knackered a ___ 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] jsfl aligning movieclip symbols to top left
I've just been writing a tonne of JSFL scripts for a project so have done a lot of this. Here's a few generic lines grabbed form some of my scripts... code var focussedDoc = fl.getDocumentDOM(); var targetLibrary = focussedDoc.library; var selectedItems = targetLibrary.getSelectedItems(); for( i = 0; i selectedItems.length; i++ ) { targetLibrary.editItem( selectedItems[i].name ); var editingTimeline = fl.getDocumentDOM().getTimeline(); for( e = 0; e editingTimeline.layers[0].frames[0].elements.length; e++ ) { var currentElement = editingTimeline.layers[0].frames[0].elements[e]; currentElement.x = 0 + currentElement.width/2; currentElement.y = 0 + currentElement.height/2; } } focussedDoc.exitEditMode(); /code To use this: 1) Select all the symbols in the library you would like to align 2) run the command Note: - It assumes that each library symbol consists of only a single frame and a single layer. If there are more layers and frames you'll need to iterate through each of them using the editingTimeline.layers and editingTimeline.layers[x].frames arrays. - It will align all elements on a single frame so the top left corners of their bounding boxes are at 0,0 - all raw shapes on a single frame are treated as a single element. They need to be grouped or converted to symbols to be treated individually by JSFL - it will return your editing focus to the main timeline upon completion Without knowing more about the exact structure of your symbols it's a little difficult to be more precise with the code but this should give you the basics you need to customise your own script. HTH Adrian Park On Fri, Feb 15, 2008 at 3:13 PM, Some Dude [EMAIL PROTECTED] wrote: Does anybody know what the jsfl would look like to automate the process of aligning movieclips to the top left as opposed to centered? I have a cs3 fla with lots of symbols that need to be aligned top left. Thanks if anybody can help. ___ 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] AS3 singleton not working across multiple loaded swf
Thanks, I wasn't using that parameter for my loader. I'll try it. BLITZ | Patrick Matte - 310-551-0200 x214 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Meinte van't Kruis Sent: Friday, February 15, 2008 4:04 AM To: Flash Coders List Subject: Re: [Flashcoders] AS3 singleton not working across multiple loaded swf I've never had that problem. To avoid conflicts between classes of loaded swf's, I usually set the loader context to the current domain of the loading SWF, maybe it helps in your case too. On Fri, Feb 15, 2008 at 2:22 AM, Patrick Matte | BLITZ [EMAIL PROTECTED] wrote: The only way I have been able to use a singleton across loaded swfs in AS3 is if it was first referenced in the main swf. Any other singleton I use that are not referenced in the main swf work only within the swf they are contained into. Is this a normal behavior in AS3 ? Does it have anything to do with ApplicationDomain? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- M.A. van't Kruis http://www.malatze.nl/ ___ 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] E4X Non sense !!! Need help
EX4 cannot find a node using E4X when one of it's sibling has the same name. Is there a way to avoid this problem ? var xmlData:XML = root accesscode id=S001 shortcutS001/shortcut shortcutsmallbusiness/shortcut /accesscode accesscode id=S000 shortcutS000/shortcut shortcut2S000/shortcut2 /accesscode /root; trace(xmlData.accesscode.(@id == S000)); trace(-); trace(xmlData.accesscode.(shortcut == S000)); trace(-); trace(xmlData.accesscode.(@id == S001)); trace(-); trace(xmlData.accesscode.(shortcut == S001)); trace(-); Martin T. LVL ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] jsfl aligning movieclip symbols to top left
Open the Flash History panel. Align a movieclip to top left. Look at the History panel for the JSFL it used to do that. Now you know what it looks like. Some Dude wrote: Does anybody know what the jsfl would look like to automate the process of aligning movieclips to the top left as opposed to centered? I have a cs3 fla with lots of symbols that need to be aligned top left. Thanks if anybody can help. ___ 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 Non sense !!! Need help
You should be able to index children of the same type as array elements. root.accesscode.(@id == S000).[0] or similar. Martin Tremblay wrote: EX4 cannot find a node using E4X when one of it's sibling has the same name. Is there a way to avoid this problem ? var xmlData:XML = root accesscode id=S001 shortcutS001/shortcut shortcutsmallbusiness/shortcut /accesscode accesscode id=S000 shortcutS000/shortcut shortcut2S000/shortcut2 /accesscode /root; trace(xmlData.accesscode.(@id == S000)); trace(-); trace(xmlData.accesscode.(shortcut == S000)); trace(-); trace(xmlData.accesscode.(@id == S001)); trace(-); trace(xmlData.accesscode.(shortcut == S001)); trace(-); Martin T. LVL ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01736 759321 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question on garbage collection
Hi Jiri, I'm not sure which AS version you're using but here are some good links on garbage collection in AS3. http://www.bit-101.com/blog/?p=783 http://gskinner.com/blog/archives/2006/06/as3_resource_ma.html http://board.flashkit.com/board/showthread.php?t=756290 32000+ more links can be found by googling, Flash AS3 garbage collection. hth, Bob Jiri Heitlager wrote: Hello List, I have two classes Time and Clock, see below. To get good encapsulation, in the Time class I added a function called clone(). This returns a copy of the Time instance, instead of a reference to it. Now I run the code, using an interval that calls the Clock.getElepasedTime(). While watching the Memory I can see it build up. Does this mean that with every clone of the Time object it still holds a reference and therefore doesnt get deleted by the garbage collector. Hope somebody can enlighten me.. Jiri class Clock { private var startTime:Number; private var elapsedTime:Time; //constructor method function Clock(tTime:Time) { clockdata = new ClockData() startTime = getTimer(); } public function getElepasedTime() : Time { var elapsedMilliseconds:Number = getTimer() - startTime; var elapsedHours:Number= Math.floor( elapsedMilliseconds / 360); var elapsedSeconds:Number= Math.floor( elapsedMilliseconds / 1000); var elapsedMinutes:Number= Math.floor( elapsedSeconds / 60); elapsedSeconds = elapsedSeconds%60; elapsedMinutes = elapsedMinutes%60; if(elapsedTime == null){ elapsedTime = new Time(elapsedHours , elapsedMinutes , elapsedSeconds) }else{ elapsedTime.hour = elapsedHours; elapsedTime.minute = elapsedMinutes; elapsedTime.second = elapsedSeconds; } return elapsedTime.clone(); } } class Time { private var _hour:Number; private var _minute:Number; private var _second:Number; //constructor method public function Time(hour:Number , minute:Number , second:Number) { _hour = hour _minute = minute _second = second } public function get hour() : Number { return _hour } public function set hour(nHour:Number) : Void { _hour = nHour } public function get minute() : Number { return _minute } public function set minute(nMinute:Number) : Void { _minute = nMinute; } public function get second() : Number { return _second } public function set second(nSecond:Number) : Void { _second = nSecond; } public function serialize() : String { var minutePrefix:String = ( (_minute 10)? '0' : ''); var secondPrefix:String = ( (_second 10)? '0' : ''); var hourPrefix:String= ( (_hour 10)? '0' : ''); return String(hourPrefix+_hour+':'+minutePrefix+_minute+':'+secondPrefix+_second); } public function clone() : Time { return new Time(_hour , _minute , _second) } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Thanks, ~ Bob Leisle Headsprout Software Engineering http://www.headsprout.com Where kids learn to read! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] PHP and Flash weirdness...
while working on a flash / php job recently, i was told to use charles which tells you exactly what is happening between flash and the php scripts don't know if it will help if php isn't working at all tho - have you tried a simple echo 'hello world' type deal to make sure it's working? On 15 Feb 2008, at 14:37, BOYD SPEER wrote: I am unable to run any php scripts on this web site (teeka.ipower.com) after moving my client's files to the server. I have set the CGI scripting to Active and have chosen php4 as the default version. there is no error recorded in the error log (0 bytes) and the access log does not show any thing about the throwing of a 500 error. One should see a banner at the top of the page saying YOUR HEALTH IS YOUR WEALTH, and a Today's Specials button should show vitamin bottles all loaded with php scripts. The scripts are ok because they run on my own website which has just been moved to the new v.3 platform at ipowerweb.com yesterday. even a simple php script that just echos a one word string will not work on the teeka.ipower.com server. The message I see when trying to run a simple script is: The server encountered an unexpected condition which prevented it from fulfilling the request. The script had an error or it did not produce any output. If there was an error, you should be able to see it in the error log. I get the same error with IE and Firefox. But on different computer it seems to work!?!?. Why would the flash / php work on a different server when viewed on my computer but not on another, or on a different computer from the same server? (Works at boyd-speer.com/A1/a1ii.html) Any insights greatly appreciated. Thanks, -Boyd ___ 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 Non sense !!! Need help
Try: trace(xmlData.accesscode.(shortcut.contains(S001))); Kenneth Kawamoto http://www.materiaprima.co.uk/ Martin Tremblay wrote: EX4 cannot find a node using E4X when one of it's sibling has the same name. Is there a way to avoid this problem ? var xmlData:XML = root accesscode id=S001 shortcutS001/shortcut shortcutsmallbusiness/shortcut /accesscode accesscode id=S000 shortcutS000/shortcut shortcut2S000/shortcut2 /accesscode /root; trace(xmlData.accesscode.(@id == S000)); trace(-); trace(xmlData.accesscode.(shortcut == S000)); trace(-); trace(xmlData.accesscode.(@id == S001)); trace(-); trace(xmlData.accesscode.(shortcut == S001)); trace(-); Martin T. LVL ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X Non sense !!! Need help
trace(xmlData.accesscode[0].(@id == S000)); cannot test it out atm (no flash/flex infront of me) but I believe they are indexed as well. hth. On Fri, Feb 15, 2008 at 2:57 PM, Martin Tremblay [EMAIL PROTECTED] wrote: EX4 cannot find a node using E4X when one of it's sibling has the same name. Is there a way to avoid this problem ? var xmlData:XML = root accesscode id=S001 shortcutS001/shortcut shortcutsmallbusiness/shortcut /accesscode accesscode id=S000 shortcutS000/shortcut shortcut2S000/shortcut2 /accesscode /root; trace(xmlData.accesscode.(@id == S000)); trace(-); trace(xmlData.accesscode.(shortcut == S000)); trace(-); trace(xmlData.accesscode.(@id == S001)); trace(-); trace(xmlData.accesscode.(shortcut == S001)); trace(-); Martin T. LVL ___ 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] RE: E4X Non sense !!! Need help
I can't make it work... Even this didn't work.. root accesscode id=S001 short test=S001/ short test=S002/ /accesscode accesscode id=S000 short test=uyiy/ short test=fgds/ /accesscode /root trace(xmlData.accesscode.short.(@test == S001)); But this worked... root accesscode id=S001 short testS001/test /short short testS0011/test /short /accesscode accesscode id=S000 short testS000/test /short short testS000/test /short /accesscode /root trace(xmlData.accesscode.short.(test == S001)); BLITZ | Patrick Matte - 310-551-0200 x214 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Tremblay Sent: Friday, February 15, 2008 1:57 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] E4X Non sense !!! Need help EX4 cannot find a node using E4X when one of it's sibling has the same name. Is there a way to avoid this problem ? var xmlData:XML = root accesscode id=S001 shortcutS001/shortcut shortcutsmallbusiness/shortcut /accesscode accesscode id=S000 shortcutS000/shortcut shortcut2S000/shortcut2 /accesscode /root; trace(xmlData.accesscode.(@id == S000)); trace(-); trace(xmlData.accesscode.(shortcut == S000)); trace(-); trace(xmlData.accesscode.(@id == S001)); trace(-); trace(xmlData.accesscode.(shortcut == S001)); trace(-); Martin T. LVL ___ 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 Non sense !!! Need help
erp! I was close ;) B. On Fri, Feb 15, 2008 at 3:56 PM, Glen Pike [EMAIL PROTECTED] wrote: You should be able to index children of the same type as array elements. root.accesscode.(@id == S000).[0] or similar. Martin Tremblay wrote: EX4 cannot find a node using E4X when one of it's sibling has the same name. Is there a way to avoid this problem ? var xmlData:XML = root accesscode id=S001 shortcutS001/shortcut shortcutsmallbusiness/shortcut /accesscode accesscode id=S000 shortcutS000/shortcut shortcut2S000/shortcut2 /accesscode /root; trace(xmlData.accesscode.(@id == S000)); trace(-); trace(xmlData.accesscode.(shortcut == S000)); trace(-); trace(xmlData.accesscode.(@id == S001)); trace(-); trace(xmlData.accesscode.(shortcut == S001)); trace(-); Martin T. LVL ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01736 759321 www.glenpike.co.uk http://www.glenpike.co.uk ___ 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 Non sense !!! Need help
Nice! BLITZ | Patrick Matte - 310-551-0200 x214 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth Kawamoto Sent: Friday, February 15, 2008 3:28 PM To: Flash Coders List Subject: Re: [Flashcoders] E4X Non sense !!! Need help Try: trace(xmlData.accesscode.(shortcut.contains(S001))); Kenneth Kawamoto http://www.materiaprima.co.uk/ Martin Tremblay wrote: EX4 cannot find a node using E4X when one of it's sibling has the same name. Is there a way to avoid this problem ? var xmlData:XML = root accesscode id=S001 shortcutS001/shortcut shortcutsmallbusiness/shortcut /accesscode accesscode id=S000 shortcutS000/shortcut shortcut2S000/shortcut2 /accesscode /root; trace(xmlData.accesscode.(@id == S000)); trace(-); trace(xmlData.accesscode.(shortcut == S000)); trace(-); trace(xmlData.accesscode.(@id == S001)); trace(-); trace(xmlData.accesscode.(shortcut == S001)); trace(-); Martin T. LVL ___ 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] AS3 / AIR Anti-aliased font without using embedFonts=true
Is there any way to get anti-aliased fonts in an AIR application without using textfield.embedFonts = true ? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] RE: E4X Non sense !!! Need help
Ha I thought it would do that automatically if the node was empty. Good to know. BLITZ | Patrick Matte - 310-551-0200 x214 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth Kawamoto Sent: Friday, February 15, 2008 4:06 PM To: Flash Coders List Subject: Re: [Flashcoders] RE: E4X Non sense !!! Need help Patrick Matte | BLITZ wrote: I can't make it work... Even this didn't work.. root accesscode id=S001 short test=S001/ short test=S002/ /accesscode accesscode id=S000 short test=uyiy/ short test=fgds/ /accesscode /root trace(xmlData.accesscode.short.(@test == S001)); Then you may like this, Patrick :) var xmlData:XML = root accesscode id=S001 short test=S001/ short test=S002/ /accesscode accesscode id=S000 short test=uyiy/ short test=fgds/ /accesscode /root; trace(xmlData.accesscode.short.(@test == S001)); trace(xmlData.accesscode.short.(@test == S001).toXMLString()); Kenneth Kawamoto http://www.materiaprima.co.uk/ ___ 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] RE: E4X Non sense !!! Need help
Patrick Matte | BLITZ wrote: I can't make it work... Even this didn't work.. root accesscode id=S001 short test=S001/ short test=S002/ /accesscode accesscode id=S000 short test=uyiy/ short test=fgds/ /accesscode /root trace(xmlData.accesscode.short.(@test == S001)); Then you may like this, Patrick :) var xmlData:XML = root accesscode id=S001 short test=S001/ short test=S002/ /accesscode accesscode id=S000 short test=uyiy/ short test=fgds/ /accesscode /root; trace(xmlData.accesscode.short.(@test == S001)); trace(xmlData.accesscode.short.(@test == S001).toXMLString()); Kenneth Kawamoto http://www.materiaprima.co.uk/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flex Builder and git
Ola, I thought some of you might be interested in this. Before starting a little Actionscript project in FB, I installed git, the newest craze in source version control. I saw a bunch of netizens freaking out about it all over the place, and the ability to create branches effortlessly and to back up things easily appealed to me. So after a relatively painless install on my Mac, I had it going in the Terminal. I then started to experiment in FB. I created an Actionscript project, and then started a git repository in that folder (using basically only these commands: http://www.kernel.org/pub/software/scm/git/docs/everyday.html -- Individual Developer (Standalone)). I wrote the basic engine for the swf and then created a new branch for guiing up this engine. At this point I saw the power in this approach. Basically, when I switch from the engine branch to the GUI branch, the AS code is updated in FB, quickly and correctly, which I sort of expected. But not only that, all the external assets are then loaded into the project. Furthermore as long as I keep committing changes to branches at important intervals, or new branches for new approaches/ideas, I have a complete annotated history of the project. I can load in any code at any point I committed and keep dead ends that might prove useful in some other project, or redo the gui for another swf some other day, and everything, including images and even compiled swfs, are loaded in as well. Dirt cheap and easy. I don't know, this is freaking me out, it is so good. You can check out the swf here: www.pandakar.com/blog Carmine ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X Non sense !!! Need help
..or perhaps these are more true to the original: trace(xmlData.accesscode.(shortcut.children()[0] == S001)); trace(xmlData.accesscode.(shortcut.text()[0] == S001)); Kenneth Kawamoto http://www.materiaprima.co.uk/ Patrick Matte | BLITZ wrote: Nice! BLITZ | Patrick Matte - 310-551-0200 x214 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth Kawamoto Sent: Friday, February 15, 2008 3:28 PM To: Flash Coders List Subject: Re: [Flashcoders] E4X Non sense !!! Need help Try: trace(xmlData.accesscode.(shortcut.contains(S001))); Kenneth Kawamoto http://www.materiaprima.co.uk/ Martin Tremblay wrote: EX4 cannot find a node using E4X when one of it's sibling has the same name. Is there a way to avoid this problem ? var xmlData:XML = root accesscode id=S001 shortcutS001/shortcut shortcutsmallbusiness/shortcut /accesscode accesscode id=S000 shortcutS000/shortcut shortcut2S000/shortcut2 /accesscode /root; trace(xmlData.accesscode.(@id == S000)); trace(-); trace(xmlData.accesscode.(shortcut == S000)); trace(-); trace(xmlData.accesscode.(@id == S001)); trace(-); trace(xmlData.accesscode.(shortcut == S001)); trace(-); Martin T. LVL ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] print function in AS2
Hi Maurice, I highly recommend you to take a look on PrintJob class. It will give you much more control and make your life easier. I'm not sure, but I remember that was an issue with the print function and layer-masks (and a lot of other stuff too). But I don't know how complicated will be for you debug and test this. A simple and fast solution would be generate a Bitmap of the screen (like a print-screen) before printing. And then you just dispose the object. I hope this helps you to figure out an solution. On Feb 15, 2008 6:34 PM, maurice sallave [EMAIL PROTECTED] wrote: Hi, I'm trying to print from Flash using the print function. I've created a print button to point to a movieClip that gets dynamically created e.g. a results page. What's weird is that it works as a standalone swf file and prints fine, but when it's in a browser I get one solid color and no images - no results. I've used bframe, bmax, and bmovie where I instantiated #p at the first frame and still no luck. Thanks for any help. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ~Gabriel Laet ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders