Re: [Flashcoders] constructor interpreted?

2011-04-05 Thread Juan Pablo Califano
a native version of it. Last I heard, the AVM JIT compiles and caches all the native code, except for code in the constructors (I don't know whether this is up to date, or why are constructors exceptions to what seems to be the general rule). Cheers Juan Pablo Califano 2011/4/5 Kerry Thompson al

Re: [Flashcoders] Unique array AS3

2011-01-13 Thread Juan Pablo Califano
provides). Now substract 1 and you'll get -1, 0 or 1, which is what you want for your sort function. Cheers Juan Pablo Califano 2011/1/13 natalia Vikhtinskaya natavi.m...@gmail.com Hi I use function that creates unique array function uniqueRandomInt(min:Number, max:Number, n:Number

Re: [Flashcoders] Unique array AS3

2011-01-13 Thread Juan Pablo Califano
= Math.floor(Math.random() * (top + 1)); tmp = array[cur]; array[cur] = array[top]; array[top] = tmp; } } } 2011/1/13 Juan Pablo Califano califa010.flashcod...@gmail.com Try this: function uniqueRandomInt(min:Number, max:Number, n:Number) { var

Re: [Flashcoders] Unique array AS3

2011-01-13 Thread Juan Pablo Califano
No problem! 2011/1/13 natalia Vikhtinskaya natavi.m...@gmail.com THANK YOU AGAIN!!! 2011/1/13 Juan Pablo Califano califa010.flashcod...@gmail.com: PS: I mentioned that a random sort was not the best approach. Here's a better way to randomize an array: public static function

Re: [Flashcoders] Automagically create an interface from a given AS3 class?

2010-12-20 Thread Juan Pablo Califano
it for Actiosncript code, but maybe knowing the common name can help you narrowing you search (for what is worth, I'm not aware of any tool that offers this feature for AS). Cheers Juan Pablo Califano 2010/12/20 Matt Perkins nudoru.m...@gmail.com So this is me being extremely lazy - is there a tool

Re: [Flashcoders] RE: swf not compiling

2010-12-12 Thread Juan Pablo Califano
the IDE team; I'm tempted to say that it shows, though. Cheers Juan Pablo Califano 2010/12/12 Merrill, Jason jason.merr...@bankofamerica.com However, CS4 uses the Flex SDK Java compiler and I'm sure CS5 does too, so I guess it's probably not a compiler issue I would disagree. The Flashbuilder

Re: [Flashcoders] RE: swf not compiling

2010-12-10 Thread Juan Pablo Califano
Pablo Califano 2010/12/10 Merrill, Jason jason.merr...@bankofamerica.com I've written 36 classes for this project, totaling 430kb, with a few more still to go. Additionally, I'm importing some third party classes. I'm wondering if I'm running into some undocumented as3 code limit. Oh

Re: [Flashcoders] stop caching

2010-12-09 Thread Juan Pablo Califano
), on the other hand, the querystring will not be considered part of the file name. So yes, it's a local / server issue. Cheers Juan Pablo Califano 2010/12/9 Lehr, Theodore ted_l...@federal.dell.com I am trying to prevent caching via: function startLoad(dfile:String) { var ran:int = Math.round

Re: [Flashcoders] Normalising Numbers

2010-11-29 Thread Juan Pablo Califano
= list.length; var result:Array = []; for(var i:int = 0; i len; i++) { result[i] = rangedToNormal(list[i],min,max); } return result; } Cheers Juan Pablo Califano 2010/11/29 Karim Beyrouti ka...@kurst.co.uk Hello FlashCoder... maybe it's because it's late but it's getting a little confusing

Re: [Flashcoders] Advice on calling subscriber script on another server

2010-11-26 Thread Juan Pablo Califano
No problem, Paul. I'm glad you sorted it out! Cheers Juan Pablo Califano 2010/11/26 Paul Steven paul_ste...@btinternet.com Awesome! Thank you Juan - that worked perfectly! I did get caught out for a while by not adding require_once HttpClient.class.php But once I realised I had omitted

Re: [Flashcoders] Advice on calling subscriber script on another server

2010-11-25 Thread Juan Pablo Califano
you could add a crossdomain there and run the php http client over there. Then, instead of talking directly to the ad server or a local php script, you'd call a third server that you control, which will proxy the communication between flash and the ad server. Hope it makes sense! Cheers Juan Pablo

Re: [Flashcoders] Set HTTP cookies with navigateToURL()

