RE: [Flashcoders] memory leak
Are you using Bitmaps and/or BitmapData? In that case try doing bitmapData.dispose() or bitmap.bitmapData.dispose() when clearing an image -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Huynen Sent: 03 September 2007 22:09 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] memory leak Hi There, I created a flash projector file to display media on a flat screen. The application loads images and xml and is supposed to loop all day long. However, after each loop the application steals 10 mb in memory more. I deleted all the movieclips and checked all the vars with the help of a foreach loop and deleted them to. Does anybody know how to deal with this data leak?? Regards, Tom ___ 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
RE: [Flashcoders] AS3 Dynamic class reference
In order to get a dynamic reference to a class, use this : getDefinitionByName("fl.motion.easing."+_easeClassName).easeIn; The compiler will need to include the easing class, so you could include this : import fl.motion.easing.SomeClass; private const _someClass:SomeClass; ... and repeat for each possible easing class -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dimitrios Bendilas Sent: 27 August 2007 10:44 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] AS3 Dynamic class reference Hello, I need to dynamically get a reference of a Class and I'm not able to do so. I think an example will illustrate my point better: package com.zefxis.solarwind2.animations { import fl.motion.easing.*; public class EaseFunctions { private var _easeClassName:String; private var _easeFuncName:String; private static var easeDependencies = [Back, Bounce, Elastic, Linear, Cubic, Quadratic, Circular, Exponential, Sine, Quintic, Quartic]; public function EaseFunctions() { } public function getEasingFunction(functionName:String):Function { var tmp:Array = functionName.split("."); this._easeClassName = tmp[0]; this._easeFuncName = tmp[1]; //trace(this._easeClassName, this._easeFuncName); var easeFunc:Function = fl.motion.easing[this._easeClassName]["easeIn"]; // return easeFunc; } } } What I want to do is pass a parameter like "Cubic.easeIn" so that EaseFunctions parses that into Cubic.easeIn. The code above produces a compile error: "1120: Access of undefined property fl.". Any clues? (it used to work in AS2) Thank you, Dimitrios ___ 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
RE: [Flashcoders] Finding a spot on a curveTo Line
This should do it : public function getPositionOnCurve(p1:Point, p2:Point, p3:Point, t:Number):Point { var pos:Point = new Point(); pos.x = Math.pow((1-t), 2)*p1.x+2*t*(1-t)*p2.x+Math.pow(t, 2)*p3.x; pos.y = Math.pow((1-t), 2)*p1.y+2*t*(1-t)*p2.y+Math.pow(t, 2)*p3.y; return pos; } P1 is the start point of the curve (moveTo(p1.x, p1.y)) P2 the control point P3 the end point (curveTo(p2.x, p2.y, p3.x, p3.y)) T is a number between 0 and 1, .5 for halfway -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eric e. dolecki Sent: 09 August 2007 17:19 To: Flashcoders mailing list Subject: [Flashcoders] Finding a spot on a curveTo Line Quick question... I have a curveTo between points, but I'd like to get the x,y 1/2 way through the curve, ON the curve. Googling for some code but haven't seen it yet... I basically want to join another line to the midpoint of the curve, and the curve is dynamically moving throughout - eric ___ 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
RE: [Flashcoders] AS3 Events
How about using a wrapper class? package { import flash.events.Event; import flash.events.IEventDispatcher; public final class Wrapper { private var _contextInfo:Object; private var _a:IEventDispatcher; public function get content():IEventDispatcher { return _a; } public function get contextInfo():Object { return _contextInfo; } public function Wrapper(url:String, contextInfo:Object) { _contextInfo = contextInfo; // new instance _a = new A(); // or reference _a = A.getInstance(); // _a.addEventListener(Event.COMPLETE, onCompleteEvent); _a.loadSomething(url); } private function onCompleteEvent(eventObj:Event):void { // implement custom event to which class B will listen dispatchEvent(new CustomEvent(eventObj.type, _contextInfo)); // or specify a getter for contextInfo from this Wrapper class } } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: 25 July 2007 15:16 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] AS3 Events Oh, and reading the link you supplied, the only concrete suggestion is from Aral Balkan, who suggests (as someone did in an earlier thread) that you subclass the Event class. How would that help in my case? Any suggestions? To go back to my original example, if you assume class A is a black box that fires an event of class Event (Event.COMPLETE), we have no way (to the best of my knowledge) to make class A produce subclasses of Event instead; unless the suggestion is to subclass A to produce different events, which (depending on A's implementation) could be very difficult. Ian (Getting frustrated!) On 7/25/07, Ian Thomas <[EMAIL PROTECTED]> wrote: > On 7/25/07, Sunil Jolly <[EMAIL PROTECTED]> wrote: > > Hi Ian, > > > > It seems like the "proper" way would be to create the extra > > functions/classes to handle this. That would solve those two issues > > which aren't major, but would make your code cleaner. ___ 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
RE: [Flashcoders] ASDoc with Flash CS3
I have this in a .bat file in the root of the project I want to export in asdoc @ECHO OFF :BEGIN "C:\Program Files\Adobe\Flex Builder 3\sdks\moxie\bin\asdoc.exe" -source-path . -doc-sources . -main-title "Documentation" -window-title "Documentation" -output asdoc PAUSE > NUL :END This generally works, but it does have problems with classes in library paths I keep a lot of code in multiple swc files which are then imported in a new as3 project and unless I copy the swc code packages directly to my project class directory, asdoc throws errors. Also it seems that -exclude-classes [className] doesn't work? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sherri Sent: 23 July 2007 17:17 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] ASDoc with Flash CS3 Just wondering if anyone has successfully used ASDoc with AS3 classes for flash? I have used it for Flex projects no problem (so I don't need help with that). but it seems to take a lot of tinkering to get it to work with Flash projects and I still have the asdoc tool failing. If not, I'd be interested in learning about other similar doc tools to use with Flash AS3 projects. Thanks *.* Sherri ___ 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
RE: [Flashcoders] IFF to AS3
So that comes down to function(a:String, b:String, c:String, d:String):uint { return a.charCodeAt(0) << 24 | b.charCodeAt(0) << 16 | c.charCodeAt(0) << 8 | d.charCodeAt(0); } thanks :) And no not for DeluxePaint, I'm trying to read Sims 1 object files into Flash, which are also encoded in IFF -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Holroyd Sent: 10 May 2007 12:42 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] IFF to AS3 On Thu, May 10, 2007 at 10:06:27AM +0200, Frank Pepermans wrote: > I'm trying to get AS3 to parse an IFF file, more specifically the EA IFF > 85 file format, using the byteArray. > > For now the best documentation I've found is this link > http://www.martinreddy.net/gfx/2d/IFF.txt and a C script called > IFFDigest. > > > > Now since I've never done anything in C, there are some sections in the > code which aren't exactly clear, for example : > > > > /* ID typedef and builder for 68000 Lattice C. */ > typedef LONG ID; /* 4 chars in ' ' through '~' */ > #define MakeID(a,b,c,d) ( (a)<<<<24 | (b)<<<<16 | (c)<<<<8 | (d) ) > > /* Globally reserved IDs. */ > #define ID_FORM MakeID('F','O','R','M') > #define ID_LIST MakeID('L','I','S','T') > #define ID_PROP MakeID('P','R','O','P') > #define ID_CATMakeID('C','A','T',' ') > #define ID_FILLER MakeID(' ',' ',' ',' ') This code is taking the four 8-bit-bytes of the IDs and assembling them into a single 32-bit value. i.e. it turns "F"-"O"-"R"-"M" into 0x464F524D. This is presumably an optimisation so that it can compare ID values a whole 32-bit-word at a time, rather than requiring four byte-wise comparisions. Are you porting DeluxePaint to Flash? ;) ta, dave -- http://david.holroyd.me.uk/ ___ 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
[Flashcoders] IFF to AS3
Hi, I'm trying to get AS3 to parse an IFF file, more specifically the EA IFF 85 file format, using the byteArray. For now the best documentation I've found is this link http://www.martinreddy.net/gfx/2d/IFF.txt and a C script called IFFDigest. Now since I've never done anything in C, there are some sections in the code which aren't exactly clear, for example : /* ID typedef and builder for 68000 Lattice C. */ typedef LONG ID; /* 4 chars in ' ' through '~' */ #define MakeID(a,b,c,d) ( (a)24 | (b)16 | (c)8 | (d) ) /* Globally reserved IDs. */ #define ID_FORM MakeID('F','O','R','M') #define ID_LIST MakeID('L','I','S','T') #define ID_PROP MakeID('P','R','O','P') #define ID_CATMakeID('C','A','T',' ') #define ID_FILLER MakeID(' ',' ',' ',' ') >>> What is should do is take the string 'FORM' and convert it to an ID, how would this translate to AS3? Should anyone know where to find more useful info on this, please let me know :-) ___ 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] LoadMovie Problem?
Use "C: pages.swf" since "\" is used to escape characters -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: dinsdag 31 januari 2006 12:00 To: Flashcoders mailing list Subject: RE: [Flashcoders] LoadMovie Problem? You also have a space in there: "C:\\ pages.swf" I would not recommend loading from c: -you can't guarantee the file will always be there can you? Loal from a relative url instead, and don't try and load into _root - create and empty movie clip instance, and load into that. Jason Merrill >>-Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] Behalf Of Dhiraj >>Girdhar >>Sent: Tuesday, January 31, 2006 2:35 AM >>To: Flashcoders mailing list >>Subject: [Flashcoders] LoadMovie Problem? >> >> >>Hi All, >> >> >> >>I am trying to load a new SWF file on root movie clip using following >>action script code, but it is not working properly. It is loading its >>first frame only. But the SWF file (to be loaded) is having more than >>one pages. >> >> >> >>loadMovie("C:\\ pages.swf", _root); >> >>_root.gotoAndStop(3); >> >> >> >>Any solution? >> >> >> >> >> >>Regards: >> >>Dhiraj >> >>___ >>Flashcoders mailing list >>Flashcoders@chattyfig.figleaf.com >>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited. ___ 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