RE: [Flashcoders] Wherefore the evils of _global?

2006-03-23 Thread David Stiller
Responding to two, here ... >> ryanm wrote: >> >> Because global variables are contrary to the >> basis of OOP, which is all about abstraction >> and encapsulation. If you need to store >> variables somewhere so that they can be >> reached anywhere, use a singleton, or a static >> class, or an app

[Flashcoders] Wherefore the evils of _global?

2006-03-23 Thread David Stiller
In the last few days, I've seen a handful of people refer apologetically to use of the _global object. To paraphrase: "I'm in a situation where I have to use _global variables," or, "We all know _global is a no-no, but I'm tempted to use it in this one weird case," etc. In general, this

RE: [Flashcoders] Determining width of rotatedMC'simaginaryboundingbox

2006-03-21 Thread David Stiller
> Odie Bracy PhD wrote: > Actually, your width will change with the > rotation. The greatest width will be when > the diagonal line of your rectangle is a > flat, horizontal line. That seems to sum it up, for sure. Thanks, Odie. >> Yotam Laufer wrote: >> First of all you're welcome. When

RE: [Flashcoders] Determining width of rotatedMC'simaginaryboundingbox

2006-03-20 Thread David Stiller
Danny, >> My MC is a 150x30 rectangle rotated to 45 degrees. >> My results show width and height both at 180, when >> they should be closer to 130. Here's my code: > That's odd: when I go through those calculations > with a calculator, they come out with about 130, > just as you say [...]. Are

RE: [Flashcoders] Determining width of rotated MC's imaginaryboundingbox

2006-03-20 Thread David Stiller
Yotam, > Correct usage of getBounds will give you > the correct result. You have to point the > coordinate scope of the getBounds method > to the parent of the mc. Wow! Yes, thank you, Yotam. Now I'm slapping my forehead, too. It doesn't get easier than that. I'm still interes

RE: [Flashcoders] Determining width of rotated MC's imaginaryboundingbox

2006-03-20 Thread David Stiller
>> Adrian Park wrote: >> if you could enclose the rotated clip in a wrapper >> clip [...] you will have the width of imaginery >> bounding box. True, but in this scenario I'm writing a class that needs to determine this with the user's MCs as they are. Definitely the way I'd go, though, i

[Flashcoders] Determining width of rotated MC's imaginary bounding box

2006-03-20 Thread David Stiller
I suspect the answer to this one is purely geometry. It's trivial to determine the width or height of a movie clip: there's the _width and _height properties, of course, as well as getBounds(). But when the clip is rotated, the concept of "width" changes. I'm looking for a way to determ

RE: [Flashcoders] Marrying Function.apply() to WebService web methodcalls

2006-03-14 Thread David Stiller
Got it! The solution is due entirely to Arjan van Ham, who recently Googled a year-and-a-half old variant of my question on the flash-db.com forum. Thanks Arjan! Now that I see it, the answer is slap-your-forehead obvious. eval() to the rescue. // Replace this ... var pc:Pendin

[Flashcoders] Marrying Function.apply() to WebService web method calls

2006-03-14 Thread David Stiller
I'd like to use Function.apply() on WebService instances' web methods. Should be pretty straightforward, right? Turns out the answer is no. I figure the quickest way to illustrate my problem is to relate my journey in a few blocks of code. Here's a successful sample, using a fre

RE: [Flashcoders] And these [EMAIL PROTECTED] paths

2005-12-09 Thread David Stiller
The answer has already been given. :) Use a different Linkage id, because BoundingBox is alread taken. David [EMAIL PROTECTED] "Luck is the residue of good design." If you make time to answer these questions 2 times, could you point me out of this in a way. My 2nd post since n

RE: [Flashcoders] Key down forces button/mc onRelease/onReleaseOutside

2005-11-03 Thread David Stiller
Actually, I was talking about movie clip based buttons. :) In my testing, it is both movie clips and buttons (symbol buttons) that fire the onRelease and onReleaseOutside when a key is pressed. HOWEVER, I just learned this issue only occurs when you test the SWF inside the IDE.

[Flashcoders] Key down forces button/mc onRelease/onReleaseOutside

2005-11-02 Thread David Stiller
Is anyone else seeing this? Draw a shape, convert to button or mc. Code the following: btn.onPress = function() { trace("pressed"); } btn.onRelease = function() { trace("released"); } btn.onReleaseOutside = function() { trace("released outside"); } Click t

[Flashcoders] [JSFL] beginDraw(true) seems to disobey document.viewMatrix

2005-10-28 Thread David Stiller
I begin to suspect that beginDraw(true), which leaves the drawing layer's drawing intact, does not obey the document.viewMatrix as it should. I'm writing a tool that uses the transformPoint() function in the Peters/Yard Extension book to compensate for changes in the pen's location in symbo

RE: [Flashcoders] Macromedia unveiling Flex 2andFlash9 :communicationor cacophony ?

2005-10-19 Thread David Stiller
Jesse, thanks! Ted's article nails exactly what I'm looking for. This statement here -- > "The SWF contains just only what you import and can be devoid of the Flex Framework," suggests to me I can avoid that 240KB initial hit right off the bat. I realize that figure may drop with

RE: [Flashcoders] Macromedia unveiling Flex 2 andFlash9 :communication or cacophony ?

2005-10-18 Thread David Stiller
> Go try it. Build something small, and you'll be on > board lickety-split. Heh, you can't build *anything* yet less than 240KB! :-p Okay, now, chuckles aside ... Jesse, I know just from subscribing to this list for a while that you're a long-time Flash dev, in addition to being