[Flashcoders] php proxy
Hi list, I'm looking for a good proxy solution to circumvent flash cross domain policies. Fact is I'm not a php geek and can't discern whether the google results I've found open up major security holes in my server. I;m looking for something that will allow me to proxy files from remote server, allow me to specify which servers are allowed to be proxied, and maybe implement some kind of token mechanism making it a little harder to call the proxy from just anywhere. Any ideas/resources would be appreciated. regards JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] php proxy
Hi Glen, thanks, but I missing this part , allow me to specify which servers are allowed to be proxied, and maybe implement some kind of token mechanism making it a little harder to call the proxy from just anywhere :) Any other ones? thanks! JC On Fri, Feb 6, 2009 at 1:11 PM, Glen Pike g...@engineeredarts.co.uk wrote: http://xmlrpcflash.mattism.com/proxy_info.php Hans Wichman wrote: Hi list, I'm looking for a good proxy solution to circumvent flash cross domain policies. Fact is I'm not a php geek and can't discern whether the google results I've found open up major security holes in my server. I;m looking for something that will allow me to proxy files from remote server, allow me to specify which servers are allowed to be proxied, and maybe implement some kind of token mechanism making it a little harder to call the proxy from just anywhere. Any ideas/resources would be appreciated. regards JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to know coordinates of letters in non fixed-width fonts
and for as2: http://objectpainters.com/blog/2008/10/12/finding-character-positions/ On Tue, Feb 24, 2009 at 1:24 AM, Matt Gitchell m...@moonbootmedia.comwrote: Is this AS3? you can use TextField.getCharBoundaries() I used it in an experiment a while back here to pretty good effect: http://www.moonbootmedia.com/interactive/m/textcompare.html --Matt On Mon, Feb 23, 2009 at 3:01 PM, Glen Pike postmas...@glenpike.co.uk wrote: Hi, You should be able to get the width of each sprite with the single letter in??? Maybe mask the stream area out. Start each letter at x - letterWidth, increase the x after each interval, when the letter reaches x=0, create show the next one, add it to your array. Loop through the array each timer increasing the x position of the letters, removing them when they reach the other side??? Something like that??/ Glen ali drongo wrote: Hi there, I'm animating some letters that are dynamically created in their own sprites across the screen as if they are being fired in a stream. Currently I am using a fixed width font so it's straight forward to find their final position. My problem is that I need to use a non fixed-width font and I don't know how to calculate the position of each letter. Any ideas very gratefully received! Thanks :) Ali ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ 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] Duplicate Bitmap and scale question
Hi, you create a clip based on mc's width, called img. then you scale image, so its width is half of what it used to be. Then you draw img into img2. Img2's size is based on half the height and width, but the draw method ignores those transformation, so it draws an unscaled version of img in img2. regards JC On Sun, Mar 1, 2009 at 3:58 PM, natalia Vikhtinskaya natavi.m...@gmail.comwrote: Hi Please explain what is wrong in this code: function duplicateMovieClipImage(from:MovieClip, target:MovieClip){ var visuals = new flash.display.BitmapData(from._width, from._height); visuals.draw(from); target.attachBitmap(visuals, 1,auto,true); } duplicateMovieClipImage(mc,img) img._xscale=50; img._yscale=50; duplicateMovieClipImage(img,img2) I expected that img1 and img2 have the same scale. Instead of that img2 show 50% of mc. ___ 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] OOP AS3 learning
Hey Pedro, i think with as3 the remark that OOP is only for big projects is not strictly true anymore (and it wasn't with as2 either). The thing is though that as3 forces your hand more than as2 did, it terms that every movieclip can be a class as well etc, so if you create one clip in the library that you want to add to the stage using as3, you're already OOP-ing. I think it would be better to say that employing complex design patterns and a rocksolid OOP architecture is more suited to big projects than to small projects. And with small I then mean small projects that are going to stay small. The reason is mostly that employing a solid architecture and design patterns might require a lot of work up front, which will pay itself back as the project gets bigger and bigger. If your project stays small it's easier to manage your hacks and shortcuts. That isn't to say that you shouldnt design upfront or use design patterns in small projects, only that you must take care that the architecture and designpatterns don't become an end onto itself, they are a means to an end. For pluses and minuses, just a few I advise you to pick up as 3 design patterns, it's an easy read. Pluses: - common vocabulary makes communicating about your projects to other easier - time proven solutions prevent you from reinventing the wheel Minuses: - may make your application overly complex without good reasons to do so I saw an example once of a hello world application as a joke, which they refactored, ending up with a lot of classes and designs pattern, for just a hello world application. Like I said it was a joke, meant to teach you to match up the complexity of your application with the complexities of the design artifacts you apply. The best situation I think is where your framework allows you to start out very simple, and allows your application to evolve and be refactored along the way as demands on your application grow. We had that framework in as 2, and havent yet in as3 unfortunately, but I'm sure we will eventually:). regards JC On Thu, Mar 5, 2009 at 12:16 PM, Pedro Kostelec pedrok...@gmail.com wrote: Hi Can you recommend a good source for learning OOP in as3? Until now i found two books: ActionScript 3.0 Design Patterns - Object Oriented Programming Techniques By William B. Sanders http://www.oreillynet.com/pub/au/2820, Chandima Cumaranatunge http://www.oreillynet.com/pub/au/2931 and: Object-Oriented ActionScript 3.0 by Todd Yard http://www.amazon.com/exec/obidos/search-handle-url/ref=ntt_athr_dp_sr_1?%5Fencoding=UTF8search-type=ssindex=booksfield-author=Todd%20Yard (Author), Peter Elst http://www.amazon.com/exec/obidos/search-handle-url/ref=ntt_athr_dp_sr_2?%5Fencoding=UTF8search-type=ssindex=booksfield-author=Peter%20Elst (Author), Sas Jacobs http://www.amazon.com/exec/obidos/search-handle-url/ref=ntt_athr_dp_sr_3?%5Fencoding=UTF8search-type=ssindex=booksfield-author=Sas%20Jacobs (Author) Which one is better? What i am looking for is a book (max 500 pages) with an overview of the different design patterns, and some case studies or examples on how to write OOP I have one question that i can't really understand: Why people say OOP programming is only for big projects? What are the pluses and minuses of sticking to some design patterns? Pedro D. Kostelec ___ 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] Duplicate Bitmap and scale question
Out of the top of my head: function duplicateMovieClipImage(from:MovieClip, target:MovieClip){ var visuals = new flash.display.BitmapData(from._width, from._height); var m:Matrix = new Matrix(); //dont forget to import this m.scale (from._xscale/100, from._yscale/100); visuals.draw(from, m); target.attachBitmap(visuals, 1,auto,true); } On Thu, Mar 5, 2009 at 12:54 PM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: How to create img2 correctly? 2009/3/4 Hans Wichman j.c.wich...@objectpainters.com: Hi, you create a clip based on mc's width, called img. then you scale image, so its width is half of what it used to be. Then you draw img into img2. Img2's size is based on half the height and width, but the draw method ignores those transformation, so it draws an unscaled version of img in img2. regards JC On Sun, Mar 1, 2009 at 3:58 PM, natalia Vikhtinskaya natavi.m...@gmail.comwrote: Hi Please explain what is wrong in this code: function duplicateMovieClipImage(from:MovieClip, target:MovieClip){ var visuals = new flash.display.BitmapData(from._width, from._height); visuals.draw(from); target.attachBitmap(visuals, 1,auto,true); } duplicateMovieClipImage(mc,img) img._xscale=50; img._yscale=50; duplicateMovieClipImage(img,img2) I expected that img1 and img2 have the same scale. Instead of that img2 show 50% of mc. ___ 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] OOP AS3 learning
lmao erm yes definately:) On Thu, Mar 5, 2009 at 2:04 PM, Paul Andrews p...@ipauland.com wrote: - Original Message - From: Hans Wichman j.c.wich...@objectpainters.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, March 05, 2009 12:08 PM Subject: Re: [Flashcoders] OOP AS3 learning snip If your project stays small it's easier to manage your hacks and shortcuts. I think you meant manage your lightweight interconnected architecture optimised for the smaller project and desparate client.. ;-) LOL Paul snip regards JC ___ 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] Duplicate Bitmap and scale question
I'm guessing the point is to create a scaled version for some reason;) if not well yes thats even easier:) On Thu, Mar 5, 2009 at 5:02 PM, Keith Reinfeld keithreinf...@comcast.netwrote: How to create img2 correctly? The same way you created img: duplicateMovieClipImage(mc,img2); img2._xscale=50; img2._yscale=50; Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders- boun...@chattyfig.figleaf.com] On Behalf Of natalia Vikhtinskaya Sent: Thursday, March 05, 2009 5:54 AM To: Flash Coders List Subject: Re: [Flashcoders] Duplicate Bitmap and scale question How to create img2 correctly? 2009/3/4 Hans Wichman j.c.wich...@objectpainters.com: Hi, you create a clip based on mc's width, called img. then you scale image, so its width is half of what it used to be. Then you draw img into img2. Img2's size is based on half the height and width, but the draw method ignores those transformation, so it draws an unscaled version of img in img2. regards JC On Sun, Mar 1, 2009 at 3:58 PM, natalia Vikhtinskaya natavi.m...@gmail.comwrote: Hi Please explain what is wrong in this code: function duplicateMovieClipImage(from:MovieClip, target:MovieClip){ var visuals = new flash.display.BitmapData(from._width, from._height); visuals.draw(from); target.attachBitmap(visuals, 1,auto,true); } duplicateMovieClipImage(mc,img) img._xscale=50; img._yscale=50; duplicateMovieClipImage(img,img2) I expected that img1 and img2 have the same scale. Instead of that img2 show 50% of mc. ___ 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] Check for Full Screen Availability
Hi, how about switching to full screen and back, and catching any security exceptions? If you can switch and back it is allowed, if a security exception occurs, it isn't greetz JC On Wed, Mar 11, 2009 at 6:34 PM, Glen Pike g...@engineeredarts.co.ukwrote: Aha, I see - don't think you can read this for some strange reason. I had problems trying to get it working, probably part of the security thing. I could not even get a context menu to do the same... Glen John Giotta wrote: Yes, Stage.displayState vs StageDisplayState.NORMAL or StageDisplayState.FULL_SCREEN, but its always NORMAL and I can only compare when full screen is the event for resize is called. Its a reactionary condition; I need the event first. I want to know if its possible from a security/capability stand point before the end-user has the chance request full screen. - John G On Wed, Mar 11, 2009 at 10:20 AM, Glen Pike g...@engineeredarts.co.uk wrote: John Giotta wrote: I want to render the UI based on availability of features. One of them is a full screen Button/Sprite that I want to not appear if allowFullScreen is false. Does anyone know of a way to check for full screen availability? I've been scouring the interwebs for an answer, but no luck so far. Is it just not possible? - John G ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders I think there is a property on the Stage instance to get the state - compare to StageDisplayState constant values?? ___ 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] using applyFilter with a BitmapData object (AS2)
Hi, yes it is destructive, but as you can read here: http://www.adobe.com/devnet/flash/articles/image_api_05.html you can find out the size of the bitmap after filtering (imagine a big blur), create a new bitmap and specify a source bitmap to the applyfilter call. If you don't want it to be destructive, attach the bitmap to a movieclip first, and set the filters on that. HTH JC On Wed, Mar 11, 2009 at 6:14 PM, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: Hi guys I have a question - if I use a ColorMatrixFilter on a BitmapData object, does it work like mc.filters = arFiltersArray in that it is non-destructive to the mc (it can be removed) or is it destructive (once you apply it, you can't then un-apply it)? ta a ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Particle Playground, Flash 10 General Purpose Comuting with Pixel Bender
awesome:) On Wed, Mar 18, 2009 at 12:45 PM, mike cann mike.c...@gmail.com wrote: Hey List, I have been playing around with particles again... I have just released my latest little saunter into the world of particles and shaders in flash 10. It started off as and idea to use the new pixel bender shaders of flash 10 as a more efficient method of updating particle simulations. Well after a few struggling evenings I managed to get a little prototype going. I was so amazed at some of the beautiful patterns and effects that the particles were making I thought it may be nice rather than just releasing a tech demo, to add abit more to it and release it for others to enjoy. I will be releasing the source code in the coming weeks along with a blog post which should explain in detail how the technical aspects of updating and rendering tens of thousands of particles per frame works. The tool features a gallery tab which you can use to take screenshots then upload them to my picassa account (proxyed via php). The hope is to get some realy beautiful images in here, perhaps if some are good enough ill get them printed and framed ;) You can see it in action over on my blog: http://www.mikecann.co.uk/?p=384 Let me know what you think! Mike Cann http://www.mikecann.co.uk/ http://www.artificialgames.co.uk/ ___ 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] swfobject 2.1
Hi list, I reinstalled my pc recently and I only installed the latest flash 10 player. I opened my site and it tells me I don't have flash installed (using swfobject 2.1). So just for fun, I installed player version 6, and now it tells me I have version 10 installed. Can anyone tell me what is going on? (swfobject tests for a minimum version of 8.0.0) regards, Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] setBufferTime on stream locks up flashplayer
Hi list, when setting the buffertime on a stream thats played through http, setting the buffertime completely locks up my interface for a few seconds. has anyone seen this before? regards, Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] setBufferTime on stream locks up flashplayer
Im getting it on 8, 9 and 10 :( On Fri, Mar 20, 2009 at 3:47 PM, Glen Pike g...@engineeredarts.co.ukwrote: I had a problem with FP9 connecting to a http stream which went with FP10... Hans Wichman wrote: Hi list, when setting the buffertime on a stream thats played through http, setting the buffertime completely locks up my interface for a few seconds. has anyone seen this before? regards, Hans ___ 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] Storing x and y in a bytearray
ah no then you'll be fine ! Although if it's just a simple shape, hittest will work as well of course, depending on the performance you need. On Mon, Mar 30, 2009 at 1:52 PM, Jiri jiriheitla...@googlemail.com wrote: On stage there is a draw shape. I copy it to BitmapData and use the transparancy for testing walkable or not. So i dont use compressed image format, just raw bitmap data. Or am i missing something? Jiri Hans Wichman wrote: yup exactly, only thing is that I'm not sure how detailed this info can be when using compressed image formats... On Mon, Mar 30, 2009 at 1:13 PM, Jiri jiriheitla...@googlemail.com wrote: Good point, i can use getPixel to retrieve the color value and based on that 'know' if it is walkable. Cheers. Jiri Hans Wichman wrote: Hi, why not use an image? Eg use an image that represents your area, lookup the pixel values, AND them and decide what you can or cannot do in that area. greetz JC On Mon, Mar 30, 2009 at 12:41 PM, Jiri jiriheitla...@googlemail.com wrote: I have a byte question. I have to store a walkable area so a character 'knows' where it can walk or not. Currently I am using a multi-dim array based on the x and y pos of the tiles . so [[1],[0],[1]..etc] where pos(0,0) = array[0][0] = 1 (walkable) I was wondering if I could store this using a bytearray, for storing and possibly faster lookup using bitwise operators. I am very knew to this, so I am ot sure where to begin and how to deal with it. The range of int is sufficient to store all the data, because a full walkarea would take 370560 (772*480) elements in the previous mentioned multi array. I could be completely wrong, but would like some advice. 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Storing x and y in a bytearray
yup exactly, only thing is that I'm not sure how detailed this info can be when using compressed image formats... On Mon, Mar 30, 2009 at 1:13 PM, Jiri jiriheitla...@googlemail.com wrote: Good point, i can use getPixel to retrieve the color value and based on that 'know' if it is walkable. Cheers. Jiri Hans Wichman wrote: Hi, why not use an image? Eg use an image that represents your area, lookup the pixel values, AND them and decide what you can or cannot do in that area. greetz JC On Mon, Mar 30, 2009 at 12:41 PM, Jiri jiriheitla...@googlemail.com wrote: I have a byte question. I have to store a walkable area so a character 'knows' where it can walk or not. Currently I am using a multi-dim array based on the x and y pos of the tiles . so [[1],[0],[1]..etc] where pos(0,0) = array[0][0] = 1 (walkable) I was wondering if I could store this using a bytearray, for storing and possibly faster lookup using bitwise operators. I am very knew to this, so I am ot sure where to begin and how to deal with it. The range of int is sufficient to store all the data, because a full walkarea would take 370560 (772*480) elements in the previous mentioned multi array. I could be completely wrong, but would like some advice. 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] Storing x and y in a bytearray
Hi, why not use an image? Eg use an image that represents your area, lookup the pixel values, AND them and decide what you can or cannot do in that area. greetz JC On Mon, Mar 30, 2009 at 12:41 PM, Jiri jiriheitla...@googlemail.com wrote: I have a byte question. I have to store a walkable area so a character 'knows' where it can walk or not. Currently I am using a multi-dim array based on the x and y pos of the tiles . so [[1],[0],[1]..etc] where pos(0,0) = array[0][0] = 1 (walkable) I was wondering if I could store this using a bytearray, for storing and possibly faster lookup using bitwise operators. I am very knew to this, so I am ot sure where to begin and how to deal with it. The range of int is sufficient to store all the data, because a full walkarea would take 370560 (772*480) elements in the previous mentioned multi array. I could be completely wrong, but would like some advice. 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] Bitwise selection
Hi, isn't the absence of break statements messing things up? greetz JC On Thu, Apr 2, 2009 at 12:08 PM, Jiri jiriheitla...@googlemail.com wrote: I am new to bitwise operators, so I am trying to learn it. I have the following code and it works half. I am using a switch case to get the result, but this is messing things up. I could revert to and if - else statement, but I was wondering if there is a more elagant way of doing it. I post my code below, and would have some advice. var NO_RESTRICTION:int = 1; var NUM_ONLY:int = 2; var CHAR_ONLY:int = 4; var RESTRICTION:int = NUM_ONLY ; function setInputCharRestriction(tInt:int):void { RESTRICTION = tInt | tInt2 | tInt3; } function getRestrict():String{ var tRestrict:String = ''; trace('all ' , Boolean(RESTRICTION1)) trace('num ' , Boolean(RESTRICTION2)) trace('char ' ,Boolean(RESTRICTION4)) switch(RESTRICTION){ case RESTRICTION1 : tRestrict +=\u0020-\u007E; trace('all') case RESTRICTION2: tRestrict = 0-9; trace('num') case RESTRICTION4: tRestrict = A-Z a-z; trace('char') } trace('restrict field ' , tRestrict) return tRestrict; } getRestrict() 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
Re: [Flashcoders] Loading MC
Hi Karl, your best bet is probably to checkout the imageloader source from martijn de visser that you are using, and adapt that to be able to get at the values you want. Maybe this works: target._width = target._width / 3; target._height = target._height / 3; _root.stage_mc[LargePic + ID].previewW = target._width; _root.stage_mc[LargePic + ID].previewH = target._height; regards, JC On Fri, Apr 3, 2009 at 12:03 PM, Karl DeSaulniers k...@designdrumm.comwrote: Hello, I was wondering if anyone can point me in the rigth direction. I have been trying for days now to figure this out. I know there is some little thing I am missing and its probably right under my nose so to speak. Here is my code: //-- // Start Image loader //-- import com.martijndevisser.ImageLoader; _root.stage_mc.attachMovie(LargePic,LargePic + ID,this.getNextHighestDepth()); _root.stage_mc[LargePic + ID].ID = ID; _root.stage_mc[LargePic + ID]._x = originalX; _root.stage_mc[LargePic + ID]._y = originalY; var mcProgress:Number = 0; var checkLoader:Object = new Object(); checkLoader.onLoadStart = function(target:MovieClip):Void { trace(Start Width: + _root.stage_mc[LargePic + ID].previewW); trace(Start Height: + _root.stage_mc[LargePic + ID].previewH); _root.stage_mc[LargePic + ID].newPic.spiralLoader._visible = true; _root.stage_mc[LargePic + ID].newPic.spiralLoader.gotoAndPlay(2); }; checkLoader.onLoadComplete = function(target:MovieClip) { target = _root.stage_mc[LargePic + ID].newPic.Image_mc; _root.stage_mc[LargePic + ID].newPic.percentCom.text = ; _root.stage_mc[LargePic + ID].newPic.spiralLoader.stop(); _root.stage_mc[LargePic + ID].newPic.spiralLoader.gotoAndStop(1); _root.stage_mc[LargePic + ID].newPic.spiralLoader._visible = false; target._width = target._width / 3; target._height = target._height / 3; _root.stage_mc[LargePic + ID].previewW = _root.stage_mc[LargePic + ID].newPic._width; _root.stage_mc[LargePic + ID].previewH = _root.stage_mc[LargePic + ID].newPic._height; trace(End Width: + _root.stage_mc[LargePic + ID].previewW); trace(End Height: + _root.stage_mc[LargePic + ID].previewH); }; checkLoader.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { mcProgress = Math.ceil((bytesLoaded / bytesTotal) * 100); _root.stage_mc[LargePic + ID].newPic.percentCom.text = mcProgress.toString() + %; }; var loader:ImageLoader = new ImageLoader(_root.stage_mc[LargePic + ID].newPic.Image_mc); loader.addListener(checkLoader); loader.loadImage(_global.projectPic,_root.stage_mc[LargePic + ID].newPic.Image_mc); //-- // End Image Loader //-- To explain further, I have a oversized image loading at first which is sized down 3 times. Once it sizes down, I want previewW and previewH to equal the new width and height. Everything loads fine, it loads and the progress runs and it resizes fine, but when I hit my resize button to make it smaller, the variables previewW and previewH take on the dimensions of _root.stage_mc[LargePic + ID].newPic.Image_mc before anything was loaded into it. (my resize button works off of the previewW and previewH vairables, this info is just FYI) var fitSizeW:Number = previewW; var fitSizeH:Number = previewH; var maxSizeW:Number = (previewW * 3); var maxSizeH:Number = (previewW * 3); var minSizeW:Number = (previewW / 3); var minSizeH:Number = (previewH / 3); Note: I have to keep previewW and previewH also because I have a mousescroll attached to that variable as well. I have a feeling that because the ImageLoader class loads a dummy MC for the bitmap and then removes it to place the img MC for smoothing, my script is not getting the final value of what is loaded into it and so previewW and previewH do not inherit its final values, just its beginning values. There is a background bitmap that gets replaced by the loaded image that is in the MC when it is placed on stage. This is the beginning value. This is in AS2 BTW. Any help would be GREATLY appreciated at this point. THX Karl DeSaulniers Design Drumm http://designdrumm.com ___ 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] Creating Dynamic addEventListeners with AS3
Might it be possible to only add a single listener to the parent for all buttons? On Mon, Apr 6, 2009 at 3:10 AM, Rob Romanek robli...@manibus.com wrote: You can try something along the lines of var stateButton = getChildByName(State_ + rs[i]); stateButton.addEventListener(MouseEvent.CLICK, StateButtonClicked); hth, Rob On 5-Apr-09, at 8:33 PM, Graham Pearson wrote: What I am trying to do is when I retrieve the recordset back from the coldfusion component is to loop through the results like function GetClientsWithinCategory_Result(rs.Object) { for (var i:int = 0; i rs.length; i++) { State_rs[i].addEventListener(MouseEvent.CLICK, StateButtonClicked); // The Value of rs[i] will return the 2 letter abriviation of the State eg: IN, WI, etc } } How do I go about combining State_ + the result from rs[i] so that when a user clicks on Indiana it will run the actionscript within the State Button Clicked Function ___ 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] Loading MC
Hi, erm no that's not what I said:). Just read the original source file to deduct where it goes wrong, or try out the replacement I suggested in your own code. regards, JC On Mon, Apr 6, 2009 at 12:24 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey thanks for your thoughts. Do you mean take the code out of the class and put it directly in my fla? Karl Sent from losPhone On Apr 5, 2009, at 10:20 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi Karl, your best bet is probably to checkout the imageloader source from martijn de visser that you are using, and adapt that to be able to get at the values you want. Maybe this works: target._width = target._width / 3; target._height = target._height / 3; _root.stage_mc[LargePic + ID].previewW = target._width; _root.stage_mc[LargePic + ID].previewH = target._height; regards, JC On Fri, Apr 3, 2009 at 12:03 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hello, I was wondering if anyone can point me in the rigth direction. I have been trying for days now to figure this out. I know there is some little thing I am missing and its probably right under my nose so to speak. Here is my code: //-- // Start Image loader //-- import com.martijndevisser.ImageLoader; _root.stage_mc.attachMovie(LargePic,LargePic + ID,this.getNextHighestDepth()); _root.stage_mc[LargePic + ID].ID = ID; _root.stage_mc[LargePic + ID]._x = originalX; _root.stage_mc[LargePic + ID]._y = originalY; var mcProgress:Number = 0; var checkLoader:Object = new Object(); checkLoader.onLoadStart = function(target:MovieClip):Void { trace(Start Width: + _root.stage_mc[LargePic + ID].previewW); trace(Start Height: + _root.stage_mc[LargePic + ID].previewH); _root.stage_mc[LargePic + ID].newPic.spiralLoader._visible = true; _root.stage_mc[LargePic + ID].newPic.spiralLoader.gotoAndPlay(2); }; checkLoader.onLoadComplete = function(target:MovieClip) { target = _root.stage_mc[LargePic + ID].newPic.Image_mc; _root.stage_mc[LargePic + ID].newPic.percentCom.text = ; _root.stage_mc[LargePic + ID].newPic.spiralLoader.stop(); _root.stage_mc[LargePic + ID].newPic.spiralLoader.gotoAndStop(1); _root.stage_mc[LargePic + ID].newPic.spiralLoader._visible = false; target._width = target._width / 3; target._height = target._height / 3; _root.stage_mc[LargePic + ID].previewW = _root.stage_mc[LargePic + ID].newPic._width; _root.stage_mc[LargePic + ID].previewH = _root.stage_mc[LargePic + ID].newPic._height; trace(End Width: + _root.stage_mc[LargePic + ID].previewW); trace(End Height: + _root.stage_mc[LargePic + ID].previewH); }; checkLoader.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { mcProgress = Math.ceil((bytesLoaded / bytesTotal) * 100); _root.stage_mc[LargePic + ID].newPic.percentCom.text = mcProgress.toString() + %; }; var loader:ImageLoader = new ImageLoader(_root.stage_mc[LargePic + ID].newPic.Image_mc); loader.addListener(checkLoader); loader.loadImage(_global.projectPic,_root.stage_mc[LargePic + ID].newPic.Image_mc); //-- // End Image Loader //-- To explain further, I have a oversized image loading at first which is sized down 3 times. Once it sizes down, I want previewW and previewH to equal the new width and height. Everything loads fine, it loads and the progress runs and it resizes fine, but when I hit my resize button to make it smaller, the variables previewW and previewH take on the dimensions of _root.stage_mc[LargePic + ID].newPic.Image_mc before anything was loaded into it. (my resize button works off of the previewW and previewH vairables, this info is just FYI) var fitSizeW:Number = previewW; var fitSizeH:Number = previewH; var maxSizeW:Number = (previewW * 3); var maxSizeH:Number = (previewW * 3); var minSizeW:Number = (previewW / 3); var minSizeH:Number = (previewH / 3); Note: I have to keep previewW and previewH also because I have a mousescroll attached to that variable as well. I have a feeling that because the ImageLoader class loads a dummy MC for the bitmap and then removes it to place the img MC for smoothing, my script is not getting the final value of what is loaded into it and so previewW and previewH do not inherit its final values, just its beginning values. There is a background bitmap that gets replaced by the loaded image that is in the MC when it is placed on stage. This is the beginning value. This is in AS2 BTW. Any help would be GREATLY appreciated at this point. THX Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders
[Flashcoders] flash ocx on c++ form
Hi list, I'm adapting an existing c++ application, but I'm not well versed in it. I have a flash ocx on a form, which loads a movie fine the first time, but not the 2nd time. It seems timeline based flash files are no problem, but my class based swf is. It is initialized and loaded, but things like onEnterFrame do no longer work. In addition if I load another swf first, the background color is different and stays different from the movies I subsequently load. Does anyone have experience with resetting a flash ocx completely? regards, Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MovieClip inside MoveClip. Path confusion.
pages.page1.width :) On Thu, Apr 9, 2009 at 12:35 PM, Dav d...@funkdaweb.com wrote: Hi all, Wondering if anyone can help me with a problem that's left me scratching my head! Basically I have a main movieclip (group) and then several other movieclips inside it (page[1-6]). I was thinking I could access them like this group.page1, group.page2 and so on. However it is not working for me. Here is some stripped down sample code, obviously the moviclips have content rather than just being blank: /// var group:MovieClip = new MovieClip(); addChild(group); var pages:Object = new Object(); pages[page1]= new MovieClip(); pages[page2]= new MovieClip(); pages[page3]= new MovieClip(); pages[page4]= new MovieClip(); pages[page5]= new MovieClip(); pages[page6]= new MovieClip(); for each (var page:MovieClip in pages) { group.addChild(page); } group.page1.width = 200;// [Fault] exception, information=TypeError: Error #1010: A term is undefined and has no properties. Fault, initScene() at Main.as:103 So I get this error when trying to access the width of page1 inside group: [Fault] exception, information=TypeError: Error #1010: A term is undefined and has no properties. Fault, initScene() at Main.as:103 Any ideas how I can access the page movieclips within the group movieclip? Thanks! Dav ___ 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] arguments.caller.name in AS 3
Hi Lists, I was looking for a way to trace the name of the current function or the calling function and I came up with a hackish bit of code. Don't know if anyone already came up with something like this but anyway, I thought it was pretty cool so I'd like to share it with you. I'm still working on making it more general, and you should not use it in a production enviroment (unless the compiler directive is set to false) package nl.trimm.lang { /** * @author JC Wichman */ public class DebugUtil { public static function getCallingInfo(pInfo:String = , pFull:Boolean = false):String { return getInfo (pInfo, pFull, 2); } public static function traceCallingInfo(pInfo:String = , pFull:Boolean = false):void { trace (getCallingInfo (pInfo, pFull)); } public static function getCallerInfo(pInfo:String = , pFull:Boolean = false):String { return getInfo(pInfo, pFull, 3) } public static function traceCallerInfo(pInfo:String = , pFull:Boolean = false):void { trace (getCallerInfo (pInfo, pFull)); } private static function getInfo (pInfo:String = , pFull:Boolean = false, pIndex:Number = 0):String { CONFIG::EXTENDED_INFO_ON { try { throw new Error(); } catch (e:Error) { var lTrace:String = e.getStackTrace().split(\tat )[pIndex+1]; lTrace = pFull?lTrace:lTrace.split([)[0]; return (lTrace + - + pInfo); } } return pInfo; } } } Usage: - define a compiler directive and set it to true or false (can be optimized) Example: public class Test extends Sprite { public function Test():void { init(); } private function init():void { trace (DebugUtil.getCallerInfo(here, true)); trace (DebugUtil.getCallingInfo(here, true)); } } Prints: Test()[D:\MY_DATA\checkouts\co_as3_library\\src\Test.as:21]-here Test/init()[D:\MY_DATA\checkouts\co_as3_library\src\Test.as:42]-here If you use DebugUtil.getCallingInfo(here, false) the source line is omited. In the next version that will be a global flag as well. I'm not sure what happens in other languages, you might need to replace \tat with \t Have fun! JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] UK time clock
or use something like this: *http://www.earthtools.org/timezone-1.1/39.96/5.6250*http://www.earthtools.org/timezone-1.1/39.96/5.6250 On Wed, Apr 22, 2009 at 10:29 PM, Weyert de Boer w...@innerfuse.biz wrote: You can check if the locale takes DST into account by compare the offsets of a winter day with a summer day. If they are the same the locale doesn't care about DST. If not, I would need to fix my alarm clock ;) On 22/04/2009, at 10:12 PM, Keith Reinfeld wrote: Pedro, To calculate the time elsewhere you have to factor-in the local machine's timezone offset value. I worked out the following for my World Clock last year: snip // Local Time var lDate:Date = new Date(); // Elsewhere Time: London Standard Time: 0, DST: 1 var utcH:Number = 1; var utcM:Number = 0; var wDate:Date = new Date(lDate.getTime() + (lDate.getTimezoneOffset() * 1000 * 60) + (utcH * 1000 * 60 * 60) + (utcM * 1000 * 60)); trace(wDate = +wDate); /snip Note: The GMT value in the trace will still reflect the local machine's timezone. Just ignore it. The important data are the time and date. Going forward you will want to consider the issues presented by Daylight Saving Time: Does the locale of the local machine observe DST? Is the locale of the local machine currently in DST? Do they observe DST in the designated Elsewhere? Is the designated Elsewhere currently in DST? Regards, -Keith http://keithreinfeld.home.comcast.net ___ 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] Video reflection with masked video
Hi Natalia, I recently wrote a reflection class that takes masking into account, it takes masks into account, hope it helps: http://objectpainters.com/blog/2008/11/23/visual-reflections-in-as2/ Gots lots of samples in the zip including video. greetz JC On Tue, Apr 28, 2009 at 10:26 AM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Hi to all I use reflection effect for video. But I want to draw not horizontal line between video and reflection Mc. So I mask my video with shape: var distance:Number=20; function drawShapeMask(mc:MovieClip, startX:Number, startY:Number, w:Number, h:Number) { mc.beginFill(0xFF); mc.moveTo(startX, startY); mc.lineTo(startX + w, startY); mc.lineTo(startX + w, startY + h); mc.lineTo(startX, startY + h-distance); mc.lineTo(startX, startY); mc.endFill(); } Now bottom line of video has an angle. Reflection code works correctly without masked video. With masked video it shows only half of video without gradient mask. This is how that looks http://www.natavi.co.uk/test/reflect.jpg . What is wrong? Maybe I can create the same angle position between video and reflection without using mask? var reflectionDropoff:Number=1.1; var reflectionAlpha:Number=50; reflectIt=function(){ var bounds = new Object(); bounds.width = myVideo_mc._width; bounds.height = myVideo_mc._height; matrixHeight = bounds.height/reflectionDropoff; var myBitmapData = new flash.display.BitmapData(bounds.width, bounds.height, true, 0xFF); myBitmapData.draw(myVideo_mc); var reflect=this.createEmptyMovieClip(reflect, 10); reflect.attachBitmap(myBitmapData, 1); reflect._yscale = -100; reflect._x =myVideo_mc._x; reflect._y =myVideo_mc._y+(bounds.height*2)-distance; reflect._alpha = reflectionAlpha; var gra=this.createEmptyMovieClip(gra, 15); var fillType = linear; var colors = [0xFF, 0xFF]; var alphas = [80, 0]; var ratios = [0, 255]; var matrix = {matrixType:box, x:0, y:0, w:bounds.width, h:matrixHeight, r:(90/180)*Math.PI}; var spreadMethod:String = pad; gra.beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod); gra.moveTo(0, 0); gra.lineTo(bounds.width, distance); gra.lineTo(bounds.width, bounds.height); gra.lineTo(0, bounds.height); gra.lineTo(0, 0); gra.endFill(); gra._y = reflect._y - reflect._height; gra._x = reflect._x; reflect.cacheAsBitmap = true; gra.cacheAsBitmap = true; reflect.setMask(gra); this.onEnterFrame = function () { myBitmapData.draw(myVideo_mc); }; } Thanks for any help! ___ 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] Video reflection with masked video
Hi, no don't think so, there is an example in there of a masked clip, and a sample of video. I'm assuming you've tried my code with masked video and it didn't work, or are you asking me to try that for you? I wasn't quite sure;). Because I see no reason why it wouldn't work :) regards, JC On Tue, Apr 28, 2009 at 11:55 AM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Yes, I saw these excellent examples and learned a lot. But it does not help with this situation. Do you have example where you have masked video? 2009/4/28 Hans Wichman j.c.wich...@objectpainters.com: that takes masking into account, it takes masks into account - some days I'm like a broken record lol On Tue, Apr 28, 2009 at 11:28 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi Natalia, I recently wrote a reflection class that takes masking into account, it takes masks into account, hope it helps: http://objectpainters.com/blog/2008/11/23/visual-reflections-in-as2/ Gots lots of samples in the zip including video. greetz JC On Tue, Apr 28, 2009 at 10:26 AM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Hi to all I use reflection effect for video. But I want to draw not horizontal line between video and reflection Mc. So I mask my video with shape: var distance:Number=20; function drawShapeMask(mc:MovieClip, startX:Number, startY:Number, w:Number, h:Number) { mc.beginFill(0xFF); mc.moveTo(startX, startY); mc.lineTo(startX + w, startY); mc.lineTo(startX + w, startY + h); mc.lineTo(startX, startY + h-distance); mc.lineTo(startX, startY); mc.endFill(); } Now bottom line of video has an angle. Reflection code works correctly without masked video. With masked video it shows only half of video without gradient mask. This is how that looks http://www.natavi.co.uk/test/reflect.jpg . What is wrong? Maybe I can create the same angle position between video and reflection without using mask? var reflectionDropoff:Number=1.1; var reflectionAlpha:Number=50; reflectIt=function(){ var bounds = new Object(); bounds.width = myVideo_mc._width; bounds.height = myVideo_mc._height; matrixHeight = bounds.height/reflectionDropoff; var myBitmapData = new flash.display.BitmapData(bounds.width, bounds.height, true, 0xFF); myBitmapData.draw(myVideo_mc); var reflect=this.createEmptyMovieClip(reflect, 10); reflect.attachBitmap(myBitmapData, 1); reflect._yscale = -100; reflect._x =myVideo_mc._x; reflect._y =myVideo_mc._y+(bounds.height*2)-distance; reflect._alpha = reflectionAlpha; var gra=this.createEmptyMovieClip(gra, 15); var fillType = linear; var colors = [0xFF, 0xFF]; var alphas = [80, 0]; var ratios = [0, 255]; var matrix = {matrixType:box, x:0, y:0, w:bounds.width, h:matrixHeight, r:(90/180)*Math.PI}; var spreadMethod:String = pad; gra.beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod); gra.moveTo(0, 0); gra.lineTo(bounds.width, distance); gra.lineTo(bounds.width, bounds.height); gra.lineTo(0, bounds.height); gra.lineTo(0, 0); gra.endFill(); gra._y = reflect._y - reflect._height; gra._x = reflect._x; reflect.cacheAsBitmap = true; gra.cacheAsBitmap = true; reflect.setMask(gra); this.onEnterFrame = function () { myBitmapData.draw(myVideo_mc); }; } Thanks for any help! ___ 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] Video reflection with masked video
that takes masking into account, it takes masks into account - some days I'm like a broken record lol On Tue, Apr 28, 2009 at 11:28 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi Natalia, I recently wrote a reflection class that takes masking into account, it takes masks into account, hope it helps: http://objectpainters.com/blog/2008/11/23/visual-reflections-in-as2/ Gots lots of samples in the zip including video. greetz JC On Tue, Apr 28, 2009 at 10:26 AM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Hi to all I use reflection effect for video. But I want to draw not horizontal line between video and reflection Mc. So I mask my video with shape: var distance:Number=20; function drawShapeMask(mc:MovieClip, startX:Number, startY:Number, w:Number, h:Number) { mc.beginFill(0xFF); mc.moveTo(startX, startY); mc.lineTo(startX + w, startY); mc.lineTo(startX + w, startY + h); mc.lineTo(startX, startY + h-distance); mc.lineTo(startX, startY); mc.endFill(); } Now bottom line of video has an angle. Reflection code works correctly without masked video. With masked video it shows only half of video without gradient mask. This is how that looks http://www.natavi.co.uk/test/reflect.jpg . What is wrong? Maybe I can create the same angle position between video and reflection without using mask? var reflectionDropoff:Number=1.1; var reflectionAlpha:Number=50; reflectIt=function(){ var bounds = new Object(); bounds.width = myVideo_mc._width; bounds.height = myVideo_mc._height; matrixHeight = bounds.height/reflectionDropoff; var myBitmapData = new flash.display.BitmapData(bounds.width, bounds.height, true, 0xFF); myBitmapData.draw(myVideo_mc); var reflect=this.createEmptyMovieClip(reflect, 10); reflect.attachBitmap(myBitmapData, 1); reflect._yscale = -100; reflect._x =myVideo_mc._x; reflect._y =myVideo_mc._y+(bounds.height*2)-distance; reflect._alpha = reflectionAlpha; var gra=this.createEmptyMovieClip(gra, 15); var fillType = linear; var colors = [0xFF, 0xFF]; var alphas = [80, 0]; var ratios = [0, 255]; var matrix = {matrixType:box, x:0, y:0, w:bounds.width, h:matrixHeight, r:(90/180)*Math.PI}; var spreadMethod:String = pad; gra.beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod); gra.moveTo(0, 0); gra.lineTo(bounds.width, distance); gra.lineTo(bounds.width, bounds.height); gra.lineTo(0, bounds.height); gra.lineTo(0, 0); gra.endFill(); gra._y = reflect._y - reflect._height; gra._x = reflect._x; reflect.cacheAsBitmap = true; gra.cacheAsBitmap = true; reflect.setMask(gra); this.onEnterFrame = function () { myBitmapData.draw(myVideo_mc); }; } Thanks for any help! ___ 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] Video reflection with masked video
Hmmm, might be that some values end up negative while they shouldn't or as floats while they should be integers. To be honest, I don't completely understand what you are trying to do in the left image, the lower part has to have an angle in it? I'm not sure that's going to work without skewing of some sort. regards, JC On Tue, Apr 28, 2009 at 1:05 PM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Yes I could not get correct rusult with masked video using neither your code nor my code. 2009/4/28 Hans Wichman j.c.wich...@objectpainters.com: Hi, no don't think so, there is an example in there of a masked clip, and a sample of video. I'm assuming you've tried my code with masked video and it didn't work, or are you asking me to try that for you? I wasn't quite sure;). Because I see no reason why it wouldn't work :) regards, JC On Tue, Apr 28, 2009 at 11:55 AM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Yes, I saw these excellent examples and learned a lot. But it does not help with this situation. Do you have example where you have masked video? 2009/4/28 Hans Wichman j.c.wich...@objectpainters.com: that takes masking into account, it takes masks into account - some days I'm like a broken record lol On Tue, Apr 28, 2009 at 11:28 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi Natalia, I recently wrote a reflection class that takes masking into account, it takes masks into account, hope it helps: http://objectpainters.com/blog/2008/11/23/visual-reflections-in-as2/ Gots lots of samples in the zip including video. greetz JC On Tue, Apr 28, 2009 at 10:26 AM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Hi to all I use reflection effect for video. But I want to draw not horizontal line between video and reflection Mc. So I mask my video with shape: var distance:Number=20; function drawShapeMask(mc:MovieClip, startX:Number, startY:Number, w:Number, h:Number) { mc.beginFill(0xFF); mc.moveTo(startX, startY); mc.lineTo(startX + w, startY); mc.lineTo(startX + w, startY + h); mc.lineTo(startX, startY + h-distance); mc.lineTo(startX, startY); mc.endFill(); } Now bottom line of video has an angle. Reflection code works correctly without masked video. With masked video it shows only half of video without gradient mask. This is how that looks http://www.natavi.co.uk/test/reflect.jpg . What is wrong? Maybe I can create the same angle position between video and reflection without using mask? var reflectionDropoff:Number=1.1; var reflectionAlpha:Number=50; reflectIt=function(){ var bounds = new Object(); bounds.width = myVideo_mc._width; bounds.height = myVideo_mc._height; matrixHeight = bounds.height/reflectionDropoff; var myBitmapData = new flash.display.BitmapData(bounds.width, bounds.height, true, 0xFF); myBitmapData.draw(myVideo_mc); var reflect=this.createEmptyMovieClip(reflect, 10); reflect.attachBitmap(myBitmapData, 1); reflect._yscale = -100; reflect._x =myVideo_mc._x; reflect._y =myVideo_mc._y+(bounds.height*2)-distance; reflect._alpha = reflectionAlpha; var gra=this.createEmptyMovieClip(gra, 15); var fillType = linear; var colors = [0xFF, 0xFF]; var alphas = [80, 0]; var ratios = [0, 255]; var matrix = {matrixType:box, x:0, y:0, w:bounds.width, h:matrixHeight, r:(90/180)*Math.PI}; var spreadMethod:String = pad; gra.beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod); gra.moveTo(0, 0); gra.lineTo(bounds.width, distance); gra.lineTo(bounds.width, bounds.height); gra.lineTo(0, bounds.height); gra.lineTo(0, 0); gra.endFill(); gra._y = reflect._y - reflect._height; gra._x = reflect._x; reflect.cacheAsBitmap = true; gra.cacheAsBitmap = true; reflect.setMask(gra); this.onEnterFrame = function () { myBitmapData.draw(myVideo_mc); }; } Thanks for any help! ___ 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
Re: [Flashcoders] Video reflection with masked video
nice find! I wonder what happens if you nest the video_mc and its coded mask into another parent clip and reflect that. regards, JC On Tue, Apr 28, 2009 at 2:15 PM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: I found that if I use layer mask reflection code works correctly http://www.natavi.co.uk/test/video_perspective.html If I try to use script mask over my video clip var videoMaska=this.createEmptyMovieClip(videoMaska,100); videoMaska._x=myVideo_mc._x; videoMaska._y=myVideo_mc._y; drawShapeMask(videoMaska, 0, 0, myVideo_mc._width,myVideo_mc._height); myVideo_mc.setMask(videoMaska); Result is wrong http://www.natavi.co.uk/test/video_perspective_wrong.html 2009/4/28 Hans Wichman j.c.wich...@objectpainters.com: Hmmm, might be that some values end up negative while they shouldn't or as floats while they should be integers. To be honest, I don't completely understand what you are trying to do in the left image, the lower part has to have an angle in it? I'm not sure that's going to work without skewing of some sort. regards, JC On Tue, Apr 28, 2009 at 1:05 PM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Yes I could not get correct rusult with masked video using neither your code nor my code. 2009/4/28 Hans Wichman j.c.wich...@objectpainters.com: Hi, no don't think so, there is an example in there of a masked clip, and a sample of video. I'm assuming you've tried my code with masked video and it didn't work, or are you asking me to try that for you? I wasn't quite sure;). Because I see no reason why it wouldn't work :) regards, JC On Tue, Apr 28, 2009 at 11:55 AM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Yes, I saw these excellent examples and learned a lot. But it does not help with this situation. Do you have example where you have masked video? 2009/4/28 Hans Wichman j.c.wich...@objectpainters.com: that takes masking into account, it takes masks into account - some days I'm like a broken record lol On Tue, Apr 28, 2009 at 11:28 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi Natalia, I recently wrote a reflection class that takes masking into account, it takes masks into account, hope it helps: http://objectpainters.com/blog/2008/11/23/visual-reflections-in-as2/ Gots lots of samples in the zip including video. greetz JC On Tue, Apr 28, 2009 at 10:26 AM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Hi to all I use reflection effect for video. But I want to draw not horizontal line between video and reflection Mc. So I mask my video with shape: var distance:Number=20; function drawShapeMask(mc:MovieClip, startX:Number, startY:Number, w:Number, h:Number) { mc.beginFill(0xFF); mc.moveTo(startX, startY); mc.lineTo(startX + w, startY); mc.lineTo(startX + w, startY + h); mc.lineTo(startX, startY + h-distance); mc.lineTo(startX, startY); mc.endFill(); } Now bottom line of video has an angle. Reflection code works correctly without masked video. With masked video it shows only half of video without gradient mask. This is how that looks http://www.natavi.co.uk/test/reflect.jpg . What is wrong? Maybe I can create the same angle position between video and reflection without using mask? var reflectionDropoff:Number=1.1; var reflectionAlpha:Number=50; reflectIt=function(){ var bounds = new Object(); bounds.width = myVideo_mc._width; bounds.height = myVideo_mc._height; matrixHeight = bounds.height/reflectionDropoff; var myBitmapData = new flash.display.BitmapData(bounds.width, bounds.height, true, 0xFF); myBitmapData.draw(myVideo_mc); var reflect=this.createEmptyMovieClip(reflect, 10); reflect.attachBitmap(myBitmapData, 1); reflect._yscale = -100; reflect._x =myVideo_mc._x; reflect._y =myVideo_mc._y+(bounds.height*2)-distance; reflect._alpha = reflectionAlpha; var gra=this.createEmptyMovieClip(gra, 15); var fillType = linear; var colors = [0xFF, 0xFF]; var alphas = [80, 0]; var ratios = [0, 255]; var matrix = {matrixType:box, x:0, y:0, w:bounds.width, h:matrixHeight, r:(90/180)*Math.PI}; var spreadMethod:String = pad; gra.beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod); gra.moveTo(0, 0); gra.lineTo(bounds.width, distance); gra.lineTo(bounds.width, bounds.height); gra.lineTo(0, bounds.height); gra.lineTo(0, 0); gra.endFill(); gra._y = reflect._y - reflect._height
Re: [Flashcoders] Tween a matrix transformation
Hi, there is probably a better way, but one solution is to do: x* state1Matrix + (x-1)*state2Matrix and tween x over 0..1 greetz JC On Fri, May 1, 2009 at 4:31 PM, Mendelsohn, Michael michael.mendels...@fmglobal.com wrote: Hi list... I'm trying to think of the best way to tween a sprite that's been transformed, with all 6 props of its matrix property having been altered. I use TweenLite a lot...should I write 6 lines of code, one for each matrix property? Any suggestions for the most optimal way to tween a matrix transform? Thanks, - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Dynamically generate blend colors
Hi, mask out the r,g, b and tween them individually. eg write a class: RGBTween.getRGB (source, dest, 0..1); The getRGB should mask out the r,g,b values, calculate the result r,g,b based on source, dest and a 0..1 factor and combine the parts into a new rgb value. It will do the trick, but Im not sure its visually correct. HTH JC On Fri, May 1, 2009 at 2:38 PM, natalia Vikhtinskaya natavi.m...@gmail.comwrote: Thank you. Yes this class allows to create gradient. But I need code that allows to have N MovieClips with blend colors from one to another. 2009/5/1 Glen Pike g...@engineeredarts.co.uk: Have a look at the Greensock Tween classes - they might help. natalia Vikhtinskaya wrote: Hi to all I need dynamically generate blend colors from one color to another. For example RGB: 1Mc 255 255 255 2? 3? 4? 5? 6? 7 136 114 141 Is there a way to calculate blend colors for 5 steps? Thanks you for any help or links. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Creating for loops for event listeners
yes you can accomplish that with one loop. On Fri, May 1, 2009 at 6:10 PM, zu...@zadesigns.com wrote: Is there a better way to write Event Listeners for a large number of buttons that increment the names by 1? example: solution_button1.addEventListener(MouseEvent.MOUSE_DOWN, s_btn1_down); solution_button2.addEventListener(MouseEvent.MOUSE_DOWN, s_btn2_down); solution_button3.addEventListener(MouseEvent.MOUSE_DOWN, s_btn3_down); solution_button4.addEventListener(MouseEvent.MOUSE_DOWN, s_btn4_down); solution_button5.addEventListener(MouseEvent.MOUSE_DOWN, s_btn5_down); solution_button6.addEventListener(MouseEvent.MOUSE_DOWN, s_btn6_down); solution_button7.addEventListener(MouseEvent.MOUSE_DOWN, s_btn7_down); solution_button8.addEventListener(MouseEvent.MOUSE_DOWN, s_btn8_down); solution_button9.addEventListener(MouseEvent.MOUSE_DOWN, s_btn9_down); can the above be accomplished with a for loop? what about more than one event over, out, down, click. can those also be automated or would I need 4 loops for that. ___ 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] ClassPath madness
Hi, shouldnt your classpath be: Macintosh HD:Users:gingerman:Sites:project:ACC:flash:src instead of Macintosh HD:Users:gingerman:Sites:project:ACC:flash:src:com ? And then your classes will have a package statement com.YourClass ? regards JC -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Stephen Matthews Sent: zondag 3 mei 2009 16:43 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] ClassPath madness I am working out of the src directory ( which is shown in fully qualified the classpath below ) Macintosh HD:Users:gingerman:Sites:project:ACC:flash:src:com In this instance you would think that I could go relative and use com instead, seeing that my FLA is in the Macintosh HD:Users:gingerman:Sites:project:ACC:flash:src directory. This does not work. ClassPaths drive me Math.abs( mad ); If you have any hints or have seen anything which makes ClassPaths seem easier to manage - please let me know Thanks Steve ___ 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] Try... catch......
Hi, yup either public function myBall( value:int ):Ball { var ball:Ball try{ //my code goes here. return ball; } catch (e:TypeError ){ trace(Whoops); } return null; } or public function myBall( value:int ):Ball { var ball:Ball = null; try{ //my code goes here. } catch (e:TypeError ){ } return ball; } There are more possibilities, some of which are better practice than others, but in such a small method, I wouldn't make to much of a fuss about it. regards, JC On Sat, May 9, 2009 at 3:22 AM, ACE Flash acefl...@gmail.com wrote: Hi there, I am trying to add try block in my code, how can I deal it with return function? If the code without any problems, I'd like to return ball , otherwise I'd like to EXIT or return null. Thanks - public function myBall( value:int ):Ball { var ball:Ball try{ //my code goes here. return ball; } catch (e:TypeError ){ } // shall I add = return null here? } ___ 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] Rounded Polygons; rounded triangles
Hi, nope not really, but I do know polymercode http://www.polymercode.com/code/index.php has a nice set of drawing tools for as2. If you combine that with the knowledge of how to draw a curve through a controlpoint: http://books.google.com/books?id=zK7zaGGVi60Cpg=PA78lpg=PA78dq=how+to+draw+a+curve+through+a+controlpointsource=blots=yRYuZFe8Vhsig=H5GgAEoYJmMpxmUd-7_Fn9dmZfohl=enei=dt0PSrHaD6HUjAf3henkCAsa=Xoi=book_resultct=resultresnum=6 (from foundation actionscript 3 animation) it shouldn't be too hard to turn the hard curves in the drawing into rounded corners. hth! JC On Fri, May 15, 2009 at 9:49 PM, John Giotta jdgio...@gmail.com wrote: I've searched for polygon draw classes and functions, but I can't find anything that can do rounded corner polygons. Anyone on the list come across or written a decent set of code that can? ___ 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] inserting object into swf
Hi, by far the easiest way, if you don't have the original source and don't want to decompile the original movie is doing something like this: 1. create a new movie with same size as the old movie 2. put this on frame one of the timeline: import [new version of old class goes here]; var cls_0:[new version of old class goes here]=null; loadMovie ('myOldSwf.swf); 3. compile and run hth JC On Sat, May 23, 2009 at 12:00 AM, Andrew Sinning and...@learningware.comwrote: A few days ago I made a post with the subject unexpected result with linked classes in embedded swf. The lesson I learned from this is that an object is only imported into a movie player once, regardless of how many swfs it occurs in. Well, I'm dealing with a situation where I forgot to back up my source code following the most recent official release of a product. I made about a month of changes as we were adding a bunch of features before I realized this. Anyway, we haven't had an official release in a while, but we've found a rather critical problem that is affecting a customer. I just need to add one line to one object to make the problem go away. So, is there a way to insert the corrected object into the last official release of the compiled swf? ___ 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] inserting object into swf
Hi Andrew, both are possible, either loading it in a child, or replacing root completely. Look into loadmovie and loadmovienum. With respect to the flashvars, no clue, you'll have to try, but if not, I think: loadMovieNum (oldswf.swf?+[replace by string with original flashvars], 0); will do the trick, you'll have to experiment first though, maybe the originals vars are retained automatically. regards JC On Sat, May 23, 2009 at 4:35 PM, Andrew Sinning and...@learningware.comwrote: That's exactly what I was looking for Hans. Thanks so much. I didn't mention that this is AS2, but it is and it looks like you're assuming that, too. Will using loadMovie without specifying a target cause myOldSwf.swf to become _root, or will it become a child of _root? Will myOldSwf.swf have access to flashVars? Of course, I should figure this out for myself, but if you happen to know . Hans Wichman wrote: Hi, by far the easiest way, if you don't have the original source and don't want to decompile the original movie is doing something like this: 1. create a new movie with same size as the old movie 2. put this on frame one of the timeline: import [new version of old class goes here]; var cls_0:[new version of old class goes here]=null; loadMovie ('myOldSwf.swf); 3. compile and run hth JC On Sat, May 23, 2009 at 12:00 AM, Andrew Sinning and...@learningware.com wrote: A few days ago I made a post with the subject unexpected result with linked classes in embedded swf. The lesson I learned from this is that an object is only imported into a movie player once, regardless of how many swfs it occurs in. Well, I'm dealing with a situation where I forgot to back up my source code following the most recent official release of a product. I made about a month of changes as we were adding a bunch of features before I realized this. Anyway, we haven't had an official release in a while, but we've found a rather critical problem that is affecting a customer. I just need to add one line to one object to make the problem go away. So, is there a way to insert the corrected object into the last official release of the compiled swf? ___ 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] flv can seek to end yes/no
Hi list, I'm still struggling with blocking video now and then (video that locks up my complete flash player). I have a couple of flv's now that play fluently, and one of the differences I'm noticing is that these videos have 'can seek to end' set to no. What does 'can seek to end' actually do, and how can I set this to no? Does anyone know whether this can actually improve the performance of the video? thanks! Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] flv can seek to end yes/no
Hi Karl, it's as2. The buffertime is set to 5. The biggest problem is that the sysadmins seem incapable of setting up a stable test environment:). regards JC On Tue, May 26, 2009 at 12:25 AM, Karl DeSaulniers k...@designdrumm.comwrote: AS2 or AS3? On May 25, 2009, at 6:26 AM, Hans Wichman wrote: Hi list, I'm still struggling with blocking video now and then (video that locks up my complete flash player). I have a couple of flv's now that play fluently, and one of the differences I'm noticing is that these videos have 'can seek to end' set to no. What does 'can seek to end' actually do, and how can I set this to no? Does anyone know whether this can actually improve the performance of the video? thanks! Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm k...@designdrumm.com http://designdrumm.com ___ 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] Papervision Help
nice tuts: http://papervision2.com/ http://papervision2.com/ http://pv3d.org/ On Tue, May 26, 2009 at 4:10 PM, Merrill, Jason jason.merr...@bankofamerica.com wrote: Have you tried the Papervision list? I think these questions specific to Papervision are more appropriate there. Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Omar Fouad Sent: Sunday, May 24, 2009 5:49 PM To: Flash Coders List Subject: Re: [Flashcoders] Papervision Help Well my concern now is, how can I apply a light and a shadow to a MovieMaterial. I've searched the whole google for it but invain. On Sun, May 24, 2009 at 9:18 AM, Ashim D'Silva as...@therandomlines.com wrote: Well, papervision will be able to do that, and the docs are quite helpful. You'll have to be specific when you search google for this stuff though. I did find some nice tutorials on lighting and shaders that should be helpful but that I can't remember offhand. However, you might want to re-evaluate using the default flash 10 stuff. Lighting and shadowing live is only necessary if your object are going to change enough to make a difference. You might find you can get away with baking all that into textures and saving your processing power. Ashim The Random Lines My online portfolio www.therandomlines.com 2009/5/24 Omar Fouad omarfouad@gmail.com: Hi all, I am working on a project where I need to create 6 circles (planes) with different colors. the cirlces are placed one over the other and centered, so when I move the mouse down those they rotate to show something like a piramid. I could just use the native 3d in Flash but my boss needs each circle to be clickable, have a shadow and be shaded (lighted). I actually played around with papervision lately, using BasicView and some kind of materials, but now I feel frustrated as I just can't figure out how to do this work. Any Ideas? I also cannot find a decent papervision explanation on the net. What I am looking for is a conceptual explanation about papervision not just how to create some shapes and put them on the stage. -- Omar M. Fouad - www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. 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 -- Omar M. Fouad - Adobe Flash™ Platform Developer www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. 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
Re: [Flashcoders] Papervision Help
Hey, on that matter: has anyone found any guidelines on which engine is 'better' or a good set of selectioncriteria for which engine is best for you? All the pv3d vs away google results same a bit outdated:) regards, JC On Thu, May 28, 2009 at 2:58 AM, Omar Fouad omarfouad@gmail.com wrote: Thanks buddies, I've switched to Away3D, which is (in my opinion) better explained, supported and more straightforward in terms of API, than Papervision3D. Thanks for the supports guys! On Wed, May 27, 2009 at 1:54 PM, Hans Wichman j.c.wich...@objectpainters.com wrote: nice tuts: http://papervision2.com/ http://papervision2.com/ http://pv3d.org/ On Tue, May 26, 2009 at 4:10 PM, Merrill, Jason jason.merr...@bankofamerica.com wrote: Have you tried the Papervision list? I think these questions specific to Papervision are more appropriate there. Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Omar Fouad Sent: Sunday, May 24, 2009 5:49 PM To: Flash Coders List Subject: Re: [Flashcoders] Papervision Help Well my concern now is, how can I apply a light and a shadow to a MovieMaterial. I've searched the whole google for it but invain. On Sun, May 24, 2009 at 9:18 AM, Ashim D'Silva as...@therandomlines.com wrote: Well, papervision will be able to do that, and the docs are quite helpful. You'll have to be specific when you search google for this stuff though. I did find some nice tutorials on lighting and shaders that should be helpful but that I can't remember offhand. However, you might want to re-evaluate using the default flash 10 stuff. Lighting and shadowing live is only necessary if your object are going to change enough to make a difference. You might find you can get away with baking all that into textures and saving your processing power. Ashim The Random Lines My online portfolio www.therandomlines.com 2009/5/24 Omar Fouad omarfouad@gmail.com: Hi all, I am working on a project where I need to create 6 circles (planes) with different colors. the cirlces are placed one over the other and centered, so when I move the mouse down those they rotate to show something like a piramid. I could just use the native 3d in Flash but my boss needs each circle to be clickable, have a shadow and be shaded (lighted). I actually played around with papervision lately, using BasicView and some kind of materials, but now I feel frustrated as I just can't figure out how to do this work. Any Ideas? I also cannot find a decent papervision explanation on the net. What I am looking for is a conceptual explanation about papervision not just how to create some shapes and put them on the stage. -- Omar M. Fouad - www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. 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 -- Omar M. Fouad - Adobe Flash™ Platform Developer www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] how to reload swf in Flash IDE Player
Hi, one option is loadMovieNum (_root._url, 0); Possibly attach some keyhandler to it, so you can press space to reload it, or set up a timer to reload it. Why do you need it? Editing data ? regards JC On Thu, May 28, 2009 at 5:40 PM, Andrew Sinning and...@learningware.comwrote: To compile and play a movie within Flash, I use control-enter. But suppose I want to reload the local copy of movie within the Flash Player without recompiling. How do I do this? Rewind seems to do nothing at all. ___ 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] ie 8 flash crashes
Hi list, we're getting reports some of our flash sites are crashing in ie8, mostly player 10 it seems. Anyone experiencing this, it seems to come from BtwVdpCapFilter.dll. Both content in both as2 and as3 is crashing. Any insights would be appreciated. This is content that has run fine for about 3 to 4 years now in previous versions of IE and flash. regards JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ie 8 flash crashes
Hi, ok thanks both! I didn't think it was this issue since I'm not using the webcam and/or video but apparently it is, nice:). regards JC On Fri, May 29, 2009 at 5:52 PM, Anthony Pace anthony.p...@utoronto.cawrote: //Its a blue tooth webcam video capture filter, and it is not a part of the default windows or ie8 installation. Rename the dll and things should be fine. Hans Wichman wrote: Hi list, we're getting reports some of our flash sites are crashing in ie8, mostly player 10 it seems. Anyone experiencing this, it seems to come from BtwVdpCapFilter.dll. Both content in both as2 and as3 is crashing. Any insights would be appreciated. This is content that has run fine for about 3 to 4 years now in previous versions of IE and flash. regards JC ___ 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] Re: Runtime Align Panel package AS3
Hi Ktu, seems great, but havent had time to really dive into it, don't take the lack of response the wrong way it happens now and then, but has nothing to do with whether or not you're building something great;) regards, JC On Sun, Jun 7, 2009 at 5:54 AM, Ktu ktu_fl...@cataclysmicrewind.com wrote: Did anyone check it out at all? Any bit of feedback would be good, even if you don't think you personally would ever use it. Capabilities SWF http://www.cataclysmicrewind.com/vizalign/examples/capabilities.html Method Descriptions http://www.cataclysmicrewind.com/vizalign/examples/MethodDescriptions.html Documentation http://www.cataclysmicrewind.com/vizalign/docs/ On Thu, Jun 4, 2009 at 5:01 PM, Ktu ktu_fl...@cataclysmicrewind.com wrote: Hey List, I have created a fairly robust alignment tool I have dubbed VizAlign. This package duplicates the align panel and more! License: I was thinking of releasing under GPL. Compiled code size - 5.8kb... for now Features: Straight Forward Human-like API Ignores Nesting Treat Multiple Objects As Groups Works In Full Screen Mode Use As Many Targets As You Need Use As Many Alignment Methods You Need In One Method Call 25 Different Alignment Methods Easily Add New Alignment Methods TruePixel Option For Even Pixel Results Choose To Apply Results Immediately Or Just Get Return Values For Animating 70% Documented Using ASDoc This is an example of the kind of stuff you can do with the VizAlign class. Capabilities.html cannot handle grouping options. http://www.cataclysmicrewind.com/viz...abilities.html http://www.cataclysmicrewind.com/vizalign/examples/capabilities.html http://www.cataclysmicrewind.com/viz...les/groups.swf http://www.cataclysmicrewind.com/vizalign/examples/groups.swf Method Descriptions: http://www.cataclysmicrewind.com/vizalign/examples/MethodDescriptions.html View current documentation here: http://www.cataclysmicrewind.com/vizalign/docs Question: I have ideas for more functionality but am not sure if they are worth it. Are you interested in this type of tool being released and maintained? I see much potential for this package. Do you? If enough people are interested then I will consider adding functionality and reducing file size. Ktu ___ 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] Projector, loaded SWFs and audio files
i just read that post again and boy is that thing old... anyway the basic idea is still the same, but the execution can be improved:) On Thu, Jun 11, 2009 at 8:11 PM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi Eric, are you using as2 or as3? The basic solution is to look at the url of the loading swf, and make your paths relative to that. If you make it a little more complex (but usually some splitting and joining will be enough) you can use something like this: http://objectpainters.com/blog/2007/01/03/where-am-i-relative-paths/ but it's as2. I have an as3 version as well if you need it. greetz JC On Thu, Jun 11, 2009 at 3:27 PM, Eric E. Dolecki edole...@gmail.comwrote: Quick question. I have a projector that loads SWFs on demand. The SWFs are in a subdirectory called Sections. Each section SWF that loads into the directory loads it's own audio from a folder inside the Sections directory. Works fine on their own, but when loaded into the Projector, the relative path is off as the SWFs loaded into the projector now think they are at the same directory level as the projector and the load audio gets botched. How can I fix this so it works from the SWF themselves as well as within the projector (without embedding the audio anywhere)? E ___ 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] Projector, loaded SWFs and audio files
Hi Eric, are you using as2 or as3? The basic solution is to look at the url of the loading swf, and make your paths relative to that. If you make it a little more complex (but usually some splitting and joining will be enough) you can use something like this: http://objectpainters.com/blog/2007/01/03/where-am-i-relative-paths/ but it's as2. I have an as3 version as well if you need it. greetz JC On Thu, Jun 11, 2009 at 3:27 PM, Eric E. Dolecki edole...@gmail.com wrote: Quick question. I have a projector that loads SWFs on demand. The SWFs are in a subdirectory called Sections. Each section SWF that loads into the directory loads it's own audio from a folder inside the Sections directory. Works fine on their own, but when loaded into the Projector, the relative path is off as the SWFs loaded into the projector now think they are at the same directory level as the projector and the load audio gets botched. How can I fix this so it works from the SWF themselves as well as within the projector (without embedding the audio anywhere)? E ___ 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] flash stops redrawing the stage
Hi list, I have an app in AS2, which I run in flash player 10. If I use fscommand (fullscreen, true) and mouseover the stage a lot, flash simply stops redrawing the stage. I can click on stuff, I hear sounds from a video thats playing, but I don't see anything, UNTIL I press escape, at which point the interface exits fullscreen mode and flash happily starts to redraw the stage again. Completely stumped, any ideas would be appreciated! Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] flash stops redrawing the stage
Hi Karl, what should I wrap in an onEnterFrame? The fullscreen call is triggered once at startup. I've found though that it seems be caused by the 'use hardware accerelation' flag. If I disable hardware acceleration the problem goes away. grrr Hans On Fri, Jun 26, 2009 at 10:55 PM, Karl DeSaulniers k...@designdrumm.comwrote: Have you tried wrapping in an onEnterFrame? May make it slow though. Karl Sent from losPhone On Jun 26, 2009, at 7:15 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi list, I have an app in AS2, which I run in flash player 10. If I use fscommand (fullscreen, true) and mouseover the stage a lot, flash simply stops redrawing the stage. I can click on stuff, I hear sounds from a video thats playing, but I don't see anything, UNTIL I press escape, at which point the interface exits fullscreen mode and flash happily starts to redraw the stage again. Completely stumped, any ideas would be appreciated! Hans ___ 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] difference in player 10 and player 8 while playing the same 8 content
Hi List, most of you probably already know, but there are some differences between player 10 and 8 when playing 8 content. One was the performance of the same content, running notably better in player 10, that appeared to be the (buggy on my pc) hardware accelaration amongst other things. But I've found some other issues as well. My reflection class runs fine in auto bounds detection mode in player 10, but not for all content in player 8 (the same swf), this means that player 10 initializes 8 content differently from player 8 then it does in 10, or that the getBounds methods work differently, haven't figured that out yet. Another thing is that loadClip (myimage.jpg?blabla) works fine in 10, but doesn't in 8 (yeah the ?blablah doesn't have to be there, but still). Anyway moral of the story, I've found that when developing stuff I now have to test it against player 8,9 and 10. And I'm not even doing exotic stuff :). Gotta love it. What is a great help to me is not using any paths directly but pass them all through some sort of Path.normalize (myPath) method, that way if you find something weird, it's easy to fix in one place. JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] flash stops redrawing the stage
Hi Karl, no problem, I'm glad you're thinking along. Most problems I seem to encounter don't involve any non-working-code but rather player bugs etc. I've tried the same swf on another pc and it runs fine. I'm starting to think my pc requires a reinstall:). thanks! Hans On Sun, Jun 28, 2009 at 11:36 PM, Karl DeSaulniers k...@designdrumm.comwrote: :) - Hi Hans I guess I was thinking that the user initiated the Full-Screen somehow by a button or something. I was thinking that if you had the code that controlled wither the movie was playing in full screen or not wrapped in an onEnterFrame, it would keep it in Full Screen when you had it in-frame per say, or something to that effect. Sorry I didn't get a chance to see your code, so I apologize, I was more so just guessing. Hope you fine the solution. Best, Karl On Jun 28, 2009, at 1:22 AM, Hans Wichman wrote: Hi Karl, what should I wrap in an onEnterFrame? The fullscreen call is triggered once at startup. I've found though that it seems be caused by the 'use hardware accerelation' flag. If I disable hardware acceleration the problem goes away. grrr Hans On Fri, Jun 26, 2009 at 10:55 PM, Karl DeSaulniers k...@designdrumm.com wrote: Have you tried wrapping in an onEnterFrame? May make it slow though. Karl Sent from losPhone On Jun 26, 2009, at 7:15 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi list, I have an app in AS2, which I run in flash player 10. If I use fscommand (fullscreen, true) and mouseover the stage a lot, flash simply stops redrawing the stage. I can click on stuff, I hear sounds from a video thats playing, but I don't see anything, UNTIL I press escape, at which point the interface exits fullscreen mode and flash happily starts to redraw the stage again. Completely stumped, any ideas would be appreciated! Hans ___ 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 Karl DeSaulniers Design Drumm http://designdrumm.com ___ 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] [OT] generate serial for onlinepayment
Hi List, this is a bit off topic, but I need to generate a serial for an online payment. Basic process is: * customer pays * mail with invoice and serial should be generated including account data * customer logs into account with data from email, downloads game * installs game using given serial Seems to me there should be out of the box solutions for this, but I'm having a hard time finding any. Currently I'm thinking about using paypal, ipn and a custom script. cheers, JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] rendering 3d model of a car for use in flash as an image sequence (360)
Hi, if you are rendering it to jpg's what does the polygon count matter? Crank it up until it looks so good you're pc is on its knees:) We've been doing like wise things, which required about 180 jpg's, but you might be able to skip a lot of those using some nice effects. In addition in our setup you can only stop every 20 frames I think, and all the frames in between (while moving) are lower quality to save filesize. regards, JC On Thu, Jul 2, 2009 at 3:02 PM, Matt Muller matthewmul...@gmail.com wrote: Hi, I am about to get some rendered frames of a car for a 360 as a targa sequence for use in flash as an image (JPG's) sequence. Does anyone know what the optimum target polygon count is for the vehicle exterior? Does anyone know roughly how many JPGs will be needed to create a smooth sequence? Any other tips or tricks or URL' s greatly appreciated. thanks, MaTT ___ 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] papervision as2 mouse projection
Hi list, I need to find the coordinates of a mouseclick within a plane in actionscript 2 papervision and I can't figure out how to do it. Has anyone got any pointers for me, my 3d math skills are vry rusty? regards, JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] papervision as2 mouse projection
Hi, yes the as3 version does:) But I'm very lucky to be stuck on the same as2 project for 5 years in a row... However I chose the easy way out, I've drawn the hotspot in a separate layer and now I can click. Not sure how this is going to add up performance wise, but time will tell! tnx JC On Fri, Jul 24, 2009 at 2:35 PM, Glen Pike g...@engineeredarts.co.ukwrote: Hi, I thought that PaperVision provided that information for you - check the docs... Glen Hans Wichman wrote: Hi list, I need to find the coordinates of a mouseclick within a plane in actionscript 2 papervision and I can't figure out how to do it. Has anyone got any pointers for me, my 3d math skills are vry rusty? regards, JC ___ 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] papervision as2 mouse projection
Ok, it seems the as2 papervision horribly distorts the perspective, and each addded hotspot makes the panorama slower. So back at square one. Essentially what I'm looking for is a panorama that takes 6 cube faces and a hotspot definition and generates a cool panorama with hotspots that light up as you mouse over them in 3d space, and that all in as2 :). So I'm looking for the documentation that provides me with the knowledge on how cubic panorama's work... yes grasping at straws here:), any pointers pretty plz... regards, JC On Fri, Jul 24, 2009 at 3:37 PM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi, yes the as3 version does:) But I'm very lucky to be stuck on the same as2 project for 5 years in a row... However I chose the easy way out, I've drawn the hotspot in a separate layer and now I can click. Not sure how this is going to add up performance wise, but time will tell! tnx JC On Fri, Jul 24, 2009 at 2:35 PM, Glen Pike g...@engineeredarts.co.ukwrote: Hi, I thought that PaperVision provided that information for you - check the docs... Glen Hans Wichman wrote: Hi list, I need to find the coordinates of a mouseclick within a plane in actionscript 2 papervision and I can't figure out how to do it. Has anyone got any pointers for me, my 3d math skills are vry rusty? regards, JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] dynamically capture and display the name of the currently executing function in the Output panel
Yep only in debug player. Annoying as this was perfectly possible in as 2 (and easy as well). No good way in as3 though. Here is one method beside throwing an error and parsing the stack, but it has to be improved, just show the basic idea (which is kinda the same as in as2): private var d:Dictionary = new Dictionary(); public function TestOne():void { var methodNames:Array = getNonstaticAccessors(TestOne); for (var i:Number = 0; i methodNames.length; i++ ) { d[this[methodNames[i]]] = methodNames[i]; } init(); } public static function getNonstaticAccessors(classOfInterest:Class):Array { var xmlDescriptionOfClass:XML = describeType(classOfInterest); var nonstaticAccessorsXML:XMLList = xmlDescriptionOfClass.factory.method; var accessors:Array = []; for each (var accessorXML:XML in nonstaticAccessorsXML) { accessors.push(accessorx...@name); } return accessors; } public function init(e:Event = null):void { trace (d[arguments.callee]); } Only works for public methods though, private methods have to be registered explicitly. I think that a utility to parse the bytecode and add this information on the fly should be possible though:) regards, JC On Tue, Jul 28, 2009 at 11:27 PM, Steve Mathews happy...@gmail.com wrote: There is a way to this as a hack. No good way though. The hack way is to do a try catch, throw an error in the try and parse the error message in the catch. Only works with the debug player I believe. On Tue, Jul 28, 2009 at 11:51 AM, Cor c...@chello.nl wrote: Question: Is there a simple way to dynamically capture and display the name of the currently executing function in the Output panel? Sample function: function doStuff ():void { trace (Function: doStuff() ); //run doStuff code... } Without hardcoding the name of the function in the trace statement shown above, can I somehow display the function name dynamically when it runs? I've never seen this done but thought I'd ask anyway TIA Cor ___ 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] palet of an index based image
Hi folks, the subject is probably incorrect english, but what I meant was: is it possible when saving an indexed coloured image from say photoshop, to load it in flash (as2) and access and modify the underlying palette directly? As far as my tests have shown, the image data is completely converted to 32-bit pixel data, and the palette is lost. Correct? regards, JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ExternalInterface.call not working on desktop...??
Hi, html on the desktop is not going work, but you might have some luck when updating the security settings. I have the following batch file in most of my projects: @echo off rem echo %APPDATA% rem echo %CD% echo [Enter name for security file inserted into %APPDATA%]: echo (use a single keyword, no spaces, no dots and no .cfg in it) SET /p fileName= echo Creating %APPDATA%\Macromedia\Flash Player\#Security\FlashPlayerTrust\%fileName%.cfg echo %CD% %APPDATA%\Macromedia\Flash Player\#Security\FlashPlayerTrust\%fileName%.cfg Store it in a batch file in the same dir as your fla, run it and enter some bogus keyword to identify your settings with, eg desktop. regards JC On Fri, Jul 31, 2009 at 1:08 AM, Barry Hannah ba...@shift.co.nz wrote: AFAIK ExternalInterface doesn't work in the standalone player, only in the browser. You should be getting error messages to that effect. You can test whether or not it's available to use with the Boolean ExternalInterface.available property. BH -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of BOYD SPEER Sent: Friday, 31 July 2009 10:49 a.m. To: Flash Coders List Subject: Re: [Flashcoders] ExternalInterface.call not working on desktop...?? The menu.swf actually is set to Access local files only and seems to work only from the website... Thanks for responding Karl... would changing the setting to Access network files only allow a broader or narrower selection of files...? - Original Message - From: Karl DeSaulniers k...@designdrumm.com Date: Thursday, July 30, 2009 5:31 pm Subject: Re: [Flashcoders] ExternalInterface.call not working on desktop...?? To: Flash Coders List flashcoders@chattyfig.figleaf.com Check you publish settings, you probably have it set to network only. Karl On Jul 30, 2009, at 5:21 PM, BOYD SPEER wrote: Hi all, I am probably missing something obvious but I have a flash .swf in embedded in .html and an ExternalInterface.call( to javascript). It works great from my website in both I.E. and Firefox - but not from the computer desktop (even though all the files are in the same relationship in their folders, etc..) Is there some security setting or other setting that I need to check to make this work? or is it just not possible? Thanks for any insights! -Boyd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ 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] LocalConnection: call functions on passed object
Hi, nope, but wouldn't it be nice:) greetz JC On Sun, Aug 2, 2009 at 4:16 PM, Andrew Sinning and...@learningware.comwrote: Using the LocalConnection object, is it be possible to pass a reference to an object from one movie to another, and hence forth call functions within the passed object directly, without having to go through the LocalConnection? This is in AS3. ___ 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] Preloading FLV with NetStream
Hi, I stumbled on this thread and kind of need to do the same thing. I have an area where a number of persons should be walking around randomly. I was thinking about something like this: * each person gets 4 flv's: (or 2 if i mirror them): turn right, walk right, turn left, walk left * all the flv's get preloaded * a player class plays 'walk right' for x times, then 'turn left', 'walk left' for y times (x y are random), 'turn right' and repeat Is this feasible? Can I put 6 video objects on stage without any problems? And concerning the preloading, I was thinking about simply setting bufferTime to a very high value or is that naive? Is preloading all the flv's in the cache and keeping the bufferTime as normal a better option? What happens if the user has disabled his/her browser cache? Another option would be to load the walk cycles as still images, not sure what the better option, your opinion is appreciated:) regards JC On Wed, Apr 4, 2007 at 6:49 PM, Jack Doyle j...@greensock.com wrote: The PreloadAssetManager class simply preloads your assets into your browser's cache; it is not meant to be used for playback or managing your FLVs once they're preloaded. There's nothing special that you need to do in order to access the preloaded FLVs - just call them as you normally would either using a NetStream object of your own or an FLVPlayback component or whatever. The user's browser will be smart enough to used the cached FLVs instead of going out to the web and downloading them again. You might want to search the Flash Help files for NetStream or FLVPlayback. Jack -Original Message- Date: Wed, 04 Apr 2007 10:59:02 -0400 From: leolea pou...@videotron.ca Subject: Re: [Flashcoders] Preloading FLV with NetStream To: flashcoders@chattyfig.figleaf.com Message-ID: c2393576.e280%pou...@videotron.cac2393576.e280%25pou...@videotron.ca Content-Type: text/plain; charset=US-ASCII Preloading works super fine! Thank you very much for this class. I am preloading a bunch of FLVs. Once they get at 100%, how do I access them using a NetStream object (or other) ? (I need to implement something that initates the playback of the first one, when it reaches the end I must start the second one, so on...) On 4/3/07 6:42 PM, Jack Doyle j...@greensock.com wrote: Yep, you can preload FLVs with the NetStream. Check out the PreloadAssetManager class which will handle it all for you: http://www.greensock.com/ActionScript/PreloadAssetManager Jack -Original Message- Date: Tue, 03 Apr 2007 16:04:35 -0400 From: leolea pou...@videotron.ca Subject: [Flashcoders] Preloading FLV with NetStream To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: c2382b93.e226%pou...@videotron.cac2382b93.e226%25pou...@videotron.ca Content-Type: text/plain; charset=US-ASCII Hi, Is it possible, using the NetStream object, to preload a FLV. I have multiple FLV videos that I need to play back-to-back smoothly. I want all of them to be preloaded so that when I start playback it doesn't buffer or lag in any way. I can't seem to find a way so my next alternative would be to use SWF with MovieClipLoader. I'd like to avoid that. Thanks ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Preloading FLV with NetStream
Hmm Jack is there an as3 version of that cool PreloadManager as well:)? greetz JC On Fri, Aug 7, 2009 at 10:13 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi, I stumbled on this thread and kind of need to do the same thing. I have an area where a number of persons should be walking around randomly. I was thinking about something like this: * each person gets 4 flv's: (or 2 if i mirror them): turn right, walk right, turn left, walk left * all the flv's get preloaded * a player class plays 'walk right' for x times, then 'turn left', 'walk left' for y times (x y are random), 'turn right' and repeat Is this feasible? Can I put 6 video objects on stage without any problems? And concerning the preloading, I was thinking about simply setting bufferTime to a very high value or is that naive? Is preloading all the flv's in the cache and keeping the bufferTime as normal a better option? What happens if the user has disabled his/her browser cache? Another option would be to load the walk cycles as still images, not sure what the better option, your opinion is appreciated:) regards JC On Wed, Apr 4, 2007 at 6:49 PM, Jack Doyle j...@greensock.com wrote: The PreloadAssetManager class simply preloads your assets into your browser's cache; it is not meant to be used for playback or managing your FLVs once they're preloaded. There's nothing special that you need to do in order to access the preloaded FLVs - just call them as you normally would either using a NetStream object of your own or an FLVPlayback component or whatever. The user's browser will be smart enough to used the cached FLVs instead of going out to the web and downloading them again. You might want to search the Flash Help files for NetStream or FLVPlayback. Jack -Original Message- Date: Wed, 04 Apr 2007 10:59:02 -0400 From: leolea pou...@videotron.ca Subject: Re: [Flashcoders] Preloading FLV with NetStream To: flashcoders@chattyfig.figleaf.com Message-ID: c2393576.e280%pou...@videotron.cac2393576.e280%25pou...@videotron.ca Content-Type: text/plain; charset=US-ASCII Preloading works super fine! Thank you very much for this class. I am preloading a bunch of FLVs. Once they get at 100%, how do I access them using a NetStream object (or other) ? (I need to implement something that initates the playback of the first one, when it reaches the end I must start the second one, so on...) On 4/3/07 6:42 PM, Jack Doyle j...@greensock.com wrote: Yep, you can preload FLVs with the NetStream. Check out the PreloadAssetManager class which will handle it all for you: http://www.greensock.com/ActionScript/PreloadAssetManager Jack -Original Message- Date: Tue, 03 Apr 2007 16:04:35 -0400 From: leolea pou...@videotron.ca Subject: [Flashcoders] Preloading FLV with NetStream To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Message-ID: c2382b93.e226%pou...@videotron.cac2382b93.e226%25pou...@videotron.ca Content-Type: text/plain; charset=US-ASCII Hi, Is it possible, using the NetStream object, to preload a FLV. I have multiple FLV videos that I need to play back-to-back smoothly. I want all of them to be preloaded so that when I start playback it doesn't buffer or lag in any way. I can't seem to find a way so my next alternative would be to use SWF with MovieClipLoader. I'd like to avoid that. Thanks ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Interface for displayObjects
Hi, when you declare them like this: var myObj1:MyInterface addChild (myObj1) wont work if you do var myObj1:Sprite = ... addChild (myObj1) it probably will. The thing is that you essentially provide two different interfaces for your object. By extending Sprite you satisfy the DisplayObject requirement for addChild(). By implementing your interface you satisfy the requirement for your own class that the objects have to of a certain interface. Telling your own class, here is a display object isn't going to work, since it needs the interface, vice versa telling the display list here is my own interface isn't going to work either, you have to pass the objects in the form expected in both cases. hth, JC On Fri, Aug 7, 2009 at 10:00 AM, Tom Huynen tomhuy...@gmail.com wrote: Hi! I have a tiny little problem with the following: I have two classes that should have the same dataType in order to use them in a third class. So I created an Interface that both of them implement. The two classes extend Sprite because they have a visual representation. However, when I try to add them to the displayList flash doesn't recognise them as a displayObject. I read that many people at this moment cast them back to a displayObject but that to me feels like a workaround. Anybody any suggestions? Thanks! Tom ___ 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] Preloading FLV with NetStream
Hi Paul, ok thanks cool. Meanwhile I've whipped up a sample using flv's but I might have to switch to images like you said! If anyone would care to see if this works okay on their browsers it'd be appreciated: http://www.wichman-media.com/misc/bin/ The awesome floor texture:) will become a 3d background, the arrows will become persons walking to and fro, the line will become a microphone allowing you to interview people. And yes its a prototype and looks like crap ;) player 10 required btw tia! Hans On Fri, Aug 7, 2009 at 11:42 AM, Paul Andrews p...@ipauland.com wrote: Hans Wichman wrote: Hi, I stumbled on this thread and kind of need to do the same thing. I have an area where a number of persons should be walking around randomly. I was thinking about something like this: * each person gets 4 flv's: (or 2 if i mirror them): turn right, walk right, turn left, walk left * all the flv's get preloaded * a player class plays 'walk right' for x times, then 'turn left', 'walk left' for y times (x y are random), 'turn right' and repeat Is this feasible? Can I put 6 video objects on stage without any problems? And concerning the preloading, I was thinking about simply setting bufferTime to a very high value or is that naive? Is preloading all the flv's in the cache and keeping the bufferTime as normal a better option? What happens if the user has disabled his/her browser cache? Another option would be to load the walk cycles as still images, not sure what the better option, your opinion is appreciated:) I have done this for people silhouettes using walk cycles generated with poser! Basically it was used to build a pseudo crowd-scene (lots of instances of the movieclips) with the movement of the people controlled with actionscript. No video, just frame by frame walk cycles playing in a movieclip controlled by actionscript. Given your application I would use that exact same technique again, or at least experiment with it. Paul regards JC ___ 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] Preloading FLV with NetStream
lol it's the vanishing point actually:) but thanks for checking and the tip about the feet! On Fri, Aug 7, 2009 at 1:22 PM, Paul Andrews p...@ipauland.com wrote: Hans Wichman wrote: Hi Paul, ok thanks cool. Meanwhile I've whipped up a sample using flv's but I might have to switch to images like you said! If anyone would care to see if this works okay on their browsers it'd be appreciated: http://www.wichman-media.com/misc/bin/ The awesome floor texture:) will become a 3d background, the arrows will become persons walking to and fro, the line will become a microphone allowing you to interview people. And yes its a prototype and looks like crap ;) Seems to work OK. The sound man is already ready - I can see his mike at the top of the movie! ;-) Just one thing to be careful about when doing this kind of thing where the feet are visible (this is an old walk cycle problem). If the feet are visible and the character is moving, the speed at which the character can be moved without looking as though they are doing some variant of a MJ moonwalk will be determined by the walkcycle animation. Move too fast and they look like they are being dragged along the ground. Too slow and the moonwalk springs to mind. Paul player 10 required btw tia! Hans On Fri, Aug 7, 2009 at 11:42 AM, Paul Andrews p...@ipauland.com wrote: Hans Wichman wrote: Hi, I stumbled on this thread and kind of need to do the same thing. I have an area where a number of persons should be walking around randomly. I was thinking about something like this: * each person gets 4 flv's: (or 2 if i mirror them): turn right, walk right, turn left, walk left * all the flv's get preloaded * a player class plays 'walk right' for x times, then 'turn left', 'walk left' for y times (x y are random), 'turn right' and repeat Is this feasible? Can I put 6 video objects on stage without any problems? And concerning the preloading, I was thinking about simply setting bufferTime to a very high value or is that naive? Is preloading all the flv's in the cache and keeping the bufferTime as normal a better option? What happens if the user has disabled his/her browser cache? Another option would be to load the walk cycles as still images, not sure what the better option, your opinion is appreciated:) I have done this for people silhouettes using walk cycles generated with poser! Basically it was used to build a pseudo crowd-scene (lots of instances of the movieclips) with the movement of the people controlled with actionscript. No video, just frame by frame walk cycles playing in a movieclip controlled by actionscript. Given your application I would use that exact same technique again, or at least experiment with it. Paul regards JC ___ 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] How to Exit/Close the Web Browser from Flash Applications?
The timeout is a good idea, I realized I stopped doing that somewhere along the way, but especially macs as well had a knack for crashing if the calling object was destroyed in the process of the call. On Fri, Aug 7, 2009 at 4:15 PM, Jer Brand thejhe...@gmail.com wrote: Here's a simple example. Note that if you don't own the window your flash is running in -- you opened it with window.open(...) -- this code will again prompt the user if they really want to close the window in IE, or do nothing (Firefox, chrome, etc). There are ways around that, but I can't bring myself help others be evil. ;-) Anyway: -- in the flash: import flash.external.ExternalInterface; function onUserConfirmedTheyWantToExit():void { ExternalInterface.call(closeWindowAsync, ) ; } in the HTML page script type=javascript function closeWindowAsync() { setTimeout(closeWindowCallback(), 500) ; } function closeWindowCallback() { window.close() ; } /script The use of setTimeout in the javascript is there because of some problems we had calling window.close directly in IE6 (very weird IE-locking bugs if there were other browser windows open). Jer On Fri, Aug 7, 2009 at 8:38 AM, it...@aol.com wrote: Hello, How to Exit/Close the Web Browser from Flash Applications? Could anyone suggest a code to exit the flash application and close the web browser window? I realize, the solution might be using ExternalInterface with JS. The question is how? The user can exit the flash application by clicking on an exit button or he/she can click on the Window “X”. When clicking either on the “exit” button or on the Window “X”, the flash application will show an alert message, asking the user whether he/she really want to exit. Upon clicking “yes” the application and web browser will close. Therefore, when the user clicks on the Window “X” the flash application needs to detect this click. Thanks, Daniel Abramovich **A Good Credit Score is 700 or Above. See yours in just 2 easy steps! ( http://pr.atwola.com/promoclk/100126575x1222846709x1201493018/aol?redir=http://www.freecreditreport.com/pm/default.aspx?sc=668072hmpgID=115bcd =JulystepsfooterNO115) ___ 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] actionscript 3 block rationale
Hey list, does anyone know the cool rationale behind the fact that the compiler won't allow me to execute a completely sane piece of code such as: private function _demo():void { for (var i:Number = 0; i 10;i++) { //evil stuff here } for (var i:Number = 0; i 10;i++) { //evil stuff here } } (getting a redefined blablah variable, to which there is no workaround but to rename the loop variables I think) But WILL allow me to do something stupid like: private function _demo():void { for (var i:int = 0; i 10; i++) { trace (this[j]); } var j:Object = null; } :) JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] actionscript 3 block rationale
ok thanks, as i expected then. Glad we agree it's counterintuitive, and although mtasc \^^\ oo /^^/ ROCKS, i like as3 too much to go back though:)) thanks Ian On Tue, Aug 18, 2009 at 10:43 AM, Ian Thomas i...@eirias.net wrote: JC, AS3 has no block scope. Whenever you write 'var x' inside a method, that declaration (effectively) gets moved to the 'top' of the method. So at a compiler level, this: private function _demo():void { for (var i:Number = 0; i 10;i++) { //evil stuff here } for (var i:Number = 0; i 10;i++) { //evil stuff here } } becomes this: private function _demo():void { var i:Number; var i:Number; /// Second definition! for (i=0;i10;i++) { // Evil stuff } for (i=0;i10;i++) { // Evil stuff } } And this: private function _demo():void { for (var i:int = 0; i 10; i++) { trace (this[j]); } var j:Object = null; } becomes this: private function _demo():void { var j:Object; var i:int; for (i=0;i10;i++) { trace(this[j]); } j=null; } I find it totally counterintuitive. It's a language spec thing. It was the same in AS2 - although, interestingly, Nicolas Cannasse's MTASC compiler added block scope and made AS2 work 'properly' - so it's not like it's an issue at bytecode level. Ian On Tue, Aug 18, 2009 at 9:28 AM, Hans Wichmanj.c.wich...@objectpainters.com wrote: Hey list, does anyone know the cool rationale behind the fact that the compiler won't allow me to execute a completely sane piece of code such as: private function _demo():void { for (var i:Number = 0; i 10;i++) { //evil stuff here } for (var i:Number = 0; i 10;i++) { //evil stuff here } } (getting a redefined blablah variable, to which there is no workaround but to rename the loop variables I think) But WILL allow me to do something stupid like: private function _demo():void { for (var i:int = 0; i 10; i++) { trace (this[j]); } var j:Object = null; } :) JC ___ 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] using flash components in flashdevelop
Hi list, I'm trying to use flashcomponents directly without going through the loop of creating an intermediate fla with the components in it. I've added all the cs4 swc files as libraries in flashdevelop, but it still cannot find the components. Starting to wonder if it is even possible any pointers would be appreciated! regards Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: using flash components in flashdevelop
Update, if I export the User Interface.fla in C:\Program Files\Adobe\Adobe Flash CS4\Common\Configuration\Components to swc and use that one instead of all the separate swc's in C:\Program Files\Adobe\Adobe Flash CS4\Common\Configuration\Components\User Interface it works just fine... On Fri, Aug 21, 2009 at 9:38 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi list, I'm trying to use flashcomponents directly without going through the loop of creating an intermediate fla with the components in it. I've added all the cs4 swc files as libraries in flashdevelop, but it still cannot find the components. Starting to wonder if it is even possible any pointers would be appreciated! regards Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] add string to a function
Hi, you are looking for: this[createSubNav+page](); HTH JC On Fri, Aug 28, 2009 at 11:20 AM, thomas horner tho...@megawattmedia.co.ukwrote: this is possibly a very basic problem, I'm still building my dynamic global sub nav, slooowly. what I want to know if can I add a string to a function, I have my initial first level navigation, I click a button and then if the button has children in that section it says true and then brings up the corresponding children to populate that subnav, I was going to have 3 separate functions for the subnavs what I'm unsure about is the line: 'createSubNav +page(); ///I wanted to then have the following functions createSubNavHis createSubNavHerscreateSubNavTheirs //is this possible? //here is my code on the first level buttons/// function mouseClickHandler(e:Event):void { //var siteNav:XML = IXml(assets.siteNav).xml; var page:String=e.target.label.text; trace(page); targetPage=e.target.linkTo; //targetPage = e.target.linkTo; if (e.target.kiddies.children().length()0) { hasChildren=true; TweenMax.to(nav1, 0.25, {x:-200, ease:Bounce.easeInOut}); trace(e.target.kiddies.children()); createSubNav + page() ; trace(hasChildren); } else { hasChildren=false; trace(hasChildren); Gaia.api.goto( + [targetPage] + ); } } ___ 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] add string to a function
ps a better option might be a parameter and a switchstatement On Fri, Aug 28, 2009 at 11:20 AM, thomas horner tho...@megawattmedia.co.ukwrote: this is possibly a very basic problem, I'm still building my dynamic global sub nav, slooowly. what I want to know if can I add a string to a function, I have my initial first level navigation, I click a button and then if the button has children in that section it says true and then brings up the corresponding children to populate that subnav, I was going to have 3 separate functions for the subnavs what I'm unsure about is the line: 'createSubNav +page(); ///I wanted to then have the following functions createSubNavHis createSubNavHerscreateSubNavTheirs //is this possible? //here is my code on the first level buttons/// function mouseClickHandler(e:Event):void { //var siteNav:XML = IXml(assets.siteNav).xml; var page:String=e.target.label.text; trace(page); targetPage=e.target.linkTo; //targetPage = e.target.linkTo; if (e.target.kiddies.children().length()0) { hasChildren=true; TweenMax.to(nav1, 0.25, {x:-200, ease:Bounce.easeInOut}); trace(e.target.kiddies.children()); createSubNav + page() ; trace(hasChildren); } else { hasChildren=false; trace(hasChildren); Gaia.api.goto( + [targetPage] + ); } } ___ 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] debugging events
Hi, you can check willTrigger(youreventtype), assuming its as3. Can you post the event constants here so we can take a look at them and the dispatching and listener code? regards JC On Thu, Sep 3, 2009 at 10:30 PM, Joel Stransky j...@stranskydesign.comwrote: I have some custom event classes for my project but one of them is just failing outright. I can verify that the function that dispatches the event is being called correctly but the object that's listening for it will never get it. The event class has two constants, one works, one doesn't. Is there a good way to verify that events are being broadcast or to debug wtf the handler never gets triggered? Thanks. -- --Joel Stransky stranskydesign.com ___ 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] disable mouse on transparent part of alpha video
Hi list, I need to create a couple of talking persons on a square, using transparent flv's for that. But it seems the whole of the video is clickable, even the transparent part (which is logical), is there any way to disable that? One other option I have is copying the persons to a bitmap and check the pixel transparency, but I'm guessing that is going to slow things down:) thanks Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] disable mouse on transparent part of alpha video
Hi, nope thats true, but I'm more concerned about the usability side of things, I don want to show a cursor when you cant click, so I would have to perform the check much more often. regards Hans On Thu, Sep 10, 2009 at 1:34 PM, Glen Pike g...@engineeredarts.co.ukwrote: Hi, Hans Wichman wrote: One other option I have is copying the persons to a bitmap and check the pixel transparency, but I'm guessing that is going to slow things down:) But if you are only checking transparency on a CLICK event, that is not going to happen to often in relation to playing the FLV right? Glen ___ 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] disable mouse on transparent part of alpha video
Hi, ok that might work, I'll try to mask out the shapes that have to be clickable. thanks folks! Hans On Thu, Sep 10, 2009 at 3:12 PM, Glen Pike g...@engineeredarts.co.ukwrote: Steven Sacks wrote: Cover the video with an alpha 0 shape. Problem solved. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Maybe like Steven said - use a shape over the video and insert cue-points for when it might be clickable. When it's clickable, mouseenable the 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
Re: [Flashcoders] fisheye dislpacement
Hi, maybe this will help; http://www.unitzeroone.com/blog/2005/10/26/2-new-flash-8-examples-displace-smoke-displacement-spheres-source/ it's as2 but the id is the same. hth JC On Thu, Sep 10, 2009 at 4:58 PM, Mendelsohn, Michael michael.mendels...@fmglobal.com wrote: Hi list... I'm trying to render a spherical earth using a DisplacementMapFilter out of a flat movieclip of the landmasses but it isn't working too well for me. Any suggestions? I'd appreciate hearing any ideas. Thanks, - Michael M. private function renderOrnament():Sprite{ var makeCirc:Function = function(isFront:Boolean, diam:uint):Shape{ // used for masks and displacement var c:Shape = new Shape(); var m:Matrix = new Matrix(); m.createGradientBox(diam,diam); var colors:Array = (isFront != true)?[0xFF,0x00]:[0x00,0xFF]; c.graphics.beginGradientFill(GradientType.RADIAL, colors,[1,1],[0,255],m); c.graphics.drawEllipse(0,0,diam,diam); c.graphics.endFill(); return c; } // container var orn:Sprite = new Sprite(); // front hemisphere var fh:Sprite = new Sprite(); orn.addChild(fh); // front world (World is a mc of all the continents) frontWorld = new World(); fh.addChild(frontWorld); // front world mask var circleMask:Shape = makeCirc(true,200); fh.addChild(circleMask); frontWorld.mask = circleMask; // front world displacement fh.filters = [new DisplacementMapFilter(new BitmapData(200,200), new Point(0,0), 1, 1,75, 75, DisplacementMapFilterMode.IGNORE, 1,0)]; return orn; } ___ 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] bitwise question
Hey, not sure if it's faster, but this would work as well: var i:Number = 32; trace (Math.log(i)/Math.LN2); returns bit number 5. Lookuptable might be faster in this case. greetz JC On Tue, Sep 15, 2009 at 10:04 AM, Jiri jiriheitla...@googlemail.com wrote: When i have a 8 bit int where only one of the bit can be 1, what is then the quickest way to get that bit position with value 1? Now I use this. function getBit():int{ var tCount:int = 0; for (var i:int=0; i 8; i++) { if (8 (1 i)) return i; } return 0; } Can this be done faster? 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] localconnection in as2
Hi list, as I understand it, there is a send/receive limit of 40k to the localconnection object in actionscript2. Mostly the objects passed in my application will probably be under 40k, but the question is: how can you tell? Is there some way to grab the actual AMF object flash is going to try and pass and cut it up into pieces if necessary? Or should you serialize and cut up everything beforehand just to be sure? regards, Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] localconnection in as2
Thanks Keith ill look into that! On Sat, Sep 19, 2009 at 5:07 PM, Keith H kh...@nc.rr.com wrote: -If you don't want to worry about a send/receive limit on a String sent, take a look at this post here. -If you just want to measure the size being sent, you can look at the part where the poster is dividing the length of the String sent by the limit. http://www.ultrashock.com/forums/actionscript/40k-byte-size-limit-on-localconnection-56395.html ...hope that leads you in the way you want to go. -- Keith H -- www.keith-hair.net Hans Wichman wrote: Hi list, as I understand it, there is a send/receive limit of 40k to the localconnection object in actionscript2. Mostly the objects passed in my application will probably be under 40k, but the question is: how can you tell? Is there some way to grab the actual AMF object flash is going to try and pass and cut it up into pieces if necessary? Or should you serialize and cut up everything beforehand just to be sure? regards, Hans ___ 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] instantiate symbol linked to parent movie's library
Hi, I don't remember the exact details, but if I remember correctly there are 2 ways: 1. let the child attach the clip at the root, copy its bitmap data and use that to create a clip in its own root, but this will result in static bitmaps only 2. -declare an empty clip with linkage id in the root and export it for runtime sharing -in the child import the clip from the parent for runtime sharing It was one of those hacks, but it's been a long time, so I'm not sure I got the steps all right, I might have those files somewhere. Hope that helps! Hans On Tue, Sep 22, 2009 at 5:50 AM, Andrew Sinning and...@learningware.comwrote: How would one instantiate a symbol instance linked to the parent movie's library? E.g., there's an asset in top most movie's library called Asset. The presentation engine is a separate swf that gets loaded into the top most movie. From within this movie, using AS2, I need to create an instance of Asset. The child swf uses _lockRoot. Thanks! ___ 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] instantiate symbol linked to parent movie's library
Hi, calling a function in the root that would instantiate the symbol is not going to work, neither is using reflection to get classes by name. The issue you are dealing with is that by default flash will only let you attach clips to a clip from the library from whence it came. I'll try to whip up a sample up of the runtime share hack. greetz JC On Tue, Sep 22, 2009 at 2:08 PM, jonathan howe jonathangh...@gmail.comwrote: Totally forget in AS2, but maybe research getDefinitionByName() - it can retrieve a class based on a classname string - and maybe there are some comments about AS2 vs. AS3 -jonathan On Tue, Sep 22, 2009 at 2:54 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi, I don't remember the exact details, but if I remember correctly there are 2 ways: 1. let the child attach the clip at the root, copy its bitmap data and use that to create a clip in its own root, but this will result in static bitmaps only 2. -declare an empty clip with linkage id in the root and export it for runtime sharing -in the child import the clip from the parent for runtime sharing It was one of those hacks, but it's been a long time, so I'm not sure I got the steps all right, I might have those files somewhere. Hope that helps! Hans On Tue, Sep 22, 2009 at 5:50 AM, Andrew Sinning and...@learningware.com wrote: How would one instantiate a symbol instance linked to the parent movie's library? E.g., there's an asset in top most movie's library called Asset. The presentation engine is a separate swf that gets loaded into the top most movie. From within this movie, using AS2, I need to create an instance of Asset. The child swf uses _lockRoot. Thanks! ___ 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 -- -jonathan howe ___ 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] instantiate symbol linked to parent movie's library
Hi Andrew, i've put a sample together at: http://www.objectpainters.com/downloads/runtimesharinghack.zip user/pass is blog/blog There are 2 demos, the first of how you probably do it at the moment, you load a sub into main and try to attach a clip from main to sub. The sample shows that doesnt work by default. The second sample added a couple of things: -main exports a hack_clip at main.swf for runtime sharing. -sub imports a hack_clip from main.swf for runtime sharing AND puts it on the stage. If you run the 2nd example you see there is no problem attaching a clip from main to sub, even though the attached clip had nothing to do with runtime sharing, only the hack_clip did. In practice you need to account for a couple things: - runtime library sharing is not without it's own problems, but since you can be sure main.swf is already in the cache by the time sub.swf requires it, you're on the safe side - i've never ever used this hack in a real project, so there is some risk involved in using it (but ain't it spiffy ;)). regards, JC On Tue, Sep 22, 2009 at 7:43 PM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi, calling a function in the root that would instantiate the symbol is not going to work, neither is using reflection to get classes by name. The issue you are dealing with is that by default flash will only let you attach clips to a clip from the library from whence it came. I'll try to whip up a sample up of the runtime share hack. greetz JC On Tue, Sep 22, 2009 at 2:08 PM, jonathan howe jonathangh...@gmail.comwrote: Totally forget in AS2, but maybe research getDefinitionByName() - it can retrieve a class based on a classname string - and maybe there are some comments about AS2 vs. AS3 -jonathan On Tue, Sep 22, 2009 at 2:54 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi, I don't remember the exact details, but if I remember correctly there are 2 ways: 1. let the child attach the clip at the root, copy its bitmap data and use that to create a clip in its own root, but this will result in static bitmaps only 2. -declare an empty clip with linkage id in the root and export it for runtime sharing -in the child import the clip from the parent for runtime sharing It was one of those hacks, but it's been a long time, so I'm not sure I got the steps all right, I might have those files somewhere. Hope that helps! Hans On Tue, Sep 22, 2009 at 5:50 AM, Andrew Sinning and...@learningware.com wrote: How would one instantiate a symbol instance linked to the parent movie's library? E.g., there's an asset in top most movie's library called Asset. The presentation engine is a separate swf that gets loaded into the top most movie. From within this movie, using AS2, I need to create an instance of Asset. The child swf uses _lockRoot. Thanks! ___ 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 -- -jonathan howe ___ 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] instantiate symbol linked to parent movie's library
Hi Andrew, yes only a single library item. Still before basing a large scale email application on something like this would not make me sleep well at night, unless there wasn't another way. Seeing the large numbers of elearning apps already written in flash, there probably is another way;). From what you describe, maybe you could use: - a template that's loaded by the main engine which loads xml and does things based on that (instead of generating it statically to an swf using swfmill, you'd have different templates). - non library based assets, completely drawn in actionscript, that way recompiling them into the main after changing, would change them for all the subs even if they were compiled with another version of the actionscript asset another time - use the bitmap based approach earlier - an asset swf that gets loaded by each sub swf only once and is used as a container to attach the assets from it's own library to as well One thing I would do is check whether this still works like this in as3 for example. On the other hand if it works it works and if you're under a lot of time pressure this might just be what you need ;) take care Hans On Tue, Sep 22, 2009 at 8:47 PM, Andrew Sinning and...@learningware.comwrote: That's super cool. So the sub only has to have a _single_ library item from the shared library in order to have access to the whole library. That's not very intuitive, but I'm really glad it works! Hans Wichman wrote: Hi Andrew, i've put a sample together at: http://www.objectpainters.com/downloads/runtimesharinghack.zip user/pass is blog/blog There are 2 demos, the first of how you probably do it at the moment, you load a sub into main and try to attach a clip from main to sub. The sample shows that doesnt work by default. The second sample added a couple of things: -main exports a hack_clip at main.swf for runtime sharing. -sub imports a hack_clip from main.swf for runtime sharing AND puts it on the stage. If you run the 2nd example you see there is no problem attaching a clip from main to sub, even though the attached clip had nothing to do with runtime sharing, only the hack_clip did. In practice you need to account for a couple things: - runtime library sharing is not without it's own problems, but since you can be sure main.swf is already in the cache by the time sub.swf requires it, you're on the safe side - i've never ever used this hack in a real project, so there is some risk involved in using it (but ain't it spiffy ;)). regards, JC On Tue, Sep 22, 2009 at 7:43 PM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi, calling a function in the root that would instantiate the symbol is not going to work, neither is using reflection to get classes by name. The issue you are dealing with is that by default flash will only let you attach clips to a clip from the library from whence it came. I'll try to whip up a sample up of the runtime share hack. greetz JC On Tue, Sep 22, 2009 at 2:08 PM, jonathan howe jonathangh...@gmail.com wrote: Totally forget in AS2, but maybe research getDefinitionByName() - it can retrieve a class based on a classname string - and maybe there are some comments about AS2 vs. AS3 -jonathan On Tue, Sep 22, 2009 at 2:54 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi, I don't remember the exact details, but if I remember correctly there are 2 ways: 1. let the child attach the clip at the root, copy its bitmap data and use that to create a clip in its own root, but this will result in static bitmaps only 2. -declare an empty clip with linkage id in the root and export it for runtime sharing -in the child import the clip from the parent for runtime sharing It was one of those hacks, but it's been a long time, so I'm not sure I got the steps all right, I might have those files somewhere. Hope that helps! Hans On Tue, Sep 22, 2009 at 5:50 AM, Andrew Sinning and...@learningware.com wrote: How would one instantiate a symbol instance linked to the parent movie's library? E.g., there's an asset in top most movie's library called Asset. The presentation engine is a separate swf that gets loaded into the top most movie. From within this movie, using AS2, I need to create an instance of Asset. The child swf uses _lockRoot. Thanks! ___ 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 -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] basic mtasc question
Hi, framescripts wont be hurt (if you mean timeline code). regards JC On Wed, Sep 23, 2009 at 5:51 PM, Andrew Sinning and...@learningware.comwrote: I'm getting really impatient with the FDE compiler. Probably my fault for piling on so many classes, but I need to keep moving forward. When using mtasc to inject code into a swf, does all the AS get replaced, or only the main class? I'd like to leave frame scripts in place. I only want to recompile main. Thanks! ___ 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] RE: swf behaving differently in different domain and other issues loading swf (Isaac Alves)
I fear this might be the 4th, I feel your pain:) On Wed, Sep 23, 2009 at 8:54 PM, Keith Reinfeld keithreinf...@comcast.netwrote: That's the third time you've ignored me... I'm done. ___ 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] RE: Pricing a Freelance Project
Hi Steven, excuse my ignorance, but as a non native English person what is TM NET 15/30? Couldn't find it on google. regards, Hans On Mon, Oct 12, 2009 at 8:23 AM, Steven Sacks flash...@stevensacks.netwrote: I do not do fixed bid projects. I always do TM NET 15/30, and don't have an issue selling my work that way. If you want me to do a fixed bid project, I'm bidding on exactly what the scope is right now. If there is any change in scope, production will stop as I assess the impact such a change will have on the schedule (my assessment is billable), and take time to modify the contract to reflect the change in scope and cost, and you will need to review and approve these changes in writing, all of which take time spent not developing and puts your deadline in jeopardy. However, with TM, I get paid for the work I do, and you have full flexibility in making as many changes as you like, with the knowledge that development never stops, though the deadline may be affected by your changes. Something to that effect. Kerry Thompson wrote: Steven Sacks wrote: You need to charge for time spent babysitting the client. That's billable time. Absolutely true, with one kicker: a fixed bid. A lot of clients want to shift the risk to you, the freelancer, so they ask for a fixed-price bid rather than an hourly rate. My advice is to be very, very careful with these. My experience shows that clients rarely, if ever, know just what they need. They will give you an idea, but there will inevitably be extras that simply must be done. Initial estimates of the amount of work needed are almost always off by a factor of at least two, often up to a factor of 10. If you underbid one of these contracts, you could spend a year to earn $20,000. Be up front with the client in this case. You are bidding on the project as it is currently designed. Changes and additions will be billed extra. You must do this to survive, or your client will bury you with feature creep. Be positive about it, of course. When they request an additional feature, say Sure, we can do that. It will cost you $4,000 and add two weeks to the schedule. I'll get started on it just as soon as I get an amendment to the contract. Also, on a fixed-bid contract, get at least 25% up front. If you bill only on milestones, can you live off your savings until they approve the prototype, or the alpha? I can't--I'm lucky that my wife has a well-paying job. Cordially, Kerry Thompson ___ 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] image upload from flex to .net
Hi list, I need to upload an image from flex to .net. That in addition to a lot of other stuff that I need to do to it. I'd like to consolidate all those operations including the upload into some kind of remoting gateway. My question is: - is remoting a good option for uploading an image in this scenario? - which remoting gateway for .net is a good option? tia, Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: image upload from flex to .net
ps i'm leaning toward weborb btw On Mon, Oct 12, 2009 at 4:05 PM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi list, I need to upload an image from flex to .net. That in addition to a lot of other stuff that I need to do to it. I'd like to consolidate all those operations including the upload into some kind of remoting gateway. My question is: - is remoting a good option for uploading an image in this scenario? - which remoting gateway for .net is a good option? tia, Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: image upload from flex to .net
Hi, no takers on this one? Noone any experience with this kind of thing through remoting? regards JC On Mon, Oct 12, 2009 at 4:05 PM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi list, I need to upload an image from flex to .net. That in addition to a lot of other stuff that I need to do to it. I'd like to consolidate all those operations including the upload into some kind of remoting gateway. My question is: - is remoting a good option for uploading an image in this scenario? - which remoting gateway for .net is a good option? tia, Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] image upload from flex to .net
Hi Dave, Jason ok thanks, will try out the different options. @jason: doesn't an upload through a webservice generate a lot of overhead? Anything special going on in using a FileReference to do so (I didn't even know it was possible;)). regards JC On Thu, Oct 15, 2009 at 1:13 AM, Dave Watts dwa...@figleaf.com wrote: I'd like to consolidate all those operations including the upload into some kind of remoting gateway. My question is: - is remoting a good option for uploading an image in this scenario? - which remoting gateway for .net is a good option? I think you're better off not using a gateway for file uploads. I don't know if a gateway will work at all for that. The URL to which you upload can perform whatever post-processing you need. 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] Vista-like glossy SimpleButton - please help with the final touch
Cool alex, I was trying to find my old aqua code, but can't locate it, it was as2 anyway, so I'll have rewrite it for as3. Not quite vista, but still acceptable I think: http://www.objectpainters.com/flashExamples/aqua/ As said, I'll have to rewrite it for as3 and I made an error in the reflection, mixing it up with how the shadow would fall when using backlighting I applied a displacement map to have it 'spread' which is of course wrong for a reflection, which shouldn't spread at all. Anyway, if anyone is interested I can still post the code after migration. regards, JC On Sun, Oct 18, 2009 at 10:57 AM, Cor c...@chello.nl wrote: Nice work Alex. Thanks for your final solution! Regards Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Alexander Farber Sent: zondag 18 oktober 2009 10:29 To: Flash Coders List Subject: Re: [Flashcoders] Vista-like glossy SimpleButton - please help with the final touch Hello all, thank you for your replies. I've added another Shape on top of my gradient and set its blendMode to BlendMode.OVERLAY and am finally satisfied with the result (except the downState - red doesn't look good there for some reason. The overlay is too bright there)... Your suggestion with BevelFilter, Cor, is a good trick too - thank you. It just doesn't match my case, I want to make a long bar of glossy buttons. I'm pasting my source code below for the archives and if someone is interested. I wonder if the treshold for OVERLAY can be changed (through setting DisplayObject's alpha?) or if it's always at 50%? Regards Alex package { import flash.display.Sprite; public class SimpleButtonExample extends Sprite { public function SimpleButtonExample() { var button:CustomSimpleButton = new CustomSimpleButton(); button.x = button.y = 100; addChild(button); } } } import flash.display.*; import flash.filters.*; import flash.geom.*; class CustomSimpleButton extends SimpleButton { private var overColor:uint = 0xFFCC00; // this one still doesn't look good: private var downColor:uint = 0xFF; private var upColor:uint = 0x00CCFF; private var size:uint = 80; public function CustomSimpleButton() { downState = new ButtonDisplayState(downColor, size); overState = new ButtonDisplayState(overColor, size); upState= new ButtonDisplayState(upColor, size); hitTestState = upState; useHandCursor = true; } } class ButtonDisplayState extends Sprite { private var bgColor:uint; private var size:uint; public static const SHADOW:GlowFilter = new GlowFilter(0x00, 1.0, 4, 4, 1, 1, false, false); private static const GLOW:GlowFilter = new GlowFilter(0xFF, 0.8, 40, 40, 1, 1, true, false); public function ButtonDisplayState(bgColor:uint, size:uint) { this.bgColor = bgColor; this.size= size; draw(); } private static function brighten(color:uint, modifier:int):uint { var red:int = (color 16) 0xFF; var green:int = (color 8) 0xFF; var blue:int = color 0xFF; red += modifier; if (red 0xFF) red = 0xFF; else if (red 0) red = 0; green += modifier; if (green 0xFF) green = 0xFF; else if (green 0) green = 0; blue += modifier; if (blue 0xFF) blue = 0xFF; else if (blue 0) blue = 0; return (red 16) | (green 8) | blue; } private function draw():void { var colors:Array = [brighten(bgColor, 120), bgColor]; var alphas:Array = [1, 1]; var ratios:Array = [0, 255]; var matrix:Matrix = new Matrix(); var overlay:Shape = new Shape(); matrix.createGradientBox(size * 4, size, Math.PI / 2, 0, 0); graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix); graphics.drawRoundRect(0, 0, size * 4, size, 4); overlay.graphics.beginFill(0xFF, 0.6); overlay.graphics.drawRoundRect(0, 0, size * 4, size / 3, 8); overlay.graphics.endFill(); overlay.blendMode = BlendMode.OVERLAY; addChild(overlay); filters = [ SHADOW, GLOW ]; } } ___ 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
Re: [Flashcoders] Movieclip in a remote shared object
Hi, as far as I'm aware, stored objects lose all type info except the basic types objects, strings, number etc. So no no storing of movieclips I think, but you can always try;) regards, Hans On Sun, Oct 18, 2009 at 12:53 AM, ktt kestuti...@yahoo.com wrote: Hello, Is it possible to store Movieclip in a remote shared object? Ktt ___ 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] Setting a property in a class from another class
Hi, your class B instance will need a reference to an instance of Class A, unless your nextPrev property is static. If nextPrev is static, Class B can do ClassA.nextPrev (assuming the property is public). If nextPrev is not static, you'll need to do new ClassB (myClassAInstance) and access the instance of A within B. Another option is a separate method doSomething (pClassA:ClassA) { pClassA.nextPrev = whatever; } JC On Tue, Oct 20, 2009 at 12:03 PM, Sajid Saiyed sajid.fl...@gmail.comwrote: Hi, I have a basic problem that I cant figure out how... I have a ClassA and ClassB (both extend Sprite) ClassA has a property called nextPrev:Boolean Inside ClassA I create an instance of ClassB like this: public var myB:ClassB = new ClassB(); Now, is it possible that I can have a method inside ClassB that can set the nextPrev property inside ClassA? Dont know if this is possible... 4 Regards ___ 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] localconnection speed in relation to movieframerate
Hi List, I've set up a test in AS2 with a 2 channel localconnection, swf A sends a msg to swf B, and B sends back an acknowledge signal. If I set the movies framerate to 1 fps, this takes about 50ms for a simple msg to get an ack signal, if I set the framerate to 30 it takes about 5ms. Erm... my naive conclusion would be that the localconnection's execution speed is connected to the framerate of the running movies, can anyone confirm that? I'm writing code that runs within a legacy shell that uses setVariable on the swf which is no longer supported so now I'm trying to work around that issue using an as2 swf within an as3 swf which passes on the signals using localconnection :-S regards, JC ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] RE: Inheritance and Static properties
Helmut, I might be missing the point here, but doesn't a MyButtonEvent class with the constants defined in there solve your problem? And what is event.target.NAME? Tried event.target.name? regards JC On Sat, Oct 24, 2009 at 3:25 AM, Brett Artrahn brtrah...@yahoo.com.auwrote: Helmut, Grant Skinner link below might help you with your event framework. http://www.gskinner.com/blog/archives/2007/07/building_a_stat_1.htm And you can access public static constants anywhere in your application as long as you import the class? Are you saying this is not true? __ Get more done like never before with Yahoo!7 Mail. Learn more: http://au.overview.mail.yahoo.com/ ___ 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] localconnection speed in relation to movieframerate
Hi Steven, in this particular case I do find it odd or rather surprising, since it's a bit unclear when the localconnection triggers the code in the other movie. If A sends to B and B sends to A and it happens all within the timespace of a single frame, I would expect the time taken to be equal no matter the framerate. If it happens within the time space of multiple frames, I would expect the time taken to be closer to the time between each frame. Ofcourse when it's all running in a single movie it's -codeexecution-draw-codeexecution-draw-etc so then it's pretty obvious how it works. It's just funny in this case my localconnection is too slow, oh well increase the framerate. I'll have to test though if it's simply the roundtrip that's taker longer or if a single call from A to B is influenced by the framerate as well. thanks Hans On Sat, Oct 24, 2009 at 9:35 PM, Steven Sacks flash...@stevensacks.netwrote: Framerate directly affects Flash's code execution response time. Is there a reason why you would find this odd or surprising? Hans Wichman wrote: Hi List, I've set up a test in AS2 with a 2 channel localconnection, swf A sends a msg to swf B, and B sends back an acknowledge signal. If I set the movies framerate to 1 fps, this takes about 50ms for a simple msg to get an ack signal, if I set the framerate to 30 it takes about 5ms. Erm... my naive conclusion would be that the localconnection's execution speed is connected to the framerate of the running movies, can anyone confirm that? I'm writing code that runs within a legacy shell that uses setVariable on the swf which is no longer supported so now I'm trying to work around that issue using an as2 swf within an as3 swf which passes on the signals using localconnection :-S regards, JC ___ 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] Changing angle for better arrangement in circle
Hi, aside from the fact that the illusion of perspective depends on the items being scaled and the spacing not being equal, i see two options, a) limit the maximum scale, dirty but might be a quick trick. Either by multiplying it by some root or a hard limit. b) sum the (scaled) width of all items, walk through list again and keep track of the (scaled) width of the items traversed up to that point. For the current item base it's angle on (in pseudo) currentListWidthUpToThisPoint/totalwidth. When determining the width of the list you can add a padding between each item, which allows you to play which the separation and scale. Just an idea I haven't tried this out, that's why the (scaled) is between brackets, you'll have to experiment with what works best. regards JC On Thu, Apr 22, 2010 at 8:29 AM, Nathan Mynarcik nat...@mynarcik.comwrote: I think you might want to look into Papervision3D to get exactly what you want. If not, your math logic is going to have to be crazy to get the results you are wanting. Your spacing stays the same because you are working on a 2D scale. If you use papervision, you might have better luck achieving your goal. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of natalia Vikhtinskaya Sent: Wednesday, April 21, 2010 11:16 PM To: Flash Coders List Subject: Re: [Flashcoders] Changing angle for better arrangement in circle Red dots I put to show points where items are attached. As you see space between points are equal. Some items are scaled and space between them is not equal. That what I try to change. Space should be equal between each item. 2010/4/21 Nathan Mynarcik nat...@mynarcik.com: If you want the dots to be on top of all the items, the dots need to be in separate MCs of the items and need to be added to the stage after all the other item MCs have been added. Quoting natalia Vikhtinskaya natavi.m...@gmail.com: Here is a result http://www.mightybook.com/test/test.html I want they don't overlap each other. Is that possible? 2010/4/22 Matt S. mattsp...@gmail.com: If the objects you were placing were centered rather than positioned at 0/0, you could scale them and they would automatically be properly distanced. There might be other reasons why you cant center them of course but that would be the quick fix... .m On Wed, Apr 21, 2010 at 4:16 PM, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Another question about better arrangement in circle. If I place items in circle and scale them like this this._x = Math.cos(this.angle) * radiusX + centerX; this._y = Math.sin(this.angle) * radiusY + centerY; var s = (this._y ) /(centerY+radiusY); this._xscale = this._yscale = s*100; Is it possible to have equal distance between items? I should change angle depending on real scale that they have but I don’t understand how to do that. Thank you if anybody can explain this mathematics. ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Infinitely Looping Image
Hi John, I've just been dabbling in the same sort of thing, but basically just using bitmapfill, it's very simple, check this out: http://www.innerdrivestudios.com/blog/articles/actionscript-3/gfx-actionscript-3-articles/wrapping-bitmapdata-in-actionscript-3 And an application of the principle: http://www.innerdrivestudios.com/blog/articles/actionscript-3/gfx-actionscript-3-articles/flag-effect-in-actionscript-3 Click and the flag and the clouds will start moving using the technique described in the first post. HTH JC On Mon, Apr 26, 2010 at 4:02 PM, John Singleton johnsingleton...@yahoo.comwrote: Hi; I would like to have a background image of clouds loop infinitely.Here's my code: function BigPic():void { parent_container2 = new MovieClip(); var square:Sprite = new Sprite(); parent_container2.mask = square; addChild(square); square.graphics.lineStyle(3,0x065566); square.graphics.beginFill(0xff); square.graphics.drawRoundRect(22, 22, 966, 146, 20); square.graphics.endFill(); addChild(parent_container2) var path:String = images/clouds.png; var req:URLRequest = new URLRequest(path); var loader:Loader = new Loader(); loader.load(req); loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void{ trace(e) }); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, BigPicLoaded); } function BigPicLoaded(evt:Event):void { var loaderInfo:LoaderInfo = evt.target as LoaderInfo; var displayObject:DisplayObject = loaderInfo.content; displayObject.width = 2000; displayObject.height = 150; displayObject.x = 20; displayObject.y = 20; parent_container2.addChild(displayObject); // TweenLite.to(parent_container2, 50, {x:-1000}); cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation); } function restartAnimation(oEvent:Event):void { cloudTween.start(); } But it ain't working. Ideas? TIA, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders