Re: Re: [Flashcoders] AS3 Compiler For MAC OS X
On 7/28/06, Haikal Saadh [EMAIL PROTECTED] wrote: You can use the command line compiler than comes with flex2. You'll have to copy stuff from the windows version, though. http://labs.adobe.com/wiki/index.php/Flex_Builder:tutorials:compiling_mxmlc_osx I'm a bit late on this, but I though it was worth pointing out (if only for the archives) that advice above is out of date. You can download the cross-platform Flex 2 SDK from here: http://www.adobe.com/products/flex/sdk/ Cheers, Steve -- Steve Webster http://dynamicflash.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Delegate and [self] Argument
Hi Jeff, In the delegate class from Steve Webster, there is this line: var fullArgs:Array = arguments.concat(self.extraArgs, [self]); I was wondering if anyone knows why there is a reference to self passed to the handler function. Or how might this be useful? This extra argument could cause a problem depending upon what your hander function does with parameters, for example if you have a function with a dynamic number of variables. Yeah, my Delegate class doesn't work very well for event handlers that expect a variable number of arguments. This has caused us problems in the past, and we have an internal version of this class that allows you to pass a third argument to Delegate.create that prevents the reference to self being added to the arguments list. Let me know if this might be useful for you and I'll dig it out. The reference to self is passed so that you have a clean and easy way to reference the delegate function in the event handler method. This was added mainly for the purpose of making it easy to remove event listeners without having to keep an external reference to the delegate functions that were created. Of course, you could just use arguments.caller, but that's less obvious. Cheers, Steve -- Steve Webster http://dynamicflash.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 - why no properties in interfaces?
I've been writing interfaces several times now where I had wished ActionScript would support not only methods but also properties for them. So I'm wondering what's the reason that Adobe still hasn't added interface support for properties. After all Java has them and even haXe supports them too. I know there is some workaround by using inheritance but that is rather sub-optimal in my opinion. Does somebody know an answer for this and maybe has a good solution? While you can't specify properties in an interface, you can specify getter/setter functions. Cheers, Steve -- Steve Webster http://dynamicflash.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] FlashVars + OOP, Best Practices?
Morton, I've just (after reading your mail) blogged[1] on the way, that I normally do this. Please read this for my ideas of OOP-ness and best practices on this matter. :) [1] http://www.barklund.org/blog/2006/06/06/flashvars-and-as2/ Nice class. The only things I'd change are: 1. Use static methods/properties instead of singleton. Gets rid of '.getInstance().' cruft. 2. Remove the setVar() method since these properties really should be read only. Move this into your settings class if you need it. 3. Use composition in the SomeSettingsClass class rather than inheritance since this isn't an 'is a' relationship. It's also worth noting that the Flex 2 framework has a nice method of abstracting FlashVars via the Application.application.parameters array. Cheers, Steve -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Encryption Packages
On 2 Jun 2006, at 02:57, Jon Bradley wrote: http://www.meychi.com/archive/31.php This one has the Rijndael algorithm implemented apparently. I haven't had much time to test. We use this library extensively. It seems to agree at least with PHP's crypto functions. Cheers, Steve -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Flash Multiplayer System
On 2 Jun 2006, at 09:43, mike cann wrote: Yes I looked at oregano a while back, and was planning on using it but it falls into the same category as the other open source projects as having no financial obligation to support with problems that we may encounter. If i was going to develop a project for personal use I would probably use oregano however as this is for a business i think the boss' are looking for more financial support and reassurance of as stable system. The current leading contenders are: http://www.electrotank.com/ElectroServer/ and http://www.smartfoxserver.com/ There is also unity from Colin Moock: http://www.moock.org/unity/ -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] PHP :: Dimensions of a SWF file?
Hi Eric, Is there a way to know via PHP the dimensions (height width) of a SWF file? I need this information to construct an html interface with all kinds of SWF loaded via UFO script! The built-in getimagesize() function supports SWF files: http://uk.php.net/getimagesize Enjoy! -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Fitting squares into an area
Mike, All my squares need to be the same size - so for example what's the best way of laying out 'n' equal squares in an areas x,y so the squares are as big as they can be. There must be an algo for this kind of thing. I might be being a little stupid, but since it's a square, and since width x height = height x width, why not just: // Calculate max area of each square var area:Number = Math.floor((x * y) / n); // Calculate side length from area var sideLength:Number = Math.sqrt(area); PS. It is Monday, so forgive me if the above doesn't work. -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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-PHP-FLASH
After browsing the Kirupa.com XML tutorial written by Senoculor, it appears that given the awkward way the AS XML Object works that using PHP to parse XML then pass the PHP variables to flash may be less intense. Could someone enlighten? I'd disagree with this, unless you're using something like AMFPHP to pass a native PHP object structure back to Flash. Otherwise, you're loosing all the meaning inherent in the XML hierarchy. Cheers, Steve -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] offline SWF generation from XML
On 18 Apr 2006, at 19:01, August Gresens wrote: I'd like to actually write out the file and then open it later using loadMovie - or include it another file using FlashAnt (which I believe can be used to nest clips inside each other?) For example, if the XML describes the contents of a text field with markup, I'd like to generate a SWF with a text field in it, that has the markup offline using the tool rather rather than doing this on the fly at runtime. From this description, swfmill (http://osflash.org/swfmill) is definitely what you need. Cheers, Steve -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Instantiate a class by string
Hi Julian, A simple question perhaps but couldn't figure it out by myself. How can I instantiate a class having it's qname? Say I know that I need an instance of org.foo.Bar, how can I summon it? I tried doing: var anObject = new (eval(org.foo.Bar)); but I get undefined in return. Maybe there is someobscure method like Class.instantiate(aQname) that I overlooked? Your example should work. Are you sure that the class has been compiled into your SWF? If there's nothing that absolutely references your class in the code, it won't get compiled in. You can test that by tracing the value of _global.org.foo.Bar. Cheers, Steve -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Instantiate a class by string
Hi Chris, var qname:String = org.foo.Bar; var x = new qname (); That won't work. Did you mean: var qname:String = org.foo.Bar; var x = new eval(qname)(); -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Instantiate a class by string
Hi Chris, Are you sure? Yup :o) If it doesn't, then var theCommand = new commands [ commandNameToCheck ] (); definite does. It's used in ARP. I'd wager that 'commands' is an array of constructor function object references, stored by name, as opposed to an array of strings which contain the package names. -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Instantiate a class by string - SOLVED
Julian, The problem is - I got to have new someClass somewhere in my code for the other layouts to appear under _globals, after which I can properly instantiate them. You just need to reference the class, so variables like this... var hLayoutRef:Function = Horizontal; var vLayoutRef:Function = Vertical; var bLayoutRef:Function = Burst; ...will do the trick. Also, if you're using mtasc you could use the following switch... -pack com.julik.stack.layout Also, if you want a more structured way to instantiate these classes, have a look at the find method of my ClassFinder class here: http://dynamicflash.com/classes/ClassFinder.as Regards, Steve -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] XPath, apostrophe, XPath's escape chars?
Ramon, I need to search an XML via a string that may contain apostrophes. ex.: var sDesc:String = XPath.selectNodes(_xml, //[EMAIL PROTECTED]' + sReleasedLabel + ']/@writeup)[0]; Is there a way to escape the apostrophe? The problem is that the sReleasedLabel, which contains Chinese New Year '06, is thought to end at ... Year because of the apostrophe. I've tried / and \ as escape chars but they don't work. You should be able to use double quotes surrounding the expression you are looking for... XPath.selectNodes(_xml, //[EMAIL PROTECTED] + sReleasedLabel + \]/ @writeup)[0]; This is something that wouldn't work in an xpath statement in an XML file, but you should be able to get away with it in ActionScript depending on whether the xpath library you are using supports this notation. Other than that there is no solution to your problem. Better to encode your attribute values so that they contain apos; instead of apostrophe characters. Cheers, Steve -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] dumb xml question
Chris, How can i get the innertext of an xml node of type 1 (without doing toString and stripping the xml tags) in flash mx (not 2004)? nodeValue doesn’t work on type 1 apparently… returns null… Loop through all the child nodes of your node and concatenate the value of the text nodes... var nodeValue:String = ; for (var i:Number = 0; i node.childNodes.length; i++) { var child:XMLNode = XMLNode(node.childNodes[i]); if (child.nodeType == 3) { nodeValue += child.nodeValue; } } trace(nodeValue); If your question is how to get the equivalent of innerHTML then change... if (child.nodeType == 3) { nodeValue += child.nodeValue; } ...to... nodeValue += child.toString(); Hope this helps! Steve -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Object path to string
Nick, I need to convert an Object path, for example data.item[3].description.short To a string: data.item[3].description.short Something like the targetpath() MovieClip method, but for a basic Object. I reckon you'd need to loop through the object backwards but was hoping to find a function written for this purpose already. No luck yet though. Anyone? You might find something here: http://proto.layer51.com/default.aspx. If you want to code this yourself, you'd need to start at 'data' and loop recursively through all its properties until you find a reference to the object you're looking for. Having said that, of course objects exist only as references, so there might be more than one 'path' to your object. Cheers, Steve -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] PrintJob causes Abort Script error message.
On 29 Mar 2006, at 12:07, Steven Sacks wrote: I would suggest that it is: there's no error in the code, and it's not that the Flash movie itself is running slowly, it's purely a result of user interaction. While the print dialogue is displayed, the Flash movie should simply not be running. PrintJob makes a synchronous call to the OS. Flash ceases to execute code until it receives a response. Unfortunately, this means Flash is hung on a line of code which means Flash is going to throw up an error after 15 seconds because it believes, and rightfully so, that it has code that is unresponsive. It is not a bug. It's the way PrintJob is written - synchronously. No, it really is a bug. The bug is that the Flash Player doesn't suppress the timeout notification when a PrintJob is active. It is quite reasonable to expect a user to spend more than 15 seconds configuring their print settings. Since I very much doubt that this was intended behaviour, I would class this as a bug. -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Inconsistent Constant
Ian, Flash doesn't have the concept of constants, so you couldn't enforce a constant even if you wanted to (except by a hack like defining a null set() function, but that's beside the point a bit)... you can only suggest that specific things should be constant by convention It's not really beside the point. We define constants in this way... class Test { public static function get SOME_CONSTANT():String { return value; } } ...which works perfectly. -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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
Fwd: [Flashcoders] Inconsistent Constant
Ian, Flash doesn't have the concept of constants, so you couldn't enforce a constant even if you wanted to (except by a hack like defining a null set() function, but that's beside the point a bit)... you can only suggest that specific things should be constant by convention It's not really beside the point. We define constants in this way... class Test { public static function get SOME_CONSTANT():String { return value; } } ...which works perfectly. PS. Sorry if I sounded a little short in the above e-mail; I sent it in a hurry and forgot to add relevant smilies :o) -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] DataGrid Component Performance
Scott, It is build to handle thousand of rows, but there a couple of issues. Population of the datagrid is slow as molasses. You might be able to short circuit your way into some better performance, but it's a crapshoot. I did some tests on this a while back and posted about it on my blog. Might be worth a read for anyone who needs to populate a datagrid with a lot of information. http://dynamicflash.com/2006/01/efficiently-populating-a-datagrid- control/ Also, don't even bother trying to sort. It might be interesting to try delegating sorting to the server and getting a permutation vector back...but even then, it might give you trouble. Well, if you've got enough records to make population and sorting a performance issue, I'd suggest that fetching those same records again from the server whenever you needed to sort them would be even less desirable. Also, column sorting is limited to string sorts. When I needed more complex sorting behaviour, I achieved it by subclassing DataGridColumn (might be named differently, it's been awhile) and hooking into the header's press handler. You could have set sortOnHeaderRelease to false and then responses to the headerRelease event to sort the data. At least that's what we're doing. -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] DataGrid Component Performance
Also, don't even bother trying to sort. It might be interesting to try delegating sorting to the server and getting a permutation vector back...but even then, it might give you trouble. Well, if you've got enough records to make population and sorting a performance issue, I'd suggest that fetching those same records again from the server whenever you needed to sort them would be even less desirable. Never mind - I see now you weren't advocating getting all the rows back, just some magic information that helps you manually sort the array. -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] crosspost: update your flash-players immediately
On 15 Mar 2006, at 14:49, Merrill, Jason wrote: I would think if it's fixed in 8.0.24.0 they wouldn't go back to the same problem again in 8.5, which isn't officially out yet, only pre-release. As for the pre-release version, it's possible the problem is there too, but I think Adobe would hope you're not pushing that on your customers yet since it's not a final release. I would not be using 8.5 in a product delivery just yet. JD mentioned that this wasn't a problem for 8.5 on his blog today/ yesterday. Unfortunately I can't find the direct link because weblogs.macromedia.com seems to be down for me. -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Help with Tree Component
James, Thanks for the reply. I was about to have a hernia. I've snooped through as much of this component as I'm willing to bare. If you mean this: tree.addEventListener('itemRollOver', treeListener); tree.addEventListener('itemRollOut', treeListener); treeListener.itemRollOver = function(evt:Object) { evt.target.setStyle(useRollOver, false); } treeListener.itemRollOut = function(evt:Object) { evt.target.setStyle(useRollOver, true); } It really doesn't work very well. The custom event handler responds after the default behaviour has been triggered. Just a quick thought: what about turning the above on its head. Disable useRollOver and only enable when rolling over items that are enabled? Probably won't work, but its worth a try! How can it be this complex to just stop the rollover for disabled elements :'( You'll probably have to resort to prototype hacking, which I had to do with the Tree component to prevent nodes being closed depending on certain conditions. -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Help with Tree Component
On 15 Mar 2006, at 17:38, Steve Webster wrote: James, Thanks for the reply. I was about to have a hernia. I've snooped through as much of this component as I'm willing to bare. If you mean this: tree.addEventListener('itemRollOver', treeListener); tree.addEventListener('itemRollOut', treeListener); treeListener.itemRollOver = function(evt:Object) { evt.target.setStyle(useRollOver, false); } treeListener.itemRollOut = function(evt:Object) { evt.target.setStyle(useRollOver, true); } It really doesn't work very well. The custom event handler responds after the default behaviour has been triggered. Just a quick thought: what about turning the above on its head. Disable useRollOver and only enable when rolling over items that are enabled? Probably won't work, but its worth a try! How can it be this complex to just stop the rollover for disabled elements :'( You'll probably have to resort to prototype hacking, which I had to do with the Tree component to prevent nodes being closed depending on certain conditions. Something like this: DataGrid.prototype.oldOnRowRollOver = DataGrid.prototype.onRowRollOver; DataGrid.prototype.onRowRollOver = function(rowIndex : Number) { if (this.rows[rowIndex].item.enabled === false) return; return this.oldOnRowRollOver.apply(this, arguments); } You can also do the same with onRowPress to prevent disabled rows from being selected. -- Steve Webster Head of Development Featurecreep Ltd. http://www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] Ensuring commercial is played before the video while keeping .FLV external
Way off topic in my response -- why do you want to that? Just to piss off your potential customers? You have the right to waste their valuable time? What arrogance. Splash screens are bad enough, this is WORSE!!! Do you create content for free? Someone has to pay for the content to be created and the bandwidth required to stream it to all and sundry, and more often that not that means subscription or advertising. Unless you're willing to pay for the content, you're going to have to put up with commercials. From a personal perspective, I hate adverts. I hate having to go to the cinema and sit through 15-20 minutes of adverts before the film starts, but I like the fact that I'm only paying £5 to watch a big blockbuster that cost hundreds of millions to make. If cinemas were to scrap ads, we'd all be paying upwards to £10 (or local equivalent) to watch a movie. Unfortunately, you either have to get used to this kind of situation, or get a big bucket of sand to hide your head in. :o) Steve -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] no method with name 'createClassObject'.
its a method of uicomponent More specifically, createClassObject is a mix-in method that gets added to MovieClip when you have a UIComponent in your library. Peter: You should try calling... super.createClassObject( ...whataver... ); ...if you're extending a MovieClip. Cheers, Steve -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ 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] How do you code your Flash applications?
5) Comment, a lot! Just wanted to qualify this piece of advice. You should comment appropriately, which is not necessarily the same as commenting a lot. Comments such as... // Increase the value of i by 5 i += 5; ...are no good to anyone. Instead, explain why 5 is being added to i, unless the surrounding code makes it obvious. Also, make sure that the comments you do make are kept up to date when changing code. It's completely baffling to read a comment that has little or no bearing to the code now surrounding it because it got left behind. I'd also add one piece of advice of my own... 6) Use subversion or some other form on source code control Saved my bacon on more than a few occasions! Steve -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] interfaces and objects
Well, you can't instanciate an interface, you need first a concrete class that implements the interface... While you cannot instantiate an interface, you can assign an object that is an instance of a class that does implement the interface to a variable that is typed to the interface. Your code should be: interface IWorldPart {} class SomeWorldPartSubclass implements IWorldPart {} var myPart:SomeWorldPartSubclass = new SomeWorldPartSubclass(); myCollection.addItem(myPart); I think what the OP is saying is that he wants to do this (based on your example): var myPart:IWorldPart = new SomeWorldPartSubclass(); ...which compiles just fine, but the compiler baulks at the following statement... myCollection.addItem(myPart); If I read correctly, the addItem method is expecting one argument of type Object, and the compiler seems to think that an object of type IWorldPart (i.e. of a class implementing the IWorldPart interface) cannot be stored in a variable of type Object. I don't have time to test this, but if this really is the case then it's a compiler bug. -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Enhanced stroke is not supported in this player
Hi Michael, I'm making a swf in 8 and publishing for 7 and I keep getting this compile error: Enhanced stroke is not supported in this player Problem is, I can't figure out how to fix that. Any ideas? Somewhere in your symbols there is a stroke on a shape that is using the new enhanced stroke options introduced in Flash 8. From http://www.macromedia.com/software/flash/flashpro/productinfo/ features/: Enhanced stroke properties Select from a variety of cap and join types. Apply a gradient to a stroke as well as a fill. Render stroke intersections better with stroke hinting. Revert to using basic strokes and publish again; that should fix your problem. -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] printJob movieclip positioning
Hi Yves, I'm currently making an application in flash that needs to print any mc that you throw at it in a decent and structured way. This is of course possible with the printJob class but I'm encountering some positioning problems at the moment. Scenario: I have a very big mc (in height) and I want to print it. I decide to cut the mc in half and send each half to the spool. I can't use flash 8 advanced pixel features (must work in f7) so I work with custom white shapes in the mc's that cover the area that belongs to the other half. Also can't use masks but can't remember right now why. :) Without masking this is going to be an impossible task. For example: main mc has a height of 1000 pixels. Part 1 still has a height of 1000 pixels but also has the white shape starting at 500 y-axis that covers the part2 content Part 2: same as part 1 but the white shape starts at 0 y-axis and covers the part 1 content. Now when I print part 1 there is no problem. It will start at the top and you won't see the part 2 content because of the white shape, technically speaking part 1 is still way too large to be printed of course but because of the white shape at the bottom that doesn't matter. There is a problem, and it doesn't have anything to do with your white shape. When printing a large MovieClip in Flash, it will not split that into 2 pages if your MC won't fit onto one page - it will just print what it can and will throw away the rest. Part2, now the problem kicks in. The white space to cover the part 1 content is now on top. When I send part 2 to the spool all I see is white and a small piece of part 2 content. This is normal of course because the white space is the top of the mc so there isn't really a problem because that's how it's supposed to work. This backs up the point I made above. So I thought I could fix this by inserting part2_mc in a new movie clip and position it so that the actual content starts at 0, 0 and the white shape lies above it. But apparently this doesn't work, it seems that the printJob class completely ignores that position and just sends the whole mc to the spool including the white shape. I played around with the addPage(xMin,xMax,etc...) margin settings but those settings aren't of any use for my problem. Indeed, neither of those options will work. The only thing that can save you is masking. Cheers, Steve -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Obfuscation
zwetan, if anyone has any further coherent information or personal experience with obfuscating by hand (ie not using someone else's software)... i would be more then happy to hear from you. once i actually achieve any results i will report back. i'm benchmarking against asv and sothink 2005 build 5.whatever. One thing that people don't consider is that You don't need to obfuscate if people can not access the SWF In the first place 1) use SSL + prevent caching in the HTTP header - no SWF in the browser cache or 2) instead of pointing to foobar.swf in the Object/Embed tag point to getBinary.php /getBinary.asp / whatever + prevent caching in the HTTP header - no SWF in the browser cache It's complicated to put in place, but the result is No SWF in the browser cache to decompile 2) off course is still not 100% safe against people being able to detect a SWF stream with a HTTP sniffer but the solution 1) well.. almost unbeatable Neither of your 'solutions' is even remotely unbeatable. I can get around both of them with the wget command-line tool, which is a standard install on most flavours of linux. There are others that do the same thing, and any download accelerator program for Windows will also be able to download the file. Obfuscation is the only way to protect your code, and even then I wouldn't consider it 'almost unbeatable'. -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Obfuscation
Hi zwetan, Neither of your 'solutions' is even remotely unbeatable. I can get around both of them with the wget command-line tool, which is a standard install on most flavours of linux. There are others that do the same thing, and any download accelerator program for Windows will also be able to download the file. I can block wget with just JavaScript ;) Fair enough, but then you also block all your regular visitors who have JavaScript disabled from accessing your SWF file. Anyway, ultimately the swf file will be loaded from somewhere (via physical file or script) and I can just point wget at that file instead. Safari's Activity window will show me all URLs loaded as part of the page, so I just just copy it from there. Obfuscation is the only way to protect your code, and even then I wouldn't consider it 'almost unbeatable'. I still think obfuscation is not the only way... I think we'll probably have to agree to disagree here. Since the Flash file *has* to be downloaded to the client for playback, it can be downloaded to the client for de-compiling. I wouldn't normally mind people protecting their own stuff using the methods you described, but when you're advising others it's important to make sure the advice you're giving out is sound. Either that, or tell people of the potential problems with your solution rather than just saying that it's 'almost unbeatable'. Sorry if I sound confrontational, but security is a bugbear of mine. -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Is Adobe settings manager usable ?
Hi John, I'd be interested to know what the reasons were for the settings manager being on a macromedia web page rather than in a local dialogue box. UI size is one issue... if you're viewing a 60-pixel-square SWF, there's no room for an internal dialog. There are also localization and update issues. I guess I can understand that, but I can't help but think that the web UI is a step too far. I certainly hope that it's viewed more as a short-term hack than a long-term solution. In our experience users just don't get the concept of going to a public web page to manage settings on their personal computer, and so we're having to hand hold our clients through this process. That approach of using a full webpage UI to examine local settings is clever, but has been too novel for many people... I know there have been internal discussions on how to improve the next generation, but I don't yet know how these discussions may manifest in new UIs. I'm glad to hear that this is being looked at and discussed. Just knowing that this is happening has reassured me that the current situation will not persist forever. Many thanks, Steve -- Steve Webster Head of Development Featurecreep Ltd www.featurecreep.com T: +44 (0)117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Is Adobe settings manager usable ?
Do someone of you (or your clients) ever use the settings manager ? See : http://www.macromedia.com/support/documentation/en/flashplayer/help/ settings_manager06.html Every client we've walked through the settings manager thinks that thing is an image. Heck, when I first went there I thought it was an image, part of a page instructing you on how to open the settings manager on your own computer. I'd be interested to know what the reasons were for the settings manager being on a macromedia web page rather than in a local dialogue box. -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Drag Drop Windows - Flash
Hi Nick, Im 99% sure of the answer to this but I'll ask anyway: Is it possible to have any interaction between the Windows desktop and a flash movie? i.e. drag an object from Windows and drop into the flash movie? You'll need a third party projector building tool for this. Not sure if screenweaver [1] did/does this, but I know that Zinc [2] does. [1] http://osflash.org/screenweaver [2] http://www.multidmedia.com/ -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Bokel's LoaderClass cache issue with Firefox - HELP !
Hi Dom, I have an initial swf in which im loading 2 external swf's into. That's all working perfectly however firefox is not caching the external swf's and is insisting on reloading them from scratch every time one of them is requested from a button click, whereas Internet Explorer knows they were cached and doesn't insist on preloading them again. (which is how it should be) Have you got caching turned off in Firefox? Seems like a simply enough question, but we had memory caching (not just hd caching) turned off one one of our machines here that caused us some real headaches with swf preloading. Check the relevant settings in about:config, quit and restart the browser. Hope this helps! Cheers, Steve -- Steve Webster Interactive Developer Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders