RE: [Flashcoders] Bitwise selection

2009-04-02 Thread Kerry Thompson
Jiri has gotten some good answers. I got to work late today after working
until 11:30 last night meeting my 5:00 deadline :-P

 

I did occur to me that a fair number of us may not completely grok bitwise
stuff. That's computer science stuff, and a lot of us got here by other
routes-I see a lot of C programmers doing bitwise stuff, but relatively few
AS programmers (at least, we don't talk about it a lot). Still, it can be
blazingly fast, so when you have a need for speed, they are great.

 

So I thought I'd talk a little about bit operations. If you already
understand them, no need to read further (unless you wish to check my
accuracy).

 

First, the basics. We all probably know this, but a byte is no more than a
series of on-off switches, or bits--eight of them on most modern computers.
On is represented by 1, off by 0. So, a byte with every other bit on would
be 10101010.

 

When you do a bitwise operation, you are comparing bits. The bitwise OR
operator, | , compares bits. If either of them is on (1), the result is 1.
If both are off (0), the result is 0. Consider the following:

 

120 | 96

 

Compares 10101010 and 0110, giving the result 11101010 (234 decimal).
Visually, this may help:

 

10101010

0110



 

11101010 

 

We get that result because the | operator compares each bit. If either of
them is on, the result is 1 for that bit.

 

The AND operator & is similar in that it compares bit by bit, but both bits
have to be on to get a 1 result. Comparing the same two numbers as before,
120 & 96, gives you the result 0010, or 32 decimal.

 

10101010

0110



 

00101010 

 

Sometimes we use these as flags, where every bit can represent a Boolean
value. They also can be used for fast math operations (check out
http://lab.polygonal.de/2007/05/10/bitwise-gems-fast-integer-math/

 

This barely scratches the surface of bitwise operators and their power, but
I hope it intrigues some of you enough to pursue it further.

 

Cordially,

 

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Bitwise selection

2009-04-02 Thread Kerry Thompson
Jiri wrote:

> Nice, that you took the time to write that post. It is much appreciated.

Thanks, Jiri.

One other thing worth mentioning is that an integer is actually 4 bytes, so
you have 32 bits. I kept my example to one byte for simplicity. If you want
to do operations on a single byte, you can use ByteArray elements.

Other bitwise operators to check out are XOR (exclusive OR, which means one
or the other is on, but not both) and shift operators >> and << to check the
value of a particular bit.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Bitwise selection

2009-04-03 Thread Kerry Thompson
Jiri wrote:

> So each element in a ByteArray can hold 8 bits.
> What about the readInt() method of the ByteArray, does an integer then
> span over 4 elements of the bytearray. And if I start at position 0 and
> then call the readInt(), is the position after that then 4?

Essentially, yes. A ByteArray is a packed array of bytes. Or, put another
way, it stores the most compact representation of a data type, but you can
still access each byte with the [] array access.

Consider the following (e-mail AS3--don't count on it to be bug-free):

var myByteArr:ByteArray = new ByteArray();

myByteArr.writeInt (2695938256);
trace (myByteArr.length);   //4
trace (myByteArr[0]);   //208
trace (myByteArr[1]);   //192
trace (myByteArr[2]);   //176
trace (myByteArr[3]);   //160

trace (myByteArr.readInt());//2695938256

I chose that rather odd number because it was a convenient hex number,
#A0B0C0D0. Doing a trace on a ByteArray element returns the decimal
equivalent of the byte.

It's possible I got the order reversed--I didn't test the code. #A0 might be
in the 0th element. Nonetheless, I think the code represents the concept
reasonably well.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Loading MC

2009-04-10 Thread Kerry Thompson
Karl DeSaulniers wrote:

> Ah duly noted.
> I will figure it out myself then.
> Sorry to all who were inconveniened.

I don't think it was really an inconvenience to anybody. I think Jason
wasn't so much criticizing you as pointing out the best way to get answers
from the group.

In other words, whittle it down to a specific code portion, describe the
issue succinctly, and we're glad to help. You original post was just a case
of TMI ^_^

Think about it. How often do you read beyond the 2nd or 3rd paragraph of a
long post?

Kids these days. No attention span ;-)

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Accessibility of a flash game

2009-04-20 Thread Kerry Thompson
Paul Steven wrote:

> I am making a game and have been asked by the client to ensure "The game
> should meet all international accessibility requirements"

>Ack!!<

"All international accessibility requirements"? Your client is out of his
mind. How can you possibly know, much less meet, so broad, varied, and
sometimes contradictory a set of standards? Even in the U.S., you can meet
federal standards, but fail to meet some state requirements.

I would go back to the client and choose a country that has a well-defined
set of requirements, and meet those. Hopefully, the country you live in has
a reasonably clear set of requirements. Most of the G-20 countries do.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Accessibility of a flash game

2009-04-20 Thread Kerry Thompson
Paul Andrews wrote:

> we insist that this work is completed and ALL
> relevant standards are met, including  and ". This could turn into
a
> really major thing.

That was my reaction, too, though I didn't state it as clearly as Paul just
did.

Paul's caution applies not only to accessibility, but to any contract. If
the work is not defined specifically enough, you could find yourself stuck
with a two-year project you though would only take a month. You stand to
lose a _LOT_ of money.

Don't count on trust or friendship, either. Never put your faith in a client
without a clear-cut contract. And friendships have been lost over these
sorts of things.

I'm not saying to mistrust your clients or friends. Just get the details
spelled out in writing. I know, it's impossible to have everything spelled
out, but something like this is a huge, blinking neon red flag.

Even if you're billing hourly, get it spelled out. Clients will have
schedule expectations and budget limitations. It's only fair to them, as
well as to yourself, that everybody have a clear picture of the project.

Cordially,

Kerry Thompson
who has been freelancing for 10 years

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Kerry Thompson
Fabio Pinatti wrote:

> A question I was wondering here. A client of mine has a website built with
> as2. And I explained him I work now with as3, but he asked what the real
> benefits for him, to convert his project to as3.
> 
> I would like to have some good arguments, but I can find more benefits for
> me, as developer, than for the client.

I tend to agree with Ian. If his Web site is already in AS2, my inclination
would be to leave it in AS2.

That depends on how extensive his AS2 code is, though. If the conversion
process can be relatively quick, safe, and inexpensive, your client will
gain some benefits from moving to AS3. Here's my take:

- Maintenance. AS2 is an obsolescent language, and soon will be the COBOL of
the Web. It will become harder to find AS2 coders--most of the newcomers in
the past year, at least, have learned AS3, not AS2. Also, a lot of
long-timers have moved to AS3 and are becoming more reluctant to work with
AS2.

- Speed. AS3 is Formula 1, while AS2 is Stock Car. AS1 is a stock car on a
muddy dirt track.

- Structure. AS3, properly done, is more structured and less prone to
hard-to-find bugs than AS2. As he builds his Web site out, he will find that
AS3 provides long-term cost benefits.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Kerry Thompson
Ian Thomas wrote:

> I think that was Paul, not me. 

Right you are. Sorry, Paul.

> But as it happens, I agree with Paul, too. :-D 

Actually, we all three seem to pretty much agree. I'm just wordier than you
:-P

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Kerry Thompson
> Please, remove me from the list.

I'm replying to the list, as well as to the OP, as an FYI for new or
inexperienced members. If you understand how mailing lists work, you need
read no further.

We have no power to remove you from the list--we're just subscribers like
you. Unless the list admin happens to see your post, you have accomplished
nothing.

There is, however, a right way to unsubscribe. Go to the URL at the bottoms
of all posts, <http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>.
Towards the bottom of the page you will see a "Flashcoders Subscribers"
section. Enter your e-mail address and click the "Unsubscribe or edit
options" button. Then you can unsubscribe yourself.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] if only flash would incorporate these features

2009-05-08 Thread Kerry Thompson
Anthony Pace wrote:

> Good work, but not so unique his patents should hold developers back
> from taking it ten steps further.

You may be right--I hope you are--but I have ceased to try to understand
U.S. patent law. If a company can patent an *idea* like plug-ins, and force
companies like Microsoft to pay up and/or use other technology, who knows
what can be patented?

Patent law is supposed to encourage innovation. The way it's being
used, at least in America these days, *discourages* innovation. Anybody with
a two-bit idea can patent it, and the onus is on others to prove prior art.
Copyright law is going the same way. In a twisted sense, I have some
sympathy for China and other countries that ignore intellectual-property
laws.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Advice on creating dynamic crossword cluesth resize function

2009-05-20 Thread Kerry Thompson
Paul Steven wrote:

> I am creating a crossword where the words and clues are read in from an
xml
> file. I need to be able to display the clues in a small area hence these
> will need to scroll. I also need to highlight a particular clue if the
word
> on the crossword is clicked. Problem is that some clues will be on more
than
> one line so I am not sure how best to approach this and would appreciate
> some advice. Also I need to include a function to toggle the text between
> small and large. Btw I am programming this in Flash 8 with AS2.
> Any advice on how best to deal with this would be really appreciated.

Gary Rosenzweig has a really good book, "Macromedia Flash MX ActionScript
for Fun and Games". I'm pretty sure it has the source for a crossword game
in it, and it's AS2. It's pretty cheap--around a dollar on Amazon. He also
has an updated book with AS3 code, "ActionScript 3.0 Game Programming
University".

I haven't used this book, but I did use a similar book he had for Director,
and I adapted his crossword code for the now defunct Learning Network. It's
pretty good code, and easy to adapt. My version might even still be up on
Family Education Network (www.fen.com). I haven't checked, but they
inherited everything from Learning Network.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Using Tab key as a game control

2009-05-22 Thread Kerry Thompson
Paul Steven wrote:

> Is it a bad idea to use the "Tab" key as a game control. Basically in a
> crossword game I am creating, I was going to use "TAB" to move to the next
> word and "SHIFT TAB" to move to the previous word. I notice however that
> when I press the TAB key all the buttons on my game screen are appearing
> with yellow boxes around them. I assume this is some kind of accessibility
> thing?

Yes, it is an accessibility issue. People with compromised muscle control
use the tab key to navigate to buttons, URLs, etc. 

I've built accessible programs a lot in the past, and I've disabled the
auto-tab feature. The programs I've written have been tailored to work with
specific hardware tools like switches and programmable flat-panel keyboard
substitutes.

If you're not building alternate accessibility features, though, you might
be in a bind. Tab is the way most people navigate crosswords, but I've done
crossword games where you can click on the clue or in a blank space in the
puzzle.

On the other hand, you might be able to get away with disabling Tab. There
are other Web tools, like Shockwave, that don't implement Tab for
accessibility. However, I'm not an expert on current accessibility
requirements. I would recommend you find out more about what the law (and
your client) require. Others on this list, and on Flash Tiger, can probably
help you with that.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Using Tab key as a game control

2009-05-23 Thread Kerry Thompson
Paul Steven wrote:

> Out of interest, do you think the user should be able to tab between each
> "square" on the crossword?

That's one way of doing it, and probably just fine. It's not the way I would
implement it--not that you're wrong, but here's what I have done, just to
throw out a few ideas.

I see that you recognize that you need to know whether you're in "across" or
"down" mode. My crosswords pretty much automatically decide that--you start,
by default, in across mode, with the cursor in the 1st square of 1 across.
Tab takes you to the first square of the next across. If you type in a
letter, the cursor automatically advances to the next square.

It helps if you do crosswords yourself, which I do (I'm not very good at
them, but I do them). I often have an idea for what a word should be, but
before I fill it in, I check the clues for the "down" words intersecting my
current "across" word. I'll often see a word I *know* is right, and fill
that out before going back to the across mode (my default mode, on paper or
on the computer).

So, I like your idea of using a key to change modes. I would use Clicking on
a cue to auto-select the mode, too, as well as you choice of selecting the
word.

Basically, as long as your interface is consistent and logical (yours looks
good), it's fine.  If you can do user testing, that will go a long ways
towards telling you how good your interface is. 

I would also have a pop-up help screen with all the options, or even have
them on-screen, depending on the real estate you have. You might, though
it's not mentioned in your interface summary.

> A-Z: Enter the typed letter into the square
> Space bar: Change between Across and Down
> Del: Clear the selected square
> Backspace: Clear the selected square (or previous if square is empty)
> Arrow keys: Select the neighbouring square
> Tab: Select the next word
> Shift+Tab: Select the previous word
> Home: Select the 1st square in the selected word
> End: Select the last square in the selected word
> 
> Click on an unselected square: Select the square clicked on
> Click on the selected square: Change between Across and Down
> Click on a clue: Select the corresponding word

All in all, it looks good, Paul. You're on the right track.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] how to reload swf in Flash IDE Player

2009-05-28 Thread Kerry Thompson
Andrew Sinning wrote:

> 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.

You could publish it. Have an instance of My Computer or Windows Explorer
open to the location you're publishing it, then you can just alt-tab to that
window and double-click on the published swf. That should launch the Flash
player.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Having trouble posting.

2009-06-08 Thread Kerry Thompson
> I get this message when I post.
> 
> Message body is too big: 260458 bytes with a limit of 40 KB
> 
> I have compressed my file and its attachments are: 180k  + the contents of
> the message.
> 
> Can't possibly get help on this without the files.

I don't think the Flashcoders list allows for attachments, and I don't know
of an area where you can post your file. Does anybody else?

If you need somebody to look at your file, you could always join Flash
Tiger: <http://tech.groups.yahoo.com/group/Flash_tiger/>. We have an area
where members can post files.

You're welcome to join Flash Tiger--I'm one of the moderators--but don't let
it be a substitute for Flashcoders. Stay here--we don't want to compete with
Flashcoders, just provide complementary services.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Sound Library/Libraries...

2009-06-27 Thread Kerry Thompson
Sander Schuurman wrote:

> I was just wondering... What do you guys use for Sound Fx?

Here are a couple of sites:

< http://www.freesound.org/index.php>
< http://www.soundrangers.com/>
< http://www.soundrangers.com/>
< http://www.sound-effects-library.com/>

Cordially,

Kerry Thompson


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Output Panel Language

2009-06-30 Thread Kerry Thompson
Isaac Alves wrote:

> I've got my Flash installed in engilsh but the output panel's shows up
> messages in portuguese! I How do I set it up to English?

It might be a system setting. If you have your system set to Portuguese,
Flash might be going off the system settings.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] To Void or not to void?? That is my question..

2009-07-13 Thread Kerry Thompson
Karl DeSaulniers wrote:

> Using AS2.
> When is it best to use the :Void ? and what is the difference between
> that and :void ?

You use void when a function doesn't return anything. In fact, there are
some languages, like Pascal and, I believe, Fortran, that have that built
in. In Pascal, a function returns something, while a procedure doesn't. A
Pascal programmer would use a function to do something like perform a
calculation--let's say, figure the square root of a number. A procedure
would do something like drawing a line.

Void is AS2, and void is AS3. I have no idea why the spelling change, but
ActionScript is, of course, case sensitive.

> What are the advantages and why use them if say, your function works
> without them?

Clarity, mainly. Also, in AS3, if you have strict type checking on (it's the
default), every function must have a type, so you use void when your
function won't return anything. If you declare a function as :void, and have
a return in it, I believe the compiler throws an error.

> I know that the Void is a Boolean, but I also know you cant use it
> when the statement returns something.
> Does this "return" include any of the basics like gotoAndPlay? or
> does it literally mean a return(); 

Void actually isn't a Boolean. Technically, its value is undefined. AFAIK,
:void can only be used as the return type of a function. You can't declare a
variable as void.

Down on the nuts and bolts level, every function is a subroutine. You call
it, and it returns control to the calling object. So every function returns;
some pass a value back, and some don't.

HTH.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] no more mac ppc for adobe?

2009-07-14 Thread Kerry Thompson
Gustavo Duenas wrote
> 
> Is adobe dropping the making of programs for the mac g5 ppc machines?

I don't know that Adobe have a company-wide policy. It seems to be more on a
product-by-product basis, or perhaps across the CS suites.

But yes, they do seem to be heading in that direction. I don't have any
inside information, but historically they have phased out support for
obsolescent machines and OS's. Support for 68K Macs is long gone. On the
Windows side, I see fewer and fewer products that support the old Windows 9x
line.

By and large, Adobe make tools for developers, and we tend to move to new
technology faster than others.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Holiday cards

2009-07-15 Thread Kerry Thompson
Michael Mendelssohn wrote:

 
> Anyone know of any really superb examples of corporate holiday greeting
cards?
> Just trying to brainstorm.

Jacquie Lawson is my favorite: <http://www.jacquielawson.com/>

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] other lists for compiler design, assembly, and machine code?

2009-08-03 Thread Kerry Thompson
Anthony Pace wrote:

> Can anyone recommend a good mailing list for compiler design for newbies?
> 
> I have books on it, and I know the basics of how to perform tokenization
> and lexical analysis; yet, even with study and practise, I am most
> likely going to be considering myself a newbie in the compiler design
> realm for at least a few years.  Keep in mind that my assembly is very
> rudimentary, and my machine code is even worse 

I did some compiler work for Borland, but that was 15 years ago or more.
Anybody remember Borland's Fortran compiler? No? I thought not.

I don't know of compiler mailing lists, but I can tell you that you probably
don't need assembly or machine code. We did the Fortran compiler in C (not
C++), with very little inline assembly code. I don't know of anybody who has
done machine code for 20 years or more. It is truly obsolete unless you're
writing for some proprietary hardware.

There is a school of thought that you ought to be able to write a compiler
in its own language. I.e., if you're writing a C++ compiler, you would write
it in C++. I don't know if that would apply so well to ActionScript, though,
because of its speed. I would probably choose a language that compiles to
machine code, like C++, rather than a tokenized language--you want that
extra speed boost in your primary tool.

Cordially,

Kerry Thompson 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] RE: Flash full screen examples

2009-08-07 Thread Kerry Thompson
> was it the cream of the crop?

It was until they started skimming the profits.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] RE: Flash full screen examples

2009-08-07 Thread Kerry Thompson
> These are getting a bit cheesy.

No whey!

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] How to compare two audio files with ActionScript?

2009-08-09 Thread Kerry Thompson
Latcho wrote:

> I'd suggest you first get down in audio math and algorithms and indeed
FFT.
> If you're done with that... choose whatever language you like and
> preferably a faster one then AS3.

AS3 may be fast enough. Its math classes are compiled to native code, and
the loops will likely be compiled by the JIT compiler. Take a look at
<http://www.noteflight.com> to see what can be done with music in real time,
using AS3. I do believe the sounds are generated in real time using FFT.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] OT - bizarre Adobe pricing

2009-08-09 Thread Kerry Thompson
Dave Watts wrote:

> This is pretty much the entire answer.
> 
> http://en.wikipedia.org/wiki/Market_segment#Price_Discrimination

There's not much competition for Flash, is there? Adobe have pretty much a
monopoly.

What is curious is that a lot of things just cost more in Europe than in
North America. A music CD that I can buy here for $12 sells for 20 Euro
(about $28) in most of the EU. 

No explanation--just an observation.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] OT - bizarre Adobe pricing

2009-08-09 Thread Kerry Thompson
Karl DeSaulniers wrote:

> Correct me if I'm wrong, but aren't monopolys illegal?

No, monopolies per se are generally not illegal. It's unfair
anti-competitive behavior that is illegal.

If I decided to make beer with Brussels sprouts instead of hops, I'd
probably have a legal monopoly simply because nobody else does it. As long
as I don't engage in anti-competitive behavior, there's nothing to stop me
from having a monopoly. 

There are anti-trust laws on the books in the U.S., and in a lot of European
countries. They aren't universal, though. A lot of countries have government
monopolies (Mexico has a monopoly on petrol, and Japan used to have a
government monopoly on tobacco). Other countries allow monopolies for
various reasons, like for cronies of dictators.

There is no international law I know of that forbids monopolies. In fact,
Adobe has a de facto monopoly with Flash, even though they haven't been
convicted of any anti-trust violations I know of (unlike Microsoft). And, in
fact, it's not a monopoly, because Java is very much alive and well in the
RIA space. It just has a relatively small market share.

Before Flash, Director/Shockwave had pretty much a monopoly on Internet RIA
development. Shockwave still has a virtual monopoly on Internet 3D content,
though that's being challenged by some strong newcomers.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] OT - bizarre Adobe pricing

2009-08-10 Thread Kerry Thompson
John McCormack wrote:

> It seems strange that we might pay Irish taxes when we don't pay US
> taxes. Can this be true?

I'm American, and have been to the UK, and to Ireland, many times. Unless
I'm badly mistaken, I was able to get a VAT refund for non-consumables. That
is, the sweater I bought in Elgin qualified for a VAT refund; the hotel and
meals didn't. Sadly, neither did the Guinness I drank in County Donegal.

I would think software would fall more into the sweater class than the
Guinness class.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] How to compare two audio files with ActionScript?

2009-08-10 Thread Kerry Thompson
Johnny lee wrote:

> Where are the Actionscript Sages when you need them :(

They're here. I know ActionScript reasonably well, but haven't used the FFT
formulas. Writing the code to compare audio files is going to be rather
involved, I'm afraid. We can provide pointers, but, since it's your program,
I'm afraid you're stuck with the heavy lifting.

To get started, Google is your friend--"AS3 FFT" turned up these, among
others:
<http://labs.adobe.com/wiki/index.php/Talk:ActionScript_3#computeSpectrum_an
d_FFT> <http://forums.adobe.com/thread/242954>
<http://summitprojectsflashblog.wordpress.com/2008/07/31/wave-theory-in-acti
onscript-3/>

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] what is the current 3D best-practice?

2009-08-10 Thread Kerry Thompson
Sebastian wrote:

> I was wondering if anyone had any feedback to my 3d inquiry? Because I
> have not received any input from the group.

My guess is that not many of us work in 3D. I've had a look at Papervision,
and, while it looks pretty good, I haven't explored it deeply enough to
help.

Does it have to be Flash? The dominant player in the online 3D world is
still Director/Shockwave, and what you are describing could be done easily
in Shockwave. If you're not familiar with Lingo, Director has an
implementation of JavaScript that is a lot closer to ActionScript. I don't
know how much of its 3D capabilities are available through JavaScript, but
it's worth a look. You can download a 30-day free trial.

Another up-and-coming 3D program is Unity--they're making some serious
waves, and, from the reports I've heard, Unity is easier to work with than
Director. Its main drawback is that it doesn't have the plugin penetration
Shockwave has.

HTH.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Slow emails

2009-08-13 Thread Kerry Thompson
> FlashTiger emails show up very quickly, but they're a Yahoo group, so the
> host is very fast.  Compared to Yahoo, atlas.pipex.net is rinky-dink.

As a Flash Tiger moderator, I'd like to jump in (perhaps a bit late).

Flashcoders has been an extremely good resource for me and other AS coders,
and continues to be. Dave Watts does a terrific job with the list, and I'm
grateful to him for the time and effort he puts into Flashcoders.

Flash Tiger is not in competition with Flashcoders. We're complementary
lists, with a lot of crossover. There's plenty of room out there for both
groups, and I see a lot more positives to continued cooperation than to
competition.

Cordially,

Kerry Thompson


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] [MEMORY LEAK]

2009-10-01 Thread Kerry Thompson
Juan Pablo Califano wrote:

> The mere fact that the
> memory footprint grows doesn't mean there's a leak.

Juan Pablo is correct, and it's important to understand why. (If you already
understand garbage collection, you need read no further, unless you want to
check the accuracy of my description :-)

As you create objects, or even variables, the Flash player allocates
memory--this is common to most runtime engines/virtual machines, including
Shockwave, C#, Java, Visual Basic (I think), and all the way back to UCSD
Pascal.

When you delete an object, or a variable goes out of scope, that memory is
no longer needed, and the Flash player notes that it is available for
re-use. It does not, however, immediately re-use the memory--in fact, it
probably doesn't even zero it out right away. The data are still there, but
the memory is marked as available.

These memory blocks are often not contiguous--your memory looks something
like a fragmented hard disk. You have a few bytes here, a couple K bytes
there. When the Flash player's memory gets too fragmented, it does a
"garbage collection". That is, it moves currently-valid objects and
variables around to make everything contiguous (un-fragmented) again. It's
much like defragmenting your hard drive, except it is done in RAM (or
virtual RAM).

The browser is probably doing the same thing. If the user has navigated away
from your Flash page, it doesn't necessarily free that memory immediately.
In fact, it probably won't, so you can still navigate forwards and
backwards.

It's sort of like deleting a file on your disk used to be. I think it's
handled differently now, but in the bad old days, the OS would simply write
a special character into the first byte of the file. There were utilities we
used to recover accidentally deleted files--we could explore the disk, find
the data, change the first byte back to what it was supposed to be, and the
file was restored. (That's somewhat simplified, but it's the right concept).

HTH.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] RE: Pricing a Freelance Project

2009-10-11 Thread Kerry Thompson
To figure what your hourly rate, take what you expect to earn in a year and 
divide it by 2,000--that's approximately the number of hours a full-time worker 
works in a year.

Now double that, because you will have no benefits like paid holidays or sick 
leave, no insurance (not as much an issue in Great Britain as it is here in the 
colonies), and the like. Also, you will have down time when you will have no 
work. Plus, you need to spend non-billable hours getting projects, doing your 
own bookkeeping, babysitting the client, and the like.

So, if you were earning £40,000 per year, that averages out to £20 per hour. 
Doubling it brings you to £40 per hour.

Now, here's the kicker. Freelancers (I'm one) charge differently, depending on 
a number of factors. A long-term contract (6 months) you should bill at a lower 
hourly rate, because you won't have to spend the time and effort to get smaller 
jobs, bill them, collect, do your bookkeeping, and the like.

An emergency contract you should charge extra for. If the client absolutely 
must have it by the end of the week, charge double. You can bet your career 
that the client and you have underestimated the scope of the project, so you're 
going to really be under the gun. Don't be shy about it either--we all do it. 
It's not because we have the client over a barrel, either. It's because we will 
have to drop everything, including any social life, and quite possibly a couple 
of nights of sleep, to meet their deadline.

Also, consider the contract. How certain are you the client will pay? I've had 
deadbeat clients--over the years I've done probably $5,000 of unpaid work. I 
just collected on an invoice due last April, and only then because I threatened 
to take them to court. I later found out they have a record of that sort of 
thing--a friend had to wait two years to collect on one invoice, and he was a 
former employee who departed on good terms! 

If your client is Wellogic of Cambridge, MA, get your payment up front--all of 
it. If you want to see what I did that took them so long to pay, just go to 
www.wellogic.com. Right there on the home page, top center, the animated text, 
and the "Certifications and Awards" box in the lower right. BTW, it was a rush 
job, but I only charged them $600 because I expected to get more work from 
them. Fat chance now!

So, a lot of things to consider. Length of contract; hourly or set price; 
client's reputation; your own experience and skills; what you need to live on; 
and other factors.

By the way, just as a comparison, I'm about to sign a 6-month contract at 
$50/hr., and I'm a programmer with 20+ years' experience, including direct 
experience in exactly what they're doing. That may be a tad low, but not much 
for that length, especially as it is likely to be extended. Plus, the client is 
a major publisher with a good track record with contractors.

Cordially,

Kerry Thompson


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] RE: Pricing a Freelance Project

2009-10-11 Thread Kerry Thompson
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


RE: [Flashcoders] as3 to iphone app

2009-10-15 Thread Kerry Thompson
Anthony Pace wrote:

> I just read the post on Keith's site, as well as all the comments, and I
> have to say that all of this could be solved simply by allowing
> developers to inject native targeted code for compilation in order to
> boost performance

That would be nice, but I don't think it's going to happen. That would be
one huge, gaping hole for malware to stroll right through and make itself at
home on your computer ^_^

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] as3 to iphone app

2009-10-16 Thread Kerry Thompson
Anthony Pace wrote:

> I am referring to the iphone.
> 
> Since it's supposed to be a native app, then why not allow it?  Once the
> user installs the program, it can do whatever it wants anyways.  A
> normal app can do all kinds of file manipulation and tracking without
> it, so why not just allow lower level access?

Good question, Anthony. I hope my answer makes as much sense as the
question.

The difference is that all the object code is produced by the compiler. We
hope the compiler won't produce malware.

If we were to give lower-level access to machine code written by a human,
you're opening the system to a malware attack.

I know, there are ways around this. If you know the machine well enough, and
can read and understand the machine code, you could manually insert malware.
That takes a pretty sophisticated programmer, and one bent on mischief, but
it could be done, at least in theory.

Hope that makes sense.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] as3 to iphone app

2009-10-16 Thread Kerry Thompson
Anthony Pace wrote:

> So if you won't get access to inject inline assembly, then why doesn't
> Adobe just modify the way their apps are cross compiled to allow inline
> objective-c?  Apple can still maintain its strangle hold but we get
> better performance because of the ability to have native access.

I'm not sure I follow you. Objective-c, like ActionScript, compiles to
bytecode, not machine language. IOW, it's an interpreted language.

That may not be what you're talking about, though. To tell the truth, I
haven't looked at the iPhone. Does objective-c have the ability to call
built-in functionality?

Sorry--not being argumentative. Just not familiar enough with the platform.

Cordially,

Kerry Thompson

___
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

2009-10-18 Thread Kerry Thompson
Hans Wichman wrote:

> if anyone is interested I can still post the code after migration.

That's pretty cool-looking, Hans. I'd love to see the AS3 implementation.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Timeline Streaming Sounds Playing Early?

2009-10-21 Thread Kerry Thompson
 Dave Dev wrote:

> I have a frame with a stop actionscript command. The next frame has a
> streaming sounds and a frame label. At runtime, Flash stops at the stop
> command frame, but then plays a very brief portion of the streaming sound
in
> the next frame. Placing some frames in between the sound and command seems
> to fix(?) the problem. This occurs on Windows XP, but not Mac OS X using
> Flash Player 8. 

Hmm... which version of Flash are you using? Is the sound in the library, or
in an external audio file? Is the sound played with an AS command, or is it
on the time line?

Sorry to ask so many questions. The way you describe it, it sounds like a
bug in Flash, but something like that should have been found and fixed long
ago. I suspect there's more going on--possibly something you don't know
about, or that treats the audio in a way you haven't thought of.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] as3 to iphone app

2009-10-28 Thread Kerry Thompson
Allandt Bik-Elliott wrote:

> don't swfs compiled from c run faster in the plugin than ones compiled
> in actionscript? i thought i read that

I don't know of a way to compile a swf from C, or any machine-language
compiler. I'm not quite sure about iPhone apps developed in Flash--they may
compile to native code, but there isn't a way to compile a swf to machine
language that I know of.

If there was, yes, it would run faster than Flash or Flex swf's. Anything
that compiles to machine code will run faster than something that compiles
to a token and runs on a virtual machine.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Mailing List Idea: Teddy Bear

2009-11-22 Thread Kerry Thompson
Nathan Mynarcik wrote:

> I think the reason why the teddy bear idea works is because you get up and
walk
> away from the project and think. 

That's part of it. I've used the teddy bear technique a lot, and it forces
me to really think through the process I'm using. I find that if I can't
explain my problem to the bear, I don't understand it myself. Forming a
detailed explanation has given me an "aha!" moment more times than I can
remember.

It often goes something like "I do this, then this, get a return value, send
it to this object, and get a void return... hang on... That's it! I have the
function returning a value, but I declared the function as void. D'oh!"

If you can explain the problem in detail, you can probably fix it.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Back On Course, Still Problems

2009-12-07 Thread Kerry Thompson
Beno wrote:

> That's abusive, period. 

Ok, now I'm really motivated to help Beno when I have time.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Back On Course, Still Problems

2009-12-07 Thread Kerry Thompson
Beno wrote:
 
> First, a bit of a rant.

Actually, Beno does have a somewhat valid gripe. I was the one who offered
to look at the code, and I wasn't able to provide him a solution.

I did look through the code, and ran it in the debugger. I also advised him
to do the same, and explained how to do it. To his credit, he did run it in
the debugger, but wasn't able to find the answer.

I got into crunch mode at work--I'm preparing an advertising campaign for
our Web site, and I've been working 12-hour days, so I hope Beno will excuse
my not having the bandwidth to help him. I did say I would, though, so we
shouldn't be too harsh on him for expressing his disappointment.

Having said that, Beno, your code really is your responsibility. Even when
you gave me a copy, you should continue to try to find the problem yourself.
People will promise to help, but they won't write your code for you.

Programming is all about understanding cause and effect. To be successful
programmers, we all have to be able to create our own logic, and figure out
why it's not working when there's a bug.

Beno has some things going on in his life that he shared with me. I don't
feel comfortable repeating what he said off-line, but his current
circumstances make it especially difficult to program effectively. In light
of that, I'm unwilling to judge him too harshly. 

I just wish I was able to help him more. I have to get back to my campaign
now, though. It's due in 3 hours.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Back On Course, Still Problems

2009-12-07 Thread Kerry Thompson
Bill Jones wrote:

> "I was gonna listen to that, but then, um, I just carried on living my
> life."

Reminds me of my favorite English folk singer, Bill Jones.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Back On Course, Still Problems

2009-12-07 Thread Kerry Thompson
Ian Hobbs wrote:

> If i ever get into intolerable difficulties I ;
> 
> 1. Go back to the books - grow insight.
> 2. Buy help or
> 3. Re-think the project from inside "current" skill-set and from
> functional/expressive intention.

There's a fourth option. I recently got a long-term contract offer I
couldn't pass up, but I had another short-term gig. I found another
contractor willing to take over the short-term gig. He's happy, I'm happy,
and the client loves his work.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] hen's teeth...

2010-01-04 Thread Kerry Thompson
Glen Pike wrote:

  Slightly OT, but how many guys here can do AS3 & C++?
>
> The other interesting thing would be to find out if you did AS3 or C++
> first.  I am betting the older guys learnt C++ first, but again, I might be
> wrong.
>

I'm one of those "older" guys who learned C++ first. Well, actually, I
learned C first--no, Pascal came before C--but then there were the years
with Fortran, 6502 Assembler, and COBOL. Oh, yeah--there were several years
of Lingo in there someplace.

Lots of languages to cram into a short career (<30 years). And my favorite?
AS3, hands down.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash and MySQL

2010-01-29 Thread Kerry Thompson
On Fri, Jan 29, 2010 at 10:05 AM, Matt S.  wrote:
> I think "beno" needs a theme song to intro and outro his posts.

How about the theme from "Gilligan's Island"?

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] WIRED hates Flash

2010-01-29 Thread Kerry Thompson
Jason Merrill wrote:

> Besides a feminine product, iPad also sounds too much like iPod

Ah, you saw that Mad TV skit 4-5 years back, too ^_^

For those that missed it, a few years back, while Apple was flogging
the iPod really hard, Mad TV had a "iPad" skit. It was a spoof on a
cross between an iPod and a feminine hygiene product, complete with
the dancing silhouette.

And, a little OT, if you saw Jobs announcing the iPad, did you think
he looked rather haggard? I understand he's been battling pancreatic
cancer. It would be a shame to lose one of the great creative
entrepreneurs of the 20th/21st centuries.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] I Must Be Asking This Question Wrong...

2010-02-02 Thread Kerry Thompson
Beno wrote:

> I have this code:
> package
> {
>  
>      public var myThumb:CloseThumb;
>
>   
>      public function theThumb():void
>       {
>               myThumb = new CloseThumb();
>               myThumb.x = 365;
>               myThumb.y = 355;
>   myThumb.addEventListener(Event.ENTER_FRAME, checkFrame);
>       }
> public function checkFrame(e:Event):void {
> if (e.target.currentFrame == 1) {
> e.target.removeEventListener(Event.ENTER_FRAME, checkFrame);
> }
> It works fine. The problem is that if I change currentFrame from == 1 to any
> other value, it breaks. The reason apparently is because the mc in the fla
> is only 1 frame long. Now, I need to be able to call it from various frames.
> I've been told to extend it to, for example, 2 frames, but that does
> nothing. My main timeline also has but one frame calling the actionscript.
> Apparently it's useless to have a listener checkframe on an mc that has 1
> frame.

It sounds like you pretty much answered the question yourself. If your
movie is only 1 frame long, naturally it won't execute if you test for
frame 2. I'm not sure why you would want to check for frame 2, anyway.

 For that matter, I'm not sure why you're checking for frame 1 if you
know that's where you'll always be. I'm afraid I also don't understand
what you're doing with the checkFrame handler, anyway. All it does is
remove itself, at least from the code you posted, so I don't
understand what the handler does.

A lot of AS3 movies are single-frame movies because AS3 lends itself
to OOP programming so well. I do a lot of enterFrame handling in my
movies, so it's not intrinsically bad.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] and now..CLIENT now hates Flash

2010-02-03 Thread Kerry Thompson
I noticed something interesting, and perhaps relevant, a couple of
days ago. Google  Docs and Google Apps is going to stop supporting
older Browsers, like IE 6, on March 1. I understand the move is to
promote HTML5.

I don't believe Flash is going away soon either. There are too many
sites out there that use Flash, including the one I'm working on,
. We're basically a big Flash site, supported by
the usual HTML, JavaScript, PHP, and the like.

I think somebody else mentioned the fact that Disney uses Flash
extensively (they do). It would be prohibitively expensive to redo all
their apps in another language.

I'm not retiring for another 5-6 years, and I expect to be a Flash
programmer for the rest of my career.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Registration Point Issue

2010-02-09 Thread Kerry Thompson
Jason Merrill wrote:

> Just a request, it would help me consider your question if you only
> posted the relevant code, or better yet, even a simplified version of
> the relevant code... by doing this, it helps you critically think about the 
> problem
> first before sending your reply.

Has anybody told beno the teddy bear story yet? Beno, waht to hear it?

Cordially,

Kerry Thompsno
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Registration Point Issue

2010-02-09 Thread Kerry Thompson
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 , no need to read further
(unless you're simply enamored of my writing style).

Hang on, Beno. I didn't mean you. You need to read this.

In one of my computer science classes, the prof had a big ol' Teddy
Bear sitting on a counter at the back of the classroom. Cute, cuddly
feller he was (the Teddy Bear, not the prof--he had serious ear hair
issues).

When we'd get stuck on a problem, if we went to the professor for
advice, he'd cut us off in short order. "Have you consulted the Teddy
Bear yet?"

So we'd trudge back to the back of the room, give the Teddy Bear a
tummy rub, and explain our problem, the approach we were taking, and
where/why it was failing.

A funny thing happened. Most of the time--I'd say 2/3 or more--the
answer would come to us while we were talking to the bear, and we'd
somewhat sheepishly go back to our seats, without needing to talk with
the prof.

The moral is that you have to understand your problem before you can
come up with a solution. Many, many times simply being able to explain
the problems is the most direct route to a solution.

So, beno, the next time you want to post a question to this forum,
talk to the Teddy Bear. If it doesn't solve your problem, it will at
least isolate it so you can send us a 5-10 line code snipped with a
clear description of your problem.

You should also get acquainted with a technique called "stubbing."
Often, you need to know several things about an object. Rather than
writing the whole program, then going back to figure out where you
went wrong, write the core of your program, and just stubs for other
methods or classes. These stubs will always return the value you want
because you hard-code them. They're just brain-dead little
burplets--you poke them, and they belch up the right answer.

As you get portions of the program working, you start replacing the
stubs with real code.

This is often called "iterative refinement," and is, to my mind one of
the central tenets of programming. I haven't seen a lot of evidence
that you're doing that with your code, at least what you're showing
us.

Incidentally, this iterative refinement concept works across
disciplines. When I'm practicing my French Horn, I use iterative
refinement to work out difficult passages. When I learned Chinese, I
didn't start by memorizing "Journey to the West." I started out
learning words and phrases, going over and over them to burn them into
my memory.

Beno, you actually do have an excellent resource here, and we will
respond very positively and helpfully when you post very specific
questions. It especially helps if you show what you've tried ("I did
this, and expected that, but got a null. Why?")

And, finally, I can't say this enough--learn to use the debugger. Live
in it. You should be spending at least 50% of your time in the
debugger--it will help you understand your own code a lot better. We
all do it--I'm not recommending a penance, but giving you a tip on how
the pros do it.

Cordially,

Kerry Thompsno
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] yuva...@gmail.com has sent you a private message

2010-02-11 Thread Kerry Thompson
Dave Watts wrote:

> Just some lame spam. I've unsubscribed the sender.

Thanks, Dave. I think you have been doing a terrific job of keeping
the list spam-free.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: import documents into flash

2010-02-17 Thread Kerry Thompson
Tom Huynen wrote:

> Thanks for the reply. To give a bit more information: The application would
> be one that runs standalone on the desktop.
> It would be able to import .html files, word documents and pdf files. Then
> grab the text in those documents and use that content.
> The documents wouldn't be displayed in their original way. Is flash truly a
> good tool for this?

I love Flash, but, IMHO, no. Director can do this without breaking a
sweat. That's the tool I would choose.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] An event when a Sprite's visible changes?

2010-02-21 Thread Kerry Thompson
Alexander Farber wrote:

> Is there please an AS3-event broadcasted
> when a Sprite is shown or hidden?

Not per se, but you might try Event.RENDER. I doubt it would work,
though--it's dispatched when the display list is about to be updated
and rendered. You'd get a lot of those to process, and I'm not even
sure if changing the visibility causes the update list to be updated.

I think your best bet is to dispatch a custom event. Of course, to do
that, you would have to have the code that could change the sprite's
visibility. Another option would be to simply check the sprite's
visibility on a frame event, but that's pretty clunky.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Finding and Removing a Sprite

2010-02-23 Thread Kerry Thompson
Theodore Lehr wrote:

> thanks for all of the help... I did resolve it by taking the functions out of 
> the other functions... and creating the sprite at the root (outside of the 
> functions)

Glad you got it fixed. I'm late to the discussion, so didn't
contribute anything yet--but I will now :-)

Do yourself a favor now. One of the real advantages of AS3 is
eliminating timeline code--you have to do that eventually to take
advantage of AS3's OOP capabilities.

Make a backup of your .fla before you do this, in case something goes wrong.

In the same folder where your .fla file is, create an ActionScript
file called Main.as. Inside it, use this:

package
{
   public class Main extends Sprite
   {
  //functions go here
   }
}

Now cut and paste all your code from the timeline and put it after the
line //functions go here. You can overwrite that line--just keep your
functions in between the inner set of curly brackets.

In the .fla file, in the Properties window, set your document class to
Main. Remember, ActionScript is case sensitive.

It should compile and run the same as before, but you will have taken
a good first step towards utilizing AS3's power.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] how to reduce CPU usage

2010-03-03 Thread Kerry Thompson
I'm glad you found the issue. I was about to make another
suggestion--I will anyway, because it's a nice trick.

Set the frame rate as low as you can, and still get smooth animation.
A frame rate of about 20 fps is often good enough, and the Flash
engine has to process fewer frame events. Movies at your local
ciniplex only run at 24 fps, and American TV runs at just under 30 fps
(29.97, I believe).

Of course, that doesn't work for a lot of movies--sometimes you need
the fastest frame rate you can get, especially for twitch games.

Another technique I've heard of, but haven't experimented with yet, is
to set the frame rate to 1 fps, and do all your rendering with
updateAfterEvent. I've seen that done, and it gets some pretty
impressive results.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] how to reduce CPU usage

2010-03-04 Thread Kerry Thompson
Steven Sacks wrote:

> Don't confuse the word "rendered" with the word "processed".  Rendering is
> the act of drawing pixels on the stage.  Invisible DisplayObjects are not
> rendered (though alpha 0 ones are) during the render phase, but they are
> processed.
>
> If you have 1000 invisible sprites on the stage that aren't running code,
> Flash still has to keep them in memory and process them in the display
> stack, it just doesn't have to render them.

Ok, I'm a little confused here. The way I understand it is that
sprites with any alpha, even 0, will be rendered. Sprites with
_visible == false are not rendered. Correct so far?

As far as processing (aside from rendering), any jpg or other
compressed format has to be processed--it has to be decompressed
before it can be rendered. Is an invisible (_visible == false) sprite
decompressed? Or is the Flash engine smart enough to look at the
_visible flag, and skip the decompression?

You could have a movie clip sprite with a dozen jpegs in it, or more.
I hope that Flash doesn't decompress them all if the movie clip is not
visible. I'm not quite sure what's going on under the hood there.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tween Issues

2010-03-04 Thread Kerry Thompson
Theodore Lehr wrote:

> I have a bar graph where the bars are tweened the do no alway finish 
> tweening... They are being drawn from the top down, so they do not alway make 
> it to the bottom - and sometimes they do not get drawn at all... What could 
> be causing this?
 ___

You have a bug in your code.

Sorry--if you want something more specific, you need to tell us more.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Simulated load time and preloading XML

2010-03-08 Thread Kerry Thompson
Theodore Lehr wrote:

> Can I put a pre-loader on XML?

I'm not sure this is what you're looking for, but yes, you can preload
your XML. I've done it often--I load the XML from the server, and when
it's done I go about my other business. Often I'll have an XML loader
running simultaneously with other loaders. You just have to make sure
everything you need is preloaded before you start running.

> Also, is there a way to slowdown load time to test a preloader? I looked at a 
> movie on another machine and it loaded slowly causing things to go ascue... I 
> want to be able to test it on my machine - mine is faster so I am finding it 
> hard to duplicate....

Use the Flash profiler.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Convert Flex to FLA

2010-03-10 Thread Kerry Thompson
Erik Mattheis wrote:

> Is there a way to convert a Flex 3 project to Flash? Tried decompiling the 
> SWF with FlashDecompiler, but it decompiles it back into a Flex project.
>
> I inherited a complex Flex project and have to deliver major edits to it in 2 
> weeks ... things is, I've not worked in Flex before!

There is nothing to fear from Flex. It's just another AS3 coding
environment, and it's pretty easy to use. Your real challenge is to
learn a new code base and edit it in two weeks. The environment
shouldn't make that much difference.

It my not be possible to do it in Flash, also. If there are Flex
components, they probably won't work in Flash. Also, there are things
in Flex, like data grids, that don't port easily to Flash. Also, if
anything significant has been done in MXML, you're pretty much stuck
with Flex (which is a good thing, actually).

But, having said that, if you really want to work in Flash, and there
are no roadblocks, you can look at the Flex project, find the .as file
that is the starting point and make that your document class.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Calculator

2010-03-17 Thread Kerry Thompson
Karl DeSaulniers wrote:

> I guess I didnt think these list were places of crucifiction, but more a
> place to ask questions.
> Next time I think ill ask the teddy bear.

The teddy bear seldom fails me. Google helps too :-)

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Calculator

2010-03-17 Thread Kerry Thompson
Karl DeSaulniers wrote:

> And he's less of an asshole too.

Now, we don't want to get a flame war going. That was Steven Sacks,
and he is most certainly one of the most helpful and knowledgeable
people on the list. Making one negative post doesn't make him an
asshole.

On the lighter side, yeah, we should probably all know how to do
percentages, but we're not all good at math. I asked the guy behind
the seafood counter at Safeway for a fifth of a pound of crab meat,
and he carefully weighed out .05 pounds for me. I probably ruined his
day when I said something like "Holy crap! Didn't they teach you
fractions in high school?"

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Kerry Thompson
I agree with Eric. Your basic issue is the way you're forming your XML.

First, the way you have it, there is no need to have a hierarchy. This
would work just as well:

   
   


It would be better, though, to make the node names meaningful and
hierarchical. So, something like this:

   
  
 
 
  
   
   
  
 
   
 
 


 
  
   


You could come up with a better structure than that, I'm sure, but
that's the basic idea.

Cordially,

Kerry Thompson


On Mon, Mar 22, 2010 at 1:59 PM, Eric E. Dolecki  wrote:
> How about having the nodes be more descriptive?
>
>  
> ...
> 
> 
>
> Then use those node names
>
> On Mon, Mar 22, 2010 at 1:33 PM, Lehr, Theodore
> wrote:
>
>> Perhaps I do have a bigger issue (actually, I have LOTS of issues ;-), but
>> the reason I need to know the depth is my thought was to use that as a means
>> of assisting in layout for example, say you have the follwing xml:
>>
>> 
>>     
>>           
>>                  
>>                  
>>           
>>           
>>           
>>    
>> 
>>
>> And you used this to create an organizational flow chart... my thought was
>> to use the depth to figure out where the names should go... I have thought
>> about how to do this 12,002 ways so my head is getting muddled
>>
>> 
>> From: flashcoders-boun...@chattyfig.figleaf.com [
>> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks [
>> flash...@stevensacks.net]
>> Sent: Monday, March 22, 2010 1:15 PM
>> To: Flash Coders List
>> Subject: Re: [Flashcoders] xml: counting parents
>>
>> I think you mean ancestors. A node can only have one parent. Parents can
>> have
>> many children.
>>
>> I think you have a bigger issue, though. Why do you need to know the depth
>> of an
>> xml node? I can't think of a single example that I would need that
>> information.
>>
>>
>> On 3/22/2010 9:27 AM, Lehr, Theodore wrote:
>> > I am still trying to find a way to see where a child is within the xml -
>> on what level... is it possible to count a nodes parents?
>> >
>> > So if I had:
>> >
>> > 
>> >        
>> >             
>> >             
>> >        
>> > 
>> >
>> > 1 would return that it has 0 parents, 2 would say it has 1 parent, 3&  4
>> would say they have 2 parents
>> >
>> > hope that makes sense
>> >
>> > Ted
>> > ___
>> > 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
>>
>
>
>
> --
> http://ericd.net
> Interactive design and development
> ___
> 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] xml: counting parents

2010-03-22 Thread Kerry Thompson
Steven Sacks wrote:

> I disagree with using explicit node names.  He's building an org chart of
> people, so the nodes should be person and the title should be an attribute.
>
> 
>    
>        
>        
>            
>        
>    
> 

It's unusual to find myself disagreeing with Steven Sacks--you're
usually right on money.

But here I do disagree. An org chart shows the organization of a unit,
and the people are secondary. When Steve Ballmer resigns or gets hired
by Google, Microsoft will still have a president.

It's also clearer to read, and easier to program, when every node
isn't named the same. Of course, there should be some
flexibility--instead of  you could have
something more generic, such as .

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] xml: counting parents

2010-03-23 Thread Kerry Thompson
Dave Watts wrote:

> So if there's an organizational shuffle of roles, I'd have to rewrite
> my XML schema? Because that sort of thing happens all the time, and a
> rigid hierarchy simply won't be able to match that without frequent
> changes.

I thought of that, which is why I suggested using something like
level1, level2, and putting the actual title as a parameter. There are
drawbacks to that approach, of course, as you and Steven pointed out.

The thing that's missing, so far, is the structure--who reports to
whom, whether it's a direct report or dotted-line, what the hierarchy
is. You have to have that information to have a usable org chart.

Steven is right--you shouldn't have to change your classes when your
organization changes. The only way I see to do that is to include
hierarchical information in the XML, and let your code handle the
display.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flash builder 4 released

2010-03-28 Thread Kerry Thompson
Colin Moock  wrote:

> i didn't see anyone post an announcement about fb4 to flashcoders, so i
> figure it's worth spreading the news a bit. here's my take on the new
> version:
>
> http://www.moock.org/blog/archives/000300.html

I've just started working with FB4 in the past couple of weeks, and I
love it. I think Adobe got it right. Well, except for the help system.
I keep the CS4 Flash help open for my AS3 reference.

It did take the better part of the day to get it set up and
configured, but that included installing Subclipse and a VPN
connection. It would have taken a lot longer if Mark Jonkman hadn't
been around to take me through the process step by step.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flash builder 4 released

2010-03-29 Thread Kerry Thompson
Zeh Fernando wrote:

> In FDT, with the caret on a method/property/reference, F3 takes you to the
> definition. F4 in a reference takes you straight to the class. The
> ctrl+cursor thing also works, but in all honesty I seldom use it. Back to
> the last edited location is ctrl+q.

FlashBuilder 4 has a really nice bookmarking feature in it (I don't
believe it was in FB3). It's a big time saver when you jump around in
your code like I do.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flash builder 4 released

2010-03-29 Thread Kerry Thompson
 Eric E. Dolecki wrote:

> Indeed it's great - is there a key combo to cycle through the bookmarks? I
> haven't found that yet.

Not that I know of. Here's a link to the Adobe page that describes it:
<http://help.adobe.com/en_US/Flex/4.0/UsingFlashBuilder/WS6f97d7caa66ef6eb1e63e3d11b6c4d0d21-7fcd.html>.

Changing the subject slightly, I griped about the new FB4 help (and I
still don't like it). Adobe have taken a step in the right direction,
though--they have developers moderating the comments on some of their
help pages. I'm not an Adobe employee or contractor, but I am a
moderator for one of their online help topics (not Flash or Flex, but
I would hope they also have developers moderating those).

I'm perhaps a bit more likely to let a snarky comment live than and
Adobe employee. I can also answer questions when appropriate--Adobe
people are good people, but their moderators aren't always the ones
using the product every day.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What good is a Controller?

2010-03-30 Thread Kerry Thompson
Karl DeSaulniers wrote:

> Or am I the last AS2 developer on the planet and just need to get in line to
> the AS3 3rd period class?

I do recommend AS3, but you're far from the last doing AS2. I just
finished up a 4-month AS2 contract, and last I heard, they were still
looking for contractors who know AS2.

When you have an extensive app or Web site built in AS2, switching to
AS3 is really tough, especially when it's a popular site and expanding
rapidly. There are lots of legacy AS2 gigs out there.

I would still become an AS3 expert. That's where the real action is.
Plus, you can use cool tools like Flex/FlexBuilder/Flashbuilder, and
AS3 is just plain better than AS2.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What good is a Controller?

2010-03-30 Thread Kerry Thompson
Karl DeSaulniers wrote:

> I want to learn AS3, I really do, but it takes too much time away from
> making money for me that I find myself missing out. :(
> I wish it was easier to make the transition, but then everyone would be a
> AS3 developer, right.

Hey, if you're doing well with AS2, there's nothing wrong with that.
It's not going away for a long time.

COBOL used to be the dominant language for business apps. I haven't
programmed in COBOL for 25 years, but I still see COBOL gigs posted.
Once you get a sizable app built in a language, you have to have a
compelling reason to switch to another. So, there are still COBOL
programmers around, maintaining 20-year-old programs.

I chose to teach myself AS3 because it's the future. I had a year of
pretty low income while I was learning, and doing gigs at a reduced
price to get practical experience. Fortunately, my wife earns enough
that I could take that year to become proficient. Some people don't
have that luxury.

By the time you run out of AS2 gigs, you might be old enough to
retire, or we might all be doing AS4, or some totally new environment
and language. No one can predict the computer future with any
accuracy, so we have to keep re-inventing ourselves every 3-5 years.
In your career, you will probably need to learn at least 4 or 5 new
languages--in my 30th year or programming, I'm on my 9th language.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] (no subject)

2010-04-09 Thread Kerry Thompson
This is spam. Don't bother.

On Fri, Apr 9, 2010 at 7:03 PM, Michael Dunn  wrote:
> http://PhoenixKenney5517.co.cc
> ___
> 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] Recommended set-up for Flash Builder 4?

2010-04-10 Thread Kerry Thompson
John McCormack wrote:
> Which setup do you recommend for Flash Builder 4?
>
> Stand-alone or plug-in?
> If plug-in, which eclipse version?

I would use the plug-in version. I've heard from very reliable sources
that there are some issues with the standalone version--I'm not sure
what the issues are, and my source can't tell me because of NDA, but I
can tell you that I have the plug-in version running, and I love it. I
have Eclipse Java EE IDE for Web Developers, Build id 30200328-2603.
The build ID may change, but that's the one you want.

When you do the installation, run everything as Administrator the
first time around if you're on Windows. Eclipse itself you just
extract, then drag to Program Files (x86)--you don't need to do the
extraction as administrator.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Recommended set-up for Flash Builder 4?

2010-04-10 Thread Kerry Thompson
Steven Sacks wrote:
> NDA? Flash Builder 4 is out. Nobody is prohibited from talking about it
> anymore. ;)

Right. And Director will rise again. Allen told me.

Now I have to go shoot myself for breaking my NDA ;-)

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Recommended set-up for Flash Builder 4?

2010-04-11 Thread Kerry Thompson
John McCormack wrote:

> Thanks Kerry,
>
> The FB3 plug-in worked well for me, so that's the route I prefer.
>
> I keep looking at versions of Eclipse and wonder if Java EE at 190MB might
> clog up my PC with things I never use. However, an fdt guy recommended the
> same version but I probably won't code with Java although I may use
> Javascript and PHP.
> Versions, versions, versions!
>
> It used to be the case that FB3 had an upper limit of version 3.4. I wonder
> if FB4 has an upper limit.
>
> For FB4, do you use the Eclipse version: Galileo 3.5.2?

Yes, Galileo 3.5.2.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] current consensus of available Flash 3D engines?

2010-04-14 Thread Kerry Thompson
Karl DeSaulniers wrote:

> Well if Unity 3d is a good 3d program to use, then I am going to learn.
> Just take a look at this. Wow.. nice functionality.

Unity is good. Real good. They're doing a lot of things right over there.

Just to keep perspective, though, there are some downsides.

- Plug-in penetration is low
- It only does 3D
- For more complex apps, you need to go beyond the drag-and-drop stuff
and write code. I believe C# is the language of choice.
- It's relatively new. If you've been around a while, you have seen a
number of good technologies come and go. iTribe, mTropolis, Icon
Author, etc.

Of course, new apps sometimes succeed. Unity's main competition is
probably Director/Shockwave, which positions Unity very nicely. They
might make the cut--as I said, they have some Real Good People working
for them. The technology is there, and the marketing is making
inroads. Time will tell.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread Kerry Thompson
natalia Vikhtinskaya wrote:

> On main timeline I have
> var countN:int=0; // this numberl be changed later
> var clip_mc = new clip_mc();  // this clip is placed in library
> addChild(clip_mc);
>
> How  can I read countN inside clip_mc?

I would pass in a reference to the timeline to the clip_mc.

You will need to have a class with a constructor for the clip_mc. For
example, set the linkage of clip_mc to ClipClass, and create this AS
file:

package
{
   public class ClipClass extends MovieClip
   {
  private var myRoot:MovieClip;
  private var parentCount:Number;

  public function ClipClass (pMyRoot:MovieClip)
  {
 myRoot = pMyRoot;
  }

  private function getCount():Number
  {
 parentCount = myRoot.countN;
  }
   }
}

There are undoubtedly errors in this--it's just e-mail ActionScript,
but it should be enough to get you going.

I would recommend very strongly against timeline programming in
ActionScript 3, though. It's designed for OOP, and you'll find your
code much more manageable if you use OOP practices. Instead of putting
code on the timeline, put it in a class, and make that your document
class.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread Kerry Thompson
natalia Vikhtinskaya wrote:

> In clip_mc I have timeline animation. When it finished I should change
> countN++ on main timeline.
> I tested as you suggested. I created ClipClass.as (just added    import
> flash.display.MovieClip;        )
>
> on main timeline I have code
> var clip_mc:MovieClip=new ClipClass(); // linkage  with name ClipClass
> in library
> addChild(clip_mc);
>
> Now that does not work
> 1017: The definition of base class MovieClip was not found.
> 5000: The class 'ClipClass' must subclass 'flash.display.MovieClip'
> since it is linked to a library symbol of that type.

There are a couple of issues. The first is the easiest: include this
line in your ClipClass.as:

  import flash.display.MovieClip;

Now, take all your code off the main timeline and put it into a file
called Main.as. Add the package and class declarations (and a
constructor if you want, though it's not required), and set Main as
your document class.

ActionScript 3 really doesn't want to be programmed like AS2. It's a
new paradigm. You can get by with AS2-style timeline programming, but
you're likely to end up with hard-to-maintain spaghetti code.

I'd recommend you take a step back and acquaint yourself with Object
Oriented principals. I call it sharpening your axe. Sure, it takes
time to sharpen an axe, and you can chop wood with a dull axe. But, if
you take time to sharpen it, at the end of the day you will have a
much larger pile of chopped wood.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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

2010-04-15 Thread Kerry Thompson
Karl DeSaulniers wrote:

> Yes JSFL. That is what I mean. So it is strictly for the IDE?

As far as I know, yes. It's the only thing I've used it
for--automating repetitive tasks.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Hello Everyone!!

2010-04-20 Thread Kerry Thompson
Peter B wrote:

> if you just moved from a third-world country and promised the client a huge
> ecommerce flash site and usually hire russian flash devs but don't have any
> contacts now and don't have money for a book then i would advise against
> posting.

LMAO! Where's Beno when you need him?

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] libraries of wav files?

2010-04-29 Thread Kerry Thompson
Jim Andrews wrote:

> i know you can load external mp3 files in flash, but is it possible to load
> a library (if that is the right term) of wav files in flash?
>
> the app i want to make involves loops, and mp3 files are not real good for
> loops.

Hi Jim,

Coming a bit late to the conversation, but I did exactly that for some
music education games. We had to have seamless playback of multiple
audio files, and mp3 just doesn't cut it.

I put my .aiff files into one Flash file, set the linkage, and
downloaded the swf at run time. When the swf download was finished, I
instantiated instances of the .aiff files. I can send you some code if
you like (it's a little to long to post in a message).

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] letter from Steve Jobs on Flash

2010-04-29 Thread Kerry Thompson
Zeh Fernando wrote:

> Right now I'm more of the opinion that rolling your eyes and moving on is
> the right thing to do.

Me too. I don't have the time to spare just now, but if I did, I'd be
writing Android apps. I see a whole lot of upside there for Flash
programmers.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Best Practices and optimization

2010-05-02 Thread Kerry Thompson
Karl DeSaulniers wrote:

> Is there a document or website or page on adobe that I can go to that has
> "all" the best practices for coding in AS2 and AS3?

There are a couple on the Adobe Web site. ActionScript 2 best
practices are at
.
ActionScript 3 best practices are at
.

If you Google "ActionScript best practices" you'll find a variety of
blogs and articles.

I can give you a couple that will speed up your code. First, use the
ActionScript classes as much as possible. They are compiled to native
code, and will run anywhere from 10 to 400 times as fast as any code
you can write, simply because the code your write gets compiled to
tokens, or bytecode, which then have to be interpreted at run time.
AS3 has a just-in-time compiler that helps, but there is still nothing
like native code.

In loops, always store the end condition in a register variable. For
example, instead of this:

for (var i:int = 0; ihttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] CIM Interview Day

2010-05-03 Thread Kerry Thompson
Dave Watts wrote:

> Uh, you just did.

Yes, he did. It would have been nice to have some hint of geographical
location. I'm not up to moving to Anchorage...

Cordially,

Kerry Thompson
Not looking for a job anyway
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Test

2010-05-14 Thread Kerry Thompson
Your previous messages have, but this one didn't.

On Fri, May 14, 2010 at 4:58 PM, Elia Morlin  wrote:
> Are my messages coming through?
>
> 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] Test

2010-05-14 Thread Kerry Thompson
Elia Morlin wrote:

> Are my messages coming through?

Aside from wiseacre comments from the likes of Jason and me, there's
an option you may not know about.

Click on <http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>.
Towards the bottom of the page, you will see a button labeled
"Unsubscribe or edit options". Enter your email address and click on
that. On the next page, enter your password.

That will take you to a screen where you can edit your settings.
Scroll down and you'll see the option "Receive your own posts to the
list?". If "No" is selected, you won't get copies of your own posts.
If you want copies, change it to "Yes".

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Oh the irony

2010-05-15 Thread Kerry Thompson
I don't see anything ironic about using QuickTime. It's one of Apple's
big success stories.

I can kind of see them pushing HTML5 over Flash, for business reasons.
But why would they want to use HTML5 over their own product?

Cordially,

Kerry Thompson

Ktu wrote:
> amazing
>
> On Fri, May 14, 2010 at 2:24 PM, Matt S.  wrote:
>
>> the other irony: When you watch the iPad ad, it plays with the
>> Quicktime plugin, at least for me, despite my being in Safari, which
>> ostensibly supports HTML5. Apparently some plugins are better than
>> others...
>>
>> http://www.apple.com/ipad/gallery/#ad
>> ___
>> 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] Oh the irony

2010-05-17 Thread Kerry Thompson
allandt bik-elliott wrote:

> they will go where the money is and in
> the future that will probably be sans-plugin for the web at least

If they're going where the money is, they'll keep plug-ins. They make
a lot of money off of them--payloads, and other things they don't talk
about. At the moment, revenue from Shockwave plug-in downloads is the
only thing that's keeping Director on life support.

Flash, and the Web suites, are a bit different in that they make money
of box sales (including downloads). They don't sell enough copies of
Director to pay for the QA, so they have to rely on download payloads.
CS suites aren't so dependent, but I would wager it's still a
significant revenue stream.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Omit Files on Build in Flash Builder