2010-11-13 Thread Juan Pablo Califano
; Cheers Juan Pablo Califano 2010/11/13 Alexander Farber alexander.far...@gmail.com Hello, I have a small multiplayer Flash game in which you can display a player profile by clicking at his or her avatar: const PROFILE_URL:String = 'http://myserver/user.php?id='; try { navigateToURL(new

Re: [Flashcoders] Calling a Static Function

2010-11-10 Thread Juan Pablo Califano
parameters they define (and also the types). In my example, it's simply: trace(describeType(mathClass)); So, you could probably see this info doing: trace(describeType(AssetLibraryDef)); Not sure where the problem could be, really, but perhaps this gives you some idea. Cheers Juan Pablo Califano

Re: [Flashcoders] Inheritance and abstract classes

2010-09-24 Thread Juan Pablo Califano
: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Juan Pablo Califano Sent: Friday, September 24, 2010 1:15 AM To: Flash Coders List Subject: Re: [Flashcoders] Inheritance and abstract classes Despite what the naming conventions are, since

Re: [Flashcoders] Inheritance and abstract classes

2010-09-23 Thread Juan Pablo Califano
be able to use your library, without having to extend some class (which is not always possible / practical). In lots of application code, though, I think you don't really need this extra flexibility and many times it adds more work for little benefit. Cheers Juan Pablo Califano 2010/9/23 Anthony Pace

Re: [Flashcoders] Using an embedded font

2010-09-22 Thread Juan Pablo Califano
font:Garamond3Embedded = new Garamond3Embedded(); textFormat.font = font.fontName; Cheers Juan Pablo Califano 2010/9/22 Kerry Thompson al...@cyberiantiger.biz I've been banging my head up against this for 4 hours, and the client has to ship tonight. FlashBuilder 4, Windows 7. I am just trying to make

Re: [Flashcoders] Using an embedded font

2010-09-22 Thread Juan Pablo Califano
PS: I meant this: var font:Font = new Garamond3Embedded() as Font; textFormat.font = font.fontName; 2010/9/22 Juan Pablo Califano califa010.flashcod...@gmail.com Have you tried not setting the font name in the text format object? I think it defaults to Times or something like

Re: [Flashcoders] Using an embedded font

2010-09-22 Thread Juan Pablo Califano
the problem per se, but maybe it shows you the name of the font as it's registered. Cheers Juan Pablo Califano 2010/9/22 Kerry Thompson al...@cyberiantiger.biz Juan Pablo Califano wrote: var font:Font = new Garamond3Embedded() as Font; textFormat.font = font.fontName; Well, I tried that too

Re: [Flashcoders] Using an embedded font

2010-09-22 Thread Juan Pablo Califano
created with code, but I generally work with fla's that have text fields with embedded fonts in the Flase IDE and having a dummy textfield is sometimes the easier way to make sure font are embbeded for the whole swf and that all text fields display the fonts correctly. 2010/9/22 Juan Pablo Califano

Re: [Flashcoders] flv on fb servers not loading in ie only

2010-09-21 Thread Juan Pablo Califano
if you find something else. Cheers Juan Pablo Califano 2010/9/21 jared stanley jared.stan...@gmail.com thanks. I think the problem has been isolated, on the URLRequest, the response is as follows: http://pastebin.com/AmwCtAcD in there, the 'referer' param is causing the file to 404

Re: [Flashcoders] flv on fb servers not loading in ie only

2010-09-20 Thread Juan Pablo Califano
recall correctly, this custom channel url workaround is necessary only if your app isn't loaded within FB, as opposed to an external site that just uses Facebook Connect. (Or was it the other way around?) Hope this helps. Cheers Juan Pablo Califano 2010/9/20 jared stanley jared.stan

Re: [Flashcoders] Error #2032

2010-09-04 Thread Juan Pablo Califano
is sent by the client anyway, and no real security could be enforced just by inspecting it). Cheers Juan Pablo Califano 2010/9/4 Paul Andrews p...@ipauland.com I have an pap that access a remote server (well it won't be remote once deployed) via http and the server returns some XML. Testing

Re: [Flashcoders] Error #2032

2010-09-04 Thread Juan Pablo Califano
will switch to GET silently (this is documented in fine print in the docs but I had missed). A simple solution for this is sending some dummy data to force flash to use POST. 2010/9/4 Juan Pablo Califano califa010.flashcod...@gmail.com It's hard to know what the problem is with such limited info

Re: [Flashcoders] parsing multi-dimensional array

2010-09-04 Thread Juan Pablo Califano
. In that case, you could consider adding other methods or (better) using some more specific data structures, such as these: http://sibirjak.com/blog/index.php/collections/as3commons-collections/ Cheers Juan Pablo Califano 2010/9/3 Lehr, Theodore ted_l...@federal.dell.com so if I have a multi

Re: [Flashcoders] Detect player version that was published

2010-08-24 Thread Juan Pablo Califano
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/LoaderInfo.html#swfVersionChecking if Loader has an unloadAndStop method defined will let you know if the player version is = 10, but not what version the swf was published for. Cheers Juan Pablo Califano 2010/8/24 Todd

Re: [Flashcoders] Getting the url where my Flash movie was embeded

2010-08-13 Thread Juan Pablo Califano
No problem. I'm glad you sorted it out. Cheers Juan Pablo Califano 2010/8/13 Pedder b_gro...@gmx.de Yeah, that worked. The embed code the user can copy from my page now directs to a server script widget.swf with some parameters. With a htaccess rewrite rule the call is redirected to a php

Re: [Flashcoders] Getting the url where my Flash movie was embeded

2010-08-12 Thread Juan Pablo Califano
swf, tell them to link to yourserver.com/your_widget.php. This php file will read and store the referrer and then just return the swf (a simple redirect to your swf will do it). Cheers Juan Pablo Califano 2010/8/12 Pedder b_gro...@gmx.de Shit, you're right! I realized that i was testing

Re: [Flashcoders] Facebook API GetPhotos not working

2010-08-10 Thread Juan Pablo Califano
the graph API, but if I had to do any other FB app, I think I'd go this way, but that's just me, I guess). Hope this helps somehow or at least gives you some pointers. Cheers Juan Pablo Califano 2010/8/10 David Hunter davehunte...@hotmail.com Hi List, . Anyone have any experience

Re: [Flashcoders] fileReference failing silently

2010-08-09 Thread Juan Pablo Califano
or not. In your case, it seems it doesn't. Try storing the fileref in an instance variable instead. It should fix it, I think. Cheers Juan Pablo Califano 2010/8/9 Matt S. mattsp...@gmail.com I'm trying to use fileReference to allow users to download images, but it keeps failing, without errors, and without

Re: [Flashcoders] const inside function

2010-08-05 Thread Juan Pablo Califano
The difference is that the reference is constant, meaning you cannot change it. You can't do this: const my_var:String = my_var; my_var = other text; You could do this if it were declared as a var. Cheers Juan Pablo Califano 2010/8/5 Jiri jiriheitla...@googlemail.com I have a simple

Re: [Flashcoders] Question on variable init in a for loop

2010-08-04 Thread Juan Pablo Califano
and that's the reason for the behavior you observed. Cheers Juan Pablo Califano 2010/8/4 Jiri jiriheitla...@googlemail.com I have the following case: var l:Array = [{},{}] function test():void{ for each(var i:Object in l){ var id:String;// = null; trace(1 ,id

Re: [Flashcoders] Question on variable init in a for loop

2010-08-04 Thread Juan Pablo Califano
objects and other stuff. Thanks for your clarifications. Cheers Juan Pablo Califano 2010/8/4 Kevin Newman capta...@unfocus.com That's an over simplification of the scope chain properties of AS3, and global isn't the right word there (though I know what you meant). To clarify the scope chain

Re: [Flashcoders] using fscommand or externalInterface - no luck

2010-07-29 Thread Juan Pablo Califano
, you could do something like this: so.addParam(allowscriptaccess,always); Cheers Juan Pablo Califano 2010/7/29 Boyd Speer bsp...@shaw.ca I am attempting to use either fscommand or external interface to tell the browser to load another .html file but can't seem to get it to work .. am I

Re: [Flashcoders] Listeners (was no subject)

2010-07-28 Thread Juan Pablo Califano
not always the case, as it depends on whether the event is dispatched synchronously or not. Cheers Juan Pablo Califano 2010/7/28 Henrik Andersson he...@henke37.cjb.net Kerry Thompson wrote: I agree with everything you say, up to that point. There is a fundamental difference in the way callbacks

Re: [Flashcoders] Listeners (was no subject)

2010-07-28 Thread Juan Pablo Califano
callback returning from run Cheers Juan Pablo Califano 2010/7/28 Henrik Andersson he...@henke37.cjb.net Juan Pablo Califano wrote: Yes, the dispatcher and the listener are both in the same call stack always, but I think what we were discussing is whether the caller (the original caller, the one

Re: [Flashcoders] Listeners (was no subject)

2010-07-28 Thread Juan Pablo Califano
Sigh... Did you actually bother to read what I wrote? But note I made a distinction between the dispatcher - the object that performs the callback, directly or through dispatchEvent - and the code (let's refer to it as the first caller) that calls the method that contains the dispatcher.

Re: [Flashcoders] SCORM Q - Strategies for saving large suspend data strings

2010-07-28 Thread Juan Pablo Califano
) considerably. To be safe, encode the bytearray to base 64 and store that. Base 64 means 1/3 overhead (for every 3 bytes in, you get 4 bytes out). Still, it'll probably be smaller than the equivalent JSON (though you might want to test it and see if this is true). Cheers Juan Pablo Califano 2010/7/28 Matt

Re: [Flashcoders] SCORM Q - Strategies for saving large suspend data strings

2010-07-28 Thread Juan Pablo Califano
encoding to base 64, which is not bad, I'd say. Cheers Juan Pablo Califano 2010/7/28 Juan Pablo Califano califa010.flashcod...@gmail.com I'm not sure you are really going to gain that much by using JSON instead of XML. ByteArrays have built-in compression as you mention (I think

Re: [Flashcoders] display list overrides keyframes

2010-06-21 Thread Juan Pablo Califano
(in a frame script in the timeline or where your code issues the gotoAndStop or gotoAndPlay that changes the frame). Hope this helps. Cheers Juan Pablo Califano 2010/6/21 Tony Fairfield tfairfi...@lifelearn.com Is there a way to overcome the following: I have a timeline file, with quiz buttons

Re: [Flashcoders] Text area focus

2010-06-17 Thread Juan Pablo Califano
to be taking too long is an internal mechanism of the player (managing and dispatching onChanged, for instance). Can't think of a way of timing that off the top of my head. If one the methods runs your fan wild and the other one doesn't, though, you have a clear winner already! Cheers Juan Pablo Califano

Re: [Flashcoders] regExp

2010-06-17 Thread Juan Pablo Califano
If don't want to learn the ascii codes by heart (or look them up), you can use charCodeAt() like this: var first:int = (A).charCodeAt(0); var last:int = (Z).charCodeAt(0); for (var i:int = first; i = last; i++) { trace(String.fromCharCode(i)); } Cheers Juan Pablo Califano 2010/6/17 Karl

Re: [Flashcoders] Text area focus

2010-06-16 Thread Juan Pablo Califano
focus is lost, what happens is you use the onChanged event instead? I mean, something like: textbox.onSetFocus = function() { textbox.onChanged = etc...; }; textbox.onKillFocus = function() { textbox.onChanged = null; } Cheers Juan Pablo Califano 2010/6/16 Karl DeSaulniers k

Re: [Flashcoders] CameraDetection Update

2010-06-16 Thread Juan Pablo Califano
, it was very helpful (and I apologize again for not giving you proper feedback at the moment, as I said I would! But better late than never) Cheers Juan Pablo Califano 2010/6/16 Ktu ktu_fl...@cataclysmicrewind.com Hey List, Thanks to Ben and Juan I have made an update to my CameraDetection

Re: [Flashcoders] Text area focus

2010-06-15 Thread Juan Pablo Califano
= Max Char: + numChar.toString(); //Have another text box with the var maxChar to display the results while typing. } } Cheers Juan Pablo Califano 2010/6/15 Karl DeSaulniers k...@designdrumm.com PERFECTO! Thanks Amol, For anyone who might want this. I have made a script that will read

Re: [Flashcoders] AIR - ByteArray to BitmapData

2010-06-10 Thread Juan Pablo Califano
No worries! And thanks for sharing. Cheers Juan Pablo Califano 2010/6/10 Karim Beyrouti ka...@kurst.co.uk Thanks for your help - uploaded the finished code to the google SVN - so it's free for all... https://code.google.com/p/kurstcode/source/browse/trunk/libs/com/kurst/air/utils

Re: [Flashcoders] swf compressing

2010-06-10 Thread Juan Pablo Califano
at least some redundancy and compressing the whole swf might be of some help (though zlib is not going to be as good for compression as JPG or PNG). I'm just guessing, but maybe it's worth giving it a shot, since it's rather simple to try. Cheers Juan Pablo Califano 2010/6/10 Latcho spamtha

Re: [Flashcoders] problem with strongly typed actionscript

2010-06-08 Thread Juan Pablo Califano
. Refactoring (if it were possible) to support proper polymorphism would obviously a bad idea, at least for me. Cheers Juan Pablo Califano 2010/6/8 Henrik Andersson he...@henke37.cjb.net Juan Pablo Califano wrote: I agree with you, but I'add for the sake of completeness that, sometimes

Re: [Flashcoders] Loading SWF file via Socket class / ByteArray

2010-06-08 Thread Juan Pablo Califano
domain, you need a crossdomain. If I recall correctly, this case also involved some LoaderContext particular setup (can't remember the details, though). You don't need to do anything server-side if you are serving the swf as a normal file. Cheers Juan Pablo Califano 2010/6/8 Tom Gooding t

Re: [Flashcoders] Loading SWF file via Socket class / ByteArray

2010-06-08 Thread Juan Pablo Califano
the proper security context for sockets is a bit more involved (you have to run a service to serve a policy file from some port below 1024, etc), but it's feasible if you have control over the server. Cheers Juan Pablo Califano 2010/6/8 Tom Gooding t...@quickthinkmedia.co.uk Thanks Juan - I

Re: [Flashcoders] problem with strongly typed actionscript

2010-06-07 Thread Juan Pablo Califano
. Cheers Juan Pablo Califano 2010/6/7 Merrill, Jason jason.merr...@bankofamerica.com Or, you can simply turn strict mode off. I tend to agree with Steven Sacks, though. There's a really good reason for strong typing--mainly, it's easier to find bugs at compile time than at Yep. IMO

Re: [Flashcoders] problem with strongly typed actionscript

2010-06-07 Thread Juan Pablo Califano
this is not the most common case, but binary compatibility could be a problem in some situations and from my experience I've learnt that, sometimes, a minor hack is a lesser evil. Cheers Juan Pablo Califano 2010/6/7 Steven Sacks flash...@stevensacks.net With due deference, what you just said I disagree

Re: [Flashcoders] Passing Var value to loaded swf

2010-06-07 Thread Juan Pablo Califano
Maybe I should rethink that metaphor... Yes, please. Although in this case, wouldn't grandpa and granny be the ones having sex? Not sure if that makes the metaphor more or less disturbing, though. Cheers Juan Pablo Califano 2010/6/7 Steven Sacks flash...@stevensacks.net Loader

Re: [Flashcoders] External Interface with looped parameters

2010-06-06 Thread Juan Pablo Califano
position the function name and after that the rest of the args you want to pass. In this example, this is equivalent to this code: ExternalInterface.call(jsFunctionName,0,1,2,3,4,5); Cheers Juan Pablo Califano 2010/6/6 Ashim D'Silva as...@therandomlines.com The last 2 weeks were crazy and I

Re: [Flashcoders] Question about approximate vowel detection in AS3

2010-06-03 Thread Juan Pablo Califano
about digital signal processing and audio programming in general, but matching sounds a bit vague. Perhaps you could enlighten us, I you feel like. Cheers Juan Pablo Califano 2010/6/3 Henrik Andersson he...@henke37.cjb.net Eric E. Dolecki wrote: It's using dynamic text to speech, so I

Re: [Flashcoders] Question about approximate vowel detection in AS3

2010-06-03 Thread Juan Pablo Califano
) and compare it in some meaningful way to precalculated samples to find a matching pattern. That's the part I have no clue about! Cheers Juan Pablo Califano 2010/6/3 Kerry Thompson al...@cyberiantiger.biz Juan Pablo Califano wrote: Wow. That was really uncalled for. That was my reaction, too. I didn't

Re: [Flashcoders] Rede social une usuários do mundo acadêmico

2010-06-01 Thread Juan Pablo Califano
If spam is to be trusted, the site will also allow you to make money by publishing stuff and inviting friends... How do you type an upside-down question mark??? Don't you dare laughing at one of the best features my language has contributed to written speech (too bad the rest of the world

Re: [Flashcoders] Rede social une usuários do mundo acadêmico

2010-06-01 Thread Juan Pablo Califano
Don't know. For me it's quite easy, Shift + the key just next to backspace, but then I have a Spanish keyboard... 2010/6/1 Paul Evans paulev...@creative-cognition.co.uk On 1 Jun 2010, at 13:42, Juan Pablo Califano wrote: It's Alt + 0191 or a bit easier on a Mac: Option

Re: [Flashcoders] Dylan responds to e-mails at 12pm and 4pm. (Auto-Response)

2010-05-30 Thread Juan Pablo Califano
Dylan refers to himself in the third person and has turned on this annoying feature in his email client that spams this list with auto-responses containing information that none of its recipients give a hoot about. Two good reasons to black-list him until he desists from inflicting at least one of

Re: [Flashcoders] AIR - ByteArray to BitmapData

2010-05-24 Thread Juan Pablo Califano
); Skip 5 bytes: 2 SOFO marker 2 length 1 precision */ var h:int = 0; var w:int = 0; if(offset 0) { offset += 5; data.position = offset; h = data.readUnsignedShort(); w = data.readUnsignedShort(); trace(w,h); } } Cheers Juan Pablo Califano 2010/5/24 Karim Beyrouti ka...@kurst.co.uk Hi All do

Re: [Flashcoders] Blocking multiple logins on one computer

2010-05-23 Thread Juan Pablo Califano
This is a gross hack (no offense intended), but I think it can actually work... (except for virtual machines) Cheers Juan Pablo Califano 2010/5/23 Ktu ktu_fl...@cataclysmicrewind.com You could also try using the LocalConnection class. If you apps connect at some point, turn the second one

Re: [Flashcoders] tint a movieclip

2010-05-19 Thread Juan Pablo Califano
values to -18%, -42%, 22% and 26%. If you want to change the values in the right of the panel through code, set the offsets instead (the properties redOffset, greenOffset, etc in the ColorTransform object). They are expressed in the same units both in code and the IDE. Cheers Juan Pablo Califano

Re: [Flashcoders] Two computers talking using AS3 Socket on same network

2010-05-12 Thread Juan Pablo Califano
you can have your app bind to a port and listen for connections, so you can have 2 swfs talk to each other without the need of an extra party. (I say apparently because I've just found out about the ServerSocket class following the link that Henrik posted). Cheers Juan Pablo Califano 2010/5/12

Re: [Flashcoders] https, .load and Error #2048

2010-05-12 Thread Juan Pablo Califano
/2008/08/28/flash-9-policy-files/ Hope this helps. Cheers Juan Pablo Califano 2010/5/12 Lehr, Theodore ted_l...@federal.dell.com it's all https, though... From: flashcoders-boun...@chattyfig.figleaf.com [ flashcoders-boun...@chattyfig.figleaf.com

Re: [Flashcoders] Producing a random list with no repeats

2010-05-09 Thread Juan Pablo Califano
: either the first one is less than, equal or greater than the second. That doesn't hold true if your sorting function returns a random result. And I think maybe that's why the number of calls that the above code prints vary even when you have the same number of items. Cheers Juan Pablo Califano PS. I

Re: [Flashcoders] Producing a random list with no repeats

2010-05-09 Thread Juan Pablo Califano
even when you have the same number of items. Cheers Juan Pablo Califano PS. I also used the method you describe (for years) until I read about its problems, so I thought maybe this is a good opportunity to pass this info on. To be honest, though, I don't think it will be a problem

Re: [Flashcoders] Producing a random list with no repeats

2010-05-09 Thread Juan Pablo Califano
PM, Juan Pablo Califano wrote: PS 2: I think the correct way to write the function that returns a number in the range -1 / 1 is: Math.floor(Math.random * 3) - 1 In this case, you could indeed use int() instead of a static Math method, so I guess I was wrong about your function needing

Re: [Flashcoders] Producing a random list with no repeats

2010-05-05 Thread Juan Pablo Califano
]; list.push(selectedNumber); } return list; } Cheers Juan Pablo Califano 2010/5/5 Alan Neilsen aneil...@gotafe.vic.edu.au I am working in ActionScript 2. I want to create a quiz in which 10 questions are randomly selected from a block of 40 questions. I found the following

Re: [Flashcoders] arranging

2010-04-28 Thread Juan Pablo Califano
); Cheers Juan Pablo Califano 2010/4/28 Lehr, Theodore ted_l...@federal.dell.com ok - so I am trying this: var curChild=getChildByName(e.currentTarget.namehttp://e.currenttarget.name/ ); var curIndex:int=getChildIndex(curChild); trace(curIndex); and it seems as though it is counting from

Re: [Flashcoders] Flash Google

2010-04-20 Thread Juan Pablo Califano
Isn't that kind of thing considered unfair play and penalized by search engines if discovered? Cheers Juan Pablo Califano 2010/4/20 tom rhodes tom.rho...@gmail.com use some server side script to serve up your site, check to see in the headers sent to the server if the request coems from a bot

Re: [Flashcoders] ASDoc third party libraries

2010-04-13 Thread Juan Pablo Califano
, you will be able to run the asdoc task without much manual work. Just a few ideas, hope it helps. Cheers Juan Pablo Califano 2010/4/13 Merrill, Jason jason.merr...@bankofamerica.com asdoc -source-path . -doc-sources . -exclude-classes comps.PageWidget comps.ScreenWidget Thanks, I've tried

Re: [Flashcoders] @#$% New iPhone Developer Agreemen t Bans the Use of Adobe’s Flash-to-iPhone Compiler

2010-04-12 Thread Juan Pablo Califano
and call of a translation governed by something like the Objective-C compiler, which you have no control over. Cheers Juan Pablo Califano PS: Even better, code the instructions directly in binary, so you don't depend on some kind of assembler, which you have no control over. 2010/4/12 Jon Bradley

Re: [Flashcoders] Security sandbox error during Upload/Download

2010-02-27 Thread Juan Pablo Califano
, or a crossdomain file. Cheers Juan Pablo Califano 2010/2/27 ktt kestuti...@yahoo.com Hello, I created file Upload/Download function with FileReference, but on different computer I get errors: Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security sandbox violation: http

Re: [Flashcoders] Can u combine....

2010-02-27 Thread Juan Pablo Califano
reference to find the loader in the array. Cheers Juan Pablo Califano 2010/2/26 Valentin Schmidt v...@dasdeck.com Juan Pablo Califano wrote: Another option: function loadXML(dfile:String,arg1:Object,arg2:Array):void { urlLoader.load(new URLRequest(dfile)); urlLoader.addEventListener

Re: [Flashcoders] Can u combine....

2010-02-26 Thread Juan Pablo Califano
XML(e.target.data); totalBars = xmlFile.children().length(); } This method has a drawback (and is usually frowned upon) because you cannot remove the listener. In this case, though, I don't think this is a problem (the loader seems to be owned by the class) Cheers Juan Pablo Califano 2010/2/26

Re: [Flashcoders] How to remove bytes from the beginning of a ByteArray?

2010-02-23 Thread Juan Pablo Califano
this since this read/wirte is in place and you want to shrink the buffer. Othewise, you'll end up with garbage after at the end of the byte array. _ba.length = newLen; And that's it. Hope it helps. Cheers Juan Pablo Califano 2010/2/23 Alexander Farber alexander.far...@gmail.com Hello, sorry

Re: [Flashcoders] Detecting if full screen mode is allowed before setting it

2010-02-17 Thread Juan Pablo Califano
I'm not sure if there's a clean way, but I'm afraid the ugly way won't work either. If I recall correctly, you can't set the displayState to fullscreen unless you're responding to user interaction (i.e. handling a button click). Cheers Juan Pablo Califano 2010/2/17 Alexander Farber alexander.far

Re: [Flashcoders] Registration Point Issue

2010-02-09 Thread Juan Pablo Califano
This used to be true in AS 2.0 due to a bug in the player that in practice made objects initialized in class declarations static. It's no longer the case in AS 3.0. Cheers Juan Pablo Califano 2010/2/9 Henrik Andersson he...@henke37.cjb.net Greg Ligierko wrote: 1) Do not instantiate objects

Re: [Flashcoders] Registration Point Issue

2010-02-09 Thread Juan Pablo Califano
Great story and great advices! Cheers Juan Pablo Califano 2010/2/9 Kerry Thompson al...@cyberiantiger.biz Nathan Mynarcik wrote: Beno could use a Teddy Bear... Send it to him personally. Or perhaps some on this list can benefit from it again. Ok. Here goes. If you've heard this before

Re: [Flashcoders] hs_err_pid WAS: E4X, it's just not my day.

2010-02-08 Thread Juan Pablo Califano
the impression that Flash CS4 uses the compiler from the SDK, though. And there's a JVM install in the CS4 folder, anyway. Cheers Juan Pablo Califano 2010/2/8 Henrik Andersson he...@henke37.cjb.net Dave Watts wrote: Thanks Dave. I'm using Flash. Any suggestions for that? Nope. I'm at a loss

Re: [Flashcoders] XML question with a test case

2010-02-06 Thread Juan Pablo Califano
I don't think so. I think that's precisely the reason why it returns an empty list instead of null. So you can safely chain toghether diferent node names in your query. Cheers Juan Pablo Califano 2010/2/6 Alexander Farber alexander.far...@gmail.com Thank you - I'll do, but On Sat, Feb 6

Re: [Flashcoders] How to use Flex Builder's profiler???

2010-02-04 Thread Juan Pablo Califano
could be unreacheable (if you managed to clean up properly) but still alive (and that's what the Live Objects view reflects). Cheers Juan Pablo Califano 2010/2/4 W.R. de Boer w...@innerfuse.biz Hello, I have been working with FB3 Profiler the whole week but I am having some strange issues

Re: [Flashcoders] Re: Matrix + BitmapData - what exactly happens?

2010-01-25 Thread Juan Pablo Califano
Juan Pablo Califano 2010/1/25 jared stanley jared.stan...@gmail.com here are some examples of the previous block of code. http://lab.freestyleinteractive.com/jared/bitmap/revival.html http://lab.freestyleinteractive.com/jared/bitmap/heman.html http://lab.freestyleinteractive.com/jared/bitmap

Re: [Flashcoders] FlashDevelop code injection

2010-01-13 Thread Juan Pablo Califano
I asume you're using MTASC. There was a flag (I never used it) to workaround this problem, I think. Checkout the -mx option: http://www.mtasc.org/ Hope it helps. Cheers Juan Pablo Califano 2010/1/13 Andrew Sinning and...@learningware.com I started looking into using FlashDevelop's code

Re: [Flashcoders] Crossdomain.xml, shared hosting, https, oh my!

2010-01-13 Thread Juan Pablo Califano
this, a host must grant access explicitly. With the crossdomain files it states that it's ok for swfs downloaded from certain domains to communicate with it. So, the only potential problem here would be in your hosting provider's LAN, as I see it. Cheers Juan Pablo Califano -- Forwarded

Re: [Flashcoders] how to reduce file size caused by redundant classes in loaded-in movies

2010-01-06 Thread Juan Pablo Califano
I never actually tryed it, but I remember I bookmarked a link about this some time ago, maybe you find it useful: http://exanimo.com/actionscript/flash-cs3-and-exclude-xml/ Cheers Juan Pablo Califano 2010/1/6 Andrew Sinning and...@learningware.com A swf that I am loading in to a parent movie

Re: [Flashcoders] Best MovieClip removal practice

2010-01-06 Thread Juan Pablo Califano
it has access to some data that is not available to you. Cheers Juan Pablo Califano 2010/1/6 Karl DeSaulniers k...@designdrumm.com So there is no way to fire the garbage collector from actionscript? This seems odd to me if that is the case. If the flash applications performance is dependent partly

Re: [Flashcoders] Best MovieClip removal practice

2010-01-06 Thread Juan Pablo Califano
in the general case, using those events simplifies the interface (meaning, the user of the class doesn't have to bother calling a destroy method, etc). Cheers Juan Pablo Califano -- Forwarded message -- From: Matt S. mattsp...@gmail.com Date: 2010/1/6 Subject: Re: [Flashcoders] Best

Re: [Flashcoders] 64 bit integers

2010-01-04 Thread Juan Pablo Califano
class to use a ByteArray as its backing storage (but preserving the API). If you want to take a look, check out this link: http://pastebin.be/22777 Cheers Juan Pablo Califano 2010/1/4 Alexander Farber alexander.far...@gmail.com Hello, I have programmed a card game and because the game

Re: [Flashcoders] Caching loaded bitmaps

2009-12-31 Thread Juan Pablo Califano
time. So maybe, and I'm just guessing here, this feature is due to how the Flash IDE works in Windows, and hence Windows only? Cheers Juan Pablo Califano 2009/12/30 Omar Fouad omarfouad@gmail.com Hi all, I have some sort of game that requires to load some bitmaps before it starts. I do

Re: [Flashcoders] Dynamically set Sound's length..?

2009-12-16 Thread Juan Pablo Califano
Just a minor correction. It's 44100 samples per second. Cheers Juan Pablo Califano 2009/12/16 Henrik Andersson he...@henke37.cjb.net It is called the samplerate, flash uses 44200 sample pairs per second. ___ Flashcoders mailing list Flashcoders

Re: [Flashcoders] Publish transparent .gif file in AS3

2009-12-14 Thread Juan Pablo Califano
) is close to 1) in many ways. 3) is the most reasonable option, I think. Unless you absolutely need to do everything client side. Cheers Juan Pablo Califano 2009/12/11 Sumeet Kumar sume...@sebiz.net Thanks for your replies. I got lot of links using which i can publish jpeg and png images

