Re: [Flashcoders] addEventListener Problem

2010-03-01 Thread Todd Kerpelman
Flash is case-sensitive. Looks like your NavToURL in your addEventListener call should really be navToURL --T On Mon, Mar 1, 2010 at 10:50 AM, Susan Day suzieprogram...@gmail.comwrote: Hi; I have the following code: function DisplayPicLoaded(evt:Event):void { var container:Sprite = new

Re: [Flashcoders] targeting sprite

2010-02-25 Thread Todd Kerpelman
I'm not entirely sure what error you're getting, but if I were to take a wild guess, I'd say the problem is that your sprite doesn't have enough children for you to add anything at index 2. For instance, if your sprite only had 1 child, it would occupy index 0 of your sprite, meaning you'd only

[Flashcoders] Settiing the default format of TextFields in CS3

2010-01-04 Thread Todd Kerpelman
Hey, Flash Coders! Happy New Year! Quick question for you guys: I work a lot with dynamic TextFields that I design, format and lay out in the Flash CS3 authoring environment. The problem I frequently run into is that when I go ahead and change the text of these things in the code, most of the

Re: [Flashcoders] Settiing the default format of TextFields in CS3

2010-01-04 Thread Todd Kerpelman
letterSpacing) are always lost with defaultTextFormat so you always need to set it again. I always used something similar to your code. Zeh On Mon, Jan 4, 2010 at 3:21 PM, Todd Kerpelman t...@kerp.net wrote: Hey, Flash Coders! Happy New Year! Quick question for you guys: I work

Re: [Flashcoders] array.indexOf problem

2009-06-16 Thread Todd Kerpelman
It sounds like your array is full of button objects, but you're searching for a string (the button name), and an object and a string don't match. Remove the .name from the key you're searching for, and I believe it should work. -T On 6/16/09, Isaac Alves isaacal...@gmail.com wrote: Hi

Re: [Flashcoders] Accessibility of a flash game

2009-04-20 Thread Todd Kerpelman
One element I can think of is to make sure your game is playable by color-blind folks. If you're making any kind of game where you have to match groups of similarly-colored objects, for instance, make sure that there's a way to tell these objects apart other than by color. (The gems in Bejeweled,

Re: [Flashcoders] Favorite Flex book?

2009-04-16 Thread Todd Kerpelman
By the way, in case anybody was wondering, I ended up picking up the O'Reilly Flex Cookbook over the Training From the Source one, primarily because the O'Reilly site had a very simple Buy the PDF option. (It's a little easier to read and code on the train if I can just have everything on my

[Flashcoders] Favorite Flex book?

2009-04-14 Thread Todd Kerpelman
Hey, guys. So at this point I feel like I've got a pretty good handle on AS3, but I'd like to get some experience with more Flex-specific development. Is there a favorite book that people have of the various ones that are out there? Ideally, I'd like to find one that spends less time rehashing

Re: [Flashcoders] point in a circle

2009-04-09 Thread Todd Kerpelman
x = Math.cos(angle) * radius y = Math.sin(angle) * radius Keep in mind the angle here needs to be in radians. If your angle is in degrees, multiply it by 180 / Math.PI. Also keep in mind the x and y values you get here will be relative to the circle's center. --T On Thu, Apr 9, 2009 at 11:02

[Flashcoders] Lint for ActionScript?

2009-03-05 Thread Todd Kerpelman
Hey, guys. Anybody have any decent Lint-like tools that they've been using for ActionScript? Google hasn't given me anything very useful, except the recommendation that a Lint tool for JavaScript might work, which I'm kinda skeptical about. --T ___

[Flashcoders] Either an incredibly easy or incredibly difficult problem

2009-02-09 Thread Todd Kerpelman
Hey, coders! I have a Sprite that consists of a polygon that I drew in Flash (using the line tool) and saved into my Library. Using ActionScript, is there any way to easily find the points of said polygon? It seems like I oughta be able to dig up those line coordinates out of my Sprite.graphics

[Flashcoders] Best way to access my main class?

2009-02-05 Thread Todd Kerpelman
Hey, FlashCoders. I'm wondering if you can help me out with a general style question that I keep running into. Let's say I've got a setup like this... class MyGame extends MovieClip - It creates a camera sprite that I can add children into - It then creates a Bouncing Ball object with the

Re: [Flashcoders] Best way to access my main class?

2009-02-05 Thread Todd Kerpelman
Thanks, everybody! Sounds like creating custom events is the way to go (and yes, it's for Send an alert of some kind to MyGame kind of functionality). I don't have a lot of experience with 'em, so I was probably going through more trouble to avoid them than would actually be required to just suck

[Flashcoders] Missing Flashcoder archives?

2009-01-29 Thread Todd Kerpelman
Hey, List folks! So in the interest of Not trying to repost too many questions that have already been asked (like, for example, probably this one) I've been trying to search the Flash Coders List archives. However, going to the archives page over at figleaf.com (

Re: [Flashcoders] Missing Flashcoder archives?

2009-01-29 Thread Todd Kerpelman
://www.mail-archive.com/flashcoders@chattyfig.figleaf.com/ - Original Message - From: Todd Kerpelman t...@kerp.net To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, January 29, 2009 5:56 PM Subject: [Flashcoders] Missing Flashcoder archives? Hey, List folks! So

Re: [Flashcoders] Error Instantiating Object

2009-01-27 Thread Todd Kerpelman
Hmmm... what's the rest of the Slide constructor? It sounds like maybe that's where the error is... Also, if you try running your Flash file in debug mode (Hit Ctrl-Shift-Enter), the debugger will take control at the moment when you're trying to access a null object, which usually helps you

Re: [Flashcoders] top down plane games

2009-01-26 Thread Todd Kerpelman
-= (plane.x-mouseX) / 6; plane.y -= (plane.y-mouseY) / 6; movemap(); } the hard part is getting the speedX and speedY to be numbers that don't cause the map to fly to fast. Just not sure where to go from here. On Sun, Jan 25, 2009 at 2:42 PM, Todd Kerpelman t...@kerp.net

Re: [Flashcoders] top down plane games

2009-01-25 Thread Todd Kerpelman
Well, I'm no plane game expert, but here's probably how I'd approach it... Within your PlaneGame movie, create a child sprite called Camera. Make all your interface stuff children of the PlaneGame movie. But make the background, your plane, the enemies, etc, all children of this Camera child

[Flashcoders] Partially drawing a graphic?

2009-01-12 Thread Todd Kerpelman
Hey, Flash Coders! Wondering if you can help me out with a little problem I'm working on... - I have a complicated piece of vector art in my Flash file. - I'm basically trying to find a way to partially draw it. That is, out of the 2000 curves that are in my piece of art, I'd like to randomly

Re: [Flashcoders] Partially drawing a graphic?

2009-01-12 Thread Todd Kerpelman
On Mon, Jan 12, 2009 at 3:53 PM, Todd Kerpelman t...@kerp.net wrote: Hey, Flash Coders! Wondering if you can help me out with a little problem I'm working on... - I have a complicated piece of vector art in my Flash file. - I'm basically trying to find a way to partially

Re: [Flashcoders] Dictionary resource for word based games

2009-01-09 Thread Todd Kerpelman
You can try the ENABLE word list. It's open source, made for Scrabble-like word games and therefore doesn't contain a lot of proper nouns or other illegal words. There's a link to it here... http://www.crosswordman.com/wordlist.html --Todd, who still thinks that zen should be a legal word On

Re: [Flashcoders] use get / set functions or make your own

2008-12-09 Thread Todd Kerpelman
I think the Control-Shift-1 functionality is fairly new -- I only got it working after I upgraded FD to Beta 9. But yes, it rocks. You can also use it on your implements Interface text to generate placeholder functions for everything in that interface. Try it! Personally, I tend to use getters

Re: [Flashcoders] Audio lag on KeyboardEvent.KEY_DOWN

2008-12-08 Thread Todd Kerpelman
I'm actually running into a very similar problem trying to create my little flash-based drum machine. I've got a 100 ms .wav that I'm trying to play on a regular basis and no matter what I try, it comes out sounding weird and erratic. I was hoping there was some magic Here's how you compress

Re: [Flashcoders] Re: adding physics to pivot object around a point

2008-12-01 Thread Todd Kerpelman
Well, I know you could do something like this very easily using a physics engine like Box2D (http://box2dflash.sourceforge.net/), but the very easily part only kicks in after you spend several hours converting your entire application to using a third party physics engine. If you're just trying to

Re: [Flashcoders] singleton returns null

2008-11-21 Thread Todd Kerpelman
Hmmm... I'm not sure I can pinpoint exactly where the problem is in your code. But there is some weirdness there around where and how that _instance variable of yours is getting instantiated. It seems like there's nothing to enforce it only gets created once or doesn't get overwritten multiple

Re: [Flashcoders] Flash Authortime vs Runtime children

2008-11-05 Thread Todd Kerpelman
Okay, I'll admit I'm only getting a vague sense of your problem, so forgive me if I'm totally off base, but I think the proper workflow is this... 1. Uncheck the Automatically declare stage instances checkbox. (In File... Publish Settings, go to the Flash tab, and click the Settings button next