2010-05-19 Thread Kerry Thompson
Elia Morlin wrote:

> No, the files are not directly included. They are files residing in source
> folders which should be omitted. I see that I can set a whole folder to be
> read-only or archive. Is there no option to "Omit from build"?
>
> The flow you describe would work I guess. It just seems very cumbersome.

How about creating a separate project, omitting the files you don't
want included? It's pretty easy to switch projects.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Line break in dynamic text imported from xml

2010-05-20 Thread Kerry Thompson
Paul Jinks wrote:

> I managed to get this to work by using  just as you
> suggested. I hadn't understood that it needed to go inside each of my
> xml tags.

Just a clarification--it doesn't need to be inside each of your XML
tags. Only the ones that contain text you're going to display,
especially if they have HTML tags like  or \n.

You don't need to make your nodes CDATA (which, by the way, stands for
Character Data--i.e., text).

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Regain stage focus

2010-05-29 Thread Kerry Thompson
Karina Steffens  wrote:

> So the question is, what's the best way to regain stage focus without
> clicking on it? Is it even possible?

AFAIK, no, it's not possible. It's a security issue--less scrupulous
people could wreak havoc by forcing focus on a .swf. Anyway, it rais
too much in Dublin ;-)

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Regain stage focus

2010-05-29 Thread Kerry Thompson
Karina Steffens wrote:

> You mean rains, right? :P

Darn! My e-mail program drops keystrokes. Don't know why--I'm using
the GMail Web interface. I just type too fast.


> So, there's no way to regain (or at least to rain...) focus without clicking
> at all? Not even by using a mouseover event or a timer inside flash?

No, not as far as I know. You can set the focus on an input field, of
course, but that won't take effect until the user gives your .swf
focus. You understand the security issues, so I won't belabor them.

I've run into the same problem. I'm writing a math game where the
user's response time is important. If they have to click on the
browser window before typing the answer, that skews the results. We
got around it by having the user log in, so the browser window should
have focus when the problem is presented. If the user switches to
another program--say, during the intoduction--we have no way of
getting focus back until the user clicks on the browser. I'm working
with a couple of the best in the business--Mark Jonkman and Raman
Pfaf--and they both tell me the same.

> And more rain on my parade: After uploading the flash movie to the server,
> some of the links in the dropdown menu have stopped working - clicking on
> the doesn't do anything, while others seem to be ok. And it's arbitrary per
> click... And this appears to be cross browser, while locally it's fine. Any
> ideas what I should be looking for here?

Not much. I assume you've checked the usual culprits--the URL is
formed correctly, your .swf isn't busy in a loop, no security issues
involved, etc. I'd use the debug Flash player and FlashDevelop to
trace out what happens when the button is clicked.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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

2010-05-31 Thread Kerry Thompson
Dave Watts wrote:

> Dave likes his chicken spicy!

Sounds kinky ;-)

Seriously, I feel a great disturbance in the force, as if hundreds of
Flashers had given huge sighs of relief.

Auto-resonders--ils sont l'ennemi!

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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

2010-06-03 Thread Kerry Thompson
Juan Pablo Califano wrote:

> Wow. That was really uncalled for.

That was my reaction, too. I didn't see Eric as complaining--just
asking. Maybe Henrik was just having a bad day.

> For me, the hard part, which you seem to imply is rather simple here, is
> *matching+ the input audio against said profiles. Admitedly, I don't know
> anything about digital signal processing and audio programming in general,
> but "matching" sounds a bit vague. Perhaps you could enlighten us, I you
> feel like.

I'm not Henrik, but I've done some lip-synch stuff for Disney. We did
it pretty much the way Eric described--we just used amplitude. It's
not as accurate as Disney would demand on a film, but it's ok in the
kids' game market.

Doing something more accurate would probably involve at least 6 mouth
positions, and if you're doing it in real time, you'd have to do a
reverse FFT. It can be done--there was a really good commercial
lip-synch program that generated Action Script to control mouth
positions. I don't know if it's still around--that was 5 years ago,
and it was pretty expensive (about $2,500 for one seat, I think). It
may even have been a Director Xtra that worked with a Flash Sprite,
but let's not talk about Director :-P

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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

2010-06-03 Thread Kerry Thompson
Jason Merrill wrote:

> You're probably thinking of the Flash-based SitePal:
> http://www.sitepal.com/   ?

It could have been. I honestly don't remember--it was at least 5 years
ago. We considered using the software, but the studio head vetoed it
as too expensive, especially since we already had an Xtra, written in
C++, to measure amplitude. Basically, the higher the amplitude, the
more open the mouth was. I think we only used 3-4 mouth positions, and
it was good enough for Disney.

It was a series of games based on Disney Channel properties (or
cartoons, as they are known in the real world). I don't watch much
Disney Channel, but I suspect their lip synch isn't up to the same
standards as their movies.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flash game source code

2010-06-04 Thread Kerry Thompson
Eric E. Dolecki wrote:

> found this in 0.25 seconds

Which is another polite way of saying "Google is your friend."

Also, check out Gary Rosenzweig's book "ActionScript 3.0 Game
Programming University". I'm not sure if it has a space invaders game,
but Gary is great for games in general. Back in the day, I used his
book on Director games as the starting point for a bunch of games for
a now-defunct dot-com. With his source, I made about 50 games in a
year, and had my boss thinking that I was the hero :^|

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flash game source code

2010-06-05 Thread Kerry Thompson
Karina Steffens wrote:

> I actually wrote one from scratch a year ago for a client. My first AS3
> project. Never got paid for it, though :-(

Yeah, I've had a couple of those in my career, too. Sometimes it's
worth the effort to go after them, but usually not. I think I've had
about US$4,000-5,000 in unpaid invoices over the years, which really
isn't bad.

I don't know how the system works in Ireland, but in the U.S. we have
something called small claims court, for disputes under $10,000. No
lawyers are allowed--just the judge. I'm polite for the first 3-4
months, but after that I'm not going to accept any more business from
them anyway. The mere threat of taking them to court is usually enough
to make them cough up the money.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] problem with strongly typed actionscript

2010-06-07 Thread Kerry Thompson
Patrick Matte wrote:

> public function x(y:Object):void
> {
>
> }
>
> Or this
>
> public function x(y:*):void
> {
>
> }

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 run time.

Of course, C and C++ are strongly typed, and they allow you to pass in
a pointer, which could point to any type of data. I've always been
wary of that, but it's there.

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flex license with CS3?

2010-06-16 Thread Kerry Thompson
Glen Pike wrote:

>  I vaguely remember hearing something a while ago about a Flex license being
> "free" for people who owned CS3 Master Collection - can anyone verify this?
>  If so, which version of Flex was it and did you need to apply / ask Adobe
> for the license number for Flex?

FlashBuilder 4 is included in CS5 Web Premium. Not sure about the
Master, but I think my upgrade from CS4 to CS5 was $599, I think. I'm
not sure what it would be for the Master suite.

What you get is FlashBuilder 4 Standard. If you've been using the
trial download, the CS5 serial number won't register it, because
you've probably been using FB4 Premium. FB4 Premium is nice--it has
some profiling and charting tools--but it's expensive (maybe less so
if you have the master suite).

I'm using FB4 Standard, and it has everything I need--code hinting, a
really robust debugger, including easy ways to set watches and
conditional break points, and day-to-day tools. There's a comparison
here <http://www.adobe.com/products/flex/upgrade/>. Oddly, I can't
find a way to buy FlashBuilder 4 standard, except in the CS suite.

Flex itself is, of course, free. You can install it, and use any IDE
you want, like FlashDevelop (I think). I really like the FB4
interface, though.

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flex license with CS3?

2010-06-16 Thread Kerry Thompson
> I can't find a way to buy FlashBuilder 4 standard, except in the CS suite.

Actually, I did find it. Here's a link to the upgrade page:
<https://store1.adobe.com/cfusion/store/index.cfm?store=OLS-US&view=ols_prod&category=/Applications/FlashBuilderStandard&distributionMethod=UPGRADE&nr=0#store=OLS-US&category=/Applications/FlashBuilderStandard&view=ols_prod&loc=en_us>

Cordially,

Kerry Thompson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flex license with CS3?

2010-06-17 Thread Kerry Thompson
Glen Pike wrote:

>    Sorry, should probably have been more specific - we still have Master
> Collection CS3 - so looking for the Flex companion to that so maybe we can
> get an upgrade from Flex NN to FB4

Gotcha. What you want, then, is FlashBuilder 4 Standard
<https://store1.adobe.com/cfusion/store/index.cfm?store=OLS-US&view=ols_prod&category=/Applications/FlashBuilderPremium&distributionMethod=FULL&nr=0&promoid=FDNXA#category=/Applications/FlashBuilderStandard&loc=en_us&view=ols_prod&store=OLS-US>.

(They don't make the standard version easy to find--a search on
FlashBuilder seemingly always takes you to the premium page).

There's no reason I can think of to use FlexBuilder 3--I don't know if
Adobe still sells it. That's what was out when CS3 was current, but
FB4 is definitely the way to go.

I don't think there's an upgrade path from CS3, but it's only $299 (as
opposed to FB4 Premium, which is $699). You'd also get it with an
upgrade to CS5, but that would be about $1,200 (in the U.S.--probably
triple that in Europe).

Cordially,

Kerry Thompson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  1   2   3   4   >