Re: [Flashcoders] text input @ appearing as ' in chrome

2009-11-22 Thread Juan Pablo Califano
IE if you set wmode to anything different from window (the default). Apparently, they've finally managed to fix it in the latest player. Cheers Juan Pablo Califano 2009/11/20 Kevin Bath ke...@flowdigital.co.uk Hi all, Has anyone had the problem with input text fields (AS3 - fp10) where

Re: [Flashcoders] Auto Webcam Detection

2009-11-04 Thread Juan Pablo Califano
The test code works fine for me (Win XP, FP 10). I'll be working on a project that includes webcam soon and this could be useful. I'll let you know how it goes if I use it. Thanks for sharing! Cheers Juan Pablo Califano 2009/11/4 Ktu ktu_fl...@cataclysmicrewind.com So I've noticed

Re: [Flashcoders] regex issue when validating unicode range

2009-10-19 Thread Juan Pablo Califano
stuff. So 0xFEFF is the last value before that range. Not sure if the way the regex behaves is a bug or a feature, really, but you can probably get by with something like this: var testIsArabic:Boolean = /[\u0627-\ufeff]/.test(str.charAt(0)); Cheers Juan Pablo Califano 2009/10/19 Matt Muller

Re: [Flashcoders] monitor outgoing http requests

2009-10-08 Thread Juan Pablo Califano
help you to narrow your search, though. Cheers Juan Pablo Califano 2009/10/8 Andrew Sinning and...@learningware.com I'm trying to track down an issue with a cross-domain policy violation. Something in one of my movies is making requests to an outside server, but I can't seem to track it down

