[Flashcoders] how to write a class that loads XML?
Hello Flash coders. :) Could anyone help me to fix my class code? I can't find any reference anywhere that will help me... I'm trying to load XML via a generalized class object, but the data in postXML never makes it to the parseXML constructor, any help is greatly appreciated! Thanks! Sebastian. [CODE] class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = parseXML(); } } [/CODE] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] how to write a class that loads XML?
Hello Flash coders. :) Could anyone help me to fix my class code? I can't find any reference anywhere that will help me... I'm trying to load XML via a generalized class object, but the data in postXML never makes it to the parseXML constructor, any help is greatly appreciated! Thanks! Sebastian. [CODE] class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = parseXML(); } } You can use the Delegate class to send the onLoad function back to your object: postXML.onLoad = mx.utils.Delegate.create(this, parseXML ); Best 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
Re: [Flashcoders] how to write a class that loads XML?
1. May be coz you never really created the XML object. You'll need to define the XML object as well, not just declare the variable. 2. Try using the Delegate class. Its pretty useful in avoiding confusions. Now the code: import mx.utils.Delegate; class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML = new XML(); postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = Delegate.create(this, parseXML);; } } Hope that helps, -- Arul Prasad http://arulprasad.blogspot.com On 4/27/07, sebastian chedal [EMAIL PROTECTED] wrote: Hello Flash coders. :) Could anyone help me to fix my class code? I can't find any reference anywhere that will help me... I'm trying to load XML via a generalized class object, but the data in postXML never makes it to the parseXML constructor, any help is greatly appreciated! Thanks! Sebastian. [CODE] class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = parseXML(); } } [/CODE] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] as3 addchild question
Hi, Not sure what you are after, but you might try something like this: import flash.display.*; var lista:Array = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); for (i = 0; i lista.length; i++) { var vSprite:Sprite = new Sprite(); vSprite.graphics.lineStyle(); vSprite.graphics.beginFill(0xAABBCC); vSprite.graphics.drawRect(10, 10, 10, 10); vSprite.graphics.endFill(); vSprite.x = lista[i] * 30; addChild(vSprite); } Hope that helps, Petro -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Gustavo Duenas Sent: Thursday, April 26, 2007 7:11 PM To: Flashcoders mailing list Subject: [Flashcoders] as3 addchild question Hi Guys, I've just read that in AS3 there is no more createEmptyMovieClip or attachMovie so there is addChild, but the problem is when I use a loop to said this add child to load a linkage movie several times, it doesn't appear in the screen but one. here is the code I'm using in the flash 9 alpha. import flash.display.*; var lista:Array = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); trace (lista); for(i=0; ilista.length; i++){ trace(lista[i]); trace(newMovie + newMovieX); var newMovie = this.addChild(new movie1()); var newMovieX= newMovie.x+lista[i]*30; } whe I do the trace the screen show several objects but I don't know how to give them a different values for x. I can do this in as2, but I'd rather do this in as3, since I'm practicing with this now. any ideas? I need help. regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to write a class that loads XML?
Hi Arul, Im from Chennai and im working as a flash programmer here. Can u just explain me what the role of the *Delegate Class* here in this. Thanks and Regards S.Hidaayth On 27/04/07, Arul Prasad M L [EMAIL PROTECTED] wrote: 1. May be coz you never really created the XML object. You'll need to define the XML object as well, not just declare the variable. 2. Try using the Delegate class. Its pretty useful in avoiding confusions. Now the code: import mx.utils.Delegate; class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML = new XML(); postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = Delegate.create(this, parseXML);; } } Hope that helps, -- Arul Prasad http://arulprasad.blogspot.com On 4/27/07, sebastian chedal [EMAIL PROTECTED] wrote: Hello Flash coders. :) Could anyone help me to fix my class code? I can't find any reference anywhere that will help me... I'm trying to load XML via a generalized class object, but the data in postXML never makes it to the parseXML constructor, any help is greatly appreciated! Thanks! Sebastian. [CODE] class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = parseXML(); } } [/CODE] ___ 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 -- Thanks and Regards, S.Hidayath ___ 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] WhITE SNOW and Seven Dwarf - MAth Problems!
OK danny, your script work fine. sorry for not testing it first. here is the script in conjunction to my prior post. on frame 1: var tIndex = 1; //- // calculate the loop overhead var looptimestart = getTimer(); //- _root.onEnterFrame = function() { for (var i = 0; i7; i++) { //OK!! ASYNCHRONOUS DEPTH NUMBER for attaching MC //trace(Drawing first Icon = + tIndex++ + - + tIndex++ + - + tIndex++ + - + tIndex++ + - + tIndex++ + - + tIndex++ + - + tIndex++); addIcon(myIcon, tIndex++); if (tIndex700) { //-- trace(getTimer()-looptimestart+ ms); //-- delete _root.onEnterFrame; break; } } var time = getTimer()-looptimestart; status.text = times elapsed : +time+ ms; }; function addIcon(sLinkage:String, nDepth:Number):Void { var mc:MovieClip = this.attachMovie(sLinkage, mcIcon+nDepth, nDepth, {_x:Math.random()*450+50, _y:Math.random()*300+50}); trace(mc._name); } it seems that I only gain the ASYNC -sequential number but not the ASYNC method for attaching movieClip. the above script will run in average 3300 miliseconds on my old but the only one PC i have: athlon 1.3 Ghz. the code below run almost 2 times faster, in average 1800 ms: var a = 1; var b = 2; var c = 3; var d = 4; var e = 5; var f = 6; var g = 7; //- // calculate the loop overhead var looptimestart = getTimer(); //- trace(Drawing first Icon = + a + - + b + - + c + - + d + - + e + - + f + - + g); drawIcon(myIcon); trace(Drawing Next Icon = + newline); _root.onEnterFrame = function(){ a +=7; b +=7; c +=7; d +=7; e +=7; f +=7; g +=7; //ASYNCHRONOUS DEPTH NUMBER for attaching MC trace(a + - + b + - + c + - + d + - + e + - + f + - + g); drawIcon(myIcon); if (g700-7){ delete _root.onEnterFrame ; //-- trace(getTimer()-looptimestart+ ms); //-- } var time = getTimer()-looptimestart; status.text = times elapsed : + time + ms; } function drawIcon(sLinkage:String):Void { //attaching mc simultaneously: must be at different depth!!! //Using seven counter i.e: a-g which count the depth inside //onEnterFrame loops this.attachMovie(sLinkage, mcIcon + a, a, {_x:Math.random()*450+50, _y:Math.random()*300+50}); this.attachMovie(sLinkage, mcIcon + b, b, {_x:Math.random()*450+50, _y:Math.random()*300+50}); this.attachMovie(sLinkage, mcIcon + c, c, {_x:Math.random()*450+50, _y:Math.random()*300+50}); this.attachMovie(sLinkage, mcIcon + d, d, {_x:Math.random()*450+50, _y:Math.random()*300+50}); this.attachMovie(sLinkage, mcIcon + e, e, {_x:Math.random()*450+50, _y:Math.random()*300+50}); this.attachMovie(sLinkage, mcIcon + f, f, {_x:Math.random()*450+50, _y:Math.random()*300+50}); this.attachMovie(sLinkage, mcIcon + g, g, {_x:Math.random()*450+50, _y:Math.random()*300+50}); } the above code attach 7 clip at the same time. I intentionally left the script with its primitive shape merely for witnessing the loop. Using debug (list object) the same script also generate the same number of movieclip on stage. based on that, your approach is even better (700 ms); i just paste addIcon(myIcon, tIndex++) for simultaneous attach! var tIndex = 1; //- // calculate the loop overhead var looptimestart = getTimer(); //- _root.onEnterFrame = function() { for (var i = 0; i7; i++) { //OK!! ASYNCHRONOUS DEPTH NUMBER for attaching MC //trace(Drawing first Icon = + tIndex++ + - + tIndex++ + - + tIndex++ + - + tIndex++ + - + tIndex++ + - + tIndex++ + - + tIndex++); addIcon(myIcon, tIndex++); addIcon(myIcon, tIndex++); addIcon(myIcon, tIndex++); addIcon(myIcon, tIndex++); addIcon(myIcon, tIndex++); addIcon(myIcon, tIndex++); addIcon(myIcon, tIndex++); if (tIndex700) { //-- trace(getTimer()-looptimestart+ ms); //-- delete _root.onEnterFrame; break; } } var time = getTimer()-looptimestart; status.text = times elapsed : +time+ ms; }; function addIcon(sLinkage:String, nDepth:Number):Void { var mc:MovieClip = this.attachMovie(sLinkage, mcIcon+nDepth, nDepth, {_x:Math.random()*450+50, _y:Math.random()*300+50}); trace(mc._name); } following the thread, jesse seem provides much nicer solution, although i haven't check it yet. :) thanks for showing me a more elegant approach. Danny Kodicek [EMAIL PROTECTED] wrote: onEnterFrame/setInterval function is just to give spreading effect to the app. as I mention earlier, using for loop doesnt't let any animation play before loop ends. the real problem is only about the
Re: [Flashcoders] how to write a class that loads XML?
Hi Thanks for that tip, delegate seems to work when I pass a variable, but its still not passing the XML object. However, I'm also having a problem which is stopping me from figuring out the issue... intermitently I get the error message: **Error** {...}/Flash/work/core/XMLoader.as: Line 3: The name of this class, 'XMLoader', conflicts with the name of another class that was loaded, 'XMLoader'. class XMLoader { I get this for different classes once in a while, and if I just recompile a few times, eventually the error goes away... huh? Its a very weird issue. I don't have any objects in the library with the same name... has anyone ever had this issue? Thanks! On 4/27/07, Danny Kodicek [EMAIL PROTECTED] wrote: Hello Flash coders. :) Could anyone help me to fix my class code? I can't find any reference anywhere that will help me... I'm trying to load XML via a generalized class object, but the data in postXML never makes it to the parseXML constructor, any help is greatly appreciated! Thanks! Sebastian. [CODE] class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = parseXML(); } } You can use the Delegate class to send the onLoad function back to your object: postXML.onLoad = mx.utils.Delegate.create(this, parseXML ); Best 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
RE: [Flashcoders] WhITE SNOW and Seven Dwarf - MAth Problems!
OK danny, your script work fine. sorry for not testing it first. here is the script in conjunction to my prior post. on frame 1: Before you start timing different methods, you should remove all your 'trace' lines, they add a time overhead of their own. Try it again with no traces and I suspect you'll see very little difference between the two scripts (and they should both run almost instantly - creating 700 clips doesn't take that long) 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
Re: [Flashcoders] Clear Set Interval Q:
And for as often and inaccurate as they want to fire, I often think the best solution is to check time change from the last frame to the current with whatever method. I assumed Intervals only fired once per frame, but apparently they fire as often and as accurate as they 'can'. If I remember correcty there were some tests done when setInterval was first introduced and it turned out that setInterval can fire approx. 10 x per frame. But alot depends on what else is going on while the interval runs and that number may/will drop. Oh, I now just spotted that your sample code shows those same numbers (11x per frame) ;-) regards, Muzak ___ 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] Wave effect
Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to write a class that loads XML?
ok i was able to solve the issue, has to do with working from a network drive... how annoying!!! http://www.epresenterplus.com/blog/archives/30.html :-P XML is loading now just fine too, thanks everyone!! :D seb. On 4/27/07, sebastian chedal [EMAIL PROTECTED] wrote: Hi Thanks for that tip, delegate seems to work when I pass a variable, but its still not passing the XML object. However, I'm also having a problem which is stopping me from figuring out the issue... intermitently I get the error message: **Error** {...}/Flash/work/core/XMLoader.as: Line 3: The name of this class, 'XMLoader', conflicts with the name of another class that was loaded, 'XMLoader'. class XMLoader { I get this for different classes once in a while, and if I just recompile a few times, eventually the error goes away... huh? Its a very weird issue. I don't have any objects in the library with the same name... has anyone ever had this issue? Thanks! On 4/27/07, Danny Kodicek [EMAIL PROTECTED] wrote: Hello Flash coders. :) Could anyone help me to fix my class code? I can't find any reference anywhere that will help me... I'm trying to load XML via a generalized class object, but the data in postXML never makes it to the parseXML constructor, any help is greatly appreciated! Thanks! Sebastian. [CODE] class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = parseXML(); } } You can use the Delegate class to send the onLoad function back to your object: postXML.onLoad = mx.utils.Delegate.create(this, parseXML ); Best 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] create image grid
I'm trying to make a two grids of images but am stumped at the moment. Here's what I have so far that works just fine but I want to have two grids of 25 thumbnails side by side. You will only be able to see one grid of 25 which is masked. code function makeGrid(){ this.createEmptyMovieClip(kk, 1029); tg._x = startx; tg._y = starty; tg.setMask(mm); var remThumbs:Number = thumbnails.length-maxCube; //creates grid of thumbnail for (var i = 0; ithumbnails.length; i++) { //drawSquare creates the thumbnails inside of the MC tg var clip:MovieClip = drawSquare(tg, i, 0, 0, 0, 40, 40); //used 45 to space each thumb 5px apart. (thumb width +5) clip._x = (i%columns)*45; clip._y = Math.floor(i/rows)*45; } } /code I want the first grid to be 25 boxes then the second get built to the right of the first at the same y position as the first. Any ideas would be helpful. 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] Wave effect
Do a search for Flash OS X dock effect. That might get you some results. On 4/27/07, Parvaiz Patel [EMAIL PROTECTED] wrote: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP ___ 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] Wave effect
google: flash mac dock here's one: http://jrgraphix.net/research/flash-dock-mx-2004.php there's more of them, check google. - Original Message - From: Parvaiz Patel [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, April 27, 2007 2:50 PM Subject: [Flashcoders] Wave effect Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP ___ 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] Wave effect
Parvaiz Patel schrieb: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP This is MAC only. micha *sorry couldn't resist. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to write a class that loads XML?
If you're working from a network drive, make sure its clock runs in synch with your working machine. On windows, you can click the clock in the system tray, go to the last tab (Time) and synchronize it with time.windows.com. Do that for both machines. You shouldn't get any errors after that (at least for a while untill they run out of synch again). Muzak - Original Message - From: sebastian chedal [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, April 27, 2007 2:53 PM Subject: Re: [Flashcoders] how to write a class that loads XML? ok i was able to solve the issue, has to do with working from a network drive... how annoying!!! http://www.epresenterplus.com/blog/archives/30.html :-P ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] how to write a class that loads XML?
[mailto:[EMAIL PROTECTED] On Behalf Of hidayath q Im from Chennai and im working as a flash programmer here. Can u just explain me what the role of the *Delegate Class* here in this. I keep getting buddy type spam every 2-3 months or so in my personal inbox from someone with your exact same name and extremely similar style of english, so I'm probably not in the mood to assist with your question. Maybe it's a different person alltogether and just an unfortunate coincidence, but hidayath q is not all that common in the websphere that I have noticed. If it is you, please remove me from your friends list or whatever. Thanks, and apologies if I'm making a bad assumption. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Wave effect
I don't know, but why don't try googling the thing? Besides Flash coders I've found a lot of useful information in google. That effect in particular appears to be the new mood or fashion to many designers, so I'd advice not to have it if you want to be original. Regards. On Apr 27, 2007, at 8:50 AM, Parvaiz Patel wrote: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com Gustavo Duenas Creative Director LEFT AND RIGHT SOLUTIONS LLC 1225 W. Beaver St. Suite 119 Jacksonville, Fl. 32204 904 . 2650330 www.leftandrightsolutions.com ___ 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] Wave effect
Amen brother * I couldn't resist too. On Apr 27, 2007, at 9:03 AM, Michael Stuhr wrote: Parvaiz Patel schrieb: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP This is MAC only. micha *sorry couldn't resist. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com Gustavo Duenas Creative Director LEFT AND RIGHT SOLUTIONS LLC 1225 W. Beaver St. Suite 119 Jacksonville, Fl. 32204 904 . 2650330 www.leftandrightsolutions.com ___ 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] Wave effect
This is MAC only. :) That's funny. Michael Stuhr wrote: Parvaiz Patel schrieb: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP This is MAC only. micha *sorry couldn't resist. ___ 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] Wave effect
Very well made site btw... inspiring! I liked the mac dock effect even though it's said to be the new fashion among designers. On 4/27/07, Robert Brisita [EMAIL PROTECTED] wrote: This is MAC only. :) That's funny. Michael Stuhr wrote: Parvaiz Patel schrieb: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP This is MAC only. micha *sorry couldn't resist. ___ 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] Random Error
Once in a while, when compiling, I get an error from one of my classes. The error is something like: 'property System not found', and it is thrown from this function: public static function getPlayerVersion() { return(System.capabilities.version); } I only see the error once out of 20 compiles or so... thoughts? Dave - Head Developer http://www.blurredistinction.com Adobe Community Expert http://www.adobe.com/communities/experts/ ___ 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] Wave effect
I tell you marcelo, I've seen it every whereEven one with that idea won in thewfa.com, course not exactly at the mac is, but the spirit is in it. Regards Gustavo Duenas On Apr 27, 2007, at 10:49 AM, Marcelo de Moraes Serpa wrote: Very well made site btw... inspiring! I liked the mac dock effect even though it's said to be the new fashion among designers. On 4/27/07, Robert Brisita [EMAIL PROTECTED] wrote: This is MAC only. :) That's funny. Michael Stuhr wrote: Parvaiz Patel schrieb: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP This is MAC only. micha *sorry couldn't resist. ___ 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 Gustavo Duenas Creative Director LEFT AND RIGHT SOLUTIONS LLC 1225 W. Beaver St. Suite 119 Jacksonville, Fl. 32204 904 . 2650330 www.leftandrightsolutions.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] [FlashGameCoders] Persistent Game AI for Off-screen baddies
Hello all, When building a game where collision detection for enemies is important (such as a scrolling tile game), how do you create persistent AI for an enemy when it's off-screen? For example, walking away from the enemy causes it to be removed from the game area, but the enemy needs to keep wandering around the world in virtual terms, so the player can't easily tell where the enemy is going to be when returning to the same area. How do you maintain that interaction for the enemy, or is it not done like that because it's too processor intensive? Any tips or pointers to resources would be much appreciated. Thanks! James ___ 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] blendMode in as3
I've just seen the blendMode in as3 and I have a code to create dynamically objects and I'd like to give them a different value of Blend Mode, but it seems that is a bit of a problem, because the compiler said this: **Error** : Line -1, Column -1 : Warning Report: --- [Coach] Warning #1072: Class is sealed. It cannot have members added to it dynamically. - frame1(6): Migration issue: BlendMode is not a dynamic class. Instances cannot have members added to them dynamically. blen1= blen1.DARKEN=10; ^ - ReferenceError: Error #1056: Cannot create property DARKEN on flash.display.BlendMode. at Timeline0_8b62bca6f4d911db81b4016cb38e89c/::frame1() and this is the code: import flash.display.*; import flash.filters.*; import flash.display.BlendMode; var blen1:BlendMode = new BlendMode(); blen1= blen1.DARKEN=10; //funcion de array repetidos. var mcArray:Array = new Array(); for(var i:uint=0; i20; i++) { var myMC:MovieClip = new movie1(); myMC.x=222; myMC.y=186; myMC.x = i*40; myMC.rotation=i*20; addChild(myMC); trace(mcArray); mcArray[myMC]; myMC.blen1=blen1+i; trace(myMC); } I hope anyone could help me out. Regards Gustavo Duenas Creative Director LEFT AND RIGHT SOLUTIONS LLC 1225 W. Beaver St. Suite 119 Jacksonville, Fl. 32204 904 . 2650330 www.leftandrightsolutions.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] Re: should be simple: MovieClip drawing API
fyi ... For AS3 examples of Drawing API this link is the bomb: http://www.3gcomm.fr/Flex/PrimitiveExplorer/Flex2PrimitiveExplorer.html Each primative class includes Class Call Sample code. Right-click for View Source. On source page, bottom right has Download source option. Explanation by the Primitive Explorer's creator (with links to prior work) is here: http://flexibleexperiments.wordpress.com/2007/03/14/flex-20-primitive-explorer/ Other similar explorers are listed here: The Flex Style Explorer is a Proud Papa http://weblogs.macromedia.com/mc/archives/2007/03/the_flex_style.cfm g ___ 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] [FlashGameCoders] Persistent Game AI for Off-screen baddies
I did this type of thing by having the collision detection separate from visual elements (each tile had a collision rect) so that the tiles need not be displayed to have the AI interact with them. This allowed their off screen position to be updated, and it was pretty low CPU hit - the biggest hit usually comes from graphics rendering. Regards, Hudson On 4/27/07, James Marsden [EMAIL PROTECTED] wrote: Hello all, When building a game where collision detection for enemies is important (such as a scrolling tile game), how do you create persistent AI for an enemy when it's off-screen? For example, walking away from the enemy causes it to be removed from the game area, but the enemy needs to keep wandering around the world in virtual terms, so the player can't easily tell where the enemy is going to be when returning to the same area. How do you maintain that interaction for the enemy, or is it not done like that because it's too processor intensive? Any tips or pointers to resources would be much appreciated. Thanks! James ___ 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] [FlashGameCoders] Persistent Game AI for Off-screen baddies
James, Unfortunately, it all depends. :-) It depends on the complexity of your game and your AI - on how big your play area is and on how much optimisation you want to do. I've seen the following approaches or combinations of these approaches: i) AI (and pixel-perfect x/y positioning) is maintained for every object all of the time (slowest and most memory intensive) ii) AI (pathfinding etc.) is maintained while offscreen, and 'grid location' for each object, but not pixel location. That's only turned on when an object gets 'close' to the screen. iii) AI (pathfinding etc.) is only maintained for objects close to the screen - anything too far away from the screen essentially 'freezes'. This sort of approach is often dealt with using sectors or regions, for speed - each region has a list of objects/enemies that are currently inside it, and only the regions in the vicinity of the player are turned on; the rest just aren't processed during a game-update loop. iv) AI _is_ maintained while objects are offscreen, but their AI update is run on a slower update rate than the AI for objects near to/on the screen. But in reality, there are as many approaches as there are programmers! Of the above, I favour number iii) for a grid-based running-around-sort-of-a-game - but as I said, it depends on the game and circumstances. Hope that's of some help. Ian On 4/27/07, James Marsden [EMAIL PROTECTED] wrote: Hello all, When building a game where collision detection for enemies is important (such as a scrolling tile game), how do you create persistent AI for an enemy when it's off-screen? For example, walking away from the enemy causes it to be removed from the game area, but the enemy needs to keep wandering around the world in virtual terms, so the player can't easily tell where the enemy is going to be when returning to the same area. How do you maintain that interaction for the enemy, or is it not done like that because it's too processor intensive? Any tips or pointers to resources would be much appreciated. Thanks! James ___ 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] [FlashGameCoders] Persistent Game AI for Off-screen baddies
Separate your display code from your game logic. One thing that I see frequently is people inheriting directly from movie clips for their game objects. This is bad because it encourages overuse of inheritance, and makes display/game logic separation harder. Usually, I'll have my game object as separate items, with their own x and y properties, then a viewport object for determining where you're looking. To determine what gets displayed, I'll check to see if the game object is within half a screen distance from the viewport, and if it is, and not already displayed, I'll attach a new movieclip, and position it relative to the screen center by the distance from the viewport to the game object. --- James Marsden [EMAIL PROTECTED] wrote: Hello all, When building a game where collision detection for enemies is important (such as a scrolling tile game), how do you create persistent AI for an enemy when it's off-screen? For example, walking away from the enemy causes it to be removed from the game area, but the enemy needs to keep wandering around the world in virtual terms, so the player can't easily tell where the enemy is going to be when returning to the same area. How do you maintain that interaction for the enemy, or is it not done like that because it's too processor intensive? Any tips or pointers to resources would be much appreciated. Thanks! James ___ 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 __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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] Wave effect
Hi Guys, Actually I want to achieve the smoothness of that menu (created in http://www.mandchou.com/) I am developing an application for my client in which everything is loaded dynamically from MS-SQL server via ASP.Net frame work into flash. Here is the URL which is in the first stage of development. http://dev.mohawkind.com/vp/LeesVirtualPortfolio.html Here I use XML to communicate with database via asp.net The script I use on each dynamically loaded thumbnails to enlarge when mouse come closer is the following: onClipEvent (mouseMove) { dist = Math.sqrt(Math.pow(Math.abs(_xmouse), 2) + Math.pow(Math.abs(_ymouse), 2)); if (dist=_root.menutriggerdist) { currscale = (1 - dist / (_root.menumultiplier * _root.menutriggerdist)) * (_root.menumaxscale - 100); this._xscale = currscale; this._yscale = currscale; } else { this._xscale = 100; this._yscale = 100; } // end else if } / _root.menutriggerdist = 40; _root.menumaxscale = 580; _root.menumultiplier = 1.50E+000; / guys, please help me to make this smoother. Thanks very much. PP -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas Sent: Friday, April 27, 2007 8:52 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Wave effect I tell you marcelo, I've seen it every whereEven one with that idea won in thewfa.com, course not exactly at the mac is, but the spirit is in it. Regards Gustavo Duenas On Apr 27, 2007, at 10:49 AM, Marcelo de Moraes Serpa wrote: Very well made site btw... inspiring! I liked the mac dock effect even though it's said to be the new fashion among designers. On 4/27/07, Robert Brisita [EMAIL PROTECTED] wrote: This is MAC only. :) That's funny. Michael Stuhr wrote: Parvaiz Patel schrieb: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP This is MAC only. micha *sorry couldn't resist. ___ 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 Gustavo Duenas Creative Director LEFT AND RIGHT SOLUTIONS LLC 1225 W. Beaver St. Suite 119 Jacksonville, Fl. 32204 904 . 2650330 www.leftandrightsolutions.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] create image grid
I didn't understand your question fully. But if you want create a grid side by side then use if condition in your for loop. Like if (i 25){ clip._x = (i%columns)*45; // reset the position as per your requirement then you will get the new position for the new set of grid. clip._y = ---; // } Cheers, Parvaiz. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 27, 2007 6:25 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] create image grid I'm trying to make a two grids of images but am stumped at the moment. Here's what I have so far that works just fine but I want to have two grids of 25 thumbnails side by side. You will only be able to see one grid of 25 which is masked. code function makeGrid(){ this.createEmptyMovieClip(kk, 1029); tg._x = startx; tg._y = starty; tg.setMask(mm); var remThumbs:Number = thumbnails.length-maxCube; //creates grid of thumbnail for (var i = 0; ithumbnails.length; i++) { //drawSquare creates the thumbnails inside of the MC tg var clip:MovieClip = drawSquare(tg, i, 0, 0, 0, 40, 40); //used 45 to space each thumb 5px apart. (thumb width +5) clip._x = (i%columns)*45; clip._y = Math.floor(i/rows)*45; } } /code I want the first grid to be 25 boxes then the second get built to the right of the first at the same y position as the first. Any ideas would be helpful. Thanks! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@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] Wave effect
Maybe using a tweening engine (I think the mx.tween would do) ? On 4/27/07, Parvaiz Patel [EMAIL PROTECTED] wrote: Hi Guys, Actually I want to achieve the smoothness of that menu (created in http://www.mandchou.com/) I am developing an application for my client in which everything is loaded dynamically from MS-SQL server via ASP.Net frame work into flash. Here is the URL which is in the first stage of development. http://dev.mohawkind.com/vp/LeesVirtualPortfolio.html Here I use XML to communicate with database via asp.net The script I use on each dynamically loaded thumbnails to enlarge when mouse come closer is the following: onClipEvent (mouseMove) { dist = Math.sqrt(Math.pow(Math.abs(_xmouse), 2) + Math.pow(Math.abs(_ymouse), 2)); if (dist=_root.menutriggerdist) { currscale = (1 - dist / (_root.menumultiplier * _root.menutriggerdist)) * (_root.menumaxscale - 100); this._xscale = currscale; this._yscale = currscale; } else { this._xscale = 100; this._yscale = 100; } // end else if } / _root.menutriggerdist = 40; _root.menumaxscale = 580; _root.menumultiplier = 1.50E+000; / guys, please help me to make this smoother. Thanks very much. PP -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas Sent: Friday, April 27, 2007 8:52 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Wave effect I tell you marcelo, I've seen it every whereEven one with that idea won in thewfa.com, course not exactly at the mac is, but the spirit is in it. Regards Gustavo Duenas On Apr 27, 2007, at 10:49 AM, Marcelo de Moraes Serpa wrote: Very well made site btw... inspiring! I liked the mac dock effect even though it's said to be the new fashion among designers. On 4/27/07, Robert Brisita [EMAIL PROTECTED] wrote: This is MAC only. :) That's funny. Michael Stuhr wrote: Parvaiz Patel schrieb: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP This is MAC only. micha *sorry couldn't resist. ___ 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 Gustavo Duenas Creative Director LEFT AND RIGHT SOLUTIONS LLC 1225 W. Beaver St. Suite 119 Jacksonville, Fl. 32204 904 . 2650330 www.leftandrightsolutions.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
Re: [Flashcoders] create image grid
I see that I left some info out like that the images are coming in via xml. Here is a sample of what I have so far: http://www.thespikeranch.com/test/photoGallery.html If you go to the last image in the lower right corner of the grid then let it play or click next you'll see the grid of 25 images slide then the yellow indicator box slides down to the x and y of image 26. I want image 26 - 50 to be a grid like image 1-25 but to the right of them. Am I making sense? I was up late and my correspondence might be a bit mixed. Thanks! On 4/27/07, Parvaiz Patel [EMAIL PROTECTED] wrote: I didn't understand your question fully. But if you want create a grid side by side then use if condition in your for loop. Like if (i 25){ clip._x = (i%columns)*45; // reset the position as per your requirement then you will get the new position for the new set of grid. clip._y = ---; // } Cheers, Parvaiz. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 27, 2007 6:25 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] create image grid I'm trying to make a two grids of images but am stumped at the moment. Here's what I have so far that works just fine but I want to have two grids of 25 thumbnails side by side. You will only be able to see one grid of 25 which is masked. code function makeGrid(){ this.createEmptyMovieClip(kk, 1029); tg._x = startx; tg._y = starty; tg.setMask(mm); var remThumbs:Number = thumbnails.length-maxCube; //creates grid of thumbnail for (var i = 0; ithumbnails.length; i++) { //drawSquare creates the thumbnails inside of the MC tg var clip:MovieClip = drawSquare(tg, i, 0, 0, 0, 40, 40); //used 45 to space each thumb 5px apart. (thumb width +5) clip._x = (i%columns)*45; clip._y = Math.floor(i/rows)*45; } } /code I want the first grid to be 25 boxes then the second get built to the right of the first at the same y position as the first. Any ideas would be helpful. Thanks! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@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] Persistent Game AI for Off-screen baddies
Really great advice there guys, thanks a lot :) I had my suspicions it would be done like this, but needed to be reassured by the Ninja's. Luckily the game logic is separated from the display, in a similar way to how you're describing. I currently have multiple scrolling engines, each representing a layer of parallax. I'm guessing I just need to duplicate a single 'terrain' scrolling engine (which is never actually drawn) and combine it with the necessary collision detection for each baddy that needs AI. Cheers folks! J Joshua Sera wrote: Separate your display code from your game logic. One thing that I see frequently is people inheriting directly from movie clips for their game objects. This is bad because it encourages overuse of inheritance, and makes display/game logic separation harder. Usually, I'll have my game object as separate items, with their own x and y properties, then a viewport object for determining where you're looking. To determine what gets displayed, I'll check to see if the game object is within half a screen distance from the viewport, and if it is, and not already displayed, I'll attach a new movieclip, and position it relative to the screen center by the distance from the viewport to the game object. --- James Marsden [EMAIL PROTECTED] wrote: Hello all, When building a game where collision detection for enemies is important (such as a scrolling tile game), how do you create persistent AI for an enemy when it's off-screen? For example, walking away from the enemy causes it to be removed from the game area, but the enemy needs to keep wandering around the world in virtual terms, so the player can't easily tell where the enemy is going to be when returning to the same area. How do you maintain that interaction for the enemy, or is it not done like that because it's too processor intensive? Any tips or pointers to resources would be much appreciated. Thanks! James ___ 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 __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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] blendMode in as3
I'm not sure I understand what you're trying to do, so I'll take a shot at this. I think there might be a confusion between blend mode and alpha. Applying a blend mode to a MC is a single-step process, which says give this MC a blend mode of darken. This is akin to a PS layer mode, so Darken will color only those pixels below it that are lighter. There aren't varying degrees of the darken blend mode, so you can't set it to 10 and increment it. Incrementing a blend mode assignment, if that's still supported in AS3, will cycle through different blend modes. I wouldn't use the integer assignment--again, assuming it's still supported, but would use the constant assignment instead. There are other things I'm not sure about, like the multiple x assignment and the unfinished array line, but here's what I think might work: import flash.display.*; import flash.filters.*; import flash.display.BlendMode; var mcArray:Array = new Array(); for(var i:uint=0; i20; i++) { var myMC:MovieClip = new movie1(); //myMC.x=222; //either omit this myMC.y=186; myMC.x = i*40; //or use += ? myMC.rotation=i*20; addChild(myMC); trace(mcArray); mcArray.push(myMC); // change to push? myMC.blendMode = BlendMode.DARKEN; trace(myMC); } The darken blend mode, however, will just affect underlying pixels, so your MC will have to have more varying colors to see any effect. You might want to look into .alpha, which controls opacity, to see if that's what you want. Sorry if I misunderstood. Rich On 4/27/07 12:11 PM, Gustavo Duenas [EMAIL PROTECTED] wrote: import flash.display.*; import flash.filters.*; import flash.display.BlendMode; var blen1:BlendMode = new BlendMode(); blen1= blen1.DARKEN=10; //funcion de array repetidos. var mcArray:Array = new Array(); for(var i:uint=0; i20; i++) { var myMC:MovieClip = new movie1(); myMC.x=222; myMC.y=186; myMC.x = i*40; myMC.rotation=i*20; addChild(myMC); trace(mcArray); mcArray[myMC]; myMC.blen1=blen1+i; trace(myMC); } ___ 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] Wave effect
One thing you're doing right is that you're not using an easing function to move the center of magnification to the mouse pointer. I looked at that mandchou site, and it's really not good from a usability standpoint. OSX's magnification feature is directly tied to the pointer, which means that you don't have to chase icons down, which is something that you don't even have to know anything about usability to know to avoid. The thing causing that awkward pop on your version is that you're using the distance from the icon to the pointer to know when to magnify or not. This distance shrinks or grows depending on how big the icon is, which leads to weird feedback. Also, if you have a mac handy, turn on magnification on the dock. Notice that when you mouse over the dock, the icons move away from the magnified icons in both directions, whereas in your example, they only move away form the magnified ones downwards. Really, if you want that effect, follow OSX's example, and not mandchou's. --- Parvaiz Patel [EMAIL PROTECTED] wrote: Hi Guys, Actually I want to achieve the smoothness of that menu (created in http://www.mandchou.com/) I am developing an application for my client in which everything is loaded dynamically from MS-SQL server via ASP.Net frame work into flash. Here is the URL which is in the first stage of development. http://dev.mohawkind.com/vp/LeesVirtualPortfolio.html Here I use XML to communicate with database via asp.net The script I use on each dynamically loaded thumbnails to enlarge when mouse come closer is the following: onClipEvent (mouseMove) { dist = Math.sqrt(Math.pow(Math.abs(_xmouse), 2) + Math.pow(Math.abs(_ymouse), 2)); if (dist=_root.menutriggerdist) { currscale = (1 - dist / (_root.menumultiplier * _root.menutriggerdist)) * (_root.menumaxscale - 100); this._xscale = currscale; this._yscale = currscale; } else { this._xscale = 100; this._yscale = 100; } // end else if } / _root.menutriggerdist = 40; _root.menumaxscale = 580; _root.menumultiplier = 1.50E+000; / guys, please help me to make this smoother. Thanks very much. PP -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas Sent: Friday, April 27, 2007 8:52 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Wave effect I tell you marcelo, I've seen it every whereEven one with that idea won in thewfa.com, course not exactly at the mac is, but the spirit is in it. Regards Gustavo Duenas On Apr 27, 2007, at 10:49 AM, Marcelo de Moraes Serpa wrote: Very well made site btw... inspiring! I liked the mac dock effect even though it's said to be the new fashion among designers. On 4/27/07, Robert Brisita [EMAIL PROTECTED] wrote: This is MAC only. :) That's funny. Michael Stuhr wrote: Parvaiz Patel schrieb: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP This is MAC only. micha *sorry couldn't resist. ___ 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 Gustavo Duenas Creative Director LEFT AND RIGHT SOLUTIONS LLC 1225 W. Beaver St. Suite 119 Jacksonville, Fl. 32204 904 . 2650330 www.leftandrightsolutions.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] SendAndLoad
How long does the server waits before it returns an error message? Say I sent 40 variables to the server and the server receives the variables but doesn't process them correctly so it just hangs there, does flash has a time limit to wait for a response before spitting out an error message? TIA ___ 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] blendMode in as3
no! man, you didn't thanks. I, really appreciate your help. Regards gustavo Duenas On Apr 27, 2007, at 2:07 PM, Lists wrote: I'm not sure I understand what you're trying to do, so I'll take a shot at this. I think there might be a confusion between blend mode and alpha. Applying a blend mode to a MC is a single-step process, which says give this MC a blend mode of darken. This is akin to a PS layer mode, so Darken will color only those pixels below it that are lighter. There aren't varying degrees of the darken blend mode, so you can't set it to 10 and increment it. Incrementing a blend mode assignment, if that's still supported in AS3, will cycle through different blend modes. I wouldn't use the integer assignment--again, assuming it's still supported, but would use the constant assignment instead. There are other things I'm not sure about, like the multiple x assignment and the unfinished array line, but here's what I think might work: import flash.display.*; import flash.filters.*; import flash.display.BlendMode; var mcArray:Array = new Array(); for(var i:uint=0; i20; i++) { var myMC:MovieClip = new movie1(); //myMC.x=222; //either omit this myMC.y=186; myMC.x = i*40; //or use += ? myMC.rotation=i*20; addChild(myMC); trace(mcArray); mcArray.push(myMC); // change to push? myMC.blendMode = BlendMode.DARKEN; trace(myMC); } The darken blend mode, however, will just affect underlying pixels, so your MC will have to have more varying colors to see any effect. You might want to look into .alpha, which controls opacity, to see if that's what you want. Sorry if I misunderstood. Rich On 4/27/07 12:11 PM, Gustavo Duenas [EMAIL PROTECTED] wrote: import flash.display.*; import flash.filters.*; import flash.display.BlendMode; var blen1:BlendMode = new BlendMode(); blen1= blen1.DARKEN=10; //funcion de array repetidos. var mcArray:Array = new Array(); for(var i:uint=0; i20; i++) { var myMC:MovieClip = new movie1(); myMC.x=222; myMC.y=186; myMC.x = i*40; myMC.rotation=i*20; addChild(myMC); trace(mcArray); mcArray[myMC]; myMC.blen1=blen1+i; trace(myMC); } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com Gustavo Duenas Creative Director LEFT AND RIGHT SOLUTIONS LLC 1225 W. Beaver St. Suite 119 Jacksonville, Fl. 32204 904 . 2650330 www.leftandrightsolutions.com ___ 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] Duplicating a movieclip/sprite in AS3
Hey everyone, I can't seem to figure out how to duplicate a sprite in AS3. Thanks to various tutorials online, I got so far as to take the constructor of the sprite I want to duplicate and instantiate a new one. var targetClass:Class = (stamp as Object).constructor; mStamp = new targetClass() as Sprite; This works in normal situations. However, the sprite I'm getting are SWF's loaded at runtime. If I trace a normal asset's constructor it will trace as [Object myasset], but no matter what I do, my externally loaded SWF's constructors all trace as [Object MovieClip] or [Object AVM1Movie]. So of course creating a new instance of the constructor will result in a blank, fresh-made movieclip. Basically my external SWFs are just some graphics on stage in one frame. I've tried setting the document class, and publishing as Flash 8, 9, Actionscript 2, Actionscript 3, and nothing changes. I'm not using Flash CS3 yet, just the AS3 Alpha for making assets and then compiling with Flex 2 SDK. Anyone? Thanks! ben ___ 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] Wave effect
http://www.reflektions.com/miniml/ has a ton of info on this and more. Check out: http://www.reflektions.com/miniml/template_permalink.asp?id=356 http://www.reflektions.com/miniml/template_permalink.asp?id=108 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Friday, April 27, 2007 6:02 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Wave effect google: flash mac dock here's one: http://jrgraphix.net/research/flash-dock-mx-2004.php there's more of them, check google. - Original Message - From: Parvaiz Patel [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, April 27, 2007 2:50 PM Subject: [Flashcoders] Wave effect Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP ___ 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] Clear Set Interval Q:
I got to thinking... The problem with setting a single interval using setCurrentInterval is that you can only have one interval running at a time, while the problem with clearAllIntervals intervals is being forced to reset those you want to keep. So I just wanted to share another idea, clearing all intervals EXCEPT those you want to keep. // // CLEAR ALL INTERVALS - EXCEPT // function clearAllIntervalsExcept ( a:Array ) { var x = {}; for ( var i in a ){ x [ '_' + a [ i ] ] = 1; }; // create new interval var id = setInterval ( this, 'blank', 0 ); while ( id != 0 ) { // count through all intervals and clear them one by one // except those defined in the array if ( !x [ '_' + id ] ) clearInterval ( id ); id--; } } function test () { trace ( arguments ); } var _1 = setInterval ( this, 'test', 0, 1, 0 ); var _2 = setInterval ( this, 'test', 0, 2, 0 ); var _3 = setInterval ( this, 'test', 10, 3, 10 ); var _4 = setInterval ( this, 'test', 100, 4, 100 ); var _5 = setInterval ( this, 'test', 1000, 5, 1000 ); var exceptionArray = [ _4, _5 ]; clearAllIntervalsExcept ( exceptionArray ); // only _4 and _5 will run _ Jesse Graupmann www.jessegraupmann.com www.justgooddesign.com/blog/ _ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jesse Graupmann Sent: Thursday, April 26, 2007 9:13 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Clear Set Interval Q: @ Muzak Clearing the previous interval works as expected. I'm showing the same example with a little more padding to illustrate how it might be better used inside another function - the benefit being the ability to still keep track of the most current interval id. // // ONLY ONE INTERVAL // function setCurrentInterval () { var id = setInterval.apply ( null, arguments ) clearInterval ( id - 1 ); return id; } function something () { trace( 'something' ); } var id = setCurrentInterval ( this, something, 0 ) var id = setCurrentInterval ( this, something, 10 ) var id = setCurrentInterval ( this, something, 100 ) var id = setCurrentInterval ( this, something, 1000 ) trace( 'ID: ' + id ); Personally I hate intervals, and I don't mind saying that. For all the problems they cause due to scope issues and whatnot, but unfortunately you can't avoid them if you really care about time. So I say just clear them all. // // CLEAR ALL INTERVALS // function clearAllIntervals ( ) { // create new interval var id = setInterval ( this, 'blank', 0 ); while ( id != 0 ){ // count through all intervals and clear them one by one clearInterval ( id ) id-- } } clearAllIntervals ( ); Through the course of this discussion about the never ending saga of intervals, a few things beyond the last example stood out at me. setInterval is probably just using 'apply' when you don't supply scope. // // SCOPE TEST // function whoAmI () { trace ( 'I am: ' + this + ' saying: ' + arguments ); } whoAmI.apply ( this, ['Hello World'] ) whoAmI.apply ( null, ['Hola World'] ) setInterval ( whoAmI, 100, 'Goodbye World' ); // I am: _level0 saying: Hello World // I am: undefined saying: Hola World // I am: undefined saying: Goodbye World And for as often and inaccurate as they want to fire, I often think the best solution is to check time change from the last frame to the current with whatever method. I assumed Intervals only fired once per frame, but apparently they fire as often and as accurate as they 'can'. // //ONENTERFRAME VS. SETINTERVAL // fTime = getTimer() iTime = getTimer(); var frame = 0; var id = setInterval ( this, 'onInterval', 0 ); function onInterval () { var now = getTimer(); var change = now - iTime; iTime = now; trace( 'onInterval: \tf: ' + ( frame ) + '\tc: ' + change ); } this.onEnterFrame = onFrame; function onFrame() { var now = getTimer(); var change = now - fTime; fTime = now trace( '\nonFrame: \tf: ' + ( frame++ ) + '\tc: ' + change + newline); } // onFrame:f: 1c: 85 onInterval: f: 2c: 8 onInterval: f: 2c: 8 onInterval: f: 2c: 9 onInterval: f: 2c: 8 onInterval: f: 2c: 7 onInterval: f: 2c: 8 onInterval: f: 2c: 8 onInterval: f: 2c: 9 onInterval: f: 2
[Flashcoders] flowcharting
Hi guys, Does any of you use flow charting to map out projects/screens/functionality? If so - what are you using to draw them. I don't have excel which I used before and am looking for some shareware or other small but beautifully formed solution. -- Nik C ___ 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] flowcharting
OpenOffice has a nice drawing tool with all of the flowcharting symbols defined. www.openoffice.org You can colour and shade them to your hearts content. I built a flowcharting add-on to Compendium www.compendiuminstitute.org http://www.compendiuminstitute.org/community/bpa.html is a link to a case study on what I did. This adds flowcharting to the functionality of Compndium which is a great tool for all kinds of knowledge management and presentation. ArgoUML is a free UML modelling package which is also pretty useful (Use Cases, Class Diagrams, Sequence Diagrams, State Diagrams, etc.) Ron nik crosina wrote: Hi guys, Does any of you use flow charting to map out projects/screens/functionality? If so - what are you using to draw them. I don't have excel which I used before and am looking for some shareware or other small but beautifully formed solution. ___ 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] flowcharting
Looked at openoffice and fell in love! Thanks, Ron!! Have a nice weekend, Nik On 4/27/07, Ron Wheeler [EMAIL PROTECTED] wrote: OpenOffice has a nice drawing tool with all of the flowcharting symbols defined. www.openoffice.org You can colour and shade them to your hearts content. I built a flowcharting add-on to Compendium www.compendiuminstitute.org http://www.compendiuminstitute.org/community/bpa.html is a link to a case study on what I did. This adds flowcharting to the functionality of Compndium which is a great tool for all kinds of knowledge management and presentation. ArgoUML is a free UML modelling package which is also pretty useful (Use Cases, Class Diagrams, Sequence Diagrams, State Diagrams, etc.) Ron nik crosina wrote: Hi guys, Does any of you use flow charting to map out projects/screens/functionality? If so - what are you using to draw them. I don't have excel which I used before and am looking for some shareware or other small but beautifully formed solution. ___ 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 -- Nik C ___ 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] Duplicating a movieclip/sprite in AS3
Personally I wouldn't try mixing the Alpha Preview with Flex. It's not feature complete and certain things will be quite different in FCS3. For instance there's the Flex Component Kit for FCS3 that makes Flex/Flash integration ALOT easier: http://labs.adobe.com/wiki/index.php/Flex_Component_Kit_for_Flash_CS3 AFAIK, there's no easy way to make copies of loaded swf's. If they're nothing more than simple graphics, I'd say the easiest way to make copies is to use the BitmapData class. Here's an example (using mxml), where I'm loading a Flash 8 swf containing a simple graphic (bitmap) on stage. The swf is loaded into an Image component. Once loaded, the Image content (AVM1Movie) is copied. Then the new BitmapData is set as the source of another Image component. You should be able to do the same in AS3 with the Loader class instead of an Image component. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private function swfCompleteHandler(evt:Event):void { trace(Application ::: swfCompleteHandler); trace(evt.currentTarget.content); var t:Image = evt.currentTarget as Image var c:AVM1Movie = t.content as AVM1Movie; trace(- content width: +t.content.width); trace(- content height: +t.content.height); // var bmd:BitmapData = new BitmapData(t.contentWidth, t.contentHeight); // or //var bmd:BitmapData = new BitmapData(c.width, c.height); bmd.draw(c as IBitmapDrawable); swfCopy_img.source = new Bitmap(bmd); } ]] /mx:Script mx:VBox mx:Image source=f8_movie.swf scaleContent=false complete=swfCompleteHandler(event) / mx:Image id=swfCopy_img / /mx:VBox /mx:Application regards, Muzak - Original Message - From: ben gomez farrell [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Friday, April 27, 2007 9:32 PM Subject: [Flashcoders] Duplicating a movieclip/sprite in AS3 Hey everyone, I can't seem to figure out how to duplicate a sprite in AS3. Thanks to various tutorials online, I got so far as to take the constructor of the sprite I want to duplicate and instantiate a new one. var targetClass:Class = (stamp as Object).constructor; mStamp = new targetClass() as Sprite; This works in normal situations. However, the sprite I'm getting are SWF's loaded at runtime. If I trace a normal asset's constructor it will trace as [Object myasset], but no matter what I do, my externally loaded SWF's constructors all trace as [Object MovieClip] or [Object AVM1Movie]. So of course creating a new instance of the constructor will result in a blank, fresh-made movieclip. Basically my external SWFs are just some graphics on stage in one frame. I've tried setting the document class, and publishing as Flash 8, 9, Actionscript 2, Actionscript 3, and nothing changes. I'm not using Flash CS3 yet, just the AS3 Alpha for making assets and then compiling with Flex 2 SDK. Anyone? Thanks! ben ___ 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