Re: [Flashcoders] Path/Point interpolator
Thanks, I will study it. It does seem to be a bit more than I am hoping for :) 2010/10/27 Patrick Matte > I think this could help you > > > http://senocular.com/flash/actionscript/files/ActionScript_3.0/com/senocular > /drawing/Path.as > > > > From: Jiri > > Reply-To: Flash Coders List > > Date: Wed, 27 Oct 2010 12:08:48 +0200 > > To: Flash Coders List > > Subject: [Flashcoders] Path/Point interpolator > > > > hello, > > > > I have an array of points that define a path. I would like to > > interpolate the complete path, so that I can move an object along that > > path based on a position. > > So for instance when I tell the interpolator to move to postion .5 it > > would be in the middle of the path, based offcourse of the interpolator > > step/interval size. > > > > for instance: > > > > interpolator.interval = 3 pixels; > > interpolator.getPositionAt(.5) // would be the middle position. > > > > The solution I am after is that I dont want to precalculate all the > > positions up front, I would like to calulcate the position 'on the fly' > > so to say. > > > > Could someone give me a hint on how to tackle this. > > > > Much appreciated. > > > > Jiri > > ___ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > This e-mail is intended only for the named person or entity to which it is > addressed and contains valuable > business information that is proprietary, privileged, confidential and/or > otherwise protected from disclosure. > > If you received this e-mail in error, any review, use, dissemination, > distribution or copying of this e-mail > is strictly prohibited. Please notify us immediately of the error via > e-mail to disclai...@tbwachiat.com and > please delete the e-mail from your system, retaining no copies in any > media. We appreciate your cooperation. > > ___ > 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] Socket connection between two air applications on the same Network Area
Couldn't HaXe a good candidate for a solution? Omar Fouad wrote: Hi all, I wanted to ask if there is a way to let two AIR applications connect to each other through a home network (the same AIR application running on different computers) by using sockets or any other method. Thanks. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] round number to closet value of 8
Indeed it looks very impressive. Could some explain what is does exactly? Hans Wichman wrote: very cool! On Thu, Dec 18, 2008 at 4:26 PM, Benjamin Wolsey wrote: Am Donnerstag, den 18.12.2008, 16:13 +0100 schrieb Hans Wichman: Hi, I think you are looking for : function roundToEight (pVal:Number) { return Math.round(pVal/8)<<3; } although 44.9 and 44.4 will both return 48, don't you mean 43.9 and 44.4? int(pVal + 4) &~ 7; will also do it. -- Free Flash, use Gnash http://www.gnu.org/software/gnash/ Benjamin Wolsey, Software Developer - http://benjaminwolsey.de ___ 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] round number to closet value of 8
Thank you all. :) Benjamin Wolsey wrote: Am Donnerstag, den 18.12.2008, 16:13 +0100 schrieb Hans Wichman: Hi, I think you are looking for : function roundToEight (pVal:Number) { return Math.round(pVal/8)<<3; } although 44.9 and 44.4 will both return 48, don't you mean 43.9 and 44.4? int(pVal + 4) &~ 7; will also do it. -- Free Flash, use Gnash http://www.gnu.org/software/gnash/ Benjamin Wolsey, Software Developer - http://benjaminwolsey.de ___ 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] round number to closet value of 8
Thnx that seems to work good enough. 44. is rounded to 48 and should be 40, but thats fine. Thnx again. Jiri Lehr, Ross (N-SGIS) wrote: I think Math.round(Math.round(32.3/8)) * 8 -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jiri Heitlager Sent: Thursday, December 18, 2008 8:55 AM To: Flash Coders List Subject: [Flashcoders] round number to closet value of 8 I am trying to figure out the fastest way to get the closest multitude of 8 from a random Number and I am really not a math person. var tN:Number = 32.3 //32 var tN:Number = 32.00 //32 var tN:Number = 44.9 //48 var tN:Number = 44.4 //40 Much appreciated if someone could help me out Jiri ___ 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
[Flashcoders] round number to closet value of 8
I am trying to figure out the fastest way to get the closest multitude of 8 from a random Number and I am really not a math person. var tN:Number = 32.3 //32 var tN:Number = 32.00 //32 var tN:Number = 44.9 //48 var tN:Number = 44.4 //40 Much appreciated if someone could help me out Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
Math should be avoided when possible, I believe it is quit slow. Maybe Number >> 0 is even faster for rounding of ;) Jiri laurent wrote: int( ) is casting the content to integer, it has the effect to drop off the decimal part. Same as Math.floor but lots faster L Cor a écrit : If the sprite.x is not an exact round number (so not an correct integer) wouldn't that throw an error??? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jiri Heitlager Sent: woensdag 17 december 2008 15:11 To: Flash Coders List Subject: Re: [Flashcoders] Pixel precise Casting to int is faster. var tX:int = int(sprite.x) Jiri jonathan howe wrote: Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ 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 No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ 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] Pixel precise
Casting to int is faster. var tX:int = int(sprite.x) Jiri jonathan howe wrote: Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ 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] What design pattern would this be?
I also still find it sometimes hard when to decide what pattern to use and mostly _if_ I should use a pattern. It helps me a lot to really think about what the responsibility is of a class and then when I notice it has more then one, then that is an inidicator I need to refine more. Sometimes refining means that I _can_ use a pattern, it doesnt always mean that I should use one. I think these are those things that take a long time of experience. Good luck. Jiri Joel Stransky wrote: Thanks Jiri, I had not seen that site. I had assumed the book covered all of the patterns I was going to need but in hindsight that was silly. The visitor pattern seems very similar to adapter however. I guess I've got a lot of learning to do. I appreciate the notion of not over engineering but until I understand them fluently I intend to implement patterns where possible no matter how trite. On Sun, Dec 7, 2008 at 5:26 AM, Jiri Heitlager <[EMAIL PROTECTED] wrote: Maybe this one: http://www.as3dp.com/2008/12/06/actionscript-30-visitor-design-pattern-a-tale-of-traverser-and-the-double-dispatch-kid/ or check out the articles there I am sure there is a pattern described that will suit your needs. I also think the previous comment on overenginering should be taking into consideration.. Good luck, Jiri Joel Stransky wrote: Thanks for your perfectly useless answer. I know if I could recognize the need for certain patterns easily I'd be more than happy to help out rather than chastise.It looks like it's possibly a Template pattern but I was hoping for the same kind of insight I've been giving at flashkit for eight years no matter how simple the question. On Sat, Dec 6, 2008 at 10:29 PM, Latcho <[EMAIL PROTECTED]> wrote: Are you gonna take a map if you have clear line of sight to your destination ? Shall we advise you on traffic light implementation if you are the only driver in the world ? Dont' overengineer. If you want to integrate / learn a design pattern take a more challenging and/or interactive interface. Latcho Joel Stransky wrote: I'm trying to make design patterns a regular part of my process but understanding them and knowing which one to use are proving to be a quite different. I'm working on a couple of classes. One class's job is to iterate over a list of display objects and modify their scale and location based on mouse position. I want this class to be able to work with a runtime generated OR an authortime generated display list. I figure it's as easy as instantiating either a RuntimeChildren or AuthortimeChildren class and passing it to the constructor of my DisplayListUtility class. Since it's so simple, does it even qualify as a design pattern and if so which one? ___ 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] What design pattern would this be?
Maybe this one: http://www.as3dp.com/2008/12/06/actionscript-30-visitor-design-pattern-a-tale-of-traverser-and-the-double-dispatch-kid/ or check out the articles there I am sure there is a pattern described that will suit your needs. I also think the previous comment on overenginering should be taking into consideration.. Good luck, Jiri Joel Stransky wrote: Thanks for your perfectly useless answer. I know if I could recognize the need for certain patterns easily I'd be more than happy to help out rather than chastise.It looks like it's possibly a Template pattern but I was hoping for the same kind of insight I've been giving at flashkit for eight years no matter how simple the question. On Sat, Dec 6, 2008 at 10:29 PM, Latcho <[EMAIL PROTECTED]> wrote: Are you gonna take a map if you have clear line of sight to your destination ? Shall we advise you on traffic light implementation if you are the only driver in the world ? Dont' overengineer. If you want to integrate / learn a design pattern take a more challenging and/or interactive interface. Latcho Joel Stransky wrote: I'm trying to make design patterns a regular part of my process but understanding them and knowing which one to use are proving to be a quite different. I'm working on a couple of classes. One class's job is to iterate over a list of display objects and modify their scale and location based on mouse position. I want this class to be able to work with a runtime generated OR an authortime generated display list. I figure it's as easy as instantiating either a RuntimeChildren or AuthortimeChildren class and passing it to the constructor of my DisplayListUtility class. Since it's so simple, does it even qualify as a design pattern and if so which one? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] E4x replace nodename
Hello list, i make the following query on an xml file to retrieve a list with certain node names: var tXML:XML = <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> var pat:RegExp = new RegExp('findname' , 'i') var tList:XMLList = tXML.*.(pat['test'](name())) This works fine, but know i would like to in addition to finding them also remove the 'findname_' I could use this: var tList:XMLList = tXML.*.(pat['test'](name())).(editNodeName(name())) function editNodeName(tObj:String):void{ trace('-> ',tObj); } And then create a new XMLlist with custom nodes. But how do I access the currentNode in the query instead of the name(). Or is it possible to directly do a regExp replace on the node? Thnx Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OT: smoothd.com
Nice Meinte van't Kruis wrote: has anyone checked out http://www.smoothhd.com/ seems pretty cool, here's the description; SmoothHD.com is an early glimpse of cutting edge new technology from Microsoft and Akamai that will raise the bar on the consumer video experience. SmoothHD.com is powered by Microsoft Internet Information Server (IIS) 7.0 Smooth Streaming – a unique adaptive streaming technology that dynamically adapts video quality in real-time based on local bandwidth conditions - and Akamai AdaptiveEdge Streaming for Microsoft(R) Silverlight™ , a new solution for enabling high-quality, scalable video experiences over Akamai's global HTTP network of more than 36,000 servers around the world. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] runtime instantiation
I know it is possible to instantiate a class at runtime, but one always needs to put in a concrete piece of code that forces the compiler to actually add the class to the swf. I am currently looking into using this technique to gain flexibility in an application, but the fact that I will always need to add concrete code to force the compiler seems to be counter productive. Here is what I have. interface aInterface class abstractA impl aInterface class injectedB extends abstractA class injectedC extends abstractA then I have a factory method that reads an xml file and instantitated a class based on the @reference node using getDefinitionByName() My idea is that I can in the future write an new class injectedC and just add it to the xml list. But this won't work because I will always need to add something like this to var foo:injectedC = null to add the class to the compiler. Meaning I will always need to recompile. Is there any way to get around this? Jiri artur wrote: need to know a few things: 1 - can i render/export to QT an AS based animation that will be 40min long? it will be incorporating an FLV ( soundtrack ) with Cuepoints..that will trigger different AS animations made from an XML file. is there a chance that the animation and sound can become out of sync ( this has been known to happen with timeline based animations ) 2 - the FLV will have over 10k cuepoints. is there a way to "Scrub through" to the middle of the animation by giving an ID# to each CuePoint? and then giving each XML node that same ID#? then just create a simple textfield form and have the client enter that ID# and the animation can Jump to that section of the animation ( for testing/previewing ) but then how can the client add/delete cuepoints in the FLV and have them be resorted numerically? so they can match the xml IDs? im sure there is a clever & flexible solution out there..anyone? thanks! p.s. i need to do this in AS2..if possible. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Question on architectural problem.
Dear List, I am having a architectural problem and would like to ask people on this list for some input. The project that I am working on uses several models, we call them proxies,i.e RemoteProxy, GameProxy etc... They all extends a base class Proxy and implement an IProxy interface. The chances are in the future more proxies will be added. The person that build the system gave every Proxy an getInfo Method, the method looks like this getInfo(sIdentifier:String) : Object. Where every return object needs to be typecast to the expected return type. The reason of this function is that custom methods can be called from a proxy. This creates flexibility but comes with a price. The compiler can't check it. I can understand the reasons why this method is implementated, not having a zillion extended interfaces, not having to add import etc. But I would like to know if some solution excists that deals with this in an elegant way. I read about the Bridge pattern, but I am not sure if this will help me? Thank you. Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question e4x attributes text replace
Thanx Ian, that sounds like a very clever solution. I will give it a try, and speedoh well I geuss it can always be faster ;) Jiri Ian Thomas wrote: Convert the XML to a string. Do the regExp replace on the string. Reparse the XML? e.g. var str:String=xml.toXMLString(); // do replacement here... xml=new XML(str); Might not be the fastest in the world, depending on the amount of XML you are parsing, but it'll do the job. HTH, Ian On Thu, Oct 9, 2008 at 5:56 PM, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Hello, I have this xml file that I would like to filter on a certain string $$lang$$ and I was wondering if it is possible in one go using regExp instead of looping through an XMLList var conf:XML = I know it is possible to do inline functions but could get the current node and then replace the text var processed:XMLList = conf..*.(test(attributes()) ); function test(tValue:Object):void { trace('called' , tValue) } In this case how do I get acces to the current XMLList and change the $$lang$$ for another string Hope somebody can help me out. Jiri ___ 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
[Flashcoders] Question e4x attributes text replace
Hello, I have this xml file that I would like to filter on a certain string $$lang$$ and I was wondering if it is possible in one go using regExp instead of looping through an XMLList var conf:XML = I know it is possible to do inline functions but could get the current node and then replace the text var processed:XMLList = conf..*.(test(attributes()) ); function test(tValue:Object):void { trace('called' , tValue) } In this case how do I get acces to the current XMLList and change the $$lang$$ for another string Hope somebody can help me out. Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Retreive name of function within scope of that function
Thank you all for the helpfull reply. JIri Juan Pablo Califano wrote: A rather dirty way is to enumerate all methods in a given object (the current timeline, for instance) and compare that to the "self-reference" that a function holds in arguments.callee. u function test():void { trace(getName(arguments.callee,this)); } function getName(funcRef:Function,scope:*):String { var funcName:String = ""; var desc:XML = flash.utils.describeType(this); var methodTable:XMLList = desc..method.(@name != "" && @name != null); for each (var item:XML in methodTable){ if([EMAIL PROTECTED] == funcRef) { funcName = [EMAIL PROTECTED]; break; } } return funcName; } test(); It's just a quick and dirty test, but it works (at least in the timeline). Cheers Juan Pablo Califano 2008/9/16 Jiri Heitlager <[EMAIL PROTECTED]> Does somebody now if it is possible to get the name of a function from the scope of that function. function doSomething():void { trace('the name of this function is ' , $$name$$) } Where the trace would be : the name of this function is doSomething In Java one has acces to stack traces, does AS3 provide acces to this? Jiri ___ 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
[Flashcoders] Retreive name of function within scope of that function
Does somebody now if it is possible to get the name of a function from the scope of that function. function doSomething():void { trace('the name of this function is ' , $$name$$) } Where the trace would be : the name of this function is doSomething In Java one has acces to stack traces, does AS3 provide acces to this? Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] AMF objects storing in database
I came across a post on storing custom classes as an AMF object. It explains how to do the following. "If you ever need to store the state of a custom object in a ByteArray or SharedObject, or send a custom object through a LocalConnection, there are a few simple steps you can take that will allow your object's state to be serialised (converted to AMF) and preserved for future restoration. " src: http://www.si-robertson.com/go/serialise-custom-classes I wanted to know, can I then just send the AMF object to a server and store it as a binary in a mysql database? And also is this adviceable? Thank you, Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] What's happened to my var?
Or add onCompleteScope:this so you dont need to import Delegate class. TweenFilterLite.to(m, tweenTime, {_y:targetPos, onCompleteScope:this , onComplete:moveShape, onCompleteParams:[_timeline.y1]}); Jiri Ali Drongo wrote: Hi there, I've noticed this happen before and can't figure out why. I have built a simple class that is passed a reference to the timeline. The class then moves an object on the timeline repeatedly using the TweenFilterLite class. My problem is that the second time the moveShape method is called the moveAmt variable is undefined. If anyone can suggest what's going on I would be really thankful! Cheers Ali //Main.as import gs.TweenFilterLite; import utils.Numbers; class Main { var minTime:Number = 1; var maxTime:Number = 2; //number of pixels to move shape up or down var moveAmt:Number = 15; var _timeline:MovieClip; function Main(timeline){ _timeline = timeline; moveShape(_timeline.y1); } //moves a shape up or down private function moveShape(m:MovieClip) { trace("moveShape:"+m+" up:"+m.up); var moveDir:Number = 1; //if movieclip is tagged as moving up if(m.up){ moveDir = -1; m.up= false; }else{ m.up=true; } var targetPos:Number = moveDir*moveAmt; trace("moveDir:"+moveDir); trace("moveAmt:"+moveAmt); trace("target:"+targetPos); var tweenTime:Number = Numbers.randRange(minTime, maxTime); TweenFilterLite.to(m, tweenTime, {_y:targetPos, onComplete:moveShape, onCompleteParams:[_timeline.y1]}); } } ___ 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] Saffron Modeler - what happened to it
That seems very promising. I really hope that the saffron will be released, becuase it looked promising when I saw a presentation about it at FITC. Ali Drongo wrote: I believe there's an open source collaboration that has been started to create something like Saffron. There's different rumours as to what is happening with Saffron so this group is building it's own: http://flair-flash-flex-air.blogspot.com/2008/04/open-source-saffron-like-uml-tool.html Ali On 30 Jun 2008, at 17:11, Sidney de Koning wrote: there is loads of activity on sam's twitter account http://twitter.com/SamuelAgesilas S. On Jun 30, 2008, at 6:05 PM, Jiri Heitlager wrote: Does somebody know what happend to the saffron UML modelling tool. The site http://www.levelofindustry.com/ is not showing any update anymore. Jiri ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Saffron Modeler - what happened to it
Does somebody know what happend to the saffron UML modelling tool. The site http://www.levelofindustry.com/ is not showing any update anymore. Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Document viewer
I don't think that Adobe is especially interested in promoting FlashPaper, which is essentially a competitor or substitute for PDF. What a same, because it has some nice features. Come to think of it, now with the PDF isnt possible to embed flash content and doesnt that open up a way to do some interesting flash stuff with a pdf. Jiri Dave Watts wrote: It has been a year ago and I'd thought Adobe would have brrought out an update by now. Geuss not! I don't think that Adobe is especially interested in promoting FlashPaper, which is essentially a competitor or substitute for PDF. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ___ 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] Document viewer
It has been a year ago and I'd thought Adobe would have brrought out an update by now. Geuss not! The problem I then had was that the client had word docs that contained a table of index. Some links would get destroyed when a doc had more then I thikn 100+ pages. Also href links would get destroyed. It was a disaster and we ended up splicing the docs.. I would really advice testing with the biggest doc you have. Jiri Stuart Campbell wrote: Really? Some of my docs will be 200 pages long. What problems did you have exactly? I'm also having "fun" because I thought FlashPaper would allow me to restrict copy and paste and printing. But it only seems to do that for PDF output. Quite dissapointed that Adobe haven't taken FlashPaper forward. On Fri, Jun 27, 2008 at 12:25 PM, Jiri Heitlager < [EMAIL PROTECTED]> wrote: Be carefull with huge documents in Flash Paper. I had some serious issues with that in the past. Jiri Stuart Campbell wrote: @Eric: Thanks. Downloading the trial now. @Paul - yeah screengrabs aren't considered a problem (the documents are so huge that nobody is likely to bother). On Thu, Jun 26, 2008 at 2:07 PM, Paul Venton <[EMAIL PROTECTED]> wrote: I take it they're not worried about the user taking screen grabs and email those off? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stuart Campbell Sent: 26 June 2008 13:23 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Document viewer Hi, I have a project where I need the client to be able to view documents in the browser (PDF, Word, RTF and Excel). However, the requirement is that the person viewing the document can never save the file and can never get their hands on it in order to email it to someone etc. It seems to me that a Flash viewer would be well suited to this kind of control. However I am not quite sure how to go about it. Is there a Flash implementation of a viewer that supports these file formats? Would I need to pre-process the files and put them into swf format? Has anybody had to do anything similar? Many thanks in advance Stu ___ 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 ___ 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] Document viewer
Be carefull with huge documents in Flash Paper. I had some serious issues with that in the past. Jiri Stuart Campbell wrote: @Eric: Thanks. Downloading the trial now. @Paul - yeah screengrabs aren't considered a problem (the documents are so huge that nobody is likely to bother). On Thu, Jun 26, 2008 at 2:07 PM, Paul Venton <[EMAIL PROTECTED]> wrote: I take it they're not worried about the user taking screen grabs and email those off? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stuart Campbell Sent: 26 June 2008 13:23 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Document viewer Hi, I have a project where I need the client to be able to view documents in the browser (PDF, Word, RTF and Excel). However, the requirement is that the person viewing the document can never save the file and can never get their hands on it in order to email it to someone etc. It seems to me that a Flash viewer would be well suited to this kind of control. However I am not quite sure how to go about it. Is there a Flash implementation of a viewer that supports these file formats? Would I need to pre-process the files and put them into swf format? Has anybody had to do anything similar? Many thanks in advance Stu ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flip movie clip
Is the center point in the middle? Jiri Bassam M wrote: Hi I have Video playing in the center of the stage and I'm using button to filp it function filp(event:MouseEvent):void { mySampleMC.scaleY *= -1; } mySampleMC.addEventListener(MouseEvent.CLICK, flip); but the problem when I flip it change Y postion and go up , I wnat to flip it and keep it in same postion Help please Thanks Bassam ___ 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] Job offer in Berlin (ActionScript)
He Abe, I am a Dutch Flash developer and I am living in Berlin since 1 year now. Your email sounds quit interesting and I would like to get to know a bit more. Could you send me some more details. Thank you, Jiri Heitlager Abe Pazos wrote: The company where I work is growing and needs more AS3 developers. The project is called Panfu, one of the biggest virtual worlds for children, developed in AS3 and PureMVC. It's a large and young international team with programmers, designers, illustrators, translators, moderators and many others. Work conditions are quite good I think. Berlin is a great city to live in, specially in summer. It's full of cultural events, parks where you can relax, lakes, and people coming from all countries. You can go around with bicycle or using a very efficient public transportation. Flats and food are quite inexpensive compared to other large cities. For more details or for sending a CV please use my e-mail address. Hopefully one of you is working here with us soon! :) Abe ps. I'm sending this job offer to the list as it was said a couple of weeks ago it is ok to do so. Hopefully it does not upset anyone. ___ 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] Question AIR Sqlite api
Thanx Muzak, I will try your solution Muzak wrote: I think I had a similar error when one of the statements wasn't valid. In this case I'd think that one of the tables already exists (which ends the transaction) and when the next statement is exectuted it throws the error you see. Here's something I used: try { _sqlConnection.begin(); // // sql statements here // _sqlConnection.commit(); }catch(e:SQLError) { trace("- message; ", e.message); trace("- details: ", e.details); _sqlConnection.rollback(); } } When creating a table it is a good idea to check if the table already exists. 'CREATE TABLE IF NOT EXISTS ...' regards, Muzak - Original Message - From: "Jiri Heitlager" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Friday, April 18, 2008 10:19 AM Subject: Re: [Flashcoders] Question AIR Sqlite api OK, I relplied a bit in a hurry and didnt make myself clear. That is stupid of me, and I am sorry. The situation is like so. I open a connection using OpenAsync. I have listeners listening to the Open event. When that is fired, I response with a method that creates 3 tables in one go, see code below. I keep getting an error, also shown below. If in the whole story I use open instead of openAsync, everything works perfect. I have now idea why that is?? Error: Error #3105: Operation is only allowed if a connection has an open transaction. at Error$/throwError() at flash.data::SQLConnection/commit() at classes.models::SQLProxy/createDatabase()[/Users/Jiri/Documents/_Flash/SmsApp/SmsApplication/src/classes/models/SQLProxy.as:128] Debug session terminated. private function createDatabase(e:Event):void { Sql_conn.addEventListener(SQLEvent.COMMIT , onDatabaseCreated); Sql_conn.begin(); var createTable:SQLStatement = new SQLStatement() createTable.sqlConnection = Sql_conn createTable.text = 'CREATE TABLE contacts (index_id INTEGER PRIMARY KEY , name TEXT , phone NUMBER )'; createTable.execute(); var createErrors:SQLStatement = new SQLStatement() createErrors.sqlConnection = Sql_conn createErrors.text = 'CREATE TABLE errors (index_id INTEGER PRIMARY KEY , error_id INTEGER , type TEXT )'; createErrors.execute(); var createArchive:SQLStatement = new SQLStatement() createArchive.sqlConnection = Sql_conn createArchive.text = 'CREATE TABLE sms_archive (index_id INTEGER PRIMARY KEY , sms TEXT , receiver NUMBER , sender NUMBER )'; createArchive.execute(); Sql_conn.commit(); } Muzak wrote: Then I'm not sure I understand what your problem is. You said it works when using openAsync().. The weird thing is that when I use openAsync instead of open, it does work? - Original Message - From: "Jiri Heitlager" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Thursday, April 17, 2008 10:52 PM Subject: Re: [Flashcoders] Question AIR Sqlite api weird...I will have to look into that and see if there is a work around, because I would really like to work with openAsync. J. Muzak wrote: Because when adding listeners you are implying asynchronous mode. In other words, as soon as you add listeners, you have to use openAsync(). I've found the use of synchronous mode to be alot easier. regards, Muzak ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question AIR Sqlite api
OK, I relplied a bit in a hurry and didnt make myself clear. That is stupid of me, and I am sorry. The situation is like so. I open a connection using OpenAsync. I have listeners listening to the Open event. When that is fired, I response with a method that creates 3 tables in one go, see code below. I keep getting an error, also shown below. If in the whole story I use open instead of openAsync, everything works perfect. I have now idea why that is?? Error: Error #3105: Operation is only allowed if a connection has an open transaction. at Error$/throwError() at flash.data::SQLConnection/commit() at classes.models::SQLProxy/createDatabase()[/Users/Jiri/Documents/_Flash/SmsApp/SmsApplication/src/classes/models/SQLProxy.as:128] Debug session terminated. private function createDatabase(e:Event):void { Sql_conn.addEventListener(SQLEvent.COMMIT , onDatabaseCreated); Sql_conn.begin(); var createTable:SQLStatement = new SQLStatement() createTable.sqlConnection = Sql_conn createTable.text = 'CREATE TABLE contacts (index_id INTEGER PRIMARY KEY , name TEXT , phone NUMBER )'; createTable.execute(); var createErrors:SQLStatement = new SQLStatement() createErrors.sqlConnection = Sql_conn createErrors.text = 'CREATE TABLE errors (index_id INTEGER PRIMARY KEY , error_id INTEGER , type TEXT )'; createErrors.execute(); var createArchive:SQLStatement = new SQLStatement() createArchive.sqlConnection = Sql_conn createArchive.text = 'CREATE TABLE sms_archive (index_id INTEGER PRIMARY KEY , sms TEXT , receiver NUMBER , sender NUMBER )'; createArchive.execute(); Sql_conn.commit(); } Muzak wrote: Then I'm not sure I understand what your problem is. You said it works when using openAsync().. The weird thing is that when I use openAsync instead of open, it does work? - Original Message - From: "Jiri Heitlager" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Thursday, April 17, 2008 10:52 PM Subject: Re: [Flashcoders] Question AIR Sqlite api weird...I will have to look into that and see if there is a work around, because I would really like to work with openAsync. J. Muzak wrote: Because when adding listeners you are implying asynchronous mode. In other words, as soon as you add listeners, you have to use openAsync(). I've found the use of synchronous mode to be alot easier. regards, Muzak ___ 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] Question AIR Sqlite api
weird...I will have to look into that and see if there is a work around, because I would really like to work with openAsync. J. Muzak wrote: Because when adding listeners you are implying asynchronous mode. In other words, as soon as you add listeners, you have to use openAsync(). I've found the use of synchronous mode to be alot easier. regards, Muzak - Original Message - From: "Jiri Heitlager" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Wednesday, April 16, 2008 5:02 PM Subject: [Flashcoders] Question AIR Sqlite api I have a question about SQLite and AIR. Does anybody know why I get this error, becuase the connection is open? I put the code below. The weird thing is that when I use openAsync instead of open, it does work? Error: Error #3105: Operation is only allowed if a connection has an open transaction. at Error$/throwError() at flash.data::SQLConnection/commit() at classes.models::SQLProxy/createDatabase()[/Users/Jiri/Documents/_Flash/SmsApp/SmsApplication/src/classes/models/SQLProxy.as:128] Debug session terminated. protected function build():void { Sql_db = File.applicationDirectory.resolvePath('TESTER.db') var exists:Boolean = Sql_db.exists if ( exists ) { Sql_conn.addEventListener(SQLEvent.OPEN , onDBStatementOpenResult); }else { Sql_conn.addEventListener(SQLEvent.OPEN , createDatabase); } Sql_conn.openAsync( Sql_db ) } private function createDatabase(e:Event):void { Sql_conn.addEventListener(SQLEvent.COMMIT , onDatabaseCreated); Sql_conn.begin(); var createTable:SQLStatement = new SQLStatement() createTable.sqlConnection = Sql_conn createTable.text = 'CREATE TABLE contacts (index_id INTEGER PRIMARY KEY , name TEXT , phone NUMBER )'; createTable.execute(); var createErrors:SQLStatement = new SQLStatement() createErrors.sqlConnection = Sql_conn createErrors.text = 'CREATE TABLE errors (index_id INTEGER PRIMARY KEY , error_id INTEGER , type TEXT )'; createErrors.execute(); var createArchive:SQLStatement = new SQLStatement() createArchive.sqlConnection = Sql_conn createArchive.text = 'CREATE TABLE sms_archive (index_id INTEGER PRIMARY KEY , sms TEXT , receiver NUMBER , sender NUMBER )'; createArchive.execute(); Sql_conn.commit(); } ___ 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] Question AIR Sqlite api
Morten, i just burst my own bubble. It appears not to be working after all. It seems the line Sql_conn.openAsync( Sql_db ) in the build() method is the problem, becuase when I change it to Sql_conn.open( Sql_db ) everything works fine. Do you have any other suggestions? Jiri Morten Barklund wrote: Hi Jiri, I believe it is due to the default lock type. The default lock type (DEFERRED) description says: * SQLTransactionLockType.DEFERRED indicates that a lock is not acquired until the first read or write operation. And since a "CREATE" is technically neither a data read or data write, but a scheme altering method, it could be the cause. Try changing the lock method be explicitly specifying EXCLUSIVE as a parameter to begin(): Sql_conn.begin(SQLTransactionLockType.EXCLUSIVE); Hope that helps, Regards, Morten Barklund -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jiri Heitlager Sent: Wednesday, April 16, 2008 5:02 PM To: Flash Coders List Subject: [Flashcoders] Question AIR Sqlite api I have a question about SQLite and AIR. Does anybody know why I get this error, becuase the connection is open? I put the code below. The weird thing is that when I use openAsync instead of open, it does work? Error: Error #3105: Operation is only allowed if a connection has an open transaction. at Error$/throwError() at flash.data::SQLConnection/commit() at classes.models::SQLProxy/createDatabase()[/Users/Jiri/Documents/_Flash/SmsApp/SmsApplication/src/classes/models/SQLProxy.as:128] Debug session terminated. protected function build():void { Sql_db = File.applicationDirectory.resolvePath('TESTER.db') var exists:Boolean = Sql_db.exists if ( exists ) { Sql_conn.addEventListener(SQLEvent.OPEN , onDBStatementOpenResult); }else { Sql_conn.addEventListener(SQLEvent.OPEN , createDatabase); } Sql_conn.openAsync( Sql_db ) } private function createDatabase(e:Event):void { Sql_conn.addEventListener(SQLEvent.COMMIT , onDatabaseCreated); Sql_conn.begin(); var createTable:SQLStatement = new SQLStatement() createTable.sqlConnection = Sql_conn createTable.text = 'CREATE TABLE contacts (index_id INTEGER PRIMARY KEY , name TEXT , phone NUMBER )'; createTable.execute(); var createErrors:SQLStatement = new SQLStatement() createErrors.sqlConnection = Sql_conn createErrors.text = 'CREATE TABLE errors (index_id INTEGER PRIMARY KEY , error_id INTEGER , type TEXT )'; createErrors.execute(); var createArchive:SQLStatement = new SQLStatement() createArchive.sqlConnection = Sql_conn createArchive.text = 'CREATE TABLE sms_archive (index_id INTEGER PRIMARY KEY , sms TEXT , receiver NUMBER , sender NUMBER )'; createArchive.execute(); Sql_conn.commit(); } ___ 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] Question AIR Sqlite api
Perfect that was it. Thank you Morten. Jiri Morten Barklund wrote: Hi Jiri, I believe it is due to the default lock type. The default lock type (DEFERRED) description says: * SQLTransactionLockType.DEFERRED indicates that a lock is not acquired until the first read or write operation. And since a "CREATE" is technically neither a data read or data write, but a scheme altering method, it could be the cause. Try changing the lock method be explicitly specifying EXCLUSIVE as a parameter to begin(): Sql_conn.begin(SQLTransactionLockType.EXCLUSIVE); Hope that helps, Regards, Morten Barklund -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jiri Heitlager Sent: Wednesday, April 16, 2008 5:02 PM To: Flash Coders List Subject: [Flashcoders] Question AIR Sqlite api I have a question about SQLite and AIR. Does anybody know why I get this error, becuase the connection is open? I put the code below. The weird thing is that when I use openAsync instead of open, it does work? Error: Error #3105: Operation is only allowed if a connection has an open transaction. at Error$/throwError() at flash.data::SQLConnection/commit() at classes.models::SQLProxy/createDatabase()[/Users/Jiri/Documents/_Flash/SmsApp/SmsApplication/src/classes/models/SQLProxy.as:128] Debug session terminated. protected function build():void { Sql_db = File.applicationDirectory.resolvePath('TESTER.db') var exists:Boolean = Sql_db.exists if ( exists ) { Sql_conn.addEventListener(SQLEvent.OPEN , onDBStatementOpenResult); }else { Sql_conn.addEventListener(SQLEvent.OPEN , createDatabase); } Sql_conn.openAsync( Sql_db ) } private function createDatabase(e:Event):void { Sql_conn.addEventListener(SQLEvent.COMMIT , onDatabaseCreated); Sql_conn.begin(); var createTable:SQLStatement = new SQLStatement() createTable.sqlConnection = Sql_conn createTable.text = 'CREATE TABLE contacts (index_id INTEGER PRIMARY KEY , name TEXT , phone NUMBER )'; createTable.execute(); var createErrors:SQLStatement = new SQLStatement() createErrors.sqlConnection = Sql_conn createErrors.text = 'CREATE TABLE errors (index_id INTEGER PRIMARY KEY , error_id INTEGER , type TEXT )'; createErrors.execute(); var createArchive:SQLStatement = new SQLStatement() createArchive.sqlConnection = Sql_conn createArchive.text = 'CREATE TABLE sms_archive (index_id INTEGER PRIMARY KEY , sms TEXT , receiver NUMBER , sender NUMBER )'; createArchive.execute(); Sql_conn.commit(); } ___ 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
[Flashcoders] Question AIR Sqlite api
I have a question about SQLite and AIR. Does anybody know why I get this error, becuase the connection is open? I put the code below. The weird thing is that when I use openAsync instead of open, it does work? Error: Error #3105: Operation is only allowed if a connection has an open transaction. at Error$/throwError() at flash.data::SQLConnection/commit() at classes.models::SQLProxy/createDatabase()[/Users/Jiri/Documents/_Flash/SmsApp/SmsApplication/src/classes/models/SQLProxy.as:128] Debug session terminated. protected function build():void { Sql_db = File.applicationDirectory.resolvePath('TESTER.db') var exists:Boolean = Sql_db.exists if ( exists ) { Sql_conn.addEventListener(SQLEvent.OPEN , onDBStatementOpenResult); }else { Sql_conn.addEventListener(SQLEvent.OPEN , createDatabase); } Sql_conn.openAsync( Sql_db ) } private function createDatabase(e:Event):void { Sql_conn.addEventListener(SQLEvent.COMMIT , onDatabaseCreated); Sql_conn.begin(); var createTable:SQLStatement = new SQLStatement() createTable.sqlConnection = Sql_conn createTable.text = 'CREATE TABLE contacts (index_id INTEGER PRIMARY KEY , name TEXT , phone NUMBER )'; createTable.execute(); var createErrors:SQLStatement = new SQLStatement() createErrors.sqlConnection = Sql_conn createErrors.text = 'CREATE TABLE errors (index_id INTEGER PRIMARY KEY , error_id INTEGER , type TEXT )'; createErrors.execute(); var createArchive:SQLStatement = new SQLStatement() createArchive.sqlConnection = Sql_conn createArchive.text = 'CREATE TABLE sms_archive (index_id INTEGER PRIMARY KEY , sms TEXT , receiver NUMBER , sender NUMBER )'; createArchive.execute(); Sql_conn.commit(); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flash developers Berlin - are there any?
A bit of topic but here goes anyway. I currently moved from Amsterdam to Berlin and I was wondering if there are any Adobe flash groups or flash related gatherings in Berlin. If anybody knows about some place (on/offline) here in Berlin where I can meet some Flash developers I would be really happy to know Thnx Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Dynamic class instantiation
But either way, do you still need to force to compiler to add the class? I am almost sure you do, but asking just in case. Jiri Hans Wichman wrote: btw new eval("_global.myPackage.MyClass")(); does the trick as well. If you please add Assert.assertNotNull (eval("_global.myPackage.MyClass")) etc On Fri, Apr 4, 2008 at 5:01 PM, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Thanx Alan, using a custom error exception is a nice little added touch :) Jiri Alan MacDougall wrote: Here is the class I use for dynamic instantiation. Note that it throws a custom exception type, you'll have to create that type yourself or alter that line of code. I copied the instantiation technique from Drew Cummins at blog.generalrelativity.org. class com.phoenixgp.common.utils.ClassLoader { /* CLASS METHODS */ /** Returns a new instance of a class given the fully-qualified name of the class. The instance will be returned as an Object, so the caller must cast the return value to the expected type or supertype. Original author: Drew Cummins, blog.generalrelativity.org @param classPath The fully-qualified class name, in dot notation @return A new instance of the named class, using its default constructor @throws ClassNotFoundException if the named class is not present. This may indicate an error or omission in the ClassRegistry. */ public static function createInstance(classPath:String):Object { var packageList:Array = classPath.split("."); var constructor:Function = Function(_global); while (packageList.length > 0) { constructor = constructor[String(packageList.shift())]; } if (constructor == null) { throw new ClassNotFoundException(classPath); return null; } return new constructor(); } } ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Dynamic class instantiation
Thanx Alan, using a custom error exception is a nice little added touch :) Jiri Alan MacDougall wrote: Here is the class I use for dynamic instantiation. Note that it throws a custom exception type, you'll have to create that type yourself or alter that line of code. I copied the instantiation technique from Drew Cummins at blog.generalrelativity.org. class com.phoenixgp.common.utils.ClassLoader { /* CLASS METHODS */ /** Returns a new instance of a class given the fully-qualified name of the class. The instance will be returned as an Object, so the caller must cast the return value to the expected type or supertype. Original author: Drew Cummins, blog.generalrelativity.org @param classPath The fully-qualified class name, in dot notation @return A new instance of the named class, using its default constructor @throws ClassNotFoundException if the named class is not present. This may indicate an error or omission in the ClassRegistry. */ public static function createInstance(classPath:String):Object { var packageList:Array = classPath.split("."); var constructor:Function = Function(_global); while (packageList.length > 0) { constructor = constructor[String(packageList.shift())]; } if (constructor == null) { throw new ClassNotFoundException(classPath); return null; } return new constructor(); } } ___ 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] Dynamic class instantiation
OK, I understand, without it the classes dont exist and therefor equals to null. Cheers! Ian Thomas wrote: Are you sure you're embedding the code for the objects into your app? import com.mypack.MyClass; on its own isn't enough: you need a concrete reference to a class for its code to be included in the SWF. Something like: import com.mypack.MyClass; import com.mypack.MyOtherClass; // somewhere in the startup of your app var dummyClasses:Array=[MyClass,MyOtherClass]; should be enough to get them compiled in. HTH, Ian On Fri, Apr 4, 2008 at 1:18 PM, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Thanx Ian, it is still tracing null. Is this even possible to do. How do all the big boys do dynamic instantation. What I basically want to achieve is have a hashMap store different kinds of Command Objects. Instead of instantiation at the start of the app, I would like to instatiated them when the are required. The argument thing I can probably solve by adding a method to the CommandObject interface like addParameters() The type casting is the real problem here. I cant have the commands tracing as null.. Do you or anybody maybe have a solution? Jiri Ian Thomas wrote: On a quick glance, I think this line is breaking it: var constructor:Function = Function( _global ); because _global is not a function. Try: function createInstance ( classPath:String , args:Array) : Object { var packageList:Array = classPath.split( "." ); var constructor:Object = _global ; while( packageList.length> 0 ) { constructor = constructor[String(packageList.shift() )]; } return Function(constructor).apply( constructor , args ) ; } On Fri, Apr 4, 2008 at 12:29 PM, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Hello list, Does anybody know an AS2 version of the AS method getDefinitionByName() I would like to dynamic instantiated classes in AS2 with passing argument to that created instance. I am using a modified script from 'http://blog.generalrelativity.org/' , but the return datatype == null, even when I cast the returned instance. import test.Shape function createInstance ( classPath:String , args:Array) : Object { var packageList:Array = classPath.split( "." ); var constructor:Function = Function( _global ); while( packageList.length> 0 ) { constructor = constructor[ String( packageList.shift() ) ]; } return constructor.apply( constructor , args ) ; } var newShape:Shape = Shape ( createInstance('test.Shape' , [1,2,3]) ) trace( newShape ) //ouputs null, it should output Shape ___ 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 ___ 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] Dynamic class instantiation
Thanx Ian, it is still tracing null. Is this even possible to do. How do all the big boys do dynamic instantation. What I basically want to achieve is have a hashMap store different kinds of Command Objects. Instead of instantiation at the start of the app, I would like to instatiated them when the are required. The argument thing I can probably solve by adding a method to the CommandObject interface like addParameters() The type casting is the real problem here. I cant have the commands tracing as null.. Do you or anybody maybe have a solution? Jiri Ian Thomas wrote: On a quick glance, I think this line is breaking it: var constructor:Function = Function( _global ); because _global is not a function. Try: function createInstance ( classPath:String , args:Array) : Object { var packageList:Array = classPath.split( "." ); var constructor:Object = _global ; while( packageList.length> 0 ) { constructor = constructor[String(packageList.shift() )]; } return Function(constructor).apply( constructor , args ) ; } On Fri, Apr 4, 2008 at 12:29 PM, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Hello list, Does anybody know an AS2 version of the AS method getDefinitionByName() I would like to dynamic instantiated classes in AS2 with passing argument to that created instance. I am using a modified script from 'http://blog.generalrelativity.org/' , but the return datatype == null, even when I cast the returned instance. import test.Shape function createInstance ( classPath:String , args:Array) : Object { var packageList:Array = classPath.split( "." ); var constructor:Function = Function( _global ); while( packageList.length> 0 ) { constructor = constructor[ String( packageList.shift() ) ]; } return constructor.apply( constructor , args ) ; } var newShape:Shape = Shape ( createInstance('test.Shape' , [1,2,3]) ) trace( newShape ) //ouputs null, it should output Shape ___ 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
[Flashcoders] Dynamic class instantiation
Hello list, Does anybody know an AS2 version of the AS method getDefinitionByName() I would like to dynamic instantiated classes in AS2 with passing argument to that created instance. I am using a modified script from 'http://blog.generalrelativity.org/' , but the return datatype == null, even when I cast the returned instance. import test.Shape function createInstance ( classPath:String , args:Array) : Object { var packageList:Array = classPath.split( "." ); var constructor:Function = Function( _global ); while( packageList.length> 0 ) { constructor = constructor[ String( packageList.shift() ) ]; } return constructor.apply( constructor , args ) ; } var newShape:Shape = Shape ( createInstance('test.Shape' , [1,2,3]) ) trace( newShape ) //ouputs null, it should output Shape ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] how to check if child exists
From the help files and modified a bit. It is probably more efficient to keep track of names and the do a getChildByName(string) function traceDisplayList(container:DisplayObjectContainer, DispObjToCheck:DisplayObject) : Boolean { var child:DisplayObject; for (var i:uint=0; i < container.numChildren; i++) { child = container.getChildAt(i); if(child == DispObjToCheck){ //found it and break out of the loop return true; } if (container.getChildAt(i) is DisplayObjectContainer) { traceDisplayList(DisplayObjectContainer(child), DispObjToCheck) } } return false } Jiri Allandt Bik-Elliott (Receptacle) wrote: that said, i'd still like to know how to determine if a display object is in the current display list? thanks a On 2 Apr 2008, at 16:35, Kenneth Kawamoto wrote: Place outside of the function -> private var eventList:Sprite; Kenneth Kawamoto http://www.materiaprima.co.uk/ Allandt Bik-Elliott (Receptacle) wrote: hmmm - i'm a little stuck on this i'm trying to create a pop-up (will tween but i want to get it working first) but i want it to kill any previous one that's up - how would i go about this please? here's my current code: CODE private function createEventList(pbList_xl:XMLList):void { if (this.contains(eventList)) removeChild(eventList); // remove previous eventList if it's available - this is the bit that needs fixing var listLength:int = pbList_xl.length(); var listentryHeight:int = 15; var listHeight:int = listLength * listentryHeight; var listWidth:int= 50; var mousePoint:Point= new Point(root.mouseX, root.mouseY); // will tween from this point to a central point on the stage var eventList:Sprite = new Sprite(); eventList.graphics.beginFill(commonGrey, 1); eventList.graphics.drawRoundRect(0, 0, listWidth, listHeight, 10); eventList.x = mousePoint.x; eventList.y = mousePoint.y; addChild(eventList); } /CODE hope you can help a Allandt Bik-Elliott thefieldcomic.com e [EMAIL PROTECTED] ___ 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] Some feedback on a coding design question
Thank you for the reply. I will take a look at the state Pattern. Reading your post, I does look a bit like what I proposed. In the state pattern, I would probably create the layout and the types of buttonsets for the panel create in a object. The state of the panel then determines wich state to load and display using composition. Did I understand your comment correctly? Jiri Raymond Simmons wrote: Jiri, Sounds like the state pattern would be helpful here. Define a class for each state of the application. Each class will contain methods for actions the user can take in that state, like selectListItem. When the user takes the given action (ex., selecting a list item), the associated function in the current state is called, and the correct actions are performed. Once those actions are performed, move the application to the new state. Essentially the current state class decides what actions to take in response to user interaction with the application. Thanks, Raymond Simmons - Original Message - From: "Jiri Heitlager" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Tuesday, April 01, 2008 6:03 AM Subject: [Flashcoders] Some feedback on a coding design question Hello List, I am currently building an application that uses panels. The Panels implement a Composite Pattern. The panel holds instances of panelButtonSets class. The panel displays certain sets based on a selected item in the client code. Now my question is, how do I get around a lot of if statements in the panel like so: if(clientcode.selecteditem.type == 1){ panel.addSet("position_panel") panel.addSet("rotation_panel") panel.addSet("edit_panel") }else if(clientcode.selecteditem.type == 2){ //different sets of button sets } etc... One solution I am thinking about is the following, but I would like to get some feedback on this approach. BasicButtonSet() { addSets(new panelButtonSets("position_panel")) addSets(new panelButtonSets("rotation_panel")) } ColorButtonSet() extends BasicButtonSet { addSets(new panelButtonSets("color_panel")) addSets(new panelButtonSets("brightness_panel")) } var basicSet:ButtonSet = new BasicButtonSet(); var colorSet:ButtonSet = new ColorButtonSet(); Then the selected item holds a reference to a certain set that can be loaded into the panel. var set = selectItem.GetButtonSet(); Panel.loadSetObject(set ) { for every set in the parameter set, call its render method and place it at the right position }; The thing in this solution is that every set is allready instantiated and therefore is probably a quit expensive solution? Jiri ___ 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] Some feedback on a coding design question
Hello List, I am currently building an application that uses panels. The Panels implement a Composite Pattern. The panel holds instances of panelButtonSets class. The panel displays certain sets based on a selected item in the client code. Now my question is, how do I get around a lot of if statements in the panel like so: if(clientcode.selecteditem.type == 1){ panel.addSet("position_panel") panel.addSet("rotation_panel") panel.addSet("edit_panel") }else if(clientcode.selecteditem.type == 2){ //different sets of button sets } etc... One solution I am thinking about is the following, but I would like to get some feedback on this approach. BasicButtonSet() { addSets(new panelButtonSets("position_panel")) addSets(new panelButtonSets("rotation_panel")) } ColorButtonSet() extends BasicButtonSet { addSets(new panelButtonSets("color_panel")) addSets(new panelButtonSets("brightness_panel")) } var basicSet:ButtonSet = new BasicButtonSet(); var colorSet:ButtonSet = new ColorButtonSet(); Then the selected item holds a reference to a certain set that can be loaded into the panel. var set = selectItem.GetButtonSet(); Panel.loadSetObject(set ) { for every set in the parameter set, call its render method and place it at the right position }; The thing in this solution is that every set is allready instantiated and therefore is probably a quit expensive solution? Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 MouseEvent target?
I think the best way to learn about Event Bubbling is understanding the Composite desing pattern. This is the pattern the DisplayList is implementing and bubbling will make much more sense when you understand the workings of the Composite Pattern. At least it did for me. Jiri Steven Sacks wrote: IMO, explaining Event Bubbling as the reason the TextField is the target is complicating the immediate solution he needs, which is mouseChildren = false. Yes, it's Event Bubbling that's causing the target to be the TextField. To understand Event Bubbling, read about it in the docs, or better yet, in a book (like Moock's). But, then you MUST do it yourself to learn how it works. If you don't play with it yourself, you will never "get it" no matter how much somebody explains it to you. I'm fully convinced of that. You gotta mess around with it to fully understand why it's so amazingly awesome. ___ 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 to determine value of source code
Thank you all for replying. It really made things clearier and some of the points made I really didn't think of yet, for instance the code libs. I really didnt take the time to develop those into consideration. Seems like a hell of a job to value code, I prefer coding :0 Again thanks, Jiri Ian Thomas wrote: I'd be very careful how you proceed with this, but at the end of the day it's your own judgement. It also rather depends on how much of what you've written for the client is solely for that client - you will never reuse it - or if you're depending on code libraries you've previously developed and plan to continue on developing. With our projects, the price to develop the project is assuming our (extensive) code libraries already exist. So if a client asks for source code, I'll tend to quote them for the project development time + all the time to (re)develop all those libraries (and associated testing etc.). And I'll explain the reasons behind it. At that point they look at the numbers, look uncomfortable, and say 'okay, well, maybe we don't want the source code, then.' :-) Ian On Wed, Mar 26, 2008 at 11:55 AM, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Hello, a client of mine has requested to buy the source code of a project I did for them. I havent really sold any source code yet, so I was wondering if somebody maybe could give me some tips, because I really dont know how to value source code? I was thinking in the line of a percentage of the total project cost, something like 45%?? Thank you, ___ 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
[Flashcoders] How to determine value of source code
Hello, a client of mine has requested to buy the source code of a project I did for them. I havent really sold any source code yet, so I was wondering if somebody maybe could give me some tips, because I really dont know how to value source code? I was thinking in the line of a percentage of the total project cost, something like 45%?? Thank you, ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Decorator Pattern - removing a decorator
Steven, thanks for that helpfull reply. It is funny becuase I was just thinking about the dualism, on the one hand there are these wonderfull elegant design patterns that supposed to make things easier and on the other hand it seems like coding has just became harder ever since when I started applying them. Knowing about them seems sometimes almost a burden. But the absolute elegance of how they can be used, which is reflected in the many articles and books on them, just makes me want to understand them better. And as you say, applying them and failing horribly is a perfect way to get to know their individual intrisic workings. Strategy is the one that I am just now looking into, because the Decorator and the possibilty of not removing them just doesnt make them suitable for the behaviour I was after on that level. I have something like this now. var item = new Item() item.executeModifier() { modifier.execute(item.mc) } item.setModifier(modifier) this.modifier = modifier item.setClip(mc) this.mc = mc Then I will use the Decorator pattern, for decorating (what else) the items. It so happens that some Items contain text that can be edited. class ItemTextDecorator implements itemInterface{ _item:Iteminterface function ItemTextDecorator(item:Iteminterface) { _item = item } function executeModifier() { _item.executeModifier(_item.mc) } function setModifier(modifier) { _item.setModifier(modifier) } function.setClip(mc) this.mc = mc //additional function to set Text and edit text } It feels beautiful to piece things together like this :) >Just understand that you won't understand until > you code yourself into a corner a few times. :) When will it end, if ever? "What you're experiencing is premature enlightenment." - Tyler Durden The Gang of Four specifically warns about this, and it's important to acknowledge that it's happening. When people first learn about design patterns, they will immediately begin looking for places to apply them. They will do this and fail in some particular way, and in doing so, learn more about that design pattern or perhaps one that they don't know of, yet. The issue most people have is trying to solve a problem with a design pattern they just learned without understanding that it isn't an appropriate pattern. But, you have to do it wrong in order to learn why. Prepare to fail and learn from those failures. It will make you a better coder. Your initial hunch is that your problem would best be solved by the Decorator pattern, but it very well may not be. The Decorator pattern has fallen out of favor in recent years, as many people believe it violates good OOP practices. It has its uses, but they're limited. You should continue coding this using Decorator if you like, so you can discover what its limitations are. It sounds like you're already hitting them. It's possible that Strategy and Composition might be useful here, as well. Just understand that you won't understand until you code yourself into a corner a few times. :) ___ 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] Decorator Pattern - removing a decorator
Meinte, i have been doing that for the last 4 years and I am not saying you are wrong, but I get the feeling that I am reinventing the wheel every time. Why not use patterns that have been developed over the last n years and as a result get better maintainable code. I just dont have that god given gift/talent or education that I can just code and discover that I used a pattern. And how can I discover I used a pattern, if I dont know them that well yet. So maybe your right, but personally I dont think it will cut the cake for me, if I want to develop myself as a better programmer and be able to start delivering code that is easy for other programmers to recognize. Am I living in a dream? I am still looking for some feedback about my last post, do you wanna give it a go? Jiri Meinte van't Kruis wrote: it's better to code and accidentally discover you've used a design pattern, than beginning to code thinking you have to use a specifick pattern, but that's just my humble opinion. On Thu, Mar 20, 2008 at 6:08 PM, Jiri Heitlager < [EMAIL PROTECTED]> wrote: I could use another design pattern, but I need to figure out which one then. The application is one where the user can selected certain items and those items are put on a canvas. Then when the user selects the item on the canvas, a panel shows up that allows the item to be rotated, scaled and possible edited ,i.e add text. I thought that the decorator would be perfect for this. Come to think of it maybe it still is. I really dont ever need to remove any decorator that is added do I. Them item starts blank and when the user rotates it, I just add a decorator, rotatorModifier. Then the decorator interface has a method setModifierProperty(key , value), in this case key = "rot" value=number. The decorator component holds a hash and checks if hash["rot"]!=undefined, then adds the rot and the value. Then calls an update method to reflect the property set. Deleting the modifier would be then just setting the hash["rot"] to 0. Does that make sense and I am approaching this in a efficient way. I am quit new to design patterns, but fell in love with there elegance and would like to learn how to implement them as best as possible. Some feedback would be very much appreciated. Jiri Cory Petosky wrote: That's not really how Decorator is meant to work. You could hack around it by exposing the decorated instance in your Decorator interface, digging down to it, and using a bunch of instanceof calls to figure out which is which. I really don't recommend this, though -- instead, use a different design pattern or program architecture. On 3/20/08, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Hello List, i am looking into the decorator pattern for an upcoming AS2 project. I was wondering if the following is possible var com:Component = new Component() com = new decoratorA(com) com = new decoratorB(decA) com = new decoratorC(decB) I cant seem to figure out what I need to do in order to remove let say decB at runtime? I tried a search on the internet, but all the articles about the decorator pattern are about runtime adding, not removing. Can somebody please help me if it is at all possible. Thank you, Jiri ___ 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] Decorator Pattern - removing a decorator
I could use another design pattern, but I need to figure out which one then. The application is one where the user can selected certain items and those items are put on a canvas. Then when the user selects the item on the canvas, a panel shows up that allows the item to be rotated, scaled and possible edited ,i.e add text. I thought that the decorator would be perfect for this. Come to think of it maybe it still is. I really dont ever need to remove any decorator that is added do I. Them item starts blank and when the user rotates it, I just add a decorator, rotatorModifier. Then the decorator interface has a method setModifierProperty(key , value), in this case key = "rot" value=number. The decorator component holds a hash and checks if hash["rot"]!=undefined, then adds the rot and the value. Then calls an update method to reflect the property set. Deleting the modifier would be then just setting the hash["rot"] to 0. Does that make sense and I am approaching this in a efficient way. I am quit new to design patterns, but fell in love with there elegance and would like to learn how to implement them as best as possible. Some feedback would be very much appreciated. Jiri Cory Petosky wrote: That's not really how Decorator is meant to work. You could hack around it by exposing the decorated instance in your Decorator interface, digging down to it, and using a bunch of instanceof calls to figure out which is which. I really don't recommend this, though -- instead, use a different design pattern or program architecture. On 3/20/08, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Hello List, i am looking into the decorator pattern for an upcoming AS2 project. I was wondering if the following is possible var com:Component = new Component() com = new decoratorA(com) com = new decoratorB(decA) com = new decoratorC(decB) I cant seem to figure out what I need to do in order to remove let say decB at runtime? I tried a search on the internet, but all the articles about the decorator pattern are about runtime adding, not removing. Can somebody please help me if it is at all possible. Thank you, Jiri ___ 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] Decorator Pattern - removing a decorator
Hello List, i am looking into the decorator pattern for an upcoming AS2 project. I was wondering if the following is possible var com:Component = new Component() com = new decoratorA(com) com = new decoratorB(decA) com = new decoratorC(decB) I cant seem to figure out what I need to do in order to remove let say decB at runtime? I tried a search on the internet, but all the articles about the decorator pattern are about runtime adding, not removing. Can somebody please help me if it is at all possible. Thank you, Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question on garbage collection
Erik, thanks for clearing that up for me. In retrospect it makes sense that the memory builds up with the trace statement. From now on I will test for memory leak in the standalone player. Jiri EECOLOR wrote: That all looks fine. There is no memory leak in the code you showed here. You do not need to delete tTime as it is declared within the scope of the function and will be marked for deletion as soon as the function is complete. If I run the classes (with the line clockdata = new ClockData() commented out), the memory is stable in the stand alone player. In flash the memory is slowly going up, but that is because we are doing a trace each interval. Note that it takes a few seconds for the memory to be stable. Greetz Erik On 2/18/08, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Erik, it would be something like this: var c:Clock = new Clock(); getTime() setInterval(this , 'getTime' , 1000) function getTime() { var tTime:Time = c.getElepasedTime() trace(tTime.serialize()) delete tTime; // is this neccessary and if so, is tTime = null maybe better ??? } EECOLOR wrote: Could you post the code that actualy calls these methods? Greetz Erik On 2/15/08, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Thanks for your reply Bob, it is for AS2. I read a lot of articles about it and understand the general concept. That is why I post the question. If I understood correctly the posted code should not leave any objects unreferenced and therefor cleared for deleting. But the memory goes up anyway. I tested it with only this two classes instantiated and nothing else. I am hoping somebody can take a look at the code I posted and give me the reassurence that I am doing things correctly. Jiri ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question on garbage collection
Erik, it would be something like this: var c:Clock = new Clock(); getTime() setInterval(this , 'getTime' , 1000) function getTime() { var tTime:Time = c.getElepasedTime() trace(tTime.serialize()) delete tTime; // is this neccessary and if so, is tTime = null maybe better ??? } EECOLOR wrote: Could you post the code that actualy calls these methods? Greetz Erik On 2/15/08, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Thanks for your reply Bob, it is for AS2. I read a lot of articles about it and understand the general concept. That is why I post the question. If I understood correctly the posted code should not leave any objects unreferenced and therefor cleared for deleting. But the memory goes up anyway. I tested it with only this two classes instantiated and nothing else. I am hoping somebody can take a look at the code I posted and give me the reassurence that I am doing things correctly. Jiri ___ 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] Question on garbage collection
Thanks for your reply Bob, it is for AS2. I read a lot of articles about it and understand the general concept. That is why I post the question. If I understood correctly the posted code should not leave any objects unreferenced and therefor cleared for deleting. But the memory goes up anyway. I tested it with only this two classes instantiated and nothing else. I am hoping somebody can take a look at the code I posted and give me the reassurence that I am doing things correctly. Jiri Bob Leisle wrote: Hi Jiri, I'm not sure which AS version you're using but here are some good links on garbage collection in AS3. http://www.bit-101.com/blog/?p=783 http://gskinner.com/blog/archives/2006/06/as3_resource_ma.html http://board.flashkit.com/board/showthread.php?t=756290 32000+ more links can be found by googling, "Flash AS3 garbage collection". hth, Bob Jiri Heitlager wrote: Hello List, I have two classes Time and Clock, see below. To get good encapsulation, in the Time class I added a function called clone(). This returns a copy of the Time instance, instead of a reference to it. Now I run the code, using an interval that calls the Clock.getElepasedTime(). While watching the Memory I can see it build up. Does this mean that with every clone of the Time object it still holds a reference and therefore doesnt get deleted by the garbage collector. Hope somebody can enlighten me.. Jiri class Clock { private var startTime:Number; private var elapsedTime:Time; //constructor method function Clock(tTime:Time) { clockdata = new ClockData() startTime = getTimer(); } public function getElepasedTime() : Time { var elapsedMilliseconds:Number = getTimer() - startTime; var elapsedHours:Number= Math.floor( elapsedMilliseconds / 360); var elapsedSeconds:Number= Math.floor( elapsedMilliseconds / 1000); var elapsedMinutes:Number= Math.floor( elapsedSeconds / 60); elapsedSeconds = elapsedSeconds%60; elapsedMinutes = elapsedMinutes%60; if(elapsedTime == null){ elapsedTime = new Time(elapsedHours , elapsedMinutes , elapsedSeconds) }else{ elapsedTime.hour = elapsedHours; elapsedTime.minute = elapsedMinutes; elapsedTime.second = elapsedSeconds; } return elapsedTime.clone(); } } class Time { private var _hour:Number; private var _minute:Number; private var _second:Number; //constructor method public function Time(hour:Number , minute:Number , second:Number) { _hour = hour _minute = minute _second = second } public function get hour() : Number { return _hour } public function set hour(nHour:Number) : Void { _hour = nHour } public function get minute() : Number { return _minute } public function set minute(nMinute:Number) : Void { _minute = nMinute; } public function get second() : Number { return _second } public function set second(nSecond:Number) : Void { _second = nSecond; } public function serialize() : String { var minutePrefix:String = ( (_minute < 10)? '0' : ''); var secondPrefix:String = ( (_second < 10)? '0' : ''); var hourPrefix:String= ( (_hour < 10)? '0' : ''); return String(hourPrefix+_hour+':'+minutePrefix+_minute+':'+secondPrefix+_second); } public function clone() : Time { return new Time(_hour , _minute , _second) } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Question on garbage collection
Hello List, I have two classes Time and Clock, see below. To get good encapsulation, in the Time class I added a function called clone(). This returns a copy of the Time instance, instead of a reference to it. Now I run the code, using an interval that calls the Clock.getElepasedTime(). While watching the Memory I can see it build up. Does this mean that with every clone of the Time object it still holds a reference and therefore doesnt get deleted by the garbage collector. Hope somebody can enlighten me.. Jiri class Clock { private var startTime:Number; private var elapsedTime:Time; //constructor method function Clock(tTime:Time) { clockdata = new ClockData() startTime = getTimer(); } public function getElepasedTime() : Time { var elapsedMilliseconds:Number = getTimer() - startTime; var elapsedHours:Number = Math.floor( elapsedMilliseconds / 360); var elapsedSeconds:Number = Math.floor( elapsedMilliseconds / 1000); var elapsedMinutes:Number = Math.floor( elapsedSeconds / 60); elapsedSeconds = elapsedSeconds%60; elapsedMinutes = elapsedMinutes%60; if(elapsedTime == null){ elapsedTime = new Time(elapsedHours , elapsedMinutes , elapsedSeconds) }else{ elapsedTime.hour = elapsedHours; elapsedTime.minute = elapsedMinutes; elapsedTime.second = elapsedSeconds; } return elapsedTime.clone(); } } class Time { private var _hour:Number; private var _minute:Number; private var _second:Number; //constructor method public function Time(hour:Number , minute:Number , second:Number) { _hour = hour _minute = minute _second = second } public function get hour() : Number { return _hour } public function set hour(nHour:Number) : Void { _hour = nHour } public function get minute() : Number { return _minute } public function set minute(nMinute:Number) : Void { _minute = nMinute; } public function get second() : Number { return _second } public function set second(nSecond:Number) : Void { _second = nSecond; } public function serialize() : String { var minutePrefix:String = ( (_minute < 10) ? '0' : ''); var secondPrefix:String = ( (_second < 10) ? '0' : ''); var hourPrefix :String = ( (_hour < 10) ? '0' : ''); return String(hourPrefix+_hour+':'+minutePrefix+_minute+':'+secondPrefix+_second); } public function clone() : Time { return new Time(_hour , _minute , _second) } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Step rouding numbers
Hans, thank you for the very clear answer. I have a feeling now why things went wrong and will work with your suggested psuedo code. Thank you again. Jiri Hans Wichman wrote: Hi Jiri, well not really, since 100 / 0.15 is not a whole number, it is 666,6 etc. Although this is a great number home to many a great song, 100.05 is divisible by 0.15 hence the result. If you really want to do what you want you should deduct the Math.floorfirst, perform the step calculations on the remainder and add the deducted Math.floor, eg in pseudo: 100,2 is split into 100 and 0.2 100 + Math.round (0.2/0.15)*0.15 trace(100 + Math.round (0.2/0.15)*0.15); Im not sure you wont get rounding errors though... greetz JC On Jan 8, 2008 12:08 PM, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Hmm, i understand the logic now, but there is this small thing I dont understand Math.round(100.2/0.15)*0.15) results in 100.2 it should actually be 100.15... Is it possible to get this result, can somebody please help me out (again) Jiri Hans Wichman wrote: Hi, sonething like: trace (Math.round(100.1/0.15)*0.15); trace (Math.round(100.35/0.5)*0.5); trace (Math.round(100.175/0.125)*0.125); greetz JC On Jan 8, 2008 10:05 AM, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Hello, i am not at all a mathematic/calculus wonder and would therefore like some help with the following. I need to round numbers up or down to a certain step size. As an example: nVal = 100,1 nStep = 0,15 outcome = 225,15 nVal = 100,35 nStep = 0,5 outcome = 100,5 nVal = 100,175 nStep = 0,125 outcome = 100,125 I just havent got a clue on how to approach this problem. Can somebody shed some light on a possible way to go? Thank you, Jiri ___ 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 ___ 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] Step rouding numbers
Hmm, i understand the logic now, but there is this small thing I dont understand Math.round(100.2/0.15)*0.15) results in 100.2 it should actually be 100.15... Is it possible to get this result, can somebody please help me out (again) Jiri Hans Wichman wrote: Hi, sonething like: trace (Math.round(100.1/0.15)*0.15); trace (Math.round(100.35/0.5)*0.5); trace (Math.round(100.175/0.125)*0.125); greetz JC On Jan 8, 2008 10:05 AM, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Hello, i am not at all a mathematic/calculus wonder and would therefore like some help with the following. I need to round numbers up or down to a certain step size. As an example: nVal = 100,1 nStep = 0,15 outcome = 225,15 nVal = 100,35 nStep = 0,5 outcome = 100,5 nVal = 100,175 nStep = 0,125 outcome = 100,125 I just havent got a clue on how to approach this problem. Can somebody shed some light on a possible way to go? Thank you, Jiri ___ 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] Step rouding numbers
Great, that seems to work like a charm. Thanks a million.. Jiri Hans Wichman wrote: Hi, sonething like: trace (Math.round(100.1/0.15)*0.15); trace (Math.round(100.35/0.5)*0.5); trace (Math.round(100.175/0.125)*0.125); greetz JC On Jan 8, 2008 10:05 AM, Jiri Heitlager <[EMAIL PROTECTED]> wrote: Hello, i am not at all a mathematic/calculus wonder and would therefore like some help with the following. I need to round numbers up or down to a certain step size. As an example: nVal = 100,1 nStep = 0,15 outcome = 225,15 nVal = 100,35 nStep = 0,5 outcome = 100,5 nVal = 100,175 nStep = 0,125 outcome = 100,125 I just havent got a clue on how to approach this problem. Can somebody shed some light on a possible way to go? Thank you, Jiri ___ 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
[Flashcoders] Step rouding numbers
Hello, i am not at all a mathematic/calculus wonder and would therefore like some help with the following. I need to round numbers up or down to a certain step size. As an example: nVal = 100,1 nStep = 0,15 outcome = 225,15 nVal = 100,35 nStep = 0,5 outcome = 100,5 nVal = 100,175 nStep = 0,125 outcome = 100,125 I just havent got a clue on how to approach this problem. Can somebody shed some light on a possible way to go? Thank you, Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Step rouding numbers
Hello, i am not at all a mathematic/calculus wonder and would therefore like some help with the following. I need to round numbers up or down to a certain step size. As an example: nVal = 100,1 nStep = 0,15 outcome = 225,15 nVal = 100,35 nStep = 0,5 outcome = 100,5 nVal = 100,175 nStep = 0,125 outcome = 100,125 I just havent got a clue on how to approach this problem. Can somebody shed some light on a possible way to go? Thank you, Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] AS2 loadvars - sends onLoad=[type Function]
Hello, good to see that the list is back and running again! I have a question about Loadvars object. The following code bellow sends all the data nicely to a server, but it also send the loadVars.onLoad method. That is on the server this is received: unit=V&name=Input voltage&value=24&step=0.25&max=35&min=0&onLoad=[type Function] is there someway that I can get ride of this onLoad thing? Thank you, Jiri private function sendData():Void { var req:LoadVars = new LoadVars(); req.onLoad = Proxy.create( this , onDataReceived , req); var url:String = $SERVER_ROOT_URL; url+='paneltype='+rootVars.paneltype url+='&tabnr='+rootVars.tabnr url+='&panelnr='+rootVars.panelnr url+='&variablenr='+rootVars.variablenr url+='&value='+rootVars.value url+='&busid='+rootVars.busid req.sendAndLoad(url, req , "POST"); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Isometic game - zdepth managing for multiple movable characters
Thanks everybody for their explanation. I am going to try to implement the z-depth manager as discussed. Jiri Ian Thomas wrote: Hi Jiri, The key here is that you can have 'empty' depth levels i.e. an object at depth 5 and an object at depth 8 with nothing at depth 6 and 7. You can make the depth dependent on the actual pixel _y value of the object rather than on the y value of the tile - so depth=_y (or more likely depth=startDepth+_y, because you'll want things behind your objects - like the tiles). To handle multiple objects etc. - from memory, when I last did this I wrote a depth manager that did something like: - Reserve 100 'slots' per_ y-value (so you could have up to 100 objects sharing the same vertical position) - Assign a depth value that combines the y value with the first free slot number - so (something like) depth=startDepth+y*100+freeSlotNumberForThisYValue That's not exact, but you get the idea. That way, generally you just need to assign a depth to an object, you don't need to shuffle all the other objects around. IIRC, it worked rather well. Hope that's helpful. Ian On 9/11/07, Jiri Heitlager <[EMAIL PROTECTED]> wrote: He guys (and maybe girls), I have a question that is related to z-depth managing in an isometric game, that needs to be made in AS2. In the game I basically use one abstract layer that holds all the tiles and their information wheter or not a movable object is allowed to 'walk' over the tile. Then there is another layer that holds all the objects, so that includes a player, a computer controlled player and enviormental objects that players cannot walk through being the visualization of the first layer. Every object gets a z-depth assigned. For the players the zdpeth need to be set based on the tile they are at. This way the players can walk 'around' the enviorment objects. For the z-depth calculation I use the tile grid x and y plus the width of the row, this generates an unique z-depth number and makes sure that the higher the y, the bigger the z-depth , thus objects appear infront of objects with a lower y index. Here is the problem I am trying to figure out. If two movable objects, or even three of them are at the same time on the same tile, then the above described z-depth managing will fail. How do I deal with that? Then another question I have is this. Does every movable object needs to check/swap z-depth on every frame. Wouldn't that be to CPU intensive? I really hope someone can clear this up for me. thank you in advance, Jiri ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@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] TWeener custom class property tweening
Thanks Zeh, that is exactly what I want to achieve. My apologize that I didn't tested the most obvious first :) Jiri Zeh Fernando wrote: Hey Jiri, I'm not sure if I'm getting it right; but if you want to animate a property of a class, you don't need to register anything. The "special properties" are meant only to wrap around features that aren't directly acessible (like data that is only acessible through methods and functions.. gotoAndStop() to change a Movieclip's _currentFrame for example). If you want to tween a numeric property that's already acessible, you can tween it directly, with no special property, wrapping function, or anything. Ie: Tweener.addTween(this, {x:10, time:.5}); Zeh Jiri Heitlager wrote: I tried to use the Tweener class to 'animate' a property of a class, but it doenst seem to work. Can somebody point me out, what it is I am doing wrong. Here is my code /** * ... * @author Default * @version 0.1 */ import caurina.transitions.Tweener; import org.dadata.utils.Proxy; class Test.test{ private var x:Number = 0; public function test() { Tweener.registerSpecialProperty("_xpos", Proxy.create(this , _xpos_get), Proxy.create(this ,_xpos_set)); Tweener.addTween(this, {_xpos:10, time:.5}); } public function _xpos_get(p_obj:Object) : Number { trace('getting x' + this.x) return p_obj.x } public function _xpos_set(p_obj:Object, p_value:Number):Void { p_obj.x = p_value trace('this x :: '+p_value) trace('this x :: '+p_obj.x) } } Thank you. Jiri ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@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] TWeener custom class property tweening
I tried to use the Tweener class to 'animate' a property of a class, but it doenst seem to work. Can somebody point me out, what it is I am doing wrong. Here is my code /** * ... * @author Default * @version 0.1 */ import caurina.transitions.Tweener; import org.dadata.utils.Proxy; class Test.test{ private var x:Number = 0; public function test() { Tweener.registerSpecialProperty("_xpos", Proxy.create(this , _xpos_get), Proxy.create(this ,_xpos_set)); Tweener.addTween(this, {_xpos:10, time:.5}); } public function _xpos_get(p_obj:Object) : Number { trace('getting x' + this.x) return p_obj.x } public function _xpos_set(p_obj:Object, p_value:Number):Void { p_obj.x = p_value trace('this x :: '+p_value) trace('this x :: '+p_obj.x) } } Thank you. Jiri ___ 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] Isometic game - zdepth managing for multiple movablecharacters
Thanks Joshua, I allready went through some of their stuff. I posted exactly those things that weren't adressed in the articles I wrote on Kirupa. J Joshua Sera wrote: kirupa.com has a ton of tutorials on Isometric stuff that I've found very useful. http://www.kirupa.com/developer/flash/index.htm#Isometry --- Jobe Makar <[EMAIL PROTECTED]> wrote: Hi Jiri, I've pasted below the isometric class that I wrote for one of my game books. It is a handy class that allows for easy translation between screen coords, and iso coords. In addition, it handles tile-based dept calculations as well. You asked how do you handle multiple per tile - check out the leeway variable in this class. If leeway is set to 5, and calculateDepth returns 1230, then you can place your item anywhere from 1230 to 1235. You just have to keep track of which depth is being used. You don't have to swap depths of every item every frame. You just have to swap depths on any items that has just changed tiles. There are two limitations with this technique: 1) It does the depth calculations based on the size of the map. For most uses this is fine. But if your map is like 5000 X 5000 tiles, then this depth calculation can probably quickly get too high for Flash to handle without further modifications. 2) A sortable item needs to be no bigger than a tile. If the base of this item takes up multiple tiles (like a couch, or bench, etc) then you need to either slice it up into tile-sized pieces, or change the depth approach. The approach that you use if you are not slicing it up does require resorting lots of item depths frequently rather than using just using unique depths per tile. //Isometric CLASS class com.electrotank.world.Isometric { private var maxx:Number; private var maxz:Number; private var theta:Number; private var alpha:Number; private var sinTheta:Number; private var cosTheta:Number; private var sinAlpha:Number; private var cosAlpha:Number; var leeway:Number; public function Isometric(x:Number, z:Number) { maxx = x; maxz = z; theta = 30; alpha = 45; theta *= Math.PI/180; alpha *= Math.PI/180; sinTheta = Math.sin(theta); cosTheta = Math.cos(theta); sinAlpha = Math.sin(alpha); cosAlpha = Math.cos(alpha); leeway = 5; } public function mapToScreen(xpp:Number, ypp:Number, zpp:Number):Array { var yp:Number = ypp; var xp:Number = xpp*cosAlpha+zpp*sinAlpha; var zp:Number = zpp*cosAlpha-xpp*sinAlpha; var x:Number = xp; var y:Number = yp*cosTheta-zp*sinTheta; return [x, y]; } public function mapToIsoWorld(screenX:Number, screenY:Number):Array { var z:Number = (screenX/cosAlpha-screenY/(sinAlpha*sinTheta))*(1/(cosAlpha/sinAlpha+sinAlpha/cosAlpha)); var x:Number = (1/cosAlpha)*(screenX-z*sinAlpha); return [x, z]; } public function setLeeway(value:Number) { leeway = value; } public function calculateDepth(x:Number, y:Number, z:Number):Number { var x:Number = Math.abs(x)*leeway; var y:Number = Math.abs(y); var z:Number = Math.abs(z)*leeway; var a:Number = maxx; var b:Number = maxz; var floor:Number = a*(b-1)+x; var depth:Number = a*(z-1)+x+floor*y; return depth; } } Jobe Makar http://www.electrotank.com http://www.electro-server.com phone: 252-627-8026 mobile: 919-609-0408 fax: 919-882-1121 - Original Message ----- From: "Jiri Heitlager" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 11, 2007 8:50 AM Subject: [Flashcoders] Isometic game - zdepth managing for multiple movablecharacters He guys (and maybe girls), I have a question that is related to z-depth managing in an isometric game, that needs to be made in AS2. In the game I basically use one abstract layer that holds all the tiles and their information wheter or not a movable object is allowed to 'walk' over the tile. Then there is another layer that holds all the objects, so that includes a player, a computer controlled player and enviormental objects that players cannot walk through being the visualization of the first layer. Every object gets a z-depth assigned. For the players the zdpeth need to be set based on the tile they are at. This way the players can walk 'around' the enviorment objects. For the z-depth calculation I use the tile grid x and y plus the width of the row, this generates an unique z-depth number and makes sure that the higher the y, the bigger the z-depth , thus objects appear infront of objects with a lower y index. Here is the problem I am trying to figure out. If two movable objects, or even three of them are at the same time on the same tile, then the above described z-depth managing will fail. How do I deal with that? Then another question I have is this. Does every movable object needs to check/swap z-depth on every frame. Wouldn't that be to CPU intensive? I really hope someone can clear this up for me. thank you in advance
Re: [Flashcoders] Isometic game - zdepth managing for multiple movablecharacters
First off, thanks that you people took the time to help me out and thank you Jobe for sending me your class. I appreciate that, but would really like to program the game myself from scratch to get a full understanding on how games like this are made. I am reading all the replies and trying to see if I am understand them correctly. Basically I have two options. Give every movable object the depth of the screen _y value and make sure that objects can never be on the same _y position. Second option. If the movable objects only move one tile at a time, meaning that their screen _y position could sometimes be the same, I need to assign for every tile a range of n numbers of depth that can be taken. Then check for an available depth within each tiles indivudual range of depth , when a movable objects is on a tile. @Danny, could please explain your comment on subsorting a bit more. I am not quit sure if I understand it. > However, you can optimise quite a bit > by sub-sorting - if you know that object 1 is in the rear 16 tiles and > object 2 is in the front 16 tiles, no need to check the z-order. Jiri Danny Kodicek wrote: Every object gets a z-depth assigned. For the players the zdpeth need to be set based on the tile they are at. This way the players can walk 'around' the enviorment objects. For the z-depth calculation I use the tile grid x and y plus the width of the row, this generates an unique z-depth number and makes sure that the higher the y, the bigger the z-depth , thus objects appear infront of objects with a lower y index. Here is the problem I am trying to figure out. If two movable objects, or even three of them are at the same time on the same tile, then the above described z-depth managing will fail. How do I deal with that? If this is possible in your game then you'll need to either store sub-tile positions and z-sort further on those (you could, for example, assign ten z-slots per tile to ensure that you have more space) or randomly choose one to be in front of the other (if there's only one position per tile, then it doesn't matter which one gets drawn in front). Then another question I have is this. Does every movable object needs to check/swap z-depth on every frame. Wouldn't that be to CPU intensive? Depends how you do it. If there's only a few movable objects, this shouldn't be particularly hard on the machine - Flash isn't the fastest thing in the world, but it's fast enough for that. However, you can optimise quite a bit by sub-sorting - if you know that object 1 is in the rear 16 tiles and object 2 is in the front 16 tiles, no need to check the z-order. Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Isometic game - zdepth managing for multiple movable characters
He guys (and maybe girls), I have a question that is related to z-depth managing in an isometric game, that needs to be made in AS2. In the game I basically use one abstract layer that holds all the tiles and their information wheter or not a movable object is allowed to 'walk' over the tile. Then there is another layer that holds all the objects, so that includes a player, a computer controlled player and enviormental objects that players cannot walk through being the visualization of the first layer. Every object gets a z-depth assigned. For the players the zdpeth need to be set based on the tile they are at. This way the players can walk 'around' the enviorment objects. For the z-depth calculation I use the tile grid x and y plus the width of the row, this generates an unique z-depth number and makes sure that the higher the y, the bigger the z-depth , thus objects appear infront of objects with a lower y index. Here is the problem I am trying to figure out. If two movable objects, or even three of them are at the same time on the same tile, then the above described z-depth managing will fail. How do I deal with that? Then another question I have is this. Does every movable object needs to check/swap z-depth on every frame. Wouldn't that be to CPU intensive? I really hope someone can clear this up for me. thank you in advance, Jiri ___ 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] search engine optimization for flash sites
Robin, maybe this will help. It wont solve all your problems, but could make a solution a bit easier. http://www.asual.com/swfaddress/ Jiri Robin Burrer wrote: Hi there, My client wants to have his website optimized for search engines. I don't know much about this topic. The binary data of a flash file can't obviously be read by a search engine though. I have this idea to create a html site map for my flash page. Basically this site map would have short summaries of all flash pages and links to these pages (e.g. http://myDomain.com/myflashPgae.htm?page =home). The search engines should then be able to find the site map page. Ideally this site page would be generated dynamically. But for now a static page will do. Does anybody have experience with such an approach? Any thoughts? Cheers Robin ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Iterator question
Hello list, i have a page object that contains has a Array that holds pageElements. This is a storage for elements with an iPageElement interface. The page object has an destroy() method. When page.destroy() is called, it will loop trough the page.pageElements Array using an iterator. Every iPageElement broadcasts an onElementKilled message when is has been destroyed. When a pageElement broadcast this message, the page need to continue in deleting the next element in the page.pageElement Array. The callback method onElementKilled in the page instance, searches for the element that has been deleted and then removes it from the page.pageElements Array. This is where i think a problem rises, because if the page.pageElements array is updated during the process, the index does not match the element to remove anymore. How can I solve this potential risk? Another question, the array that is passes into the iterator is a reference to the pageElements Array. Does this mean, that if I delete an element from this array from within the iterator, the page.pageElements array is modified? I hope my question is clear.. thank you in advance. Jiri Below a snippet: private function getPageElementIterator() : Void { return new PageElementIterator(this.pageElements) } //initiated the deleting proces, by starting with the first element. public function destroyPageElements() : Void { destroyElement(this.pageElements[0]); } private function destroyElement(element:iPageElement) : Void { curElement.addEventListener('onElementKilled' , this) curElement.destroy(); } private function onElementKilled(eventObj:Object) : Void { var killElement:iPageElement = eventObj.target; var iter:PageElementIterator = this.getPageElementIterator(); while(iter.hasNext()){ var curElement:iPage = iPage (iter.next()); if(killElement == curElement) { //deleted the element now clear the listener and continue killElement.removeEventListener('onElementKilled' , this) /* * POTENTIAL RISK, if a new element is added, then the index, does not match the right element anymore * * get the current index from the deleted element by checking what * the currentIndex of the iterator is, and remove it from this.pageElements Array */ this.pageElements = this.pageElements.splice((iter.getCurrentIndex() , 0) //get the next element in the iterator array if(iter.hasNext()) this.destroyElement( iPage(iter.next()) ); delete killedElement; break; } } } if(this.pageElements.length == 0){ trace('all page elements have been removed') } } ___ 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] Colin Moock Book - stores in Berlin
Hello, My question has not so much to do with actual coding, so I hope that it is not a problem posting it here. I am currently living in Berlin for a few months and I am looking for a bookstore where I can buy the new Colin Moock book on AS3. If somebody on the list happens to be living in Berlin and knows a shop where I can buy books on computer programming (especially the Moock Book), I would love to know it ? And yes I am aware of amazon and the lot, but I prefer looking into books before buying them ;) Jiri ___ 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: AW: [Flashcoders] Turn image around effect?
Hmmm, i would also really like to know how they did that. It seems to be running in as2 FP8, so that probably rules out papervision. Maybe it is done by Sandt, but I cant figure out how. But then again it could also be done by using mask, couldn't it. Jiri Matthias Dittgen wrote: have you tried to contact their developer directly? ;-) 2007/6/29, Peter Oliver Geller <[EMAIL PROTECTED]>: But when you use the image distortion effect (Bitmap Data) with a two image flip, it´s tricky to program your mask on the point of intersection where the image turns around, because on that moment you display the front and backside and I think group94 use another type of technique which is definitely easier. Hmm or you can really simple do a gradient alpha flow on the two images in an inversely direction? Thanks Peter -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Cedric Muller Gesendet: Freitag, 29. Juni 2007 11:40 An: flashcoders@chattyfig.figleaf.com Betreff: Re: AW: [Flashcoders] Turn image around effect? maybe by creating the illusion of only one image that is front and back ?? My guess is that there are two images flipped in the same time: one from visible to invisible and the other one from invisible to visible hth, Cedric > I know the card flip effect, > but I think its more like the effect Jesse Graupmann posted. > > The question is how ja shows the image backside??? > I have no idea how to combine the image distortion to switch from > front to > backside and vice versa? > > Any ideas? > > Peter > > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Im Auftrag von > Pedro > Taranto > Gesendet: Donnerstag, 28. Juni 2007 19:37 > An: flashcoders@chattyfig.figleaf.com > Betreff: Re: [Flashcoders] Turn image around effect? > > Card Flip Effect: > http://pixelfumes.blogspot.com/2006/07/business-card-flip-effect- > class-with. > html > > --Pedro Taranto > > > Peter Geller escreveu: >> Hi list, >> >> >> >> can somebody give me an answer how this turn around effect was >> made when >> you click on the speech bubble? >> >> >> >> http://www.ja-ik-doe-mee.be/ >> >> >> >> Or is it done with a visual flatted 3D Image made with >> http://www.flashsandy.org/ ? >> >> >> >> >> >> Another nice technique which interests me is used on this side: >> >> http://lab.mathieu-badimon.com/ same technique? >> >> >> >> Maybe some of you have a link for me how this is done? >> >> >> >> Thanks a lot >> >> >> >> Peter >> >> ___ >> Flashcoders@chattyfig.figleaf.com >> To change your subscription options or search the archive: >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> Brought to you by Fig Leaf Software >> Premier Authorized Adobe Consulting and Training >> http://www.figleaf.com >> http://training.figleaf.com >> >> > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@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] Preloading mp3 - onLoad vs GetBytesLoaded()
Hello list, I have a question on preloading mp3's. When I start preloading the mp3 I set the isstreaming to false. Then I check the bytesloaded compared to bytestotal en when that is 100% procent it means all is loaded When I start preloading the sound, I also delegate the function onLoad of the sound Object. I put a trace inside this delegated onLoad method and that fires much later after the 100% loaded is fired? I noticed that when the mp3 is 100% loaded according to the BytesLoaded, and I start the sound by creating a new sound object and using the same url as the preloaded mp3, but setting the streaming flag to true, it stills takes some time, as it seems to buffer the sound. Shouldn't is start immediatedly, as it was preloaded before and is resisiding in the browser cache? How is this possible and what is the best way then to preload a mp3. Many thanx Jiri ___ 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] Grid / Math - getting neighbouring positions
I'll take it ;) thanks for everybody's help. Jiri Merrill, Jason wrote: That is a nice solution, but it leaves me with the problem that starting from one point (3,2) it only produces a set of points of ring directly around the selected point. I am looking for a solution to get _all_ the points, from a certain point and the move in a ring towerds the outside of a grid. Uh, you can still do that with my code - just modify it as needs be. You know how long each array is, you can move out from the center by moving one place back in the arrray in one direction, one way in the other by increasing the position in the array. Take it or leave it I guess. Jason Merrill Bank of America GT&O 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 ___ 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] Grid / Math - getting neighbouring positions
Thxn Joshua and others, I have to look into that. In the mean time I came up with the following code. This takes in a vector and then calculates a 'ring' from that position. With this, I can scale up the 'radius' and get recursively get all the rings from a point from in to outer ring. My goal i still to fill an array with all the points of the grid, starting from a center point en then moving outwards in a ring. Here is the code so far, i hope someone can maybe give some commment on it. var i:Number = 0; var cycle:Number = 1; var dir:Number = 1; var count:Number = 3; var row:Number = 0; function getTiles(startX:Number , startY:Number) : Void { //startX -= (count-1); //startY -= (count-1); var x:Number = 0; var y:Number = 0; while (cycle<=4) { if (cycle>2 && dir == 1) { dir = -1; } row = (cycle%2); while (ihttp://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] Grid / Math - getting neighbouring positions
Please I really need help on this on, I am cracking my head over it. Bresenham algo is also not the way to go, because it is for circle's and to complex! I can only get one ring, arggg If I go one ring further then it results in many double values, calculate allready when doing the first ring. Here is the code.. var row = 0; var c:Number = 3; var ring:Number = 1; //take start pos [2,2] var x:Number = 2; var y:Number = 2; // while (rowhttp://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] Grid / Math - getting neighbouring positions
Please I really need help on this on, I am cracking my head over it. Bresenham algo is also not the way to go, because it is for circle's and to complex! I can only get one ring, arggg If I go one ring further then it results in many double values, calculate allready when doing the first ring. Here is the code.. var row = 0; var c:Number = 3; var ring:Number = 1; //take start pos [2,2] var x:Number = 2; var y:Number = 2; // while (row It depends how you define the rings. It is by distance or by connectedness? Is 0,0 in the second ring with 1.0 and 0,1? What is the purpose of knowing this? Ron Jiri Heitlager | dadata.org wrote: Hello list, I have the following grid and would like to find the neighbouring positions of a certain point, going in a radius from in to out, covering all the positions. [0,0] [1,0] [2,0] [3,0] [4,0] [0,1] [1,1] [2,1] [3,1] [4,1] [0,2] [1,2] [2,2] [3,2] [4,2] [0,3] [1,3] [2,3] [3,3] [4,3] [0,4] [1,4] [2,4] [3,4] [4,4] Let say I take point [2,2] then its neighbours are in the first ring [1,1] [2,1] [3,1] [3,2] [3,3] [2,3] [1,3] [1,2] I manage to get the first ring, but getting the other rings I haven't got a clue on how to do that. Can somebody help me? Thank you, jiri ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@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] Grid / Math - getting neighbouring positions
That is a nice solution, but it leaves me with the problem that starting from one point (3,2) it only produces a set of points of ring directly around the selected point. I am looking for a solution to get _all_ the points, from a certain point and the move in a ring towerds the outside of a grid. Jiri Merrill, Jason wrote: This requires you to re-do your grid, but it's one way to handle it without complex math. It seems a simple way would be to make each row of the grid an array (the entire thing can be an array as well, but make each row it's own array). You could do some object mix-in to ease syntax and allow for storing complex data types: myGrid = {row:[{cell:[{id:0},{id:1},{id:2},{id:3}], id:0}, {cell:[{id:0},{id:1},{id:2},{id:3}], id:1}, {cell:[{id:0},{id:1},{id:2},{id:3}], id:2}, {cell:[{id:0},{id:1},{id:2},{id:3}], id:3}]} (you would make that with for-loops, not necessarily hand-type, though you could) So the cell at position 3,2 would be: myGrid.row[2].cell[1] (since arrays start at 0) So to get surrounding cells of myGrid.row[2].cell[1], it would be: myGrid.row[1].cell[0] myGrid.row[1].cell[1] myGrid.row[1].cell[2] myGrid.row[2].cell[0] myGrid.row[2].cell[2] myGrid.row[3].cell[0] myGrid.row[3].cell[1] myGrid.row[3].cell[2] In other words, for the cell up and to the left of the current cell, it would be: myGrid.row[thisRow.id-1].cell[thisCell.id-1] the grid cell directly above would be: myGrid.row[thisRow.id-1].cell[thisCell.id] the grid cell directly above and to the right would be: myGrid.row[thisRow.id-1].cell[thisCell.id+1] the grid cell directly to the left would be: myGrid.row[thisRow.id].cell[thisCell.id-1] etc. get thisRow and thisCell objects with for loops. for(var i-0; iBank of America GT&O Learning & Leadership Development eTools & Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jiri Heitlager | dadata.org Sent: Saturday, June 16, 2007 8:16 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Grid / Math - getting neighbouring positions Hello list, I have the following grid and would like to find the neighbouring positions of a certain point, going in a radius >from in to out, covering all the positions. [0,0] [1,0] [2,0] [3,0] [4,0] [0,1] [1,1] [2,1] [3,1] [4,1] [0,2] [1,2] [2,2] [3,2] [4,2] [0,3] [1,3] [2,3] [3,3] [4,3] [0,4] [1,4] [2,4] [3,4] [4,4] Let say I take point [2,2] then its neighbours are in the first ring [1,1] [2,1] [3,1] [3,2] [3,3] [2,3] [1,3] [1,2] I manage to get the first ring, but getting the other rings I haven't got a clue on how to do that. Can somebody help me? Thank you, jiri ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@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] Grid / Math - getting neighbouring positions
The ring is defined by distance not by connectedness. It is used for the following. A big image will be split into tiles of 100x100 pixels, that are loaded from a server. The total image made of these tiles are loaded in a movieclip so that the image is rebuilded. The image is masked by a 100x100 mask and can be scrolled to left and right. Based on the tile that is in the view, i would like to preload the rest of the tiles 'intelligently'. To do this, i take the current tile and start building a loadingQue Array from there. So first the ring around the current tile, the a ring around the first ring and so on, until all the tiles of the total image are in the array. Does that make sense? JIri Ron Wheeler wrote: It depends how you define the rings. It is by distance or by connectedness? Is 0,0 in the second ring with 1.0 and 0,1? What is the purpose of knowing this? Ron Jiri Heitlager | dadata.org wrote: Hello list, I have the following grid and would like to find the neighbouring positions of a certain point, going in a radius from in to out, covering all the positions. [0,0] [1,0] [2,0] [3,0] [4,0] [0,1] [1,1] [2,1] [3,1] [4,1] [0,2] [1,2] [2,2] [3,2] [4,2] [0,3] [1,3] [2,3] [3,3] [4,3] [0,4] [1,4] [2,4] [3,4] [4,4] Let say I take point [2,2] then its neighbours are in the first ring [1,1] [2,1] [3,1] [3,2] [3,3] [2,3] [1,3] [1,2] I manage to get the first ring, but getting the other rings I haven't got a clue on how to do that. Can somebody help me? Thank you, jiri ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@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] Grid / Math - getting neighbouring positions
Hello list, I have the following grid and would like to find the neighbouring positions of a certain point, going in a radius from in to out, covering all the positions. [0,0] [1,0] [2,0] [3,0] [4,0] [0,1] [1,1] [2,1] [3,1] [4,1] [0,2] [1,2] [2,2] [3,2] [4,2] [0,3] [1,3] [2,3] [3,3] [4,3] [0,4] [1,4] [2,4] [3,4] [4,4] Let say I take point [2,2] then its neighbours are in the first ring [1,1] [2,1] [3,1] [3,2] [3,3] [2,3] [1,3] [1,2] I manage to get the first ring, but getting the other rings I haven't got a clue on how to do that. Can somebody help me? Thank you, jiri ___ 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] Grid - getting neighbouring positions
[0,0] [1,0] [2,0] [3,0] [4,0] [0,1] [1,1] [2,1] [3,1] [4,1] [0,2] [1,2] [2,2] [3,2] [4,2] [0,3] [1,3] [2,3] [3,3] [4,3] [0,4] [1,4] [2,4] [3,4] [4,4] I have the following grid and would like to find the neighbouring positions of a certain point, going in a radius from in to out, covering all the positions. Let say I take point [2,2] then its neighbours are in the first ring [1,1] [2,1] [3,1] [3,2] [3,3] [2,3] [1,3] [1,2] I manage to get the first ring, but getting the other rings I haven't got a clue on how to do that. Can somebody help me? Thank you, jiri ___ 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] Mathematics specialist - trigonometry
Hello list, I have a client that wants something like this: http://www.wdcs.co.uk/media/flash/whalebanner/content_pub_en.html Basically a huge image is split into tiles, and each load a tileImage. The user can drag a navigator (small view in ratio) over the image. It can occur that the tiles under the view are not loaded yet. To deal with this I need to know wich tiles are visable, after the user has moved the navigator and then load the corresponding image in at the position. Becuase the amount of tiles, can become quit big I dont want to loop through all the tile MovieClips to find out the closestby. I have a feeling trignomotry is the way to ga, but am poor in Mathmatics. In my example you will find a image with 100x100 movieclip tiles. This is just for testing, because in the end I would like to dynamically createMovieClips on there right location. So I actually need to find out locations [x,y] that are visible. I uploaded some files and hope someone will take the time to dowlaod them and help me with finding a solution. Here is a view: http://playground.dadata.org/trig/test_01.swf and here the .fla can be downloaded http://playground.dadata.org/trig/test_01.fla Many thnx Jiri ___ 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] SWX and security
I have been reading up on SWX by Aral Balkan and have a question that maybe the list can answer. Dealing with sending data to a server from flash there is always the question of security. Making games in flash and sending data to a server is always a hassle when the sended data needs to be obscured. I wonder if SWX has the potential to make sending data over the wire 'saver', that is when the swf is created on the server side, maybe it can be encrypted. But still the URL to the gateway on the server can be read with different tool, so that makes me wonder if it is possible at all. Some thoughts on the matter by the more genious among the list would be nice ;) Jiri ___ 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] amfphp.org?
The new URL is http://www.amf-php.org Jiri Hershell Bryant wrote: See Count Schemula's reply...it's at sourceforge. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dnk Sent: Tuesday, May 15, 2007 9:43 AM To: Flashcoders Subject: [Flashcoders] amfphp.org? looks like the domain has expired (May 7th). I am assuming the project is not dead, but it is rather just an over site by the owner. Does anyone have any info on this? How about a spot to download the latest? d ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@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] Question on removeEventListener and Delegate callback
I was wondering if I am doing something correctly when adding listeners to objects. My question is, if I remove the listener is the code below then the right way. Do I use the Proxy class (or mx.utils.Delegate) also when I remove the listener?? //adding a listener this.currentDisplayObject.addEventListener('onContentCleared' , utils.Proxy.create(this , onBlockContentDestoyed , 'text ' , url)) //removing it this.currentDisplayObject.removeEventListener('onContentCleared' , utils.Proxy.create(this , onBlockContentDestoyed)) Thank you Jiri ___ 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] Question on removeEventListener and Delegate callback
Hello List, I was wondering if I am doing something correctly when adding listeners to objects. My question is, if I remove the listener is the code below then the right way. Do I use the Proxy class (or mx.utils.Delegate) also when I remove the listener?? //adding a listener this.currentDisplayObject.addEventListener('onContentCleared' , utils.Proxy.create(this , onBlockContentDestoyed , 'text ' , url)) //removing it this.currentDisplayObject.removeEventListener('onContentCleared' , utils.Proxy.create(this , onBlockContentDestoyed)) Thank you Jiri John Trentini wrote: Hi guys, I want to create as many text fields (which eventually I would like to turn into buttons) as the length of an array. I also want to use the content of the array to populate the text of the fields created dynamically. I have tried everything I know but all I seem to get is one filed with the lasat item in the array, sheesh! I've gone absolutely mad on this one (newish to actionScript, I am!) but can anyone tell me what I am doing wrong here? I could do with a helping hand or seven =:-) var myTxt:Array = new Array("branding", "news", "about us", "print", "marks", "contact"); var myX = 430; var menuArray:Array = new Array(); var ySpacing:Number = 90; // /*create textFields**/ // // for(i=0; i // trace(myTxt[i]);//the trace works, it list all tyhe lements in the array but myId.text = myTxt[i]; // this one in not producing the appropriate results // myId.border = false; myformat = new TextFormat(); myformat.font = "Verdana"; myformat.size = 14; myformat.bold = true; myformat.color = 0x55; myformat.align = "right"; // myId.selectable = false; myId.setTextFormat(myformat); //myId.text = myTxt[i]; //tried putting it at the end but no dah! // } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Question on removing Proxied Functions and EventListeners
Hello List, I was wondering if I am doing something correctly when adding listeners to objects. My question is, if I remove the listener is the code below then the right way. Do I use the Proxy class (or mx.utils.Delegate) also when I remove the listener?? //adding a listener this.currentDisplayObject.addEventListener('onContentCleared' , utils.Proxy.create(this , onBlockContentDestoyed , 'text ' , url)) //removing it this.currentDisplayObject.removeEventListener('onContentCleared' , utils.Proxy.create(this , onBlockContentDestoyed)) Thank you Jiri ___ 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] Question on removeEventListener and Delegate callback
I was wondering if I am doing something correctly when adding listeners to objects. My question is, if I remove the listener is the code below then the right way. Do I use the Proxy class (or mx.utils.Delegate) also when I remove the listener?? //adding a listener this.currentDisplayObject.addEventListener('onContentCleared' , utils.Proxy.create(this , onBlockContentDestoyed , 'text ' , url)) //removing it this.currentDisplayObject.removeEventListener('onContentCleared' , utils.Proxy.create(this , onBlockContentDestoyed)) Thank you Jiri John Trentini wrote: Hi guys, I want to create as many text fields (which eventually I would like to turn into buttons) as the length of an array. I also want to use the content of the array to populate the text of the fields created dynamically. I have tried everything I know but all I seem to get is one filed with the lasat item in the array, sheesh! I've gone absolutely mad on this one (newish to actionScript, I am!) but can anyone tell me what I am doing wrong here? I could do with a helping hand or seven =:-) var myTxt:Array = new Array("branding", "news", "about us", "print", "marks", "contact"); var myX = 430; var menuArray:Array = new Array(); var ySpacing:Number = 90; // /*create textFields**/ // // for(i=0; i // trace(myTxt[i]);//the trace works, it list all tyhe lements in the array but myId.text = myTxt[i]; // this one in not producing the appropriate results // myId.border = false; myformat = new TextFormat(); myformat.font = "Verdana"; myformat.size = 14; myformat.bold = true; myformat.color = 0x55; myformat.align = "right"; // myId.selectable = false; myId.setTextFormat(myformat); //myId.text = myTxt[i]; //tried putting it at the end but no dah! // } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Matrix Building
Can somebody help me out with dynamically building a matrix of clips. Well it is not really a matrix, see example: 1 2 3 4 12 5 11 6 10 9 8 7 Thanks.. Jiri ___ 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] Matrix Building
Can somebody help me out with dynamically building a matrix of clips. Well it is not really a matrix, see example: 1 2 3 4 12 5 11 6 10 9 8 7 Thanks.. Jiri ___ 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] Init generic clip
Thnks for the posts Both suggested solutions don't work, altough the first one by Gilles does work. But I want the button to be selfcontained, no external initFunctions. Just a MovieClip onStage called btn and on the parent timeline of btn something like btn.setLabel('hello world') The onLoad suggestion I dont get working. btn.onLoad = function(){ this.setLabel('hello world') } this is actual the same as the onEnterFrame. It is not that I have a problem with the onEnterFrame, I just dont understand how Flash VM works. Basically I would like the enclosed script to be executed before the frame of the timeline it is seen on is started. Is this possible. For more light on what I am trying to achive, the file can be downloaded here: playground.dadata.org/initButtonWoo.fla Jiri Heitlager | dadata.org wrote: Hello list, I have made a very simpele MovieClip that functions as a generic button, this is clip 'gen_btn_mc'. For the designers it is important that I place the gen_btn_mc on stage and not attach it at runtime. The gen_btn_mc clip itself has a few functions on the 1st frame of its timeline, these are: setLabel() setSize() setIcon() Because the button is place on stage during authortime, it seems the functions of the gen_btn_mc can only be called after one 'onEnterFrame' because it seems the functions are 'undefined' otherwise. EXAMPLE clipInstance0 is set on stage timeline. Then on the stage timeline I have to put this code. onEnterFrame = function(){ clipInstance0.setLabel('hello world') clipInstance0.setSize(200) clipInstance0.setIcon(true) delete this.onEnterFrame } This makes the clip flicker, and it is clearly being set, becuase of the one onEnterFrame loop. QUESTION Is there a way I can overcome this init. problem WITHOUT attaching the clip at runtime? Many thanks. Jiri ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Init generic clip
Hello list, I have made a very simpele MovieClip that functions as a generic button, this is clip 'gen_btn_mc'. For the designers it is important that I place the gen_btn_mc on stage and not attach it at runtime. The gen_btn_mc clip itself has a few functions on the 1st frame of its timeline, these are: setLabel() setSize() setIcon() Because the button is place on stage during authortime, it seems the functions of the gen_btn_mc can only be called after one 'onEnterFrame' because it seems the functions are 'undefined' otherwise. EXAMPLE clipInstance0 is set on stage timeline. Then on the stage timeline I have to put this code. onEnterFrame = function(){ clipInstance0.setLabel('hello world') clipInstance0.setSize(200) clipInstance0.setIcon(true) delete this.onEnterFrame } This makes the clip flicker, and it is clearly being set, becuase of the one onEnterFrame loop. QUESTION Is there a way I can overcome this init. problem WITHOUT attaching the clip at runtime? Many thanks. Jiri ___ 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] AS2 TextField with html content question
I think you have to use a placeholder. So in you html code that is rendered in the input field set the width and height: To detect if images are loaded I think you will have to make something like a proxy class that handles the loading of the images (offscreen for instance) Jiri Max Kaufmann wrote: If a TextField in AS2 contains images, how does one detect that the images have finished loading? Or that the internal content height has changed? Max Kaufmann l Technical Artist - 2105 Sarah St | Pittsburgh, PA 15203 O (412) 567-4606 W www.silvertreemedia.com C (440) 915-8277 E [EMAIL PROTECTED] ___ [EMAIL PROTECTED] 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 ___ [EMAIL PROTECTED] 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] Need help problem with sound object
When creating a sound object, you should give a movieclip as it parameter var snd:Sound = new Sound(movieclipReference) By not assigning a movieclip, you acces the global sound. Jiri creativity wrote: Hi, i have used sound object at level 0 which is controlled by a button to stop and play. But when sound through sound object is stoped. The sound of video at other level also stops. on setting sound object play again the sound with sound object plays but video sound doesnot. Though on loading other movie again sound of vieo play perfectly. pls let me know if any boy has some solution. 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] swf working but in browser doesnt???!!!
I am not sure if this will help you, but I had some .swf's in the past that didnt work as expected online, altough offline the worked fine. Check the local playback security in PublishSettings. maybe it is not set correct. Jiri Omar Fouad schreef: i have a flash movie that i am still working on... it has some code that attaches things from the library on the stage only till now with some Stage.height and Stage.width properties and so on.. the movie works fine when opening the swf alone but into the browser it doesnt attaches all the objects on the stage... i am using IE 7 and the swfobject.js and my stage is 1200x1000 px. set the Stage.scaleMode to "noScale" and alligned to top left. i used to do this with many projects and it works just fine.. what is the problem than in this one?? any ideas?? thanks -- --- Jiri Heitlager Stichting z25.org Concordiastraat 67A 3551 EM Utrecht tel:06-28159323 http://www.z25.org [EMAIL PROTECTED] ___ 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] onPrinting done
Is it somehow possible to recieve a notice when a printer is done printing a document? Can this be done with flash? Jiri -- --- Jiri Heitlager Stichting z25.org Concordiastraat 67A 3551 EM Utrecht tel:06-28159323 http://www.z25.org [EMAIL PROTECTED] ___ 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] Class packaging swc
For a project, I made two movieclips that are both linked to an as class in the linkage Identifier box. Now I want to protect my classes so I read an article that explains how to make a compiled clip, a class packager. It all worked well, becuase I tested the .swc in new .fla. The classes are all know when the compiled clip is dragged onto the stage. But using it in my project file, I get a compiling error telling me the classes cannot be loaded. I tried placing the compiled clip on frame 1 and have the classes and set the export frame for classes at 2, with no luck. Does somebody have an idea how to handle this problem? Jiri ___ 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] Using transform matrix
I need to build an application for a client to scale and rotate an image. I am thinking of using a tranfomation matrix, but am not so familiar with it. I read the article of Senocular: http://www.senocular.com/flash/tutorials/transformmatrix/ i did some tests. The app itself places four handlers on each corner of the image. Pressing the handlers and dragging them scales the image. My idea is to scale and replace the image when a handler is drag. I ran into trouble when trying to read the width of the image from the matrix. My question, is it possible to calculate the width based on the matrix grid? Thank you Jiri ___ 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] FlashPaper limited amount of links
I am experiencing a very weird bug with converting .doc to flashpaper .swf. The .doc is very large, 400 pages and holds +400 hyperlinks. When converting to an .swf, all the links on the first 200 pages are gone. When I reduce the page amount of the .doc to 200 pages, and convert it again to an .swf, the links work fine. It seems that the links start breaking up when a .doc has more then 400 links. Did anybody ever experience this, or is this a know bug. I searched the web, but could not find anything about it. Jiri ___ 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] Flashpaper issue with large Word doc
Hello, I have a Word document that has about 400 pages and contains hyperlinks. When I convert it into a .swf using FlashPaper 2.01, the links on the first 200 pages don't work anymore, the links located in the last 100 or so pages do work??? When I convert the same document but then only the first 200 pages, all works fine. Is there anybody that once coverted a large word doc with hyperlinks and that experienced the same problem? Thnk you --- Jiri Heitlager ___ 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] Flashpaper issue with large Word doc
Hello, I have a Word document that has about 400 pages and contains hyperlinks. When I convert it into a .swf using FlashPaper 2.01, the links on the first 200 pages don't work anymore, the links located in the last 100 or so pages do work??? When I convert the same document but then only the first 200 pages, all works fine. Is there anybody that once coverted a large word doc with hyperlinks and that experienced the same problem? Thnk you -- --- Jiri Heitlager Stichting z25.org Concordiastraat 67A 3551 EM Utrecht tel:06-28159323 http://www.z25.org [EMAIL PROTECTED] ___ 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] Overriding method FlashPaper
Hi I have a question. I am overridding the goToLinkTarget () method of flashpaper object. The reason is that the links to pages, where not opening in a new window. It works but somehow the anchors dont work anymore. I dont understand why because I am simply just forwarding the aguments. I hope someone can help me out. Here is my code var originalFlashPaperAPI={ goToLinkTarget: fp_document.goToLinkTarget } //override method fp_document.goToLinkTarget = function (linktarget:String, window:Object):Void { if (arguments[0].indexOf("anchor")<0){ originalFlashPaperAPI.goToLinkTarget(linktarget,"_blank") }else{ //format is "anchor:foo" //but when harcoded it also doesnt work originalFlashPaperAPI.goToLinkTarget(linktarget) } } ___ 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] saving bmp from flash
I am looking for a way to capture webcam images from Flash and save them as .bmp's. Using PHP is not a possibilty because it cannot save images as a .bmp. Is it in theory possible to use screenweaver. So in Flash I would run trough all the pixels getting there value and store these values in an Array. Then use screenweaver to save the array to a file. But how do I build an .bmp then. Would this be possible to save a bmp from flash or does someone knows a solution using php. Thank you in advance. Jiri ___ 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