Re: [Flashcoders] [MEMORY LEAK]

2009-10-01 Thread Juan Pablo Califano
at those points and be in a better position to determine if there's a leak, and, in that case, what could be causing it. Hope it helps. Cheers Juan Pablo Califano 2009/9/30 TS sunnrun...@gmail.com Hello, this issue is killing me. I had a swf that loaded an xml file then loaded images from

Re: [Flashcoders] [MEMORY LEAK]

2009-10-01 Thread Juan Pablo Califano
point was that you should keep in mind that GC is not deterministic; because maybe you don't have a leak in the first place. The mere fact that the memory footprint grows doesn't mean there's a leak. Cheers Juan Pablo Califano 2009/10/1 TS sunnrun...@gmail.com Well I'm going to use gskinner's

Re: [Flashcoders] bitwise question

2009-09-15 Thread Juan Pablo Califano
7; default: return -1; } } Cheers Juan Pablo Califano 2009/9/15 Paul Andrews p...@ipauland.com Paul Andrews wrote: Jiri 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

Re: [Flashcoders] Garbage Collection on Scrollbar class

2009-09-04 Thread Juan Pablo Califano
been executed before you try to access the var. Cheers Juan Pablo Califano 2009/9/4 Zuriel zu...@zadesigns.com Here is a page of my GAIA framework code. I am loading a scrollbar var ffxscroller:AxisScroller; but I am trying to destroy it. The documentation for destroying the scrollbar

Re: [Flashcoders] Error #2044

2009-08-29 Thread Juan Pablo Califano
.org/2001/XMLSchema-instance; xsi:noNamespaceSchemaLocation= http://www.adobe.com/xml/schemas/PolicyFile.xsd; allow-access-from domain=londonstudentbible.com / /cross-domain-policy Another easy fix is not hardcoding the absolute url. Just use a relative path in your xml. Cheers Juan Pablo

  1   2   3   >