[Flashcoders] Re: AVM1Movie unload and static variables
my impression of this is that if you have static variables or methods of the moveclip then you have a class that extends MovieClip? if so, my suggestion is make sure the references to the class are set to null / out of scope - in my experience unloading a class that extends MovieClip does not always delete the reference to the associated subclass of MovieClip hth - and might be barking up the wrong tree rob From: [EMAIL PROTECTED] on behalf of Matthias Dittgen Sent: Thu 1/10/2008 2:20 AM To: Flash Coders List Subject: [Flashcoders] Re: AVM1Movie unload and static variables In fact this problem applies not only for AS2/AS3 interop. How can I unload MovieClips and thus unload static variables to have a fresh startover, when loading the same MovieClip later again? Matthias On Jan 9, 2008 3:32 PM, Matthias Dittgen [EMAIL PROTECTED] wrote: Hello Flashcodes, I isolated a recent problem I had using AVM1Movies. I have build this everywhere mentioned Proxy for old Flash content (Flash8 and before), that enables my AS3 Application to communicate with the loaded AS2 based MovieClip using LocalConnection. Now I load an old Movie for the first time into an own container within my proxy AVM1Movie and I lockroot it, too. Later the Movie gets unloaded and sometime later the Movie ist loaded again to a new container. The second time, the Movie does NOT work as expected, because static variables from its former incarnation are still set. Questions: Why are these variables still there and not deleted by garbage collection or the like? How can I have it work? Is there more than lockroot, I can do? Any help or comment on this is welcome. Matthias ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RE: obfuscation swf !
2006/5/7, [EMAIL PROTECTED] [EMAIL PROTECTED]: Is there any good way or method for obfuscation a Flash file so that swf works fine after obfuscation and also prevent any one to understand the code easily . Few common softwares for obfuscation are just not that good as swf stops working after using them . Of if not obfuscation is there any other method to prevent swf to be decompiled to fla . help will be really appreciate . Thx Max My understanding is that encryption is unreliable - since the player has to be able to decrypt it anyway, and the swf format is known - so any trick that fools the decompiler is vulnerable to being corrected in the next release of the decompiler I've written a home grown obfuscator of sorts (for AS2). It's a bit slow and clunky - and not AS3 compatible - but does what I need. (It can parse AS2 source code for variable and functions names using VB, and then obfuscate the byte code using FLASM.) Few common softwares for obfuscation are just not that good as swf stops working after using them . depending on coding style, you need to avoid changing names of variables that correspond to other constants (eg names of nodes in an XML file that are matched in your code - won't match if you rename the coded version) Also array syntax (AS2) that does things like [prop + x] - don't want to rename prop0, prop1 etc elsewhere So you typically need some sort of exclusion list. I don't know that you can ask the software to reliably work out which variables must be excluded in some of these contexts. (In some cases I could observe if functionality was impaired and look in that region of code for array syntax etc.) I had a look at ASO lite a while ago and at the time it took the approach of not renaming any functions or classes - just simple variables, and it also allows a custom exclusion list. I was naïve enough to try my own (using Flasm and VB) that also did function names etc. The current ASO version now seems to rename functions and class names etc (still allowing a custom exclusion list). Its pretty fast - but I've had your issue - my code stops working and I can't work out which additional variables to exclude. For example it seemed to kill the V2 mx components - and it was finding thousands of variables from those components. It seemed to me that I only wanted to obfuscate my own code (eg I don't mind if people decompile the mx components etc). So I revisited the one I'd tinkered with. Its slow - uses VBA and Flasm. (I tested it as compiled VB6 and almost identical speed. VBA allows me to use Excel for data storage. I now get it to parse my AS2 files first and locate all of the variables and functions names I have introduced. (I don't get it to scan the mx source files so it will leave them in swf). I do have a list of excluded native functions - onRollOver etc. Anyway, then VBA uses FLASM to search for those variables in the byte code (flm file). (not all of them make it into the byte code) Then, when there is a common list (my variables / functions / class names that do appear in the swf - it does text a text / replace with an illegal name - eg an integer - which works at byte code level, but not if decompiled). This is all horribly slow (10 minutes - for say 75 classes - 400 k of AS2 files - 200 k of swf - 2 MB flm file - on slowish machine) Not sure it would qualify as a good solution for other contexts But it does work well for my AS2 based development and I have full control over obfuscation and I know it works. I don't know what method ASO uses though I saw on the Flasm website that one of ASO's people helped them optimise Flasm - so maybe a similar (more optimised) approach. Was too aggressive for me though - couldn't get it to work. Any interest in this? Cheers Rob Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] copying formatted text out of flash
Hello Is there any way to copy formatted text to the system clipboard ie I don't really want all the html / textformat tags But I'd like to be able to copy formatted text out of textbox / textarea I'm thinking that's not too easy - its either plain text, or textformat tags? Hoping I'm wrong Cheers Rob Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] flash database - very conservative connections
Dear all I am using sendAndLoad to extract data from an MS Access db, via an ASP page. When running on my localhost, this only works if I restrict calls to the asp/db to about one per 30s. Any more, and the XML.onLoad callback returns a success value of false - (ie fails!) It does work fine if I step through very slowly - 1 page access per 30s. Its like the database is still tied up after the first access. I assume that I have some permission or database setting set incorrectly, but I can't find it. The ASP pages close the SQL connection when finished Conn.Close() Conn=null (Have also added all the iusr and (helper accounts) permissions I can think of for the wwwroot folder) This did run fine on a slower laptop at one stage (it was also XP, but it was an older version of Flash - mx2004. Now using Flash8) Any insights or help very greatly appreciated Thanks Rob Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re : [Flashcoders] components in flash
Do you need to call invalidate on the component? I've had that when using scrollpanes with dynamic text - they don't take their needed dimensions till you force a redraw with invalidate -- Date: Tue, 16 Jan 2007 14:11:13 -0500 From: Gustavo Duenas [EMAIL PROTECTED] Subject: Re: [Flashcoders] components in flash To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed hi, I did, but the error is still there, the movie is in a loader component, even it has a preloader component also, how can I do? any ideas? Regards. On Jan 16, 2007, at 1:37 PM, Hans Wichman wrote: Hi, yes, don't do anything at all until the whole movie is loaded. There is probably a lot of info on this in the archive. So in other words, as long as _root.getBytesLoaded 4 and getBytesTotal, dont jump to frames, create components etc. Only when getBytesLoaded==getBytesTotal, (or _framestotal == _framesloaded), it's safe to do so. You can also wrap your movie into a loader movie, and have that loader movie take care of things. greetz, JC On 1/16/07, Gustavo Duenas [EMAIL PROTECTED] wrote: any ideas about how can I fix it? regards Gustavo Duenas On Jan 16, 2007, at 11:46 AM, Hans Wichman wrote: sounds like another preloading issue:) grtz JC On 1/16/07, Gustavo Duenas [EMAIL PROTECTED] wrote: Does anyone know why the components in flash don't always read well and need to refresh the page. The case is that I'm using a scrolling bar component attached to a dynamic text, the first time the component is read , is white, then when I do the refresh page in my browser it appears as is should be. Any ideas? Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com Gustavo Duenas Creative Director LEFT AND RIGHT SOLUTIONS LLC 1225 w. Beaver St. suite 119 Jacksonville, FL 32204 904 . 2650330 www.leftandrightsolutions.com Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] trivial or mysterious problem with component?
Dear all I have a strange problem getting a V2 component to initialize I can copy code works that fine in one class, compiled into another class (and another swf), and it no longer works - just fails silently This is the essence of it : import mx.controls.Button; class Mysterious { function Mysterious () { doStuff() } function doStuff() { var endNoteButt = _root.createClassObject(Button, endNoteButt,1000); trace(endNoteButt); ; } } In the original class, it traces : _level0.endNoteButt In the new class it traces : undefined Very odd ...i might well be missing something trivial / obvious, but I can't see it... I know that V2 objects need some time to fully initialize, but they shouldn't return undefined? Bit more info that might help someone advise me here (1) in the first (working) case, Mysterious is instantiated from another class - in the second from the main timeline (2) using MX2004 IDE - both swf's compile and run fine - no errors (3) this is a new PC. fscommand also seems to have stopped working on this machine - unrelated? Security issue? (4) both have same directory location, and class paths set for the swf Help?! TIA Rob Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education Training.. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Re: Programmatically instantiating a class that extends MovieClip
As a variant on the __proto__ method (which I gather is what the compiler actually uses behind the scenes anyway) I also bundle the code into a static method Class A { ... // dynamicMc (no library symbol) will be added and subclassed to mcSubClass dynamicMc:MovieClip = McSubClass.addInstance(baseMC); } class McSubClass extends MovieClip{ function McSubClass { //empty constructor } function init(){ //initialize mc - add dynamic graphics etc } static function addInstance (base_mc) { var newMc; var nd = base_mc.getNextHighestDepth(); newMc= base_mc.createEmptyMovieClip(mcSubClass+nd,nd); newMc.__proto__ = new McSubClass (); newMc.init(); return newMc; } } maybe mc.__proto__ == MyClass.prototype (below) is better than my newMc.__proto__ = new McSubClass () my method (i picked up on this list) does have the side effect that the constructor can't initialize the mc, hence the separate init call after the __proto__ / constructor; all wrapped in one method so I don't forget Rob Subject: Re: [Flashcoders] Programmatically instantiating a class that extends MovieClip. To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=UTF-8; format=flowed Hello :) it's easy, you must use __proto__ AS2 - MyClass extend MovieClip !!! MyClass extends MovieClip { // o Constructor public function MyClass() { } } var mc = createEmptyMovieClip(myInstance, 1) ; mc.__proto__ == MyClass.prototype ; MyClass.call(mc) ; EKA + :) 2006/6/29, Scott Hyndman [EMAIL PROTECTED]: That's exactly what I mean. As a result you can do cool things like reparenting -- like moving a button from one window to another. It handles the MovieClip creation itself. A code example really isn't too easy, because the framework that allows this to be possible is quite large. If you were really interested, you could look at the code. Here's a link: http://tinyurl.com/jqtwv It's a gigantic class...so it might be difficult to work through. The important method is createMovieClips(), which is called when a view (the type of object that encapsulates movieclips) moves to a new superview. Scott On 29/06/06, Jim Kremens [EMAIL PROTECTED] wrote: Why not subclass object instead? Both ActionStep and ASwing work this way, then create movieclips on the fly. It's very nice to work with. So you never really subclass movieclip, you use composition instead. In other words, your class has a movieclip, but it isn't a movieclip.,, Is that what you mean, or am I missing the point? Can you give a small code example? Thanks, Jim Kremens --- original message Subject: Re: [Flashcoders] Programmatically instantiating a class that extends MovieClip. To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=UTF-8; format=flowed Hello :) it's easy, you must use __proto__ AS2 - MyClass extend MovieClip !!! MyClass extends MovieClip { // o Constructor public function MyClass() { } } var mc = createEmptyMovieClip(myInstance, 1) ; mc.__proto__ == MyClass.prototype ; MyClass.call(mc) ; EKA + :) Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education Training. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] RE: rich text box
Hi Sander, my need is for the latter a text box in which people can create rich text content with a formatting toolbar so you can send it so a server-side script Rob - Original Message - Rob, Is a rich text box a box you can fill with HTML content easily or a box in which people can create rich text content with a formatting toolbar so you can send it so a server-side script? S On 04 Mar 2006, at 13:00, Costello, Rob R wrote: anyone know of rich text box components in flash MX2004 - preferably with source code Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education Training. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] rich text box
Hello all anyone know of rich text box components in flash MX2004 - preferably with source code I have a feeling that there is resoure kit with one (DRK?) and i have an old MX book (Hall/Wan) that sets out the code for one in MX will pursue these two options but thought i'd see if the list has other solutions for this Rob Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education Training. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] RE: Focus in the text field
are you using firefox? is so, you might need to look at the wmode (in the html page) - can't recall the details but their is an issue that stops FF displaying cursor with wmode set to transparent - change the setting and will correct, if indeed it is that issue -Original Message- Date: Tue, 17 Jan 2006 11:13:29 +0530 From: Sumeet Kumar [EMAIL PROTECTED] Subject: RE: [Flashcoders] Focus in the text field To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii Even this line is not working the focus is getting set but the Cursor is not visible -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] On Behalf Of Chris Velevitch Sent: Tuesday, January 17, 2006 11:05 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Focus in the text field You might also need to set the cursor position Selection.setSelection(0, 0); Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education Training. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RE: Interactive SWF in a Scroll Pane
might be that problem where a v2 component hogs the focus if so, use selection.setFocus(this) in an onPress or onRelease handler of the movie clip inside the scrollpane to get them to take focus properly hth Rob -- Message: 12 Date: Wed, 11 Jan 2006 21:16:56 -0700 (MST) From: Jason Lutes [EMAIL PROTECTED] Subject: [Flashcoders] Interactive SWF in a Scroll Pane To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=iso-8859-1 Is there a way to allow the contents of a scroll pane component instance to receive mouse events? Mine doesn't seem to be doing it. - pixelTwiddler, a.k.a. Jason Respect yourself, and THINK about stuff Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education Training. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] mac windows
hello i'm running windows but having some problems with a swf on the Mac player .. which isn't convenient to debug ... macs are few and far between where i work and play is there anyway to get a mac player to run under windows; or any online service that simulates a mac client? cheers Rob Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education Training. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: Newbie AS3 question
yes, this is true in ActionScript referencing or instantiating a singleton class via a static getInstance method, is a different matter to all methods of a class being static The former is calling an instance method and the latter is calling a static method. Instance methods have access to instance data that is persisted as long as the instance exists, static methods have access only to static data and that data passed in to the method call. Is this not true in ActionScript? Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education Training. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] window depth
is there a way to attach a V2 window component without it taking over the top layer - i need to move objects in front of it thanks in advance Rob Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education Training. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders