[Flashcoders] Re: online export paths to illustrator or eps
You could print to a PDF file and then open the resulting PDF in Illustrator to access all the vectors, etc. I'm not sure it works in all cases, but it has worked on several occasions for me. Jack ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: When singletons go bad
Just curious if this works better for you: private function MyManager() { // constructor return getInstance(); } public static function getInstance() : MyManager{ if(_myManager == undefined){ _myManager = new MyManager(); _myManager.init(); } return _myManager; } Sorry, I haven't had the time to follow the whole discussion, but I figured I'd throw this your way and see if it helps. Good luck. Jack ___ 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] BitmapData, threshold and copyChannel bug (black pixels)! Help?
I'm applying a threshold() to a BitmapData instance and then using copyChannel() to copy it's red channel to the alpha channel of a different BitmapData instance. This is part of a technique I'm using to animate simulated brush strokes without any kind of tweens (just gradations). Much easier on the processor. Anyway, I whipped together a simple FLA file that isolates the problem (no brush strokes, sorry). Download the FLA at: http://www.greensock.com/threshold_bug.zip Publish the file and you'll see it work. But that's only because I implemented a hack on line 31 (copying pixels back in from a stored copy). Remove line 31 and you'll see the problem immediately. All of the pretty red/green/blue pixels that have ever been made transparent during the course of the animation (using the threshold()/copyChannel() technique) turn black and stay that way! No idea why. Am I doomed to a life of hacks? Is my code somehow flawed? Help? This project has to be finished in a matter of hours, so I'd appreciate your prompt responses. I'd be happy to share the final brush stroke effect with anyone who is interested once I get it working (I'm close). Jack ___ 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] Q:missing font styles in fonts menu!!
I've experienced the same problem countless times. I loathe the way Flash [mis]handles fonts. The only way I've found to sort of get around it is by opening the font in Fontographer (or something like it), renaming the font so that instead of Futura with a style of Light, I name the font Futura Light with no style. Again, this is far from ideal, but after installing that new font, I was at least able to select it from the Font menu in Flash. Hope that helps. Jack Doyle -- Date: Wed, 24 May 2006 10:40:45 -0400 From: [EMAIL PROTECTED] Subject: [Flashcoders] Q:missing font styles in fonts menu!! To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi I'm pulling my hair out over missing font styles in the futura family. I've re-installed both type 1 and truetype versions of futura but no matter what I do I only see one version of futura in the fonts menu. When opening an older flash fla that used futura light, I can't re-map to the correct font. Anyone have a similar problem?? Help please! ___ 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: tweening multiple properties simultaneously
For what it's worth, I spent a lot of time creating a TweenLite class that does exactly what you want (I think). It adds less than half of the Kb to the SWF compared to other Tweening engines I've worked with (about 2Kb) and it allows you to very easily tween multiple properties with a single call like so: gs.TweenLite.to(mcClip, 1.5, {_x:120, _y:50, _xscale:70, _yscale:70, ease: Strong.easeOut}); You can even delay the tween for a set amount of time, have it call a function when it's done, pass arguments to that function, and more. See the documentation at the top of the class file for more info. Download it at: http://www.greensock.com/ActionScript/TweenLite.zip I hope it serves you well. This is, by the way, the first time I've made my little TweenLite class publicly available and I'm hoping it'll prove valuable for others as well. I'd welcome comments/suggestions (please be kind). Jack Doyle -- Date: Wed, 2 Aug 2006 10:56:12 -0400 From: Matthew Ganz [EMAIL PROTECTED] Subject: Re: [Flashcoders] tweening multiple properties simultaneously To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; format=flowed; charset=iso-8859-1; reply-type=response thanks for the links. enrico - i tried scaling first and it didn't work, and rich, i tried the TweenExtend class and that also didn't work. i'm still getting the same results. the zooming in works but my tweens of the 'x' and 'y' is not working anymore. below is my function. can you see s/thing in the way i'm calculating the displacement for 'nX' and 'nY' that may be the cause of the problem? thanks for lending a hand. very much appreciated. public function zoomIn(activeState:MovieClip) { var nX:Number = (Stage.width/2) - activeState._xmouse; // activeState is reference to US map mc. var nY:Number = (Stage.height/2) - activeState._ymouse; // zoom in to the selected state. new Tween( activeState, _x, Strong.easeOut, activeState._x, nX, 2, true ); new Tween( activeState, _y, Strong.easeOut, activeState._y, nY, 2, true ); // zoom into the map new Tween( activeState, _xscale, Strong.easeOut, activeState._xscale, 200, 2, true ); new Tween( activeState, _yscale, Strong.easeOut, activeState._yscale, 200, 2, true ); } ___ 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: Better XML parsin
I wrote a class that might be useful to you. Just point it at your XML file and it'll load it and parse it into Arrays/Objects. See the top of the class file for some documentation. It can also reverse parse (dump an object back into XML format). http://www.greensock.com/ActionScript/XMLParser.zip This is the first time I'm making it available to the public, so I welcome comments/suggestions (be kind). It's been working quite well for me for months. Jack Doyle --- Date: Mon, 21 Aug 2006 15:46:24 -0400 From: Flash Mel [EMAIL PROTECTED] Subject: [Flashcoders] Better XML parsin Hello everyone, There has to be a better way to parse XML. Using for loops seems antiquated. Could I do a while loop and cycle through all the possible nodes? What else is out there for parsing XML in a cleaner fashion? Cheers! fM ___ 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: Q:Reduce file size of mx.transitions.Tween ??
This is exactly why I wrote the TweenLite class. It only adds about 2k to your file and has some features that the Tween class doesn't. You can download it at http://www.greensock.com/ActionScript/TweenLite.zip There's some brief documentation at the top of the file, but let me know if you have any questions. Hope it helps. Jack Doyle From: [EMAIL PROTECTED] Date: 2006/09/07 Thu AM 08:47:29 CDT To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Q:Reduce file size of mx.transitions.Tween ?? Hi Working on a project where file size is important...and the built in mx.transitions.Tween comes in at over 6k. Any suggestions to reduce the size? Thanks! Jim bBachalo [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ ___ 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: Q:Reduce file size of mx.transitions.Tween ??
That's great! Thanks, Rich. Cool site! Is it yours? There are several classes I've written that might help others, but I haven't found the time to write sufficient documentation yet, so I'll work on that and send 'em your way if you're interested. I've got a handy XML loader/parser/translater, an FLV video manager, an asset preloading engine, and even a transformation class that draws a selection box with handles around any MovieClip and lets the user scale, rotate, and/or move it around the stage (kinda like you can in modern day graphics applications like Adobe Illustrator or Photoshop, etc.). If anyone has a pressing need, shoot me an e-mail and I'll send you a class file sooner rather than later. Otherwise I'll work on documentation when I find pockets of time (hard for me to come by lately) and post 'em then. Thanks again. Jack Doyle - Message: 1 Date: Fri, 8 Sep 2006 11:34:22 -0700 From: Rich Rodecker [EMAIL PROTECTED] Subject: Re: [Flashcoders] RE: Q:Reduce file size of mx.transitions.Tween ?? To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com I added this class to actionscriptclasses.com: http://www.actionscriptclasses.com/2006/tweenlite/ If you (or anyone else) has any other classes they'd like to share on there, feel free to sign up and add them. On 9/8/06, Rich Rodecker [EMAIL PROTECTED] wrote: got it, thanks On 9/8/06, Count Schemula [EMAIL PROTECTED] wrote: link worked for me. I just e-mailed you the .zip file... On 9/8/06, Rich Rodecker [EMAIL PROTECTED] wrote: hey jacki tried downloading that zip but the link doesnt seem to lead anywhere? On 9/7/06, Jack Doyle [EMAIL PROTECTED] wrote: This is exactly why I wrote the TweenLite class. It only adds about 2k to your file and has some features that the Tween class doesn't. You can download it at http://www.greensock.com/ActionScript/TweenLite.zip There's some brief documentation at the top of the file, but let me know if you have any questions. Hope it helps. Jack Doyle From: [EMAIL PROTECTED] Date: 2006/09/07 Thu AM 08:47:29 CDT To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Q:Reduce file size of mx.transitions.Tween?? Hi Working on a project where file size is important...and the built in mx.transitions.Tween comes in at over 6k. Any suggestions to reduce the size? Thanks! Jim bBachalo [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ ___ 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: Relationship between data rate and file size doesn't work ?
What software are you using to create your FLVs? I know Sorenson Squeeze has a setting that allows you to specify a minimum quality level which overrides any data rate settings (if/when it needs to). So if you set your bit rate really low, like 50kbps but the minimum quality is set to 95, you'll get a huge file. Jack -Original Message- Date: Fri, 22 Sep 2006 12:57:28 -0700 (PDT) From: David Bellerive [EMAIL PROTECTED] Subject: [Flashcoders] Flash Video : Relationship between data rate and filesize doesn't work ? To: flashcoders@chattyfig.figleaf.com I don't know if I'm missing something here but what's the deal with Flash Video data rate and file size? Here's my understanding on Flash Video encoding: When I specify 300 kilobits/second for the video data rate and 50 kilobits/second for the audio data rate, I should get and FLV file that NEVER goes beyond 350 kilobits/second. So if I encode a 30 second video with those settings, I should get and FLV file that weighs 1.28 MegaByte. If I decide to double the frame size for exemple (from 320x240 to 640x480), I should still get the same file size (1.28 MegaByte) but the image quality should obviously be badly affected. That's not the case. Can someone please help me shed some light on this data rate vs. file size dilemma? ___ 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: Find point after rotation
Pick up a copy of Foundation ActionScript Animation: Making Things Move! by Keith Peters. Best $26.39 (at Amazon.com) you'll ever spend. The answer to your question (and a bunch more you never knew you had) is in that book. Jack -- Date: Wed, 4 Oct 2006 16:55:45 -0500 From: Jason C Reynolds [EMAIL PROTECTED] Subject: [Flashcoders] Find point after rotation Hi, having some math problems... hoping someone can help Lets say I have a rectangle (height width). I need to know the bottom middle point. That would be point(clipWidth / 2, clipHeight). But I am having a hard time keeping track of this point after I rotate that clip. If I rotate the clip 40 degrees (clip._rotation = -40), where on the stage is that bottom middle point now? I have searched the forums, and came up with alot of finding the angles, but all seem to assume I know 2 points. Closest I've gotten is using: x=ClipWidth / 2 + Math.cos(angle) y=ClipWidth / 2 - Math.sin(angle) Sorry, I'm s rusty with math and hoping someone can push me in the right direction. Right now I'm trying to figure out the radius of the 'circle' that is formed while rotating, but that isn't going anywhere (fast anway). Thanks for any tips, Jason ___ 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: LoadVars to XML object
This may be overkill, but feel free to use the XMLParser class I wrote which handles a bunch of stuff related to getting XML into and out of Flash without all the headaches. For example, you can: - Throw any object at the objectToXML() function and it'll translate it into XML. - Use the load() function to load any XML document, parse it into intuitive ActionScript-friendly objects/arrays, and call a function of your choice when it's finished. - Use the sendAndLoad() function to (you'll never guess...) send an object or XML to a server-side script and get the results, parsing them into ActionScript-friendly objects/arrays and calling a function of your choice when it's finished. Download the class and a simple example at: http://www.greensock.com/ActionScript/XMLParser.zip Hope it's helpful. Jack Doyle -Original Message- Date: Tue, 17 Oct 2006 12:16:51 -0400 From: Chip Moeser [EMAIL PROTECTED] Subject: [Flashcoders] LoadVars to XML object Hello All, I am trying to convert the return string of a loadvars to an XML object. Does anyone know a simple way of doing this? Thanks! ___ 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] xml parsing problem
You might want to try using my XMLParser class. It translates the XML into ActionScript-friendly arrays/objects. http://www.greensock.com/ActionScript/XMLParser.zip Jack Doyle -Original Message- Date: Thu, 26 Oct 2006 22:13:50 -0400 From: Bill Pelon [EMAIL PROTECTED] Subject: [Flashcoders] xml parsing problem I'm having trouble grabbing the right value from a node any help would be awesome.. I can't figure out where to increment as I'm going through my loop for the sub items. node structure below NetworkLeftnav mainItem name=main item name goes here url=url goes here window=_self open=true subItem textsub item name goes here/text urlsub item URL goes here/url window_self/window /subItem subItem textsub item name goes here # 2/text urlsub item URL # 2/url window_self/window /subItem /mainItem mainItem name=main item 2 url=main item url #2 window=_self open=false /mainItem /NetworkLeftnav AS below onClipEvent(load){ function ExpandData(turbo){ var turboItem = turbo.firstChild.childNodes; var subItem = turbo.firstChild.firstChild.childNodes; trace(number of main section nodes + turbo.firstChild.childNodes.length); // main section count for (var i = 0; i turboItem.length; i++){ var turbo = turboItem[i]; // running through main nodes mainNavName = turbo.attributes.name; mainNavUrl = turbo.attributes.url; mainNavWindow = turbo.attributes.window; mainNavOn = turbo.attributes.open; // set to true or false trace(mainNaveName = + mainNavName); trace(mainNaveURL = + mainNavURL); trace(mainNaveWindow = + mainNavWindow); trace(mainNaveOn = + mainNavOn); if( turbo.childNodes.length =1){ trace(this node has subcontent); trace(number of subcontent nodes = + turbo.childNodes.length); turboChild = turbo.firstChild.firstChild; trace( ); trace(total times to loop = + turbo.childNodes.length); for (var n = 0; n turbo.childNodes.length; n++){ trace(Subcounter incremental value = + n); / THESE NEED TO BE INCRIMENTED trace(turboChild.firstChild.nodeValue); // returns sub item name trace(turboChild.nextSibling.firstChild.nodeValue); // returns sub item URL trace(turboChild.nextSibling.nextSibling.firstChild.nodeValue); // returns sub itemWindow } } trace( ); } } var turbo = new XML(); turbo.ignoreWhite = true; turbo.onLoad = function(success){ if (success) ExpandData(this); else trace(Error loading XML file); } turbo.load(netnav.xml); // what my xml is called that is posted above stop(); } ___ 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] AS Tweening. Approach to prevent tween
I'm not sure about other tweening engines, but the one I wrote (TweenLite) automatically overwrites tweens that affect the same object/MovieClip to prevent collisions unless you flag it not to. I found that I almost always needed it to overwrite existing tweens, so I made that the default behavior but like I said, you have the ability to change that if you need to. See the documentation at the top of the class file for instructions. You can snag the class at: http://www.greensock.com/ActionScript/TweenLite/ Good luck! Jack Doyle -Original Message- Message: 8 Date: Fri, 3 Nov 2006 16:39:52 + From: Kevin Cannon [EMAIL PROTECTED] Subject: [Flashcoders] AS Tweening. Approach to prevent tween clashing? Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=UTF-8; format=flowed Hi All, I've been building sites with laco's tweens for a good while. Occasionally I've come accross problems when you click on buttons really fast in sucession. If one item is still tweening you can end up with unpredictable results. Does anyone have any advise on what approach I can take to avoid that. I'm real trouble figuring out what specifically is causing the problem, even though I understand the general problem. Has anyone any advice, Thanks, - Kevin ___ 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] Loading library movie clips sequentially?
I ran into the same problem with the popular tweening engines like Fuse kit. Awesome features, but I just couldn't afford the overhead bloat, so I built TweenLite which adds only about 2k to your file and has all the essentials. You can build in a delay for any tween which allows you to sequence things. Snag the class at: http://www.greensock.com/actionscript/tweenlite/ I certainly can't claim it's the ideal solution in all cases, but maybe someone will find it helpful. Also, regarding your sequential preload issue, I wrote a class for that too. It does allow you to prioritize an asset anytime and it has several other features you may find useful. Check it out at: http://www.greensock.com/actionscript/PreloadAssetManager/ Good luck. Jack Doyle -Original Message- Date: Wed, 29 Nov 2006 10:37:58 -0500 From: Merrill, Jason [EMAIL PROTECTED] Subject: RE: [Flashcoders] Loading library movie clips sequentially? Bestway todo this? To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] I have found a major issue with the Fuse kit - it's huge and has huge overhead. It's a great set of classes, does some neat things, don't get me wrong, but I found that using it in code-intensive app brought it down and made it unusable. I switched back to the built-in Tween and Transition classes in the same application and using the onMotionFinished event and such things went back to normal. I only respond because you were asking for the best way to do this. - this was just my experience. Jason Merrill Bank of America Learning Organizational Effectiveness -Original Message- Hello, Here is the scoop: I have 36 movie clips in my library that get placed on stage via actionscript... Long story short, I would like to load each clip one at a time, for example: movie_clip-01 fully loads and animates into position, then movie_clip-02 loads and animates into position, (...), and finally movie_clip-36 loads and animates into position. Basically, I want to break-up the load across time, vs. doing it all at the beginning. Just wondering if the above idea makes sense? Is it standard to do that type of loading from the library at runtime, or should I be working with 36 external swf files? Anyone seen any tutorials and/or example files on the web that cover this type of loading? Any tips/suggestions/links/rtfm's (with page #) ya'll can send my way would be kick-butt! :) Sorry if noob question... I am just now getting back into Flash after a 2-year hiatus. Many thanks in advance. Cheers, Micky ___ 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] Which Data Structure is good for this?
I think Steven has already sent you the XML2AS code which is great. You could also try the XMLParser class I wrote which is similar but adds a few features. You can basically throw your XML document at it and it'll spit back an object with properties arrays that follow the naming convention from your original XML document which makes it a lot easier to get at the data (in my opinion at least). It'll retain your hierarchy too. Snag it at: http://www.greensock.com/ActionScript/XMLParser Hope it helps. Jack -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sascha Sent: Monday, December 11, 2006 7:54 PM To: 'Flashcoders mailing list' Subject: [Flashcoders] Which Data Structure is good for this? I would be interested in recommendations about what kind of data structure is best used in the following situation. I'm loading in a XML file with a typical recursive structure, then the data from it should be parsed into a data storage object and this data should be accessible globally through the application. The XML file has a structure like this: resourceList display type=1 displayProperties property name=foo value=doo/ property name=fee value=faa/ /displayProperties displayObjects object id=1 file=foo/etc/file.xml/ object id=2 file=foo/etc/file2.xml/ object id=3 file=foo/etc/file3.xml/ /displayObjects backgrounds backgrounds id=125 file=foo/etc/bg.png/ / backgrounds /display data dataTypes property name=foo value=doo/ property name=fee value=faa/ /dataTypes /data etc somethingElse property name=foo value=doo/ / somethingElse /etc ... The XML is being extended by the time but it retains the shown hierarchical structure. I want to be able to keep a similar structure in memory but I don't want to keep it as an XML object. I was thinking about using a custom object and populate it with HashMaps but then the hierarchy would be too flat. I would appreciate it if somebody could give me some suggestions what kind of data structure is a good choice for this as I don't have much experience with trees, lists and other more complex structures. Thanks a lot, Sascha ___ 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] Q:Preloader when TOTAL size of assets not known
You can use my PreloadAssetManager class for this sort of thing: http://www.greensock.com/actionscript/preloadassetmanager/ Basically, it reads in just enough of each asset to figure out the total size then dumps it and moves onto the next one until it has the total size of all of the assets (could be images, SWFs, or FLVs), then loads each of them completely. All you've gotta do is create an instance, tell it the URLs of the assets to preload, and then you can poll its percentLoaded_num property to update your progress bar on screen. There's some brief documentation at the url above. Hope it helps. Jack Doyle -Original Message- Date: Thu, 25 Jan 2007 13:15:48 -0800 From: [EMAIL PROTECTED] Subject: [Flashcoders] Q:Preloader when TOTAL size of assets not known To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi Using a XML config file to load in a number of image assets. i was wondering what approach is best taken when you want to create some type of a 'percent loaded' display, not knowing the combined total size of all assets... Is there an easy solution to this without 'faking' it or hardcoding the total size? Perhaps using PHP on the back end? Thanks [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ 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: Q:Dynamically Scale a MovieClip by dragging
For those of you who downloaded my TransformManager class yesterday/today, I found a small bug and uploaded a new version (4.1). http://www.greensock.com/ActionScript/TransformManager. Shoot me an e-mail with TransformManager in the subject if you'd like me to keep you posted about future updates. Thanks for all the positive comments! They make the time effort I dumped into it much more worthwhile. Jack Doyle -Original Message- Date: Fri, 2 Feb 2007 09:14:11 -0600 From: slangeberg [EMAIL PROTECTED] Subject: Fwd: [Flashcoders] RE: Q:Dynamically Scale a MovieClip by dragging To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed Some indispensable AS code, here. Nothing like people opening their hearts to the community, by sharing important code like this! -Scott -- Forwarded message -- From: Jack Doyle [EMAIL PROTECTED] Date: Feb 1, 2007 7:55 PM Subject: [Flashcoders] RE: Q:Dynamically Scale a MovieClip by dragging To: flashcoders@chattyfig.figleaf.com To interactively scale/rotate/move any MoveClip in an intuitive way at runtime in a manner similar to modern-day graphics applications like Photoshop and Illustrator, feel free to use my TransformManager class: http://www.greensock.com/ActionScript/TransformManager/ There's an interactive sample there. I put a lot of time into attempting to making it user-friendly and relatively intuitive, but I haven't tested it extensively yet so your comments/suggestions are welcome. It should handle just about any MovieClip regardless of where the registration point is, etc. Hope it helps. Jack Doyle ___ 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] NetStream Bug? FLVs with no audio won't pause(false)
Anyone else run into this problem? If I call a NetStream's pause() function and pass a value of FALSE, it's supposed to unpause it. However, if I do so after a few milliseconds on an FLV that's encoded without any audio, the pause(false) does the exact opposite! If I run the same code on an FLV that has audio, it works perfectly! I encoded lots of different ways in Sorenson Squeeze and with the Quicktime exporter using various codecs and bitrates, but nothing solves the problem. The only way to fix it is to call a pause(true) immediately before calling pause(false). I've set up an interactive test file so you can see exactly what I'm talking about. It has a sample FLA, two FLVs (one with audio, one without), and the original WMV video. Just click the buttons to see the behavior. Download the 1.9MB file at: http://www.greensock.com/NetStream_Bug.zip I know you're thinking why would you want to call pause(false) if you're already playing the NetStream, butwell...it's a long story and you'll just have to trust me. Like I said, I figured out a way around it, but I'm sending this e-mail out for two reasons: 1) Maybe you guys can find an error in my code (not that the code is the least bit complex, but I've been known to miss the obvious) 2) Maybe someone else has run into the same problem and would be helped by the simple hack I'm using Here's some sample code (not what I'd use in my application - just a simplified version to show the bug): var _nc:NetConnection = new NetConnection(); _nc.connect(null); var _ns:NetStream = new NetStream(_nc); video_obj.attachVideo(_ns); _ns.play(without_audio.flv); var delayInterval_num:Number = setInterval(resume, 200); function resume():Void { //_ns.pause(true); //Uncomment this line and it'll work again. Shouldn't have to though. _ns.pause(false); clearInterval(delayInterval_num); } Jack Doyle ___ 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] Image resizer that maintains ratio
This might be overkill, but feel free to use the TransformManager and/or TransformItem class(es) available at http://www.greensock.com/ActionScript/TransformManager. You can just set the constrainScale_boolean property to true. Jack Doyle -Original Message- Date: Mon, 26 Mar 2007 13:08:09 +0100 From: Adrian Lynch [EMAIL PROTECTED] Subject: [Flashcoders] Image resizer that maintains ratio To: Flashcoders flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Any examples out there? I've got as far as resizing a user supplied image and am about to work on the ratio remaining fixed. Just thought I'd throw this out there as I think it may be tricky. Ta. Adrian *** ___ 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] Free AS2 Filter Tweening Engine - TweenFilterLite
For those of you using the TweenLite tweening engine, I just released the TweenFilterLite class which extends TweenLite, adding the following capabilities: - Tween filters like Blurs, Glows, DropShadows, and Bevels - Tween ColorMatrixFilter effects like colorization, hue, saturation, brightness, contrast, and threshold I tried to make it extremely easy to use, and I created an interactive sample that demonstrates a lot of the features and even generates the code for you. http://www.greensock.com/ActionScript/TweenFilterLite It's free. This isn't a sales pitch; I just thought some of you FlashCoders out there could benefit from the time I poured into this. I'm grateful for the community of experts out there who take time from their valuable day to answer questions from me and many others. If you haven't checked out the lightweight (2kb) TweenLite tweening engine, have a look: http://www.greensock.com/ActionScript/TweenLite Cheers. Jack Doyle ___ 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] ColorMatrix
The TweenFilterLite class I just released does exactly what you're looking for. http://www.greensock.com/ActionScript/TweenFilterLite Jack -Original Message- Date: Tue, 27 Feb 2007 16:53:50 +0200 From: misa [EMAIL PROTECTED] Subject: [Flashcoders] ColorMatrix To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hello flash coders, I need some help with color transformations. I want to change dynamicly the hue of a MC with a transition/tween, something like fading from one image to another with different colors. I tried both G. Skinner's and M. Klingman's colorMatrix class, but the tweening they use is bound to some object. In G.S's demo there's a scroll bar, and in M.K's he uses two images. I want to use one of their classes but be able to transform the color of one MC just with a function: onSomeEvent ... { tweenHue for myMC from thisHUE to newHUE }. Thanks in advance ** ___ 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] Free AS2 Filter Tweening Engine - TweenFilterLite
The Color Picker was the handy work of Alessandro Crugnola, http://www.sephiroth.it/file_detail.php?id=147 Very nice job. -Original Message- Date: Tue, 27 Mar 2007 08:40:22 -0400 From: Merrill, Jason [EMAIL PROTECTED] Subject: RE: [Flashcoders] Free AS2 Filter Tweening Engine - TweenFilterLite To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii Hey cool - where did you get the color picker - did you make it or is there a free class out there available? I've been looking for a good AS 2 color picker. I made my own, and it works OK, but it's slightly buggy. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ 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] Preloading FLV with NetStream
Yep, you can preload FLVs with the NetStream. Check out the PreloadAssetManager class which will handle it all for you: http://www.greensock.com/ActionScript/PreloadAssetManager Jack -Original Message- Date: Tue, 03 Apr 2007 16:04:35 -0400 From: leolea [EMAIL PROTECTED] Subject: [Flashcoders] Preloading FLV with NetStream To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII Hi, Is it possible, using the NetStream object, to preload a FLV. I have multiple FLV videos that I need to play back-to-back smoothly. I want all of them to be preloaded so that when I start playback it doesn't buffer or lag in any way. I can't seem to find a way so my next alternative would be to use SWF with MovieClipLoader. I'd like to avoid that. Thanks ___ 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] Video delivery process ...
You can preload FLVs with the NetStream and even see how big the FLV file is as long as you've encoded it properly so that it has MetaData. I know that if you do your compression in Sorenson Squeeze it'll inject the MetaData for you, and I think most other tools do the same automatically. Check out the PreloadAssetManager class which will handle all the preloading for you including reporting the percent loaded: http://www.greensock.com/ActionScript/PreloadAssetManager Jack -Original Message- Date: Wed, 4 Apr 2007 12:56:36 +1000 From: Stephen Ford [EMAIL PROTECTED] Subject: [Flashcoders] Video delivery process ... To: flashcoders@chattyfig.figleaf.com flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=iso-8859-1 Hi,How do I preload video when the target player is 7?.The delivery technique I'm using is progressive download.Should I be using a proxy SWF to load an external FLV (because the Video class in Flash doesn't have anyway of polling the size of an external FLV, or how much of that FLV is loaded - unless I'm missing something).Thanks. ** ___ 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] Preloading FLV with NetStream
The PreloadAssetManager class simply preloads your assets into your browser's cache; it is not meant to be used for playback or managing your FLVs once they're preloaded. There's nothing special that you need to do in order to access the preloaded FLVs - just call them as you normally would either using a NetStream object of your own or an FLVPlayback component or whatever. The user's browser will be smart enough to used the cached FLVs instead of going out to the web and downloading them again. You might want to search the Flash Help files for NetStream or FLVPlayback. Jack -Original Message- Date: Wed, 04 Apr 2007 10:59:02 -0400 From: leolea [EMAIL PROTECTED] Subject: Re: [Flashcoders] Preloading FLV with NetStream To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII Preloading works super fine! Thank you very much for this class. I am preloading a bunch of FLVs. Once they get at 100%, how do I access them using a NetStream object (or other) ? (I need to implement something that initates the playback of the first one, when it reaches the end I must start the second one, so on...) On 4/3/07 6:42 PM, Jack Doyle [EMAIL PROTECTED] wrote: Yep, you can preload FLVs with the NetStream. Check out the PreloadAssetManager class which will handle it all for you: http://www.greensock.com/ActionScript/PreloadAssetManager Jack -Original Message- Date: Tue, 03 Apr 2007 16:04:35 -0400 From: leolea [EMAIL PROTECTED] Subject: [Flashcoders] Preloading FLV with NetStream To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII Hi, Is it possible, using the NetStream object, to preload a FLV. I have multiple FLV videos that I need to play back-to-back smoothly. I want all of them to be preloaded so that when I start playback it doesn't buffer or lag in any way. I can't seem to find a way so my next alternative would be to use SWF with MovieClipLoader. I'd like to avoid that. Thanks ___ 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: The best way to monitor load progress of multiple swfs?
This AS2 class will handle preloading multiple SWFs and/or FLVs and/or images and report on the total progress: http://www.greensock.com/ActionScript/PreloadAssetManager Documentation examples are on the site. I think you'll find it pretty easy to implement. Enjoy. Jack Doyle -Original Message- Date: Wed, 2 May 2007 10:09:43 +0100 From: Alistair Colling [EMAIL PROTECTED] Subject: [Flashcoders] The best way to monitor load progress of multipleswfs? To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi there, I am trying to figure out the best way to monitor the load progress of swfs that are loading into each other. There are 20 swfs (of different sizes) that load into my main movie and I plan on loading my main movie into a holder so I can monitor the progress of it's download using movie clip loader class. I am fine using the Movie Clip Loader class to monitor the progress of one SWF downloading but I'm not sure how to approach checking the total progress of multiple SWFs. Previously I've created an object that holds all of the movies like this: var loadChecker:Object = new Object(); loadChecker.copyProperties = true; loadChecker.checkServer = false; loadChecker.howToPlay = false; loadChecker.chat_mc = false; each swf has this code that registers with the loadChecker object that it has loaded: _root[loadChecker][this._name] = true; and then a function that is triggered from a 3 frame looping MC checks if the movies are loaded: function checkLoaded():Boolean { var tmpBoo:Boolean = true; for (var k in _root.loadChecker) { if (!_root.loadChecker[k]) { tmpBoo = false; } } _root.moviesLoaded = true; return tmpBoo; } If someone would suggest the best way so I can monitor the progress of the loading of all SWFs so I can make a preloader that will show the progress of all SWFs that have to load that would be really good. Just a point in the right direction would be great :) Thanks, Ali ___ 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: Any good XML api out there?
Here's an AS2 class that'll load and parse your XML file into almost exactly what you're asking for: http://www.greensock.com/ActionScript/XMLParser Instead of root[track[n][artist]] from your example, it would be simply track[n].artist Jack Doyle -Original Message- Date: Thu, 03 May 2007 16:15:02 +0200 From: Johan Nyberg [EMAIL PROTECTED] Subject: [Flashcoders] Any good XML api out there? To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi, what I need is basically a class that puts all the data in an associative array, or numeric, depending on if I'm storing values for individual nodes, or a mothernode. Now I find there is a lot of looping going on every time I have to parse a XML, and XPath seems more like the thing you want to use if you're looking for specific data inside the XML - I just want to put all the data in an Array or Object... For example: root track name/name artist/artist /track track name/name artist/artist /track /root I would like it like this: root[track[n][artist]] Regards, /Johan ___ 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: preloading images from xml
You could try using the PreloadAssetManager class at http://www.greensock.com/ActionScript/PreloadAssetManager Jack -Original Message- Date: Wed, 13 Jun 2007 16:17:42 +0100 From: Poole, Simon [EMAIL PROTECTED] Subject: [Flashcoders] re: preloading images from xml To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi Im having an issue with the following code. It is tracing the individual thumbnail images correctly with the onLoadProgess function, but will only display the percent loaded and loadbar for the last image (image 10), once this one has preloaded, all the other images then appear correctly. I would like it to preload all 10 images, displaying the percent and loadbar for all 10. The thumbnails images are buttons for a flv video player. Ive been trying to fix this for ages and can sort it, its doing my head in! Any help would be greatly appreciated. Ty s / var newClip:MovieClip = vidbutn.holder_mc.createEmptyMovieClip(thumbie+(i+1), this.getNextHighestDepth()); var myLoader:MovieClipLoader = new MovieClipLoader(); var myListener:Object = new Object(); myListener.onLoadProgress = function (target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { trace(target + .onLoadProgress with + bytesLoaded + bytes of + bytesTotal); vidbutn.holder_mc.infoField = Math.floor(bytesLoaded/bytesTotal*100)+%; if (bytesLoaded != bytesTotal) { vidbutn.holder_mc.loadBar._yscale = Math.floor(bytesLoaded/bytesTotal*100); /*return;*/ } if(bytesLoaded == bytesTotal) { vidbutn.holder_mc.gotoAndPlay(2); } } myListener.onLoadInit = function (target:MovieClip):Void { //trace (target + .onLoadInit); } myLoader.addListener(myListener); myLoader.loadClip(myRoot+thumbPath+thumbList[i], newClip); / ___ 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] AS 2.0 Tweening libraries
To each his own. I've got nothing against Fuse specifically (or any other tweening engine), but TweenLite might be worth looking at because: 1) It's only about 2K 2) I haven't been able to find a faster tweening engine 3) It's got AS2 and AS3 flavors 4) It has a big brother, TweenFilterLite (5K total), that handles tweening filters like blurs, drop shadows, etc. including ColorMatrixFilter effects like colorization, hue, saturation, contrast, etc. 5) Despite being only 2K, it has a ton of functionality built-in (tween multiple properties, build in delays, onComplete and onStart callbacks, pass any number of parameters, automatically overwrite conflicting tweens, tween color, volume, arrays of numbers, etc.) 6) It doesn't rely on prototype alterations, so it should compile cleanly in various environments 7) The syntax is pretty darn simple (Tweener users should be right at home) Again, I'm not saying TweenLite is better than any other tweening engine out there (I'm admittedly biased). You asked about benefits in other packages, and the response to TweenLite has been very positive so I thought I'd mention it. www.TweenLite.com www.TweenFilterLite.com Jack Doyle -Original Message- Date: Wed, 18 Jul 2007 09:48:27 -0400 From: Alan MacDougall [EMAIL PROTECTED] Subject: [Flashcoders] AS 2.0 Tweening libraries To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed So, coming off the enterFrame() tween discussion, a lot of people mentioned various tweening libraries. I still use Fuse, which has proven extremely capable for my purposes; are there any pressing flaws in Fuse, or benefits in the other packages, that might convince me to change? ___ 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] Prevent flash from caching the loaded assets
If you're able to store the images in SWF format instead of something like JPG, you could set up your SWFs so that they're covered with a black rectangle MovieClip by default and then you flip the _visible property to false in your application when you load them in. That way, if people try to look at the SWF from the browser's cache, they'll just see a big black rectangle but within your app, the photo is visible. Just a thought. Jack -Original Message- Date: Mon, 6 Aug 2007 16:17:32 +0200 From: Niels Endlich [EMAIL PROTECTED] Subject: [Flashcoders] Prevent flash from caching the loaded assets To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII We are making a game in which people have to quess what's on a photo while viewing it through a little moveable hole. The images will be loaded from the server. The problem is caching. To cheat is easy... watch the cached files. Is there a way to prevent flash from caching the loaded assets or does anyone has an other solution? Thanks, Niels ___ 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] Free Text Metrics class (find x, y, width, height of substrings more)
I noticed some chatter on the list about determining lines in TextFields, etc., and I thought I'd mention that I just posted a new TextMetrics class on my blog that'll help figure out: - x/y coordinates and width/height of each line of text - x/y coordinates and width/height of any substring (very useful for positioning things around or on certain strings in a dynamic or input TextField) - each line of text (for seeing where the line breaks are) It's probably overkill for many applications, but it was indispensable on a recent project I worked on, so I figured I'd pass it along. There's a visual sample and some brief documentation on the site. http://www.greensock.com/ActionScript/TextMetrics/ Hope some folks find it useful. Jack Doyle PS TweenLite TweenFilterLite were recently updated as well to make sequencing more intuitive. ___ 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] Depth issues...
I ran into the same problems a while back. I created a LevelsManager class to get around it which you can set to hijack the getNextHighestDepth() function. That way, you can run one line of code at the beginning of your application and all your getNextHighestDepth() calls will work regardless of whether or not there are components on the stage. You can download the small class file at http://www.greensock.com/ActionScript/LevelsManager.zip. Here is the primary function I used in that class: function getNextHighestDepth(mc:Object):Number { if (mc == undefined) {mc = this}; var maxDepth_num:Number = mc.getNextHighestDepth(); if (maxDepth_num != undefined maxDepth_num 16000) { return maxDepth_num; } else { maxDepth_num = -1; var depth_num:Number; var obj:Object; var tf = TextField.prototype; for (var p in mc) { obj = mc[p]; if ((typeof(obj) == movieclip || obj.__proto__ == tf) obj._parent == mc) { depth_num = obj.getDepth(); if (depth_num maxDepth_num depth_num 16000) { maxDepth_num = depth_num; } } } return maxDepth_num + 1; } } Jack -Original Message- Date: Tue, 7 Aug 2007 17:15:55 +0800 From: Darren Bowers [EMAIL PROTECTED] Subject: [Flashcoders] Depth issues... To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 I have written a class that simply creates movieclips (grids) on screen. It draws everything from actionscript so no library items are required. However, I am passing this class on to developers that will use it as they see fit. The problem is with the depth management. It seems I am stuck with forcing the developers not to use any components, otherwise the depth management is all stuffed up. If I use getNextHighestDepth(), I can create and destroy movieclips freely which is fine. Until someone uses a v2 component (like a button), then it breaks. They will create, but wont destroy because they get an invalid depth at creation. If I decide to use the DepthManager class, I have to have at least one v2 component in the library for it to work. The reason i created the class in the first place was to keep things small and libraryless if i wanted to. its seems I'm damned if i do and i'm damned if i dont. Is there any way to detect for components and use the DepthManager class instead of getNextHighestDepth()? cheers, Darren ___ 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 ColorMatrix class
Seb, there's something very similar built into the TweenFilterLite class which is available in AS2 and AS3. It lets you tween contrast, hue, saturation, brightness, colorization, threshold, etc. as well as other filters like glows, blurs, etc. www.TweenFilterLite.com (there's a link to the AS3 version) Jack -Original Message- Date: Tue, 14 Aug 2007 16:21:02 +0100 From: quinrou . [EMAIL PROTECTED] Subject: [Flashcoders] as3 ColorMatrix class To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi all, I after the AS3 versino of the grant Skinner ColorMatrix class ( http://www.gskinner.com/blog/archives/2005/09/flash_8_source.html ). Has anyone converted to AS3? If yes could you share it? many thanks Seb ___ 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] Rotate, Scale and _x, _y
Not sure if it'll help, but check out http://www.greensock.com/ActionScript/TransformManager. It'll let the user scale, rotate, or move any MovieClip regardless of where its registration point is. Again, this might not be exactly what you're looking for but you could at least get some ideas from it. Jack -Original Message- Date: Wed, 29 Aug 2007 08:19:58 +0200 From: julian atienza [EMAIL PROTECTED] Subject: [Flashcoders] Rotate, Scale and _x, _y To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=UTF-8 Hello everybody. I'm ending one small project that handle images and make possible to do zoom, rotate (from 90 degrees to 90 degrees) and move this images by dragdrop when images are bigger than screen. I have a problem with rotate. Zooming is easy thus this doesn't change my _x and _y, but yes my _width and _height. But everytime i rotate, it changes my _x and _y and is a little confused to make operations that i used to do like localToGlobal (to know center of screen respect image and zoom from there), startDrag (to mark limits), and a much more... there is anyway to rotate without changing _x and _y??? i tried to copy image with bitmapData and apply a matrix with rotation, but is the same situation... I'm using this classes from Darron Schall: http://www.darronschall.com/weblog/archives/54.cfm It helps me to move my Dynamic Registration (center of movieclip) and zoom or rotate from there but... _x (and _x2 in the case) also change... any help? thanks in advance... ___ 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] Tweening Engines for AS3
First let me say that Tweener is fantastic, and a lot of people rely on it for good reason. If quantity of features is your top priority, you should seriously consider using Tweener. Let me briefly address a few of the TweenLite-related concerns folks have mentioned: SPEED - TweenLite's speed advantage isn't only a factor when you're doing hundreds of simultaneous tweens - it can be important even with a single tween. Imagine a button that initiates a tween when you rollover it, and the user rolls their mouse on/off/on/off quickly. Even a slight pause can degrade the experience. Speed is also critical for mobile devices that have slower processors, less memory, etc. FILE SIZE - File size can be a huge factor in certain scenarios, especially for banner ads. But for those who don't deal with strict file size requirements, it's a non-issue. FEATURES Bezier tweens - Coming soon (well, as soon as I can clear my over-filled plate) to TweenMax which is a class that extends TweenLite, adding non-essential features. That way, the base class will remain very lean mean, but if you need the extra features and are willing to trade off some file size and performance, TweenMax will take care of you. Rounding numbers - Possible now with TweenLite's onUpdate feature. It does require some extra steps, though. If it gets added to the base class, every tween takes a slight performance hit because of the added conditional logic required just to see whether or not each tween needs rounding. Calling Math.round() on every frame is expensive in terms of performance too. Transitions/easing - There aren't fewer transition options in TweenLite. You can use ANY function as long as it conforms to the standard ease format that all of Adobe's and Penner's do. Elastic, Strong, Back, etc. are all available. You may actually find that there are a few features that the TweenLite family of classes (TweenLite, TweenFilterLite, and TweenMax) has that Tweener is missing, but in general, I'd say Tweener is more feature-packed. It just comes a the price of file size and performance. That's not to say Tweener performs poorly, though - it depends on the scenario which is why this speed test might be helpful: http://blog.greensock.com/tweening-speed-test/ So, again, this isn't a good/bad issue - they're just different tools that you can choose from to get the job done. TweenLite wasn't built to be everything to everyone, and I'm pretty sure Tweener wasn't built to be a super-compact engine that's perfect for banner ads. I'd encourage folks to give 'em both a shot and see what feels best. Tweener: http://code.google.com/p/tweener/ TweenLite: http://www.TweenLite.com Jack -Original Message- From: Cory Petosky [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 1:43 PM To: Flash Coders List Subject: Re: [Flashcoders] Tweening Engines for AS3 TweenLite doesn't have bezier curve support, can't store the duration in the options object, doesn't support auto-rounding of pixels, and has significantly fewer transition options. I think TweenLite is great -- if I ever need to tween 1200 things at once, I'll certainly choose it -- but these features in Tweener make it a better choice for many of my projects. On Mon, Mar 24, 2008 at 1:16 PM, Steven Sacks [EMAIL PROTECTED] wrote: Tweener is proven to be significantly slower than TweenLite, and it's almost 300% larger (TweenLite is 3k vs Tweener's 8k). I'm not telling you what to do. You're welcome to your preference. I prefer to write better, faster, smaller, more efficient code. Different strokes for different folks, I guess. :) Dave Mennenoh wrote: I prefer Tweener, and if you've ever used Fuse you'll like it's syntax. It's also quite small - adds about 8K. Dave - Head Developer http://www.blurredistinction.com Adobe Community Expert http://www.adobe.com/communities/experts/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Tweening Engines for AS3
You're right, Dwayne, for a lot of non-banner work, 8k vs 3k really doesn't matter. It can, however, come into play in local memory as tweens are created. For example, if an instance of Tweener has 8k worth of code driving it (not that every instance would take 8k in memory - I'm just talking about the variables/properties/methods stored for each instance) and you create 300 instances, it's that much more that has to get pushed into memory and chewed on by the CPU verses 3k worth of code. Again, with today's desktop/laptop processors and Gigabytes of RAM, it's not much of an issue unless you're working with a LOT of tweens, but in some cases it's important, especially for mobile devices. Some developers prefer lightweight, efficient and speedy whereas some would rather trade for a broader feature set. I'd encourage you to compare the feature sets because if you need a Tweener-specific feature, your choice is a no-brainer. But many developers find everything they need and more in TweenLite, so they feel all warm fuzzy inside when they get the size and speed benefits too. When you're driving around town, there ain't much difference between a Hummer and a Porche. They both get you from point A to B. If you're gonna do some off-roading, better warm up the Hummer. If you need speed and agility, get your racing gloves on and hop into the Porsche. :-) Jack -Original Message- From: Dwayne Neckles [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 10:29 AM To: Flash Coders List Subject: RE: [Flashcoders] Tweening Engines for AS3 Gys I'm very clear that when doing banners the is the big concern about size.. I was saying before that I understand that... I do banners everyday but that when it comes to BIG sites (2 megs )etc that I don't understand the concern .most sites on FWA are big you know thats all? Other than banners whats the big deal? Who cares about file sizes.. those sites on FWA are pretty huge.. Put me on.. I'm just asking Date: Wed, 26 Mar 2008 11:04:30 -0400 From: [EMAIL PROTECTED] Subject: RE: [Flashcoders] Tweening Engines for AS3 To: flashcoders@chattyfig.figleaf.com I don't get the big deal either about size.. I mean I really don't... except for ads maybe that have a tight 30k limit( which needs to be upped) You add 40k here for some media. 60k there for some code, you're up to 100k. If you have download requirements of 100k max in some client environments (like we do in some environments), 8k makes a difference. Jason Merrill Bank of America GTO and Risk LLD Solutions Design Development eTools Multimedia ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Flash8 Question - contrast transform
Yep, a BitmapFilter is what you need. You might want to check out TweenFilterLite for an easy way to apply (and/or tween) the filter. It'll also let you adjust saturation, brightness, colorization, hue, and threshold. www.TweenFilterLite.com The code would look something like: TweenFilterLite.to(my_mc, 0.5, {colorMatrixFilter:{contrast:2}}); Jack -Original Message- From: Pedro Taranto [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2008 12:17 AM To: Flash Coders List Subject: Re: [Flashcoders] Flash8 Question - contrast transform laurent wrote: Hm...I should play with colors again. How do we change the contrast or brightness of a color ? using HSV ?? or is there a straight way using colorTransformin AS3 or AS2. thx L you should apply some BitmapFilter -- Pedro Taranto ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Tweening Engines for AS3
I know this is an old thread, but I wanted to mention a few things that might interest a few of you: 1) The entire TweenLite family now does synchronized tweens. 2) TweenLite's big brother, TweenMax, was just released and it adds support for Bezier tweens, sequencing, hex color tweening, and a bunch more features. It does everything TweenLite and TweenFilterLite do plus more. 3) In addition to normal Bezier tweening, TweenMax has a bezierThrough feature that allows you to define points through which you want the bezier curve to travel (instead of normal control points that simply attract the curve) There's an interactive demo that lets you play with the Bezier functionality, as well as a feature comparison chart for TweenLite, TweenFilterLite, and TweenMax, and a Bezier speed test all available at www.TweenMax.com. Of course everything is available in AS2 and AS3. Cheers! Jack -Original Message- From: Meinte van't Kruis [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 1:51 PM To: Flash Coders List Subject: Re: [Flashcoders] Tweening Engines for AS3 Tweenlite has one lil thingy against it though; tweens aren't synchronised. It doesn't happen much that this becomes a problem, though I can imagine projects where people want lots of tweens ending at the same time, which simply won't happen with lots of objects in TweenLite, other than that it's pretty sweet. On Mon, Mar 24, 2008 at 7:20 PM, eric e. dolecki [EMAIL PROTECTED] wrote: third TweenLite and TweenFilterLite On Mon, Mar 24, 2008 at 1:51 PM, Dave Mennenoh [EMAIL PROTECTED] wrote: I prefer Tweener, and if you've ever used Fuse you'll like it's syntax. It's also quite small - adds about 8K. Dave - Head Developer http://www.blurredistinction.com Adobe Community Expert http://www.adobe.com/communities/experts/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Converting simple XML data into Array
This class might be helpful: http://blog.greensock.com/xmlparseras2/ I believe it does exactly what you're asking. Jack -Original Message- From: ACE Flash [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2008 6:46 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Converting simple XML data into Array hey there, I was using loop to push them into Array Is there a way to convert this XML file into Array more easily? like = xml as Array? files filefile name1/file filefile name2/file filefile name3/file . /files var ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you do this? (animating gradient fillcolours)
You can use TweenMax's ability to tween hex colors and fire an onUpdate callback that applies the new values, like this (AS3): import flash.geom.* import flash.display.* import gs.*; var gradientColors:Object = {left:0xFF, right:0xFF}; var gradientMatrix:Matrix = new Matrix(); gradientMatrix.createGradientBox(100, 100, 0, 0, 0); function applyGradient():void { this.graphics.beginGradientFill(GradientType.LINEAR, [gradientColors.left, gradientColors.right], [1, 1], [0, 255], gradientMatrix, SpreadMethod.PAD); this.graphics.drawRect(0, 0, 100, 100); } applyGradient(); TweenMax.to(gradientColors, 2, {hexColors:{left:0x00FF00, right:0x660066}, onUpdate:applyGradient, delay:1}); The same sort of thing can be done in AS2 as well. You can get TweenMax at www.TweenMax.com Jack -Original Message- From: Ali Drongo [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2008 3:47 AM To: Flash Coders List Subject: Re: [Flashcoders] How do you do this? (animating gradient fillcolours) Thanks for your reply allandt, I can see how TweenLite could tween the color property of a movie clip but how is the gradient bit achieved? Cheers, Ali On 8 Jul 2008, at 09:39, allandt bik-elliott (thefieldcomic.com) wrote: not entirely sure but it sounds like a tweenmax color matrix tween take a look at http://blog.greensock.com/ a On Tue, Jul 8, 2008 at 9:20 AM, Ali Drongo [EMAIL PROTECTED] wrote: Hiya, how do you think you would do this? Can anyone point me to some tutorials or give me a snippet? Cheers! Ali ___ 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] How do you do this? (animating gradient fillcolours)
LOL. Yeah, I've peeked at the TweenMax source code a _few_ times. For those who are interested, Rich did a great intro to TweenLite here: http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/ (thanks Rich) Also, I should mention that the whole TweenLite/Filter/Max family has a new visible (_visible in AS2) special property for toggling visibility at the end of the tween, and TweenMax has a new multiSequence() method that allows each tween in the sequence to have a different target. Oh, and forums are now online at http://forums.greensock.com. And I hope to post some video tutorials later this month, time permitting. Cheers Jack -Original Message- From: Rich Shupe [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2008 10:32 AM To: FlashCoders Subject: Re: [Flashcoders] How do you do this? (animating gradient fillcolours) Hey, Jack... You sound like you know TweenMax pretty well. (Heh.) Thanks for the great work! Rich http://www.LearningActionScript3.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you do this? (animating gradient fillcolours)
That is odd - never heard of that one before. Let's talk off-list and I'm sure we can figure out what the problem is. Send me your FLA if you don't mind, and let me know if you're on a Mac or PC. If anyone else has any theories, I'd welcome them. Jack -Original Message- From: Helmut Granda [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2008 3:39 PM To: Flash Coders List Subject: Re: [Flashcoders] How do you do this? (animating gradient fillcolours) For some odd reason when I run a movie in AS2 I always get the following warning Warning: 'gs' has no property '_visible' latest version of tweenlite... You wont see that on the output panel but it is written to the flashlog.txt... interesting huh? On Wed, Jul 9, 2008 at 9:02 AM, Jack Doyle [EMAIL PROTECTED] wrote: LOL. Yeah, I've peeked at the TweenMax source code a _few_ times. For those who are interested, Rich did a great intro to TweenLite here: http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/ (thanks Rich) Also, I should mention that the whole TweenLite/Filter/Max family has a new visible (_visible in AS2) special property for toggling visibility at the end of the tween, and TweenMax has a new multiSequence() method that allows each tween in the sequence to have a different target. Oh, and forums are now online at http://forums.greensock.com. And I hope to post some video tutorials later this month, time permitting. Cheers Jack -Original Message- From: Rich Shupe [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2008 10:32 AM To: FlashCoders Subject: Re: [Flashcoders] How do you do this? (animating gradient fillcolours) Hey, Jack... You sound like you know TweenMax pretty well. (Heh.) Thanks for the great work! Rich http://www.LearningActionScript3.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] urgent TweenMax easing question
Yep, that sounds right. I highly doubt it has anything to do with TweenMax. Graphics rendering is by FAR the biggest processor drain in almost every situation. You can test that theory by removing TweenMax from the equation and just doing a simple ENTER_FRAME loop to move your stuff temporarily and see if you still hit the slowdown. I suspect you will. One idea to improve performance would be to either set cacheAsBitmap = true or use BitmapData on your broken-apart text to force it to use a bitmap representation of it which Flash can render much faster than lots of vectors. Jack -Original Message- From: H [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2008 8:53 AM To: Flash Coders List Subject: Re: [Flashcoders] urgent TweenMax easing question I don't think so. It sounds like your issue has to do with rendering changing transparent objects on top of one another. This is inherently slow. On Wed, Aug 13, 2008 at 5:44 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: Hi guys I'm having a problem with a TweenMax animation. I'm animating a shape (broken apart text) over a transparent png but as the text hits the edge of the png, it slows down. Is there something I can do to stop this happneing? thanks 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] TweenMax help needed
Sure, you can use delay and delayIncrement together in a TweenMax.allTo() call. They work great together. Also, I should mention that I'm releasing a pretty significant upgrade to the TweenLite/TweenFilterLite/TweenMax family soon. Probably the biggest enhancement has to do with a new OverwriteManager class that gives you lots of control of how (and if) tweens handle overlaps/conflicts, including an AUTO mode that only overwrites individual overlapping properties instead of the entire tweens. There are actually 4 modes from which to choose (NONE, ALL, AUTO, and CONCURRENT). This means you'll probably never have to type overwrite:false again. Keep an eye on http://blog.greensock.com for the announcement. If anyone would like me to e-mail them when the update is ready, just let me know by sending me an e-mail with TweenMax update in the subject. Jack -Original Message- From: allandt bik-elliott (thefieldcomic.com) [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2008 10:27 AM To: Flash Coders List Subject: [Flashcoders] TweenMax help needed hi folks - i have a quick question can anyone tell me if i use delay and delayIncrement in the same TweenMax call, will they clash? so will delayIncrement:0.05 and delay:_delay overwrite each other? TweenMax.allTo(aTilesToMove, .2, {_y:nMoveAmount, ease:Quad.easeIn, delayIncrement:0.05, overwrite:false, , onStart:nextAnimationFrame, onStartParams:[_oAnimationObject]}); thanks a ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] TweenMax help needed
Absolutely not - I've never heard of (or experienced) any problems with intervals and TweenMax. I can't imagine anything TweenMax-related that would cause the problems you described. I'd love to see your code, though. The reason for the delayedCall() in TweenMax is just convenience. Timing is synchronized with tweens and you can pause/resume all the delayed calls (and/or tweens) at once. Feel free to send me your code - I'm sure we can figure out what the issue was. Jack -Original Message- From: Allandt Bik-Elliott (Receptacle) [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2008 12:38 PM To: Flash Coders List Subject: Re: [Flashcoders] TweenMax help needed sweet i actually found a workaround for my issue - i used the TweenMax.delayedCall to run my functions instead of running delay: and delayIncrement: and that seemed to fix the problem i had. On a side note - i was using a setInterval to add pauses in between firing the different tweens i was doing (as part of a larger animation manager package) and it seemed to have problems doing both the tweens and the interval - the numbers i was passing to the interval were behaving very strangely - they were behaving like seconds rather than milliseconds and the whole interval would fall over after a couple of calls (hence me digging into the tweenmax api for the delay and delayedCall options). So it would seem that TweenMax doesn't play nice with setInterval. Is this a recognised issue (and the reason for a delayedCall method)? a On 24 Aug 2008, at 16:34, Jack Doyle wrote: Sure, you can use delay and delayIncrement together in a TweenMax.allTo() call. They work great together. Also, I should mention that I'm releasing a pretty significant upgrade to the TweenLite/TweenFilterLite/TweenMax family soon. Probably the biggest enhancement has to do with a new OverwriteManager class that gives you lots of control of how (and if) tweens handle overlaps/conflicts, including an AUTO mode that only overwrites individual overlapping properties instead of the entire tweens. There are actually 4 modes from which to choose (NONE, ALL, AUTO, and CONCURRENT). This means you'll probably never have to type overwrite:false again. Keep an eye on http://blog.greensock.com for the announcement. If anyone would like me to e-mail them when the update is ready, just let me know by sending me an e-mail with TweenMax update in the subject. Jack -Original Message- From: allandt bik-elliott (thefieldcomic.com) [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2008 10:27 AM To: Flash Coders List Subject: [Flashcoders] TweenMax help needed hi folks - i have a quick question can anyone tell me if i use delay and delayIncrement in the same TweenMax call, will they clash? so will delayIncrement:0.05 and delay:_delay overwrite each other? TweenMax.allTo(aTilesToMove, .2, {_y:nMoveAmount, ease:Quad.easeIn, delayIncrement:0.05, overwrite:false, , onStart:nextAnimationFrame, onStartParams:[_oAnimationObject]}); thanks 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] smooth animations? AS3
If you want sub-pixel movement, you must turn smoothing on for the asset, but there are a few gotchas that I'm aware of: 1) If DisplayObject/MovieClip has any filters applied to it (blur, drop shadow, etc.), I'm pretty sure it's impossible to get sub-pixel movement. It will only move on whole pixels which would explain that undesirable effect you described. 2) If you're animating a TextField with anti-aliasing set to anti-alias for readability, you'll probably get some visual vibration as it moves. Obviously bitmap text (no anti-aliasing) won't work well for sub-pixel movement. 3) In certain scenarios, Flash will not allow smoothing on subloaded assets from other domains unless you have a crossdomain.xml file in place. It's a security thing. If your asset is a raster image in your library, you can simply right-click on it, choose properties, and select the allow smoothing checkbox. If it's a BitmapData object, you'll need to enable smoothing when you create it through code. If it's not a raster image, could try creating a BitmapData of your asset, set smoothing to true, and animate that in order to get the sub-pixel movement. Not sure it would give you great results, but it's worth a shot. Hope that helps. Jack -Original Message- From: sebastian [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 03, 2008 7:50 PM To: Flash Coders List Subject: [Flashcoders] smooth animations? AS3 Hi everyone, so I have a MC I want to move very-very slowly across the screen; so that it is subtle. I have the frame rate set to 30fps and any increase to the FPS doesn't seem to make much of a difference. I have tried basic timeline motion tween, and also the AS3 Tweener class; but in both cases I get the issue that the slow animation makes the image do little 1 pixel jumps that are VERY visible and break the effect I am going for [which needs to be extremely subtle]. Am I just stuffed? Or is there a way to achieve very smooth animations in Flash/AS3? [short of laying it all out as frames and cross fading! which would be ridiculous and over-size the file so not possible]. Maybe I just need to turn on something somewhere? I can't remember where if that's the case... Thanks!! Sebastian. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Tween multiple rotations
If you want to rotate it 3 full rotations, you could just use a relative value by putting quotes around the value, like this: TweenLite.to(my_mc, 1, {rotation:1080}); Or if your amount is in a variable, just cast it as a String, like this: TweenLite.to(my_mc, 1, {rotation:String(myRotationVariable)}); Is that what you were looking for? Jack -Original Message- From: Glen Pike [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2008 5:14 PM To: Flashcoders mailing list Subject: [Flashcoders] Tween multiple rotations Hi, I am trying to rotate an object through 1080 (3 * 360) degrees with TweenLite. Does anyone know if I have to join a sequence of 360 tweens together to do this, or is there a way of cheating so it just does as you would hope? Thanks Glen -- Glen Pike 01326 218440 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] TweenMax subversion?
No, not *YET* Sorry. For now, you'll need to snag updates at www.TweenMax.com or www.TweenLite.com Jack -Original Message- From: allandt bik-elliott (thefieldcomic.com) [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2008 10:45 AM To: Flash Coders List Subject: [Flashcoders] TweenMax subversion? Hi - does anyone know if there's a subversion link for TweenMax/Lite please? ta ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Tween multiple rotations
I've never used it, but from what I understand, Fuse is indeed very powerful in terms of sheer number of features. And in Moses' defense, he recognized the problems with Fuse (bloat, poor performance) and came out with GoASAP for AS3 in an effort to have a core lightweight engine that developers could build their own custom engines on top of. But lots of developers don't want to mess with building an engine, so it might not be a good fit for everyone. You could pick up a pre-built one based on GoASAP if you want, though, like HydroTween. There are several others too. http://code.google.com/p/goplayground/. Tweener is very powerful as well, and tons of people use it. That being said, you may still want to check out TweenLite and/or TweenMax because: - They're faster. In some cases by a WIDE margin. http://blog.greensock.com/tweening-speed-test/ - Obviously TweenLite is lighter weight (about 3k). Fuse is huge. - AS2 AS3 versions with virtually identical syntax features - If you're looking for features (sequencing, Bezier tweening, filter tweening, pause/resume, event dispatching, timeScale, etc.), check out TweenMax which does everything TweenLite does plus tons more. Same syntax. Easy to upgrade. There are several features in TweenMax, in fact, that no other tweening engine has (that I'm aware of). I'd encourage you to download several engines and give 'em a shot. You might be surprised what you prefer after using them for a project or two. TweenLite comes with TweenMax which can be downloaded here: www.TweenMax.com Just my 2 cents. Keep the change. Jack -Original Message- From: sebastian [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2008 7:41 PM To: Flash Coders List Subject: Re: [Flashcoders] Tween multiple rotations Ooops on the simple solution for a relative rotation [my bad]! Much better than my suggestion... :P Why Fuse? - Sequencing, passing writing animation objects. It is true for small applications, like banners; it's overkill when kbs are in dire need. But for web 2.0 application development, a few extra kb is insignificant. Check the last pages of this primer for what sets it apart when building complex or dynamic animation sequences: http://www.mosessupposes.com/Fuse/speakernotes-mgunesch.pdf mind you i am now coding primarily only in AS3... and 'Fuse3: Go' doesn't do it for me [why would I want to write my own tweens? isn't that the point of using an engine, so i don't have to write my own tweens anymore?...] :P :) Seb. Merrill, Jason wrote: On AS3 there isn't as good a package as fuse around [yet?]; What does FUSE have over TweenLite and TweenMax? FUSE always bloated my projects and had problems in high stress situations. Jason Merrill Bank of America 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 Innovative Learning Blog subscribe. ___ 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] Easing a selection
Just an idea - you could use TweenLite with an onUpdate to do something like: var frequency:Number = 0.05; //number between 0 and 1 indicating how often your function should get called over the course of time var myObject:Object = {progress:0}; var nextTrigger:Number = frequency; TweenLite.to(myObject, 5, {progress:1, ease:Strong.easeIn, onUpdate:checkProgress}); function checkProgress():void { if (myObject.progress = nextTrigger) { myFunction(); nextTrigger = myObject.progress + frequency; } } Then you can swap out the easing equation with whichever one you want. Or build a custom ease with something like http://blog.greensock.com/customease/. And in the example, the tween lasts 5 seconds, but obviously change that to whatever you need. Warning: The updates are based on the frame rate, so this method does not guarantee that the function will get called at precise increments, nor does it guarantee that the function will be called a certain number of times, but since your stuff doesn't render inbetween frames anyway, I believe it should generally produce the results you're after (easing the time between function calls). If not, ignore this post - it was just an idea I had off the top of my head :) Jack -Original Message- From: Eric E. Dolecki [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2008 5:13 PM To: Flash Coders List Subject: Re: [Flashcoders] Easing a selection I use TweenLite daily, but I am not tweening the properties on a DisplayObject, I am easing the call of methods over time. I believe that a timer, setting the delay after each call, and based on a number of times to call might serve me well. On Thu, Nov 6, 2008 at 5:44 PM, sebastian [EMAIL PROTECTED] wrote: Oh do you mean easing? So as it approaches its destination it moves slower and slower? If so, there are many packages that already do this for you, so no need to reinvent the wheel. All you need to do is call it. One such package is TweenLite: http://blog.greensock.com/tweenliteas3/ Just set the easing equation to what ever curve you require, there is even a little flash app. that lets you pick parameters to copy-paste. Peace, Seb. Eric E. Dolecki wrote: I am after tweening events more than the actual position of a selector. ie. class.increment(); short pause class.increment(); slightly longer pause class.increment(); even longer pause... until stop So I would be providing a UI of selected items via visual easing. I think I have this nailed down... just wanted to get some other ideas on how best to approach it. On Thu, Nov 6, 2008 at 4:38 PM, sebastian [EMAIL PROTECTED] wrote: Erm, I am not sure I understand; so let me paraphrase: You want to scroll one area based on the position of a mouse in another, right? If so, just measure the bounds [x/y difference] from some center range and apply a Tween to the area you want to scroll. BTW: I would generally always recommend against using timers to apply movements; I've seen far too much code written that uses timers incorrectly and it's a real pain in the *** Stick to simple tween calls; like: TweenLite. With kind, Sebastian. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Tweening a Bitmap Blur in combo w/generateFilterRect?
Yep, JC's idea seems very doable. Or look into the upcoming version of TweenLite/Max which uses a plugin architecture, so you could write your own little plugin that would accomplish it. http://blog.greensock.com Jack -Original Message- From: Hans Wichman [mailto:j.c.wich...@objectpainters.com] Sent: Friday, January 09, 2009 1:19 PM To: Flash Coders List Subject: Re: [Flashcoders] Tweening a Bitmap Blur in combo w/generateFilterRect? Hi, how about setting up a couple properties, and tween them using TweenLite, calling your apply method using TweenLite's onUpdate method? greetz JC On Fri, Jan 9, 2009 at 6:49 PM, Matt S. mattsp...@gmail.com wrote: So I'm applying a blur to a bitmap via the code below (a little clunky perhaps, this is for testing only), and it's accomplishing my goal, which is to blur a bitmap WITHOUT the annoying fuzzing out and fading away of the edges. I just want a uniform blur across the whole image. The tricky part, though, is that I want to TWEEN the blur, while preserving the generateFilterRect effect of having the blur go edge to edge evenly. I've looked at all the tween classes but none seem to allow for this. Does anyone know of a way to either tween an applyFilter for a bitmap, or else accomplish the same effect while simply blurring a movieclip or sprite? thanks, .matt var bmd:BitmapData = new BitmapData(157,157); bmd.draw(myRoot.testbitmap); var bFilter:BlurFilter = new BlurFilter(15.0,15.0,3); var filterRect:Rectangle = bmd.generateFilterRect(bmd.rect, bFilter); var bmdFinal:BitmapData = new BitmapData(157, 157, true, 0x); bmdFinal.applyFilter(bmd, bmd.rect, new Point(0, 0), bFilter); var bm:Bitmap = new Bitmap(bmdFinal); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] change the origin of rotation for a movieclip?
There's a new plugin for TweenLite/Max that'll cause transformation (rotation/scale) tweens to occur around any point, so it'll be as easy as: TweenLite.to(mc, 2, {transformAroundPoint:{point:new Point(100, 100), rotation:85}}); Or if you want to use the center of the object as its origin, you could simply do: TweenLite.to(mc, 2, {transformAroundCenter:{rotation:80}}); It works for the scale too, like: TweenLite.to(mc, 2, {transformAroundCenter:{scaleX:1.5, scaleY:2, rotation:-70}}); NOTE: The plugin is a membership benefit of Club GreenSock. You can see an interactive demo at http://blog.greensock.com/sneak-peek/ (scroll all the way down in the list of plugins - they're at the bottom - click example). For those of you who are wondering what's this 'plugin' talk with TweenLite - I didn't know there were any plugins!, it's a new feature that's part of a big update I'm rolling out soon. It adds lots of flexibility. Read more at the site. Jack PS There's also TransformMatrixProxy which has been around for a while and it'll do something similar and also let you skew things. http://blog.greensock.com/transformmatrixproxy/ It's not quite as convenient as a plugin for TweenLite/Max, though. -Original Message- From: Anthony Pace [mailto:anthony.p...@utoronto.ca] Sent: Saturday, January 10, 2009 6:12 PM To: Flash Coders List Subject: [Flashcoders] change the origin of rotation for a movieclip? How do you change the origin of rotation dynamically? can it be done? or will it always be 0,0 I was hoping that with the new features of as3 that this I would be able to indicate where I wanted the origin; yet, I am starting to think that I was hoping for too much. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] change the origin of rotation for a movieclip?
Wow. Sorry. I thought that might be helpful. Obviously it wasn't. I should have given a more thorough answer - after all, this list is for more advanced developers who don't need things simplified. There are 3 ways I know of to do something like that (some have already been covered): 1) Wrap it in another DisplayObject/MovieClip, offset it however much you need so that the new parent's registration point is where you need it on your object. Then rotate the parent. Upside: it's easy. Down side: You're screwing with the display list which fires off events like ADDED_TO_STAGE. It feels like a hack. 2) Use matrix transformations like MatrixTransformer class's rotateAroundInternalPoint() method. Cleaner in some ways, but in my experience, it doesn't always give accurate results over time. 3) Determine where the point is internally around which you want to rotate (according to your DisplayObject's local coordinates). Rotate and then use localToGlobal() and globalToLocal() to figure out how much it was offset and move the x/y coordinates to compensate. Hope that was more helpful. Jack -Original Message- From: Anthony Pace [mailto:anthony.p...@utoronto.ca] Sent: Monday, January 12, 2009 2:24 PM To: Flash Coders List Subject: Re: [Flashcoders] change the origin of rotation for a movieclip? How about a real answer? Jack Doyle wrote: There's a new plugin for TweenLite/Max that'll cause transformation (rotation/scale) tweens to occur around any point, so it'll be as easy as: TweenLite.to(mc, 2, {transformAroundPoint:{point:new Point(100, 100), rotation:85}}); Or if you want to use the center of the object as its origin, you could simply do: TweenLite.to(mc, 2, {transformAroundCenter:{rotation:80}}); It works for the scale too, like: TweenLite.to(mc, 2, {transformAroundCenter:{scaleX:1.5, scaleY:2, rotation:-70}}); NOTE: The plugin is a membership benefit of Club GreenSock. You can see an interactive demo at http://blog.greensock.com/sneak-peek/ (scroll all the way down in the list of plugins - they're at the bottom - click example). For those of you who are wondering what's this 'plugin' talk with TweenLite - I didn't know there were any plugins!, it's a new feature that's part of a big update I'm rolling out soon. It adds lots of flexibility. Read more at the site. Jack PS There's also TransformMatrixProxy which has been around for a while and it'll do something similar and also let you skew things. http://blog.greensock.com/transformmatrixproxy/ It's not quite as convenient as a plugin for TweenLite/Max, though. -Original Message- From: Anthony Pace [mailto:anthony.p...@utoronto.ca] Sent: Saturday, January 10, 2009 6:12 PM To: Flash Coders List Subject: [Flashcoders] change the origin of rotation for a movieclip? How do you change the origin of rotation dynamically? can it be done? or will it always be 0,0 I was hoping that with the new features of as3 that this I would be able to indicate where I wanted the origin; yet, I am starting to think that I was hoping for too much. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Tween a matrix transformation
You could do this: var matrix:Matrix = mc.transform.matrix; TweenLite.to(matrix, 1, {a:1.5, b:0.2, c:0.2, d:1.5, tx:100, ty:100, onUpdate:applyMatrix, onUpdateParams:[mc, matrix]}); function applyMatrix($mc:DisplayObject, $matrix:Matrix):void { $mc.transform.matrix = $matrix; //for changes in the matrix to take effect, it must be re-applied. } Jack -Original Message- From: Mendelsohn, Michael [mailto:michael.mendels...@fmglobal.com] Sent: Friday, May 01, 2009 9:31 AM To: Flash Coders List Subject: [Flashcoders] Tween a matrix transformation Hi list... I'm trying to think of the best way to tween a sprite that's been transformed, with all 6 props of its matrix property having been altered. I use TweenLite a lot...should I write 6 lines of code, one for each matrix property? Any suggestions for the most optimal way to tween a matrix transform? Thanks, - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Dynamically generate blend colors
Here's a function that you can feed a start hex color, end hex color, and however many steps you want, and it'll generate an Array with hex values for that many steps: -- function getHexSteps($start:uint, $end:uint, $steps:uint):Array { var startVals:Object = {r:$start 16, g:($start 8) 0xff, b:$start 0xff}; var changeVals:Object = {r:($end 16) - startVals.r, g:(($end 8) 0xff) - startVals.g, b:($end 0xff) - startVals.b}; var hexSteps:Array = []; var spacing:Number = 1 / ($steps - 1); var changeFactor:Number; for (var i:int = 0; i $steps; i++) { changeFactor = i * spacing; hexSteps[i] = ((startVals.r + (changeFactor * changeVals.r)) 16 | (startVals.g + (changeFactor * changeVals.g)) 8 | (startVals.b + (changeFactor * changeVals.b))); } return hexSteps; } -- For example, getHexSteps(0xFF, 0xFF, 8) would return an Array that has 8 steps total, going from red to blue: [0xff, 0xda0024, 0xb60048, 0x91006d, 0x6d0091, 0x4800b6, 0x2400da, 0xFF] So a simple use case that builds 30-pixel blocks across the stage, one for each step would look like: var colors:Array = getHexSteps(0xFF, 0xFF, 8); var s:Sprite; for (var i:int = 0; i colors.length; i++) { s = new Sprite(); s.graphics.beginFill(colors[i], 1); s.graphics.drawRect(0, 0, 30, 30); s.graphics.endFill(); addChild(s); s.x = i * s.width; } Hope that helps. Jack -Original Message- From: natalia Vikhtinskaya [mailto:natavi.m...@gmail.com] Sent: Friday, May 01, 2009 7:38 AM To: Flash Coders List Subject: Re: [Flashcoders] Dynamically generate blend colors Thank you. Yes this class allows to create gradient. But I need code that allows to have N MovieClips with blend colors from one to another. 2009/5/1 Glen Pike g...@engineeredarts.co.uk: Have a look at the Greensock Tween classes - they might help. natalia Vikhtinskaya wrote: Hi to all I need dynamically generate blend colors from one color to another. For example RGB: 1Mc 255 255 255 2? 3? 4? 5? 6? 7 136 114 141 Is there a way to calculate blend colors for 5 steps? Thanks you for any help or links. ___ 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] Dynamically setting color and adding a glow [Flash 8 AS2]
The color transform (setRGB()) affects the entire MovieClip including all filters. There are two options that come to mind that would accomplish what you're after: 1) Wrap your objTileColor MovieClip in another MovieClip. Then you can tint/color the inner clip and apply the glow to the wrapper. 2) Use a ColorMatrixFilter instead of setRGB(). This may not give you exactly the same effect and it's a bit more difficult to work with, but it does allow you to alter the color without affecting the glow (just make sure you stack the effects in the proper order) Personally, option #1 seems the easiest/cleanest. Jack -Original Message- From: Paul Steven [mailto:paul_ste...@btinternet.com] Sent: Wednesday, May 20, 2009 6:36 AM To: 'Flash Coders List' Subject: [Flashcoders] Dynamically setting color and adding a glow [Flash 8 AS2] I am trying to dynamically set the color and apply a glow to a movie clip as follows however one seems to overwrite the other. Anyone know why this is not working and how to fix it? My code is as follows: function setGameBackgroundColourAndGlow(passedHexColour:Number):Void { var objTileColor = new Color(gameBgMC); objTileColor.setRGB(passedHexColour); var myGlowFilter:GlowFilter = new GlowFilter (); myGlowFilter.color = 0x003366; myGlowFilter.blurX = 10; myGlowFilter.blurY = 10; myGlowFilter.strength = 0.6; myGlowFilter.quality = 3; myGlowFilter.inner = true; myGlowFilter.knockout = false; gameBgMC.filters = [myGlowFilter]; } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] re: gotoStopAndWait
Senocular explained it well here: http://www.kirupa.com/forum/showthread.php?p=2113726#post2113726 -Original Message- From: Mario Gonzalez [mailto:ma...@wddg.com] Sent: Tuesday, August 04, 2009 1:31 PM To: Flash Coders List Subject: [Flashcoders] re: gotoStopAndWait (I think there was a problem when i sent my initial email so resending) Hey list, Here's a problem i've had to lesser or greater degrees for pretty much ever. I'm sure everyone's come across it. Depending on what's going on, on the site, or especially if it's during the application initialization. Here's an example scenario, You have 10 different illustrated pants for a character in a MovieClip, each mapped to a different label. Based on the database information, you load the proper 'pants' swf, then switch to the variation of it based on the frame label using gotoAndStop. However when you try to access, pants.getChildByName('thing') you receive null. Sometimes the assets are just not ready yet, period case closed. I've tried different solutions to this problem on different projects, ranging from -moving asset initialization function (sometimes just not an option) -creating a FrameDelay class, -creating enterframe listener checking then killing itself once the asset is accessible, - and shamefully even sometimes having to use setTimeout with 250 ms when the site was live and there was no time for elegant work arounds -- I'm aware of how the flash player works, that it needs a step sometimes to process the assets in the frame. Does anyone have a kind of magic bullet solution or workaround for this or in general i'm interested in hearing how you guys have dealt with this problem. -- Mario Gonzalez http://www.onedayitwillmake.com __ Information from ESET NOD32 Antivirus, version of virus signature database 4305 (20090804) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Re: time based smooth animation w/ GTween. HELP!
Hey Isaac. What exactly are you trying to accomplish with the renderTime(10)? Your example tween was only 1 second long, so where does the 10 come from? If you want to skip to a certain time in a TweenMax tween, make sure you're using the latest v11 (http://blog.greensock.com/v11beta/) and just set the currentTime property like myTween.currentTime = 10 would make it go to the 10-second point. Or use the currentProgress property (always between 0 and 1 where 0.5 is halfway finished) like myTween.currentProgress = 0.5. Dont use renderTime() - use the currentTime, currentProgress, totalTime, or totalProgress getters/setters. The convenience of these getters/setters is that they can easily be tweened for advanced effects. And there's an easier way to accomplish your repeatReverse() functionality. Just use the yoyo and repeat features like: var plantaTween:TweenMax = new TweenMax(planta, 1, {y:414, repeat:1, yoyo:true, ease:Sine.easeInOut}); That'll repeat it once and since yoyo is true, it'll play forward the first time through and backwards the second time through. Full ASDoc documentation is at http://www.greensock.com/as/docs/tween/ Again, make sure you've got v11: http://blog.greensock.com/v11beta/. Feel free to use the forums at http://forums.greensock.com for these types of questions. I try to be pretty active in responding there. Jack PS For the record, TweenLite/Max does NOT use a Timer to drive updates. It's ENTER_FRAME driven which is generally optimal for many reasons (I won't bore you with an explanation here). You can have any tween base its timing on frames instead of time if you prefer (new in v11) by setting useFrames:true. -Original Message- From: Isaac Alves [mailto:isaacal...@gmail.com] Sent: Monday, September 14, 2009 9:04 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Re: time based smooth animation w/ GTween. HELP! Hey Joel, so, I´m giving a try with TweenMax. as far as I understood, tweenmax´s default timing mode is set to time based , not frame. how can I change then the renderTime? I-ve tried to do so but no success. var plantaTween:TweenMax = new TweenMax(planta, 1, {y:414, onComplete: repeatReverse, immediateRender:true, ease:Sine.easeInOut}); // TweenMax.renderTime(10); // this doesn´t work, how should I set it ? function repeatReverse():void { plantaTween.reverse(); } thanks! -- Grant has now merged forces with Jack Doyle, author of TweenLite, TweenMax and TweenGroup. The syntax is almost identical and I think you'll have an easier time achieving the effect you want. A tweens pulse can be updated via a setInterval, use of a Timer object, based on the milliseconds a flash movie has been running (getTime) or Enter_Frame events. Enter_Frame has proven to be the most reliable but due to differences in computer speed and network conditions none of them are bullet proof. TweenLite, I believe uses a combination of enter_frame and a Timer where the pulse is updated via enter_frame and the Timer object is then used to determine exactly which frame of the tween is to be rendered. This means if for some reason the flash movie lags, you may see a jump in animation in order to complete in the time you've allotted. You do not have to specify this when using TweenLite but keep in mind your movies framerate, the distance of the tween and the amount of time you are allowing for the tween to finish all factor in to the smoothness of playback. On Fri, Sep 11, 2009 at 10:48 AM, Isaac Alves isaacal...@gmail.com wrote: Hello! I would like to create a time based and very smooth animation with GTween (or another one). But I´m used to GTween , though. here is my code: var plantaTween = new GTween(planta, 1.5, {y: 414}, {delay: 0.8, reversed: true, reflect: true, repeat: 999, ease:Quartic.easeInOut}); I´ve read the following examples in Gtween´s documentation and somewhere else but i can-t quite understand it .. GTween.timingMode = GTween.TIME; at http://www.gskinner.com/blog/archives/2008/08/gtween_a_new_tw.html should I use: plantaTween.timingMode = GTween.TIME; or: GTween.timingMode = GTween.TIME; ? What does the latter exactly means? it doesn´t do nothing. maybe cause the default timeInterval property is 25ms. how do i set it ? the first one throws a reference error Error #1056: and i-ve seen this also at the documentation http://www.gskinner.com/libraries/gtween/docs/ Implementation public static function get timeInterval():uint public function set timeInterval(value:uint):void Implementation public static function get timingMode():String public function set timingMode(value:String):void but cannot figure out how to implement it... help ! thanks ! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http
RE: [Flashcoders] Infinite Loops
First of all, you don't need to keep re-activating the AutoAlphaPlugin - you can just do that once in your SWF. It doesn't hurt anything to re-activate it multiple times, but it definitely doesn't help. Regarding the infinite loop, please make sure you're using the latest version of the GreenSock code - there was a bug a couple weeks ago that could cause an infinite loop in a specific scenario, but it has since been fixed (sorry about any inconvenience that caused). http://www.TweenLite.com There are certainly other things that could cause infinite loops that have nothing to do with the tweening code, but it's tough to know without seeing how/where you're calling the functions, what the rest of your code looks like, etc. Jack -Original Message- From: beno - [mailto:flashmeb...@gmail.com] Sent: Wednesday, November 18, 2009 9:25 AM To: Flash Coders List Subject: [Flashcoders] Infinite Loops Hi; I have the following code. All the functions go in infinite loops *except* the first one, which is strange to me, since both it (hatAndFace, and both eyeball1 and eyeball2) all use the same greensock codes, yet the latter two repeat ad infinitum the alpha tween. Why is this? How do I control it such that it only plays once? I thought putting a stop(); at the end would do the trick, but no :( TIA. beno package { import flash.display.MovieClip; import com.greensock.*; import com.greensock.plugins.*; import com.greensock.easing.*; public class Main extends MovieClip { public function Main():void { } public function hatAndFace():void { var mcHatAndFaceInstance:mcHatAndFace = new mcHatAndFace(); TweenPlugin.activate([AutoAlphaPlugin]); addChild(mcHatAndFaceInstance); mcHatAndFaceInstance.x = 350; mcHatAndFaceInstance.y = 100; mcHatAndFaceInstance.alpha = 0; TweenLite.to(mcHatAndFaceInstance, 2, {autoAlpha:1}); } public function eyeball1():void { var mcEyeballInstance1:mcEyeball = new mcEyeball(); TweenPlugin.activate([AutoAlphaPlugin]); addChild(mcEyeballInstance1); mcEyeballInstance1.x = 380; mcEyeballInstance1.y = 115; mcEyeballInstance1.alpha = 0; TweenLite.to(mcEyeballInstance1, 2, {autoAlpha:1}); } public function eyeball2():void { var mcEyeballInstance2:mcEyeball = new mcEyeball(); TweenPlugin.activate([AutoAlphaPlugin]); addChild(mcEyeballInstance2); mcEyeballInstance2.x = 315; mcEyeballInstance2.y = 115; mcEyeballInstance2.alpha = 0; TweenLite.to(mcEyeballInstance2, 2, {autoAlpha:1}); } public function rightHand():void { var mcHandInstance1:mcHand = new mcHand(); addChild(mcHandInstance1); mcHandInstance1.x = 400; mcHandInstance1.y = 200; } public function leftHand():void { var mcHandInstance2:mcHand = new mcHand(); addChild(mcHandInstance2); mcHandInstance2.x = 800; mcHandInstance2.y = 200; } } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] double barrelled TweenMax instances
I tested your code locally and it worked fine - I suspect there's something else going on in your file that's causing the problem. There is absolutely no functional difference between using the static to() method and creating an instance with new TweenMax(). Some prefer a static to() call because they don't want to keep track of the instance or null references to it for gc purposes while others like the object-oriented new TweenMax() syntax. Pick whatever you like. And those tweens won't cancel each other out in your example either. Could you send me an example FLA that demonstrates the problem (off-list of course)? Feel free to post the question in the forums at http://forums.greensock.com as well. I'm sure we can get this figured out. Jack -Original Message- From: Mendelsohn, Michael [mailto:michael.mendels...@fmglobal.com] Sent: Monday, April 05, 2010 12:41 PM To: Flash Coders List Subject: [Flashcoders] double barrelled TweenMax instances Hi list... I'm trying to call a function twice in a row, and have some TweenMax instances fire up. They aren't firing. I thought it would have to do with the way I'm instancing the TweenMax objects, instead of calling the static to method, but that doesn't seem to be it. I still suspect that instances are somehow cancelling each other out. Example 2 works, and they're instance with the static to method. But, the issue is, I'd like to reduce the amount of code I have down to one private function. Any advice is appreciated, - Michael M. // not working, TweenMax doesn't get fired at all... /// enable(buttonBack, .2, .9, 2, false); enable(buttonNext, 1, 1, 0, true); private function enable(t:Sprite, a:Number, s:Number, b:Number, e:Boolean):void{ var tween1 = new TweenMax(t.getChildAt(0), .5, {alpha:a, scaleX:s, scaleY:s, blurFilter:{blurX:b,blurY:b,quality:2}, ease:Sine.easeOut}); var tween2 = new TweenMax(t.getChildAt(1), .5, {alpha:a, scaleX:s, scaleY:s, blurFilter:{blurX:b,blurY:b,quality:2}, ease:Sine.easeOut}); t.buttonMode = e; var addOrRemove:String = (e==true)?addEventListener:removeEventListener; t[addOrRemove](MouseEvent.CLICK, dispatchProceedEvent); var v:Boolean = (t==buttonBackEnabled)?buttonBackEnabled:buttonNextEnabled; v = e; } // this works all instances of TweenMax fire properly... /// TweenMax.to(buttonBack.getChildAt(0), .5, {alpha:.2, scaleX:.9, scaleY:.9, blurFilter:{blurX:2,blurY:2,quality:2}, ease:Sine.easeOut}); TweenMax.to(buttonBack.getChildAt(1), .5, {alpha:.2, scaleX:.9, scaleY:.9, blurFilter:{blurX:2,blurY:2,quality:2}, ease:Sine.easeOut}); buttonBack.buttonMode = false; buttonBack.removeEventListener(MouseEvent.CLICK, dispatchProceedEvent); buttonBackEnabled = false; TweenMax.to(buttonNext.getChildAt(0), .5, {alpha:1, scaleX:1, scaleY:1, blurFilter:{blurX:0,blurY:0,quality:2}, ease:Sine.easeOut}); TweenMax.to(buttonNext.getChildAt(1), .5, {alpha:1, scaleX:1, scaleY:1, blurFilter:{blurX:0,blurY:0,quality:2}, ease:Sine.easeOut}); buttonNext.buttonMode = true; buttonNext.addEventListener(MouseEvent.CLICK, dispatchProceedEvent); buttonNextEnabled = true; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ASDoc third party libraries
You might want to check out SourceMate for Flash Builder 4 - it has an ASDoc tool that makes it relatively simple to include/exclude classes (one click can exclude a whole package). http://www.elementriver.com/sourcemate/ Although it sounds like you're not a Flash Builder 4 guy, so that may not help much. Also, for the record, the GreenSock downloads have included a .swc file for a while. Not that it solves your problem, but I noticed it mentioned earlier in the thread so I figured I'd clarify. Jack -Original Message- From: Merrill, Jason [mailto:jason.merr...@bankofamerica.com] Sent: Tuesday, April 13, 2010 5:13 PM To: Flash Coders List Subject: RE: [Flashcoders] ASDoc third party libraries asdoc -source-path . -doc-sources . -exclude-classes comps.PageWidget comps.ScreenWidget Thanks, I've tried that all different ways substituting in com.greensock.TweenLite - no luck. Here is a sample class that imports Greensock's TweenLite class which in tests I cannot get ASDoc to exclude TweenLite. If anyone knows how to get this class documented in ASDoc without compiler errors, I'm all ears. package { import flash.display.Sprite; import com.greensock.TweenLite /** * ... * @author Jason Merrill */ public class Main extends Sprite { private var _mySprite:Sprite; /** * Constructor * @param duration the duration of the animation */ public function Main(duration:Number) { TweenLite.to(_mySprite, duration, {x:10, y:10 } ); } } } Jason Merrill Bank of America Global Learning Learning Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl DeSaulniers Sent: Tuesday, April 13, 2010 5:48 PM To: Flash Coders List Subject: Re: [Flashcoders] ASDoc third party libraries One last one, maybe to redeem myself, lol :) / Excluding classes All of the classes specified by the doc-classes, doc-sources, and doc- namespaces options are documented, with the following exceptions: If you specified the class by using the exclude-classes option, the class is not documented. If the ASDoc comment for the class contains the @private tag, the class is not documented. If the class is found in a SWC, the class is not documented. In the following example, you generate output for all classes in the current directory and its subdirectories, except for the two classes comps\PageWidget and comps\ScreenWidget.as: asdoc -source-path . -doc-sources . -exclude-classes comps.PageWidget comps.ScreenWidget Note that the excluded classes are still compiled along with all of the other input classes; only their content in the output is suppressed. If you set the exclude-dependencies option to true, dependent classes found when compiling classes are not documented. The default value is false, which means any classes that would normally be compiled along with the specified classes are documented. For example, you specify class A by using the doc-classes option. If class A imports class B, both class A and class B are documented. / From: http://livedocs.adobe.com/flex/3/html/help.html? content=asdoc_3.html GL, Karl A man who says he just doesn't know will never know, but a man who says he thinks he can know, eventually will. On Apr 13, 2010, at 4:39 PM, Karl DeSaulniers wrote: None taken. Karl On Apr 13, 2010, at 4:23 PM, Merrill, Jason wrote: My file that calls ASDoc class?? Can you explain? ASDoc is a documentation compiler that comes with the Flex SDK. Not a class. Again, have you used ASDoc or are you just guessing? I DO appreciate the help, but I am thinking you know less about ASDoc than I do - no offense. :) Jason Merrill Bank of America Global Learning Learning Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl DeSaulniers Sent: Tuesday, April 13, 2010 5:05 PM To: Flash Coders List Subject: Re: [Flashcoders] ASDoc third party libraries Well, I must admit it is a theory more so. Probably a better solution than that. Is it possible that in your file that calls ASDoc, where it goes to actually call the ASDoc class, having conditional statements add the
RE: [Flashcoders] Infinitely Looping Image
You're mixing Tween and TweenLite code. You've got an event listener set up for a TweenEvent.MOTION_FINISH but TweenLite doesn't dispatch events (TweenMax does though), and you didn't define your cloudTween variable. The easiest thing to do would be to use TweenMax and its repeat property, setting it to -1 for infinite: TweenMax.to(parent_container2, 50, {x:-1000, repeat:-1}); Or you could use TweenLite's onComplete special property to call restart() on your TweenLite instance, like: var cloudTween:TweenLite = new TweenLite(parent_container2, 50, {x:-1000, onComplete:repeatCloudTween}); function repeatCloudTween():void { cloudTween.restart(); } Make sure you're using v11: http://www.greensock.com/v11/ Jack -Original Message- From: John Singleton [mailto:johnsingleton...@yahoo.com] Sent: Monday, April 26, 2010 9:02 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Infinitely Looping Image Hi; I would like to have a background image of clouds loop infinitely.Here's my code: function BigPic():void { parent_container2 = new MovieClip(); var square:Sprite = new Sprite(); parent_container2.mask = square; addChild(square); square.graphics.lineStyle(3,0x065566); square.graphics.beginFill(0xff); square.graphics.drawRoundRect(22, 22, 966, 146, 20); square.graphics.endFill(); addChild(parent_container2) var path:String = images/clouds.png; var req:URLRequest = new URLRequest(path); var loader:Loader = new Loader(); loader.load(req); loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void{ trace(e) }); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, BigPicLoaded); } function BigPicLoaded(evt:Event):void { var loaderInfo:LoaderInfo = evt.target as LoaderInfo; var displayObject:DisplayObject = loaderInfo.content; displayObject.width = 2000; displayObject.height = 150; displayObject.x = 20; displayObject.y = 20; parent_container2.addChild(displayObject); // TweenLite.to(parent_container2, 50, {x:-1000}); cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation); } function restartAnimation(oEvent:Event):void { cloudTween.start(); } But it ain't working. Ideas? TIA, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Tweener still in development
Yeah, regarding the BetweenAS3 demo, they tweened Sprites with TweenMax but Points with BetweenAS3. Sprites use 12.6 times more memory and require about 2.2 times more processing power to update x and y properties! Very misleading. As for the comment about GTween being stricter and more object oriented, that's a common misperception due to the fact that many folks like to use the static to() and from() methods in TweenLite/Max to avoid gc chores. TweenLite/Max are equally object oriented, though - you can use this syntax: var myTween:TweenLite = new TweenLite(mc, 1, {x:100, y:200}); myTween.play(); myTween.currentTime = 0.5; myTween.reverse(); ...etc. Speed tests are available at http://www.greensock.com/tweening-speed-test/ or do your own. But like Steven said, for most use cases speed won't be the biggest factor. Other things should be considered like syntax, documentation, support, reliability, file size, architecture, and features. Happy tweening. Jack -Original Message- From: Steven Sacks [mailto:flash...@stevensacks.net] Sent: Thursday, June 24, 2010 3:37 PM To: Flash Coders List Subject: Re: [Flashcoders] Tweener still in development If I recall correctly, one of his points was that they used Vectors in 10 for theirs and Arrays in 9 for Greensock's for their comparison, which is obviously biased. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Create your own t-shirt
This may be helpful for allowing interactive selecting/scaling/rotating/moving: http://www.greensock.com/transformmanageras3/ There's an AS2 flavor as well. Both accommodate scaling multiple selections even if each object is rotated at a different angle. Transformations can be exported and imported as XML to make it easy to save and reload the state. I know several t-shirt making apps use it. Good luck. Jack -Original Message- From: Karl DeSaulniers [mailto:k...@designdrumm.com] Sent: Wednesday, August 04, 2010 9:27 AM To: Flash Coders List Cc: Flash Coders List Subject: Re: [Flashcoders] Create your own t-shirt Well, I did say I'd purchase it. But I hear your point. I know how to do all those things, but needed this in somewhat of a hurry and was seeing if I could find a fish instead of congering one out of mid air. So to speak. But thank you for your response. No harm no foul. Best, Karl Sent from losPhone On Aug 4, 2010, at 8:55 AM, Merrill, Jason jason.merr...@bankofamerica.com wrote: Does anyone know where I might find an AS2 (preferably) or AS3 create your own t-shirt tutorial or any advice on one that is made and for sale? Does your t-shirt maker also have to have sharks and lasers? I had no luck on google, but I may not be searching for the right key phrase. Try this search: Flash Tutorial T-Shirt Maker Sharks Lasers Seriously though, you're thinking about this the wrong way - looking for an EXTREMELY specific example. You need to not think about the specific result you want (because it's extremely unlikely you'll find a tutorial on it), and instead ask questions and find tutorials on knowledge gaps in Actionscript and Flash related to the problem you are trying to solve. For example: How do I detect when two graphics are overlapping? How would I go about allowing the user to draw on the screen? How can I send graphics to a printer? Is there a tutorial out there on loading XML? etc. By asking for a tutorial very specific to your project, it seems like you just want something to show you everything you should do for your project, instead of learning the Flash/Actionscript things you need to learn to tackle any project. So I would advise you to learn to fish instead of ask for a fish. Sorry if that sounds harsh, I don't mean it to be - it's just the best advice I can give you. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) ___ 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] TweenMax.allTo()
No need to use a Timer. Wouldn't it be as simple as this?: var targets:Array = [mc1, mc2, mc3]; var positions:Array = [0, 100, 200]; var stagger:Number = 0.2; for (var i:int = 0; i targets.length; i++) { TweenMax.to(targets[i], 1, {y:positions[i], delay:i * stagger}); } If you need to control the entire sequence as a whole (pause(), resume(), reverse(), restart(), gotoAndPlay(), etc.), definitely insert() them into a TimelineLite or TimelineMax. If you aren't familiar with TimelineLite/Max, check out the brief video at http://www.greensock.com/timeline-basics/. But again, a simple loop along with the delay special property should be all you need for most situations. Jack -Original Message- From: Merrill, Jason [mailto:jason.merr...@bankofamerica.com] Sent: Thursday, September 09, 2010 1:43 PM To: Flash Coders List Subject: [Flashcoders] TweenMax.allTo() So in Greensock's TweenMax, you can tween and stagger (delay) the tweens of multiple sprites at once, via giving a method like, allTo an array of objects (in this example, _blockViews): TweenMax.allTo(_blockViews, 1, { alpha:1, y:150 }, .2); However, this assumes you want all the tweens to tween to the same property value. What if I wanted all the objects to end up at various Y locations instead of 150? As it is in the code above, they all tween to y=150. Is there a way to provide an array of y locations that each object moves to and have then staggered (as you can with the allTo() method)? I can of course accomplish this by writing some Timer event code to tween each object individually and accomplish what I want - ending up at varying Y locations, but I'd rather not have to write all that code - shouldn't there be a way to do this with TweenMax's sequencing capabilities? Would this be a case where you would use TimelineMax and append several tweens? If so, how would you also stagger them? Jason Merrill ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Zooming
If you're a Club GreenSock member, the transformAroundPoint can make this pretty simple to integrate into a tween. For example: var center:Point = new Point(275, 200); TweenLite.to(mc, 1, {transformAroundPoint:{point:center, scaleX:3, scaleY:3}}); That would scale mc's scaleX/scaleY to 3 and use the center point as though it's where your object's registration point is. You can affect rotation too if you want. There's an interactive example of transformAroundPoint in the Plugin Explorer at http://www.TweenLite.com Alternatively, you could wrap your object in a Sprite and offset its position internally so that the Sprite's registration point is where things should scale from on your image, and then tween the scaleX/scaleY of the Sprite. Or do the math to figure out where your image's registration point would end up after scaling it from wherever the focal point is and tween the x/y/scaleX/scaleY together. Or use the camera suggestions others have offered. Sorry, hope that didn't overwhelm you with options :) Jack -Original Message- From: Lehr, Theodore [mailto:ted_l...@federal.dell.com] Sent: Monday, September 13, 2010 11:14 AM To: Flash Coders List Subject: [Flashcoders] Zooming Is there anyway to zoom into a mc and make sure a certain point on an object (just an image converted to a mc in this instance) is always in the center? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] loadermax load issue?
No need to avoid going straight to GreenSock - there are dedicated forums for these types of questions at http://forums.greensock.com and I try to be very active there. Anyway, I don't remember ever hearing of a LoaderMax queue simply not completing except if it contains a VideoLoader that is between version 1.73 and 1.75 (those versions exposed a Flash bug in a particular scenario - long story - but it was worked around as of version 1.76). Your code didn't show any VideoLoaders, though, so I suspect something else is going on. I'd love to see a sample FLA that demonstrates the problem (the simpler the better, no need to see your production files). That'd really help in terms of troubleshooting. And of course make sure you're using the latest version. http://www.greensock.com/loadermax/ I'm sure we can get to the bottom of this once I see the sample file(s). Jack PS The loading twice thing sounds related to file size audits - please see the explanation at http://www.greensock.com/loadermax-tips/#10 -Original Message- From: allandt bik-elliott (thefieldcomic.com) [mailto:alla...@gmail.com] Sent: Monday, December 06, 2010 5:15 AM To: Flash Coders List Subject: [Flashcoders] loadermax load issue? hey all just wanted to run something by you guys before i went to greensock. We've started using LoaderMax in house and we're starting to get some weird load errors (or lack thereof) we're adding everything into the queue manually, setting event listeners and starting the queue and everything seems to load twice but the following behaviour occurs: the queue starts several progress events occur then the application fails to get a complete event. we're getting no load errors, or any flash errors - the loader just fails to complete. here is the code [code] _queue = new LoaderMax( { name:dataQueue, onProgress:onQueueProgress, onComplete:onQueueComplete, onError:onQueueError } ); _queue.append( new SelfLoader(this, { name:self } ) ); _queue.append( new CSSLoader( cssPath, { name:cssStyle } ) ); _queue.append( new XMLLoader(xmlPath, { name:xmlData, noCache:false } ) ); _queue.load(); [/code] be interested to see if this has happened to anyone else best a ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] loadermax load issue? [UPDATE]
You meant estimatedBytes, not bytesLoaded, right? And you're using the latest version of LoaderMax? (http://www.LoaderMax.com) Feel free to shoot me a sample FLA that reproduces the problem anytime and I'll take a peek. Jack -Original Message- From: allandt bik-elliott (thefieldcomic.com) [mailto:alla...@gmail.com] Sent: Tuesday, December 07, 2010 6:29 AM To: Flash Coders List Subject: Re: [Flashcoders] loadermax load issue? [UPDATE] hi jack just a quick update - we've tried turning the auditing off and setting the bytesLoaded but neither has fixed the issue we're going to try editing the headers of the xml best a On 7 December 2010 11:43, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: hey jack - thanks for the response the xml that is being loaded is dynamically generated so we're going to try turning the filesize auditing off to see if that fixes the problem - we're also going to change the http headers on the dynamic file to output a proper filesize. It seemed to occur in a specific combination (swfobject and firefox). I'll get back to you - if there is an actual bug / fix, i'll file it on your site best a On 6 December 2010 17:16, Jack Doyle j...@greensock.com wrote: No need to avoid going straight to GreenSock - there are dedicated forums for these types of questions at http://forums.greensock.com and I try to be very active there. Anyway, I don't remember ever hearing of a LoaderMax queue simply not completing except if it contains a VideoLoader that is between version 1.73 and 1.75 (those versions exposed a Flash bug in a particular scenario - long story - but it was worked around as of version 1.76). Your code didn't show any VideoLoaders, though, so I suspect something else is going on. I'd love to see a sample FLA that demonstrates the problem (the simpler the better, no need to see your production files). That'd really help in terms of troubleshooting. And of course make sure you're using the latest version. http://www.greensock.com/loadermax/ I'm sure we can get to the bottom of this once I see the sample file(s). Jack PS The loading twice thing sounds related to file size audits - please see the explanation at http://www.greensock.com/loadermax-tips/#10 -Original Message- From: allandt bik-elliott (thefieldcomic.com) [mailto:alla...@gmail.com] Sent: Monday, December 06, 2010 5:15 AM To: Flash Coders List Subject: [Flashcoders] loadermax load issue? hey all just wanted to run something by you guys before i went to greensock. We've started using LoaderMax in house and we're starting to get some weird load errors (or lack thereof) we're adding everything into the queue manually, setting event listeners and starting the queue and everything seems to load twice but the following behaviour occurs: the queue starts several progress events occur then the application fails to get a complete event. we're getting no load errors, or any flash errors - the loader just fails to complete. here is the code [code] _queue = new LoaderMax( { name:dataQueue, onProgress:onQueueProgress, onComplete:onQueueComplete, onError:onQueueError } ); _queue.append( new SelfLoader(this, { name:self } ) ); _queue.append( new CSSLoader( cssPath, { name:cssStyle } ) ); _queue.append( new XMLLoader(xmlPath, { name:xmlData, noCache:false } ) ); _queue.load(); [/code] be interested to see if this has happened to anyone else best 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