Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread [p e r c e p t i c o n]
> I feel the same way. C gives you a feeling for the nitty-gritty of the
> computer. I use C++ now, but I did a lot of C first (and Assembler before
> that). Can you imagine writing a C library to display Chinese characters
> on
> English Windows 3.1? I would have died if it hadn't been for Paetzold.
>
> here here!



cheers

p

___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Kerry Thompson
 [p e r c e p t i c o n] wrote:
 
> i guess it depends on where you begin...i think special attention has to
be
> paid to as1's ability to add variables and function dynamically 

I agree with most everything you say, but that's where we'll have to agree
to disagree. I think the ability to add variables and functionality
dynamically is AS1's weakest point as far as OOP implementation. I can think
of no easier way to break encapsulation. But I do agree that it's very
powerful, much like Darth Vader ;-)

> everyone i know who came over from lingo has had a very hard time with
actionscript

Except me ^_^

With apologies to all my Director friends on this list, I find ActionScript
a far superior OOP model than Lingo. The only problems I'm having are with
Flash itself, not AS. The standard set--scope, components, depths.

> oddly, i  couldn't learn lingo...i tried several times and never quite
> caught on...

It took me years to become truly proficient. Even after 10 years doing
mostly Director, there are still things that I haven't explored.

> all in all i too am biased towards the class model, but when people ask me
> if they should learn c or c++ first i always say learn c first...

I feel the same way. C gives you a feeling for the nitty-gritty of the
computer. I use C++ now, but I did a lot of C first (and Assembler before
that). Can you imagine writing a C library to display Chinese characters on
English Windows 3.1? I would have died if it hadn't been for Paetzold.

Cordially,

Kerry Thompson


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread [p e r c e p t i c o n]
i guess it depends on where you begin...i think special attention has to be
paid to as1's ability to add variables and function dynamically because it's
at once very powerful and in the hands of someone looking to expand their
knowledge of programming and programming languages very misleading because
most languages don't make it that easy to do that sort of thing...

but, it's still a bit easier to explain prototype after having explained how
to use variables and functions, then how to attach them to objects like
moviclips, than it is to explain the relationship of
class/encapsulation/inheritence/polymorphism...ooops did i say polymorphism
in relation to actionscript?...well ok let's say interface...

my point is that these are higher level concepts that are much easier to
grasp if you have the fundamentals of vars/functions/scope

i came from c++ as well ...the concept of adding vars and functions
dynamically was very alien,yet liberating...and protoype just confused me
because i can be thick when i'm rushing to get a project done, but everyone
i know who came over from lingo has had a very hard time with actionscript,
oddly, i  couldn't learn lingo...i tried several times and never quite
caught on...

all in all i too am biased towards the class model, but when people ask me
if they should learn c or c++ first i always say learn c first...

regards

p



On 8/20/07, Kerry Thompson <[EMAIL PROTECTED]> wrote:
>
> [p e r c e p t i c o n] wrote:
>
> > i understand your point, but i found that when teach students how to use
> an
> > object and what's contained in an object first, then the more conceptual
> > ideas come easier
>
> Ok, I'll buy that.
>
> Not to be argumentative--just curious--how do you find the AS1 prototype
> model easier to understand than the class/object model? I'll admit to
> having
> a strong bias for the class model from my time with C++ and Lingo, and
> having a tough time when first introduced to the prototype model.
>
> Cordially,
>
> Kerry Thompson
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Real Player 11 messing up Flash application UI

2007-08-20 Thread Troy Rollins


On Aug 20, 2007, at 2:58 PM, Andy Herrman wrote:


 I haven't been
able to find any documentation about how they're detecting it.  Anyone
played around with this yet?  Are there any known methods to prevent
that toolbar from appearing?


This is hideously bad news. Adobe should fire up the legal department  
and chase Real off the planet. I'm sure they could come up with some  
kind of grounds. Or maybe we could start a class action suit for  
breaking our content.


--
Troy
RPSystems, Ltd.
http://www.rpsystems.net


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Kerry Thompson
 [p e r c e p t i c o n] wrote:
 
> i understand your point, but i found that when teach students how to use
an
> object and what's contained in an object first, then the more conceptual
> ideas come easier

Ok, I'll buy that.

Not to be argumentative--just curious--how do you find the AS1 prototype
model easier to understand than the class/object model? I'll admit to having
a strong bias for the class model from my time with C++ and Lingo, and
having a tough time when first introduced to the prototype model.

Cordially,

Kerry Thompson


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread T. Michael Keesey
I think both sides of this debate have some valid points, although I'd
lean a lot more strongly toward the "teach OOP later" approach. But
it's still possible to create OOP code from the start in AS2 or AS3.

The fundamentals of programming are variables, expressions, control
structures, and methods/functions/subroutines. In theory, you could
start teaching about variables with a pretty simple class like so:

package {
class MyProgram {
function MyProgram() {

var text:String = "Hello, world!";
trace(text);

}
}
}

At this stage there'd be no point in explaining what the package,
class, or function lines actually do--just say, "Don't worry about it;
we'll get to that later." I think it would be pretty easy to just
focus on the lines within the constructor. Once they have variables,
expressions, and control structures down, you can introduce the idea
of adding other functions. Once that's ingrained (maybe by the
beginning of an intermediate class) you can start to show how code can
be divided into classes and packages, how functions can have different
scopes, etc., and they won't be totally weirded out by the new
structure.

Just my thoughts. In the end it probably doesn't make much difference
whether you introduce the concepts via timeline code or simple, single
classes, as above. The core concepts being presented would be the
same, it's just a matter of whether you want to introduce them to the
environment of OOP earlier or later. In either case, the concepts of
OOP should come later.
-- 
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Jesse Graupmann

http://www.debreuil.com/docs/ch01_Intro.htm   

http://www.kirupa.com/developer/oop2/AS2OOPindex.htm 

---

http://proto.layer51.com 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread [p e r c e p t i c o n]
hi Kerry,
i understand your point, but i found that when teach students how to use an
object and what's contained in an object first, then the more conceptual
ideas come easier...of course every class and every student is different...

p

On 8/20/07, Kerry Thompson <[EMAIL PROTECTED]> wrote:
>
> [p e r c e p t i c o n] wrote:
> > AS1 or even JavaScript for that matter actually provides a suitable
> introduction to
> > OOP on some level
>
> Oof. I agree with most of what you said except for AS1 being a suitable
> introduction to OOP. I consider AS1's OOP model an abomination. You can
> write OOP in AS1 if you work really hard, and don't let any other
> programmers get their hands on it, but it's way, way too easy to break
> encapsulation.
>
> AS2's OOP implementation is light years ahead of AS1, and AS3, from what
> I've read, is even better. Plus, AS2's class approach is much more
> standard
> than the AS1 prototype approach.
>
> Cordially,
>
> Kerry Thompson
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Real Player 11 messing up Flash application UI

2007-08-20 Thread John Dowdell

Andy Herrman wrote:

For those who don't know, Real Player 11 (in beta right now) added a
feature that lets users download videos embedded in flash applications
(like youtube, google video, etc).  It does this by adding an entry to
Flash's rightclick menu and by having a mini-toolbar appear at the top
left of the flash movie when it loads and when the mouse goes over the
movie.

Does anyone know what method it uses to determine if a SWF is used to
play a video?  It seems to think that our Flash application serves
video even though it doesn't, and the toolbar thingy they're adding is
showing up over par of the UI and could confuse users.  I haven't been
able to find any documentation about how they're detecting it.  Anyone
played around with this yet?  Are there any known methods to prevent
that toolbar from appearing?


I've been asking the Real folks for solid documentation too. Here are 
the best current resources I know of:

http://rws-blog.rhapsody.com/realplayer/
http://www.bit-101.com/blog/?p=1051
http://www.flashcomguru.com/index.cfm/2007/8/1/real-bug
http://blog.jaycharles.net/?p=9

jd



--
John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Kerry Thompson
 [p e r c e p t i c o n] wrote:
> AS1 or even JavaScript for that matter actually provides a suitable
introduction to
> OOP on some level

Oof. I agree with most of what you said except for AS1 being a suitable
introduction to OOP. I consider AS1's OOP model an abomination. You can
write OOP in AS1 if you work really hard, and don't let any other
programmers get their hands on it, but it's way, way too easy to break
encapsulation.

AS2's OOP implementation is light years ahead of AS1, and AS3, from what
I've read, is even better. Plus, AS2's class approach is much more standard
than the AS1 prototype approach.

Cordially,

Kerry Thompson


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread [p e r c e p t i c o n]
I started in the industry as a t.a. for a graduate course in
programming...the research as well as my own personal experience suggests
that younger people tend to learn the semantics and nuance of object
oriented programming much easier than older adults...with that said..AS1 or
even JavaScript for that matter actually provides a suitable introduction to
OOP on some level...while still being heavily steeped in the procedural
paradigm...i would start there let them build a few things that way then
expand on the concept of OOp from there...after all...the most important
thing is the fundamentals...no matter how the discipline evolves...it
evolves  from the fundamentals

cheers

p

On 8/19/07, Mike Reilly <[EMAIL PROTECTED]> wrote:
>
> Hi there -
>
> I'm a high school teacher who's decided to teach "Intro to
> Programming" using Actionscript (2.0 for now, waiting for the school
> to upgrade).
>
> I'd prefer to take an OO approach, and use games in doing so.  For
> example, my first game would be a Pong copy.  Lots of basics in there
> to learn the environment, basic principles, etc.
>
> So, I was wondering if anyone out there knew of good resources, wanted
> to contribute (hell, I'll give you all the credit, you can write a
> book, etc.), collaborate, share.  I've search most of the tutorial
> sites, but most code is not a great OO example for Flash games due to
> little OO, or too much complexity for the beginner.
>
> Your input is welcome, rock on.
>
> Mike
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread John McCormack
I came at software from the electronics upwards, and maybe because of that I
sometimes don't see the woods for the trees. If these kids get to handle
objects in a more natural way without being concerned about what they are
made of they might get a better feel for OOP.

Also, in today's world it's more important to learn how to learn and go for
the detail as you need it. The most important thing is to grab their
interest and let their motivation kick in.

All the same I take your point about the need for basics. Many people here
in the UK know how to handle software but are unfamilar with files and
folders and so come unstuck.

John

- Original Message - 
From: "Steven Sacks" <[EMAIL PROTECTED]>
To: 
Sent: Monday, August 20, 2007 7:53 PM
Subject: Re: [Flashcoders] Intro to OOP using ActionScript


> OOP might seem easy to understand to people who understand it, but how
> can you expect anyone to think abstractly about concepts they don't even
> understand at a concrete level?  If this was a class of people who
> understood basic programming but had no OOP experience, then I'd say
> sure give it a shot, but these are non-programmers.
>
> There are classes that require abstract thinking by students on subjects
> that they have a solid foundation on already, and those classes can be
> very challenging for some people.  Attempting to explain the benefits of
> inheritance to somebody who doesn't even understand the difference
> between indexed and associative arrays (or even what they are) is
pointless.
>
> You can't teach chromatic scales to somebody who is just learning to
> read sheet music.  You can't teach iambic pentameter to somebody who is
> just learning how to speak.  You can't teach calculus to somebody who is
> just learning algebra.  You can't teach OOP to somebody who is just
> learning what variables and functions are.
>
> OOP is not a foundation for programming, it's a programming paradigm.
> You can't look at different paradigms if you don't know even know what
> you're looking at in the first place.  It's a topic you don't get into
> until you're at least intermediate level, and a topic you don't truly
> grasp well until you've been doing it for awhile (i.e. senior level).
>
>
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Real Player 11 messing up Flash application UI

2007-08-20 Thread Andy Herrman
For those who don't know, Real Player 11 (in beta right now) added a
feature that lets users download videos embedded in flash applications
(like youtube, google video, etc).  It does this by adding an entry to
Flash's rightclick menu and by having a mini-toolbar appear at the top
left of the flash movie when it loads and when the mouse goes over the
movie.

Does anyone know what method it uses to determine if a SWF is used to
play a video?  It seems to think that our Flash application serves
video even though it doesn't, and the toolbar thingy they're adding is
showing up over par of the UI and could confuse users.  I haven't been
able to find any documentation about how they're detecting it.  Anyone
played around with this yet?  Are there any known methods to prevent
that toolbar from appearing?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Steven Sacks
You can simplify it by saying "A subroutine is a function that is called 
by another function."  But, how can you explain the concept of a 
subroutine to somebody who doesn't even know what a function is?


While the term "subroutine" has fallen out of popular use, I know what 
it is and what it means without even thinking about it.  It's that type 
of foundation that is required for learning OOP.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Steven Sacks
OOP might seem easy to understand to people who understand it, but how 
can you expect anyone to think abstractly about concepts they don't even 
understand at a concrete level?  If this was a class of people who 
understood basic programming but had no OOP experience, then I'd say 
sure give it a shot, but these are non-programmers.


There are classes that require abstract thinking by students on subjects 
that they have a solid foundation on already, and those classes can be 
very challenging for some people.  Attempting to explain the benefits of 
inheritance to somebody who doesn't even understand the difference 
between indexed and associative arrays (or even what they are) is pointless.


You can't teach chromatic scales to somebody who is just learning to 
read sheet music.  You can't teach iambic pentameter to somebody who is 
just learning how to speak.  You can't teach calculus to somebody who is 
just learning algebra.  You can't teach OOP to somebody who is just 
learning what variables and functions are.


OOP is not a foundation for programming, it's a programming paradigm. 
You can't look at different paradigms if you don't know even know what 
you're looking at in the first place.  It's a topic you don't get into 
until you're at least intermediate level, and a topic you don't truly 
grasp well until you've been doing it for awhile (i.e. senior level).





___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] accessing super fields

2007-08-20 Thread Kerry Thompson
Hans Wichman wrote:
 
> yep they should have copied that [private and protected] from java years
ago :))

Or from C++ years before Java was born ^_^

Cordially,

Kerry Thompson


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Kerry Thompson
Steven Sacks wrote:
 
> A subroutine is one of the foundational concepts of programming,
> especially OOP

Right on, Steven. We call them "functions" or "methods" now. "Subroutine" is
simply an older name for a very current concept.

There are some advantages to having been a programmer since 1980.

Cordially,

Kerry Thompson


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] flash media server2 installation query

2007-08-20 Thread Andy Herrman
Check to make sure the windows firewall isn't blocking connections to
FMS.  I had that problem when I first installed it on my machine.

  -Andy

On 8/20/07, Jeff Harrington <[EMAIL PROTECTED]> wrote:
> You should definitely read the docs, but here it is quick.  You don't
> need Apache or IIS - it's a standalone media server.
>
> You make an application - say call it - myApp in the applications
> folder.  Then your flvs go into applications/myapp/streams/video/myFlv.flv
>
> The URL will be:
>
> rtsp://localhost:1935/myApp/video/myFlv
>
> Use the MediaServer Control swf to monitor connections etc...  and read
> the manual and check out the example code.
>
> Jeff
> http://jeffharrington.org
>
> creativity wrote:
> > Hi,
> >
> > i was just trying to use flash media server on windowsxp machine without IIS
> > but with apache. I have installed windows version of flash media server2. I
> > also downloded sample files and followed instructions, but video is not
> > playing. whether i need to use linux version or is there a simple  way to
> > check flash media server is working properly. What will be the path for
> > video if mediaserver is installed in macromedia folder under program files.
> >
> >
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread David Ngo
I'm with Steven on this one. I, too, started way back in the days of
procedural programming (Turbo Pascal, anyone?) and all of that taught me to
understand the basic how's and why's of programming. I see a lot of new
developers today who take what they read verbatim and apply it only because
everyone else tells them they should. They don't necessarily understand the
'why' and, to me, that's just as important as learning about literals,
syntax and objects.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks
Sent: Monday, August 20, 2007 1:09 PM
To: [EMAIL PROTECTED]; flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Intro to OOP using ActionScript

 > What is a "subroutine"? Not used in this millennium. Seems to be a
 > concept from the distant past.

Distant past?  Subroutines are the foundation of DRY and OOP.

http://en.wikipedia.org/wiki/Subroutine

This is exactly what I mean by developers taking for granted what it 
took to get them where they are, and I think it proves my point.  You 
learn something until you forget it, meaning it becomes second nature 
and you cease to think about it, it has become hardwired.

So, while the term "subroutine" might feel like a "concept from the 
distant past", that's because it is a concept from your distant past 
when you were first cutting your teeth that has become something that is 
now simply accepted knowledge, and you take for granted that you 
understand it.

A subroutine is one of the foundational concepts of programming, 
especially OOP, and understanding subroutines and why they're used is 
fundamental to programming in general.  Again, there are more to the 
basics of programming than just knowing Arrays, Strings, Numbers, math, 
iteration, etc.  OOP is just not beginners territory.  Intermediate at best.

If you wanted to teach OOP at a conceptual level without digging into 
actual code, I could see a use for that, but you can't teach coding 101 
while teaching a 300 level course.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread elibol
make*...

On 8/20/07, elibol <[EMAIL PROTECTED]> wrote:
>
> Seems to perfect sense in as3...
>
> On 8/20/07, Ron Wheeler <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > Hans Wichman wrote:
> > > Hi,
> > >
> > > okay thanks that comes as closest to an explanation as I'd like I
> > > guess, but.
> > >
> > > If I declare a method test() in superclass, i can call it from the
> > subclass
> > > using super.test().
> > > Whether I have overwritten it or not.
> > >
> > > So why doesnt the same go for fields.
> > >
> > >
> > Think about what this would mean.
> >
> > How would the methods in the superclass ever reference any variable?.
> > Which _test would it use? How would the super class know that you had
> > overriden _test?
> >
> > You would have to override every method to make such an idea work. Then
> > you do not have "extends" anymore.
> >
> > Take a second and think about this. It can not work any other way.
> >
> > Ron
> >
> >
> > > I think its a bug to be honest.
> > >
> > > As Benny said, "you dont need to", no i know! But appearantly it works
> > > different for fields than for methods.
> > >
> > > greetz
> > > JC
> > >
> > >
> > > On 8/20/07, Kerry Thompson <[EMAIL PROTECTED]> wrote:
> > >
> > >> Hans Wichman wrote:
> > >>
> > >>> lets say i have a superclass:
> > >>>
> > >>> class SuperClass {
> > >>>  private var _test:String = null;
> > >>> }
> > >>>
> > >>> and a subclass:
> > >>>
> > >>> class SubClass {
> > >>> private function _testFunction () {
> > >>>   super._test = "foo";
> > >>> trace (super._test);
> > >>> }
> > >>> }
> > >>>
> > >>>
> > >>> this traces undefined.
> > >>>
> > >>> If I remove the super. it works, but I like to know when I'm
> > referencing
> > >>> super class fields.
> > >>>
> > >> Actually, you're not referring to a superclass field in this
> > instance.
> > >> Your
> > >> subclass inherits all the methods and variables of the superclass, so
> >
> > >> _test
> > >> is a member of the object you create using SubClass.
> > >>
> > >> You need to use super when you have overridden a method or variable.
> > For
> > >> example, if you have an Init() method in both, and you want to run
> > the
> > >> superclass's Init() first, you would call super.Init();
> > >>
> > >> Otherwise, you treat inherited methods and vars as if they were part
> > of
> > >> the
> > >> subclass--which they are. They're just inherited, not declared.
> > >>
> > >> Cordially,
> > >>
> > >> Kerry Thompson
> > >>
> > >>
> > >> ___
> > >> Flashcoders@chattyfig.figleaf.com
> > >> To change your subscription options or search the archive:
> > >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >>
> > >> Brought to you by Fig Leaf Software
> > >> Premier Authorized Adobe Consulting and Training
> > >> http://www.figleaf.com
> > >> http://training.figleaf.com
> > >>
> > >>
> > > ___
> > > Flashcoders@chattyfig.figleaf.com
> > > To change your subscription options or search the archive:
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > Brought to you by Fig Leaf Software
> > > Premier Authorized Adobe Consulting and Training
> > > http://www.figleaf.com
> > > http://training.figleaf.com
> > >
> > >
> > >
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
>
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread elibol
Seems to perfect sense in as3...

On 8/20/07, Ron Wheeler <[EMAIL PROTECTED]> wrote:
>
>
>
> Hans Wichman wrote:
> > Hi,
> >
> > okay thanks that comes as closest to an explanation as I'd like I
> > guess, but.
> >
> > If I declare a method test() in superclass, i can call it from the
> subclass
> > using super.test().
> > Whether I have overwritten it or not.
> >
> > So why doesnt the same go for fields.
> >
> >
> Think about what this would mean.
>
> How would the methods in the superclass ever reference any variable?.
> Which _test would it use? How would the super class know that you had
> overriden _test?
>
> You would have to override every method to make such an idea work. Then
> you do not have "extends" anymore.
>
> Take a second and think about this. It can not work any other way.
>
> Ron
>
>
> > I think its a bug to be honest.
> >
> > As Benny said, "you dont need to", no i know! But appearantly it works
> > different for fields than for methods.
> >
> > greetz
> > JC
> >
> >
> > On 8/20/07, Kerry Thompson <[EMAIL PROTECTED]> wrote:
> >
> >> Hans Wichman wrote:
> >>
> >>> lets say i have a superclass:
> >>>
> >>> class SuperClass {
> >>>  private var _test:String = null;
> >>> }
> >>>
> >>> and a subclass:
> >>>
> >>> class SubClass {
> >>> private function _testFunction () {
> >>>   super._test = "foo";
> >>> trace (super._test);
> >>> }
> >>> }
> >>>
> >>>
> >>> this traces undefined.
> >>>
> >>> If I remove the super. it works, but I like to know when I'm
> referencing
> >>> super class fields.
> >>>
> >> Actually, you're not referring to a superclass field in this instance.
> >> Your
> >> subclass inherits all the methods and variables of the superclass, so
> >> _test
> >> is a member of the object you create using SubClass.
> >>
> >> You need to use super when you have overridden a method or variable.
> For
> >> example, if you have an Init() method in both, and you want to run the
> >> superclass's Init() first, you would call super.Init();
> >>
> >> Otherwise, you treat inherited methods and vars as if they were part of
> >> the
> >> subclass--which they are. They're just inherited, not declared.
> >>
> >> Cordially,
> >>
> >> Kerry Thompson
> >>
> >>
> >> ___
> >> Flashcoders@chattyfig.figleaf.com
> >> To change your subscription options or search the archive:
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> >> Brought to you by Fig Leaf Software
> >> Premier Authorized Adobe Consulting and Training
> >> http://www.figleaf.com
> >> http://training.figleaf.com
> >>
> >>
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> >
> >
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Hans Wichman
well just to be clear, i wasnt planning on overriding _test :) the example
was bad enough practice in itself.
It was more about a readability issues, like some like to do this. etc for
every variable.

On 8/20/07, Ron Wheeler <[EMAIL PROTECTED]> wrote:

>
>
> Hans Wichman wrote:
> > Hi,
> >
> > okay thanks that comes as closest to an explanation as I'd like I
> > guess, but.
> >
> > If I declare a method test() in superclass, i can call it from the
> subclass
> > using super.test().
> > Whether I have overwritten it or not.
> >
> > So why doesnt the same go for fields.
> >
> >
> Think about what this would mean.
>
> How would the methods in the superclass ever reference any variable?.
> Which _test would it use? How would the super class know that you had
> overriden _test?
>
> You would have to override every method to make such an idea work. Then
> you do not have "extends" anymore.
>
> Take a second and think about this. It can not work any other way.
>
> Ron
>
>
> > I think its a bug to be honest.
> >
> > As Benny said, "you dont need to", no i know! But appearantly it works
> > different for fields than for methods.
> >
> > greetz
> > JC
> >
> >
> > On 8/20/07, Kerry Thompson <[EMAIL PROTECTED]> wrote:
> >
> >> Hans Wichman wrote:
> >>
> >>> lets say i have a superclass:
> >>>
> >>> class SuperClass {
> >>>  private var _test:String = null;
> >>> }
> >>>
> >>> and a subclass:
> >>>
> >>> class SubClass {
> >>> private function _testFunction () {
> >>>   super._test = "foo";
> >>> trace (super._test);
> >>> }
> >>> }
> >>>
> >>>
> >>> this traces undefined.
> >>>
> >>> If I remove the super. it works, but I like to know when I'm
> referencing
> >>> super class fields.
> >>>
> >> Actually, you're not referring to a superclass field in this instance.
> >> Your
> >> subclass inherits all the methods and variables of the superclass, so
> >> _test
> >> is a member of the object you create using SubClass.
> >>
> >> You need to use super when you have overridden a method or variable.
> For
> >> example, if you have an Init() method in both, and you want to run the
> >> superclass's Init() first, you would call super.Init();
> >>
> >> Otherwise, you treat inherited methods and vars as if they were part of
> >> the
> >> subclass--which they are. They're just inherited, not declared.
> >>
> >> Cordially,
> >>
> >> Kerry Thompson
> >>
> >>
> >> ___
> >> Flashcoders@chattyfig.figleaf.com
> >> To change your subscription options or search the archive:
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> >> Brought to you by Fig Leaf Software
> >> Premier Authorized Adobe Consulting and Training
> >> http://www.figleaf.com
> >> http://training.figleaf.com
> >>
> >>
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> >
> >
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Hans Wichman
yep they should have copied that from java years ago :))

On 8/20/07, elibol <[EMAIL PROTECTED]> wrote:
>
> In as3, variables (properties and methods) that are private are not
> visible
> to subclasses, protected are accessible with this and super (as should
> be),
> and public are accessible with this and super too (kind of obvious). as3
> definitely rocks when it comes to variable scoping.
>
> On 8/20/07, Mark Winterhalder <[EMAIL PROTECTED]> wrote:
> >
> > On 8/20/07, Hans Wichman <[EMAIL PROTECTED]> wrote:
> > > Hi Mark,
> > >
> > > why is it static?
> >
> > Uhm... because I didn't read properly, sorry. :/
> >
> > > Its declared as private var not as private static var?
> >
> > I could swear it read 'static var' when I first read the mail. Now you
> > made Gmail change it some how. :)
> >
> > Anyway, interesting question. I think Kerry's explanation is
> > conceptually right, and even technically correct for AS3 as far as I
> > understand the inner workings so far.
> > But in AS2, when you do
> >
> > class SuperClass {
> > private var _test:String = null;
> > }
> >
> > technically you set SuperClass.prototype._test = null. So to do what
> > you want to do, you can access it as this.prototype.prototype._test
> > from within your child class instance.
> >
> > HTH,
> > Mark
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Steven Sacks

> What is a "subroutine"? Not used in this millennium. Seems to be a
> concept from the distant past.

Distant past?  Subroutines are the foundation of DRY and OOP.

http://en.wikipedia.org/wiki/Subroutine

This is exactly what I mean by developers taking for granted what it 
took to get them where they are, and I think it proves my point.  You 
learn something until you forget it, meaning it becomes second nature 
and you cease to think about it, it has become hardwired.


So, while the term "subroutine" might feel like a "concept from the 
distant past", that's because it is a concept from your distant past 
when you were first cutting your teeth that has become something that is 
now simply accepted knowledge, and you take for granted that you 
understand it.


A subroutine is one of the foundational concepts of programming, 
especially OOP, and understanding subroutines and why they're used is 
fundamental to programming in general.  Again, there are more to the 
basics of programming than just knowing Arrays, Strings, Numbers, math, 
iteration, etc.  OOP is just not beginners territory.  Intermediate at best.


If you wanted to teach OOP at a conceptual level without digging into 
actual code, I could see a use for that, but you can't teach coding 101 
while teaching a 300 level course.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Need special 3D Charting / Graphing solution...

2007-08-20 Thread Mike
This should get you started. They have a free and a licensed version. Pretty
slick!

http://www.maani.us/xml_charts/

Regards,
Mike

On 8/20/07, Mankowski, Chris <[EMAIL PROTECTED]> wrote:
>
> Does anyone know where I can find a nice-looking charting component that
> can not only draw a line graph, but *also* allow me to scroll left or
> right ...  In a perfect world this will download a dynamically generated
> XML file that matches up with the position of the scroll bar.
>
>
>
> I'm open to free, or commercial implementation...
>
>
>
> Thanks!
>
> -Chris
>
>
>
>
> Notice:  This e-mail message and any attachment to this e-mail
> message may contain information that is confidential, proprietary,
> privileged, legally privileged and/or exempt from disclosure under
> applicable law.  If you are not the intended recipient, please accept
> this as notice that any disclosure, copying, distribution or use of the
> information contained in this transmission is strictly prohibited.
> National Financial Partners Corp. reserves the right, to the extent
> and under circumstances permitted by applicable law, to retain,
> monitor and intercept e-mail messages to and from its systems.
>
> Any views or opinions expressed in this e-mail are those of the
> sender and do not necessarily express those of National Financial
> Partners Corp.  Although this transmission and any attachment are
> believed to be free of any virus or other defect that might affect any
> computer system into which it is received and opened, it is the
> responsibility of the recipient to ensure that it is virus free and no
> responsibility is accepted by NFP, its subsidiaries and affiliates, as
> applicable, for any loss or damage arising in any way from its use.
> If you have received this e-mail in error, please immediately contact
> the sender by return e-mail or by telephone at 212-301-4000 and
> destroy the material in its entirety, whether electronic or hard copy
> format.
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



-- 
Kind Regards,
Mike Ickes
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] [Script_in_Action] New Links

2007-08-20 Thread Mark Winterhalder
On 8/20/07, Dave Watts <[EMAIL PROTECTED]> wrote:
> Just as a heads-up, when you BCC Flashcoders your messages will not be sent
> to the list automatically.

Also, my filter won't catch it and it ends up in my inbox instead of
in FlashCoders.

Mark
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread elibol
In as3, variables (properties and methods) that are private are not visible
to subclasses, protected are accessible with this and super (as should be),
and public are accessible with this and super too (kind of obvious). as3
definitely rocks when it comes to variable scoping.

On 8/20/07, Mark Winterhalder <[EMAIL PROTECTED]> wrote:
>
> On 8/20/07, Hans Wichman <[EMAIL PROTECTED]> wrote:
> > Hi Mark,
> >
> > why is it static?
>
> Uhm... because I didn't read properly, sorry. :/
>
> > Its declared as private var not as private static var?
>
> I could swear it read 'static var' when I first read the mail. Now you
> made Gmail change it some how. :)
>
> Anyway, interesting question. I think Kerry's explanation is
> conceptually right, and even technically correct for AS3 as far as I
> understand the inner workings so far.
> But in AS2, when you do
>
> class SuperClass {
> private var _test:String = null;
> }
>
> technically you set SuperClass.prototype._test = null. So to do what
> you want to do, you can access it as this.prototype.prototype._test
> from within your child class instance.
>
> HTH,
> Mark
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Roy Pardi
At 9:54 PM -0400 8/19/07, Mike Reilly wrote:
>I think we're on the same path Roy.  While I have some future coders,
>this is Intro for 9th-11th grade kids, so my task is to teach but also
>whet their appetite for more.  My deeper desire is to do it as OO as
>possible, to better prepare them for AP Comp Sci if they choose.
>
>I used to be the Co-Director of TechBoston up there in Boston, wish I
>were closer. I'm in Georgia now.
>
>If you're interested in doing more of an OO spin, let me know and I'll
>keep you in the loop.
>

Hi Mike,
I'd be interested to hear how it goes. In this class that is now finishing
up most of the students are in the digital content creation areas, not
programming and this is a required class. I realized at a certain point
that there was a fundamental difference between my students who had
self-selected to pursue the programming path and those who were in the
class only because it was required. The former group are more comfortable
with abstract thinking, have a greater tolerance & patience for certain
types of problem solving. They had major problems with basic things and too
often resorted to memory rather than understanding (i.e they remember how
a for loop should be set up without really getting it). These are bright
folks so it's more that they have strengths in other areas.

Programming is basically just writing- and some people take to it and find
pleasure and creative opportunities through it and other people can do it
if they have to, though struggle with organizing their ideas or being clear
but find it difficult and frustrating.

--Roy
-- 
-
Studio Site Updated!
http://www.roypardi.com/


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Roy Pardi
At 11:43 PM -0700 8/19/07, Steven Sacks wrote:
>If these students have no experience programming, you just can't start
>with OOP.  They have no foundation to understand the concepts.  You have
>to walk before you can run, and OOP is definitely runners territory.
>Students with no programming experience are barely crawling.  Arrays,
>Strings, Objects, Functions, Variables - these things are your first
>steps.  You can't learn those while learning about Classes, Inheritance,
>  and Design Patterns.  Those things are based on solid foundations.

This has been my experience teaching beginning programming to designers and
artists. You would be surprised at how many people have problems grasping
abstract concepts like objects or arrays, or translating their
understanding of conditional logic, objects and the rest from their
experience of the real world to the abstract world of code.

--Roy
-- 
-
Studio Site Updated!
http://www.roypardi.com/


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Ron Wheeler



Hans Wichman wrote:

Hi,

okay thanks that comes as closest to an explanation as I'd like I
guess, but.

If I declare a method test() in superclass, i can call it from the subclass
using super.test().
Whether I have overwritten it or not.

So why doesnt the same go for fields.

  

Think about what this would mean.

How would the methods in the superclass ever reference any variable?. 
Which _test would it use? How would the super class know that you had 
overriden _test?


You would have to override every method to make such an idea work. Then 
you do not have "extends" anymore.


Take a second and think about this. It can not work any other way.

Ron



I think its a bug to be honest.

As Benny said, "you dont need to", no i know! But appearantly it works
different for fields than for methods.

greetz
JC


On 8/20/07, Kerry Thompson <[EMAIL PROTECTED]> wrote:
  

Hans Wichman wrote:


lets say i have a superclass:

class SuperClass {
 private var _test:String = null;
}

and a subclass:

class SubClass {
private function _testFunction () {
  super._test = "foo";
trace (super._test);
}
}


this traces undefined.

If I remove the super. it works, but I like to know when I'm referencing
super class fields.
  

Actually, you're not referring to a superclass field in this instance.
Your
subclass inherits all the methods and variables of the superclass, so
_test
is a member of the object you create using SubClass.

You need to use super when you have overridden a method or variable. For
example, if you have an Init() method in both, and you want to run the
superclass's Init() first, you would call super.Init();

Otherwise, you treat inherited methods and vars as if they were part of
the
subclass--which they are. They're just inherited, not declared.

Cordially,

Kerry Thompson


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Brian Lesser
Mutimedia authoring tools have been "object oriented" for a long time 
because "interactive" multimedia requires a reasonable way to handle 
user-driven events. So there is no way to avoid working with objects. 
But what does it mean to "start with OOP"? or not "start with OOP?" I 
have a lot of sympathy for Steven's first point. Students who are new to 
programming have a lot to learn that we take for granted. It is an 
interesting problem: where to start so that students can learn in 
managable increments and can enjoy the process by having lots of 
opportunities to experiment with things that interest them.


If you have them on your bookshelf have a look at the first chapter of 
Colin Moock's Essential ActionScript 3.0 and chapter 1 of his 
ActionScript for Flash MX. Now ask yourself which chapter you would 
prefer to start teaching students in high school with? In chapter 1 of 
ActionScript for Flash MX students see the basics of what some might 
call procedural programing, such as expressions and statements. They 
also read about handling events and scripting objects (Buttons and 
TextFields). By the end of the chapter they can build and experiment 
with a simple quiz. So after less than 40 pages they have something they 
can work with that does something. That's important.


On the hand, Essential ActionScript 3 spends roughly 40 pages on 
packages, classes, objects, constructors, and other things. It takes 
about six chapters before you have much code you can really play with 
that has any impact on the user. (By the way, I'm not knocking Colin's 
books. They are brilliantly written and I plan on using the AS3 book to 
teach with next term.) Six chapters is alot to impose on high school 
students in the first week or two when you want to get them to start off 
doing something interesting.


So what does it mean to start with OOP? My personal approach is to delay 
detailed teaching of packages, classes, inheritance, and so on. I 
usually start with creating classes that can be associated with 
movieclips or sprites in the library. I show students how to write 
methods that give sprites new behaviours. Writing individual methods 
involves "procedural" coding in response to events. Movement, drag and 
drop, hit detection etc. Then I provide them with enough scaffolding 
code to build something like a simple game. As the course progresses 
they write code that provide sprites with more complex behaviours and 
enhance games to, keep scores, add difficulty for the user, and add 
levels. Along the way they learn about objects, packages, classes and 
subclasses. I make sure they write nearly all their code in class files 
from beginning to end.


In short I think you get a lot more mileage in the early going of a 
class by providing examples and "scaffolding" that students can start 
experimenting with early and parcel out higher-level object-oriented 
programming and design theory as you go. In some ways AS 2 and 
especially AS 3 make it harder for students to dive in quickly. But with 
a little care and good examples its possible to lower the barrier to 
experimentation - which I think is the essential thing.


Also, maybe its worth saying that I've seen the results of too much 
theory up front on first year computer science students. Many are lost 
by the approach. They are unsure what classes to create and what code to 
put in each method to solve a problem. At any rate the essential thing 
is to start where you students are and not where you want them to be. 
Start with what they find interesting and not just what you find 
interesting.


Yours truly,
-Brian

Ron Wheeler wrote:

What is a "subroutine"? Not used in this millennium. Seems to be a 
concept from the distant past.


Start with OOP. We did not get  here by accident.
It is easier. It is less prone to errors. It makes your coding 
examples much smaller and much easier to grasp.


Their code exists in a small context. You can write the test programs 
to get them started and let the students start by programming simple 
classes that compile on their own and can be incorporated into your 
test environment which they do not have to deal with until you are 
ready to show them the object that uses their simple class.


Define the interface that their code must implement (might as well get 
them used to programming to an interface), let them extend your 
interface.
Show them how the interface is the "contract" between the user and the 
class.
If you give them the interface class with lots of comments about the 
functionality required for each method, you have the description of 
the assignment.


Ron


Johannes Nel wrote:

i think teaching someone OOP from the begining is not a bad idea, you 
are
still teching them to code but around classes. you do not need to 
introduce
more advanced concepts until later.  the best free book i think is 
thinking

in java by bruce eckel and should be easily adaptable for your needs.
i also think as3 is a good place

RE: [Flashcoders] [Script_in_Action] New Links

2007-08-20 Thread Dave Watts
Just as a heads-up, when you BCC Flashcoders your messages will not be sent
to the list automatically.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information! 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Ron Wheeler
> Sent: Sunday, August 19, 2007 00:59
> To: [EMAIL PROTECTED]
> Subject: [Flashcoders] [Script_in_Action] New Links
> 
> I have added a lot of new links for general graphic design.
> Some new links to programming books have been added as well.
> Please check out the Links section and let me know of new 
> links that should be added.
> I would like to hear from people who are using components 
> that should be included.
> 
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training 
> http://www.figleaf.com http://training.figleaf.com
> 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Ron Wheeler

You can learn the basics while using OOP.
It is just easier. You can start with simple objects and still write a 
complete piece of code that has a set of well-defined behaviours and can 
be stuck into a test program without having to deal with the whole nasty 
story at once.


I am not sure how OOP eliminates procedural code unless procedural code 
is taken to mean spaghetti code where the execution path is 
unpredictable and every variable starts "_root."


It is hard to see how you have many classes with no properties so I 
think that the students will find out about Strings, etc.
Some objects will need Arrays of other objects so I am pretty sure that 
you can get to Arrays at some point.
Class methods have been known to have iterations in them so that can be 
covered.

Might even get to recursion!!!

Naming conventions are essential. Worthwhile to make sure that all of 
your examples are 100% correct and deduct bigtime for assignments with 
violations of conventions. This gets very important when you start to 
get into frameworks which use class inspection to find things.


I would not worry about AS1 and maintaining other people's crappy code. 
If they are lucky, they will be too late into the fray and we will have 
fixed up all of the crap by then.
Realistacally,  it is unlikely that any of them will actually ever make 
a living from ActionScript programming since most of them will probably 
end up in other fields since it is a high-school not a university course.


Ron

Steven Sacks wrote:
If these students have no experience programming, you just can't start 
with OOP.  They have no foundation to understand the concepts.  You 
have to walk before you can run, and OOP is definitely runners 
territory. Students with no programming experience are barely 
crawling.  Arrays, Strings, Objects, Functions, Variables - these 
things are your first steps.  You can't learn those while learning 
about Classes, Inheritance,  and Design Patterns.  Those things are 
based on solid foundations.


Anyone here who says they would have been better off if they learned 
OOP from the get-go is dismissing everything it took to get where they 
are.  Procedural code has its purpose sometimes and knowing how and 
when to use it is important, especially in Flash.


I disagree with the statement that AS2 is on the way out.  Jesse 
Warden blogged about that very subject which mirrored my own feelings 
on the subject.  AS2 will be around for some time to come.  The fact 
is, AS3 is such a leap from AS2 most Flash developers will not be able 
to (or want to) make the leap.  Only senior level coders will, and 
certain bright designer/coder types.  Eventually, people might, but 
agencies will be able to turn out great Flash sites with AS2 (even 
AS1) for years to come.


The fact is, you can still do a lot in Flash by hacking AS1 procedural 
code, and this skill is an absolute requirement in agency work where 
you're working with short timelines, ridiculous client changes 
throughout the process, and the site is a churn and burn never to be 
touched again after it goes live.  AS2/AS1 is going to remain king in 
that very large sect of Flash development for some time to come.


If you were teaching Java or Ruby, I would say go OOP right away.  But 
Flash is only now becoming OOP strong and AS3, while a good step in 
the right direction, is not the absolute best OOP language to teach 
because of all the other things that make up Flash development that 
have less to do with Actionscript and more to do with Flash itself.  
Ruby is a fantastic OOP language, though it might be a bit heady for 
newbies.


I think you should consider teaching programming basics, focusing on 
clean code, best practices, naming conventions, etc. and touch on OOP 
towards the end.  The people who are most interested will seek out 
more information, but I think you will lose people if you try to teach 
OOP concepts right out the gate before they even know how to iterate 
through an Array, or before they know what a subroutine is.



Steven Sacks
Flash Maestro
Los Angeles, CA
--
blog: http://www.stevensacks.net
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] accessing super fields

2007-08-20 Thread Kerry Thompson
Hans Wichman wrote:
 
> okay thanks that comes as closest to an explanation as I'd like I
> guess, but.
> 
> If I declare a method test() in superclass, i can call it from the
subclass
> using super.test().
> Whether I have overwritten it or not.
> 
> So why doesnt the same go for fields.
> 
> I think its a bug to be honest.

Not really. Methods and variables are different. The code for an overridden
method still exists, and can be accessed with super. 

At the end of the day, a variable is just a place in memory--the compiler
controls how much and where, but it's still just memory. When you override a
variable, you are replacing the superclass's variable.

There is one rather odd way of accessing an overridden superclass variable,
though. If a property is initialized in the superclass body, outside of a
method or constructor, then that value is accessible via super. Here's an
untested e-mail example:

class foo
{
   public var x:Number = 10;
   public var y:Number;

   public function foo //constructor
   {
  y = 10;
   }
}

class bar extends foo
{
   public var x:Number = 20;
   public var y:Number;

   public function bar //constructor
   {
  y = 20;
  trace x;   // shows 20
  trace super.x; // shows 10
  trace y;   // shows 20
  trace super.y; // undefined
   }
}


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Mark Winterhalder
On 8/20/07, Hans Wichman <[EMAIL PROTECTED]> wrote:
> Hi Mark,
>
> why is it static?

Uhm... because I didn't read properly, sorry. :/

> Its declared as private var not as private static var?

I could swear it read 'static var' when I first read the mail. Now you
made Gmail change it some how. :)

Anyway, interesting question. I think Kerry's explanation is
conceptually right, and even technically correct for AS3 as far as I
understand the inner workings so far.
But in AS2, when you do

class SuperClass {
 private var _test:String = null;
}

technically you set SuperClass.prototype._test = null. So to do what
you want to do, you can access it as this.prototype.prototype._test
from within your child class instance.

HTH,
Mark
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Hans Wichman
sorry i missed that part, thanks benny:)

On 8/20/07, Benny <[EMAIL PROTECTED]> wrote:
>
> > As Benny said, "you dont need to", no i know! But appearantly it works
> >different for fields than for methods.
> It actually doesn't work *different* but it doesn't work *per design* for
> fields.
> The docs (see the link I provided) clearly state that it is only supported
> with methods. There is no mention of that it should only work with
> overridden methods but that's of course the logical place where you would
> use super (and of course in the constructor).
>
> - Benny
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] [Script_in_Action] New Links

2007-08-20 Thread Ron Wheeler
I have added a lot of new links for general graphic design.
Some new links to programming books have been added as well.
Please check out the Links section and let me know of new links that
should be added.
I would like to hear from people who are using components that should
be included.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] accessing super fields

2007-08-20 Thread Benny
> As Benny said, "you dont need to", no i know! But appearantly it works
>different for fields than for methods.
It actually doesn't work *different* but it doesn't work *per design* for
fields. 
The docs (see the link I provided) clearly state that it is only supported
with methods. There is no mention of that it should only work with
overridden methods but that's of course the logical place where you would
use super (and of course in the constructor). 

- Benny 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] flash media server2 installation query

2007-08-20 Thread Jeff Harrington
You should definitely read the docs, but here it is quick.  You don't 
need Apache or IIS - it's a standalone media server. 

You make an application - say call it - myApp in the applications 
folder.  Then your flvs go into applications/myapp/streams/video/myFlv.flv


The URL will be:

rtsp://localhost:1935/myApp/video/myFlv

Use the MediaServer Control swf to monitor connections etc...  and read 
the manual and check out the example code. 


Jeff
http://jeffharrington.org

creativity wrote:

Hi,

i was just trying to use flash media server on windowsxp machine without IIS
but with apache. I have installed windows version of flash media server2. I
also downloded sample files and followed instructions, but video is not
playing. whether i need to use linux version or is there a simple  way to
check flash media server is working properly. What will be the path for
video if mediaserver is installed in macromedia folder under program files.

  


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Hans Wichman
Hi,

okay thanks that comes as closest to an explanation as I'd like I
guess, but.

If I declare a method test() in superclass, i can call it from the subclass
using super.test().
Whether I have overwritten it or not.

So why doesnt the same go for fields.

I think its a bug to be honest.

As Benny said, "you dont need to", no i know! But appearantly it works
different for fields than for methods.

greetz
JC


On 8/20/07, Kerry Thompson <[EMAIL PROTECTED]> wrote:
>
> Hans Wichman wrote:
> > lets say i have a superclass:
> >
> > class SuperClass {
> >  private var _test:String = null;
> > }
> >
> > and a subclass:
> >
> > class SubClass {
> > private function _testFunction () {
> >   super._test = "foo";
> > trace (super._test);
> > }
> > }
> >
> >
> > this traces undefined.
> >
> > If I remove the super. it works, but I like to know when I'm referencing
> > super class fields.
>
> Actually, you're not referring to a superclass field in this instance.
> Your
> subclass inherits all the methods and variables of the superclass, so
> _test
> is a member of the object you create using SubClass.
>
> You need to use super when you have overridden a method or variable. For
> example, if you have an Init() method in both, and you want to run the
> superclass's Init() first, you would call super.Init();
>
> Otherwise, you treat inherited methods and vars as if they were part of
> the
> subclass--which they are. They're just inherited, not declared.
>
> Cordially,
>
> Kerry Thompson
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] status text in navigator when loading external content

2007-08-20 Thread Gilles Roquefeuil

Hello,

i've noticed that when a flash movie loads some external content  
(images, texts, videos, etc), in the navigator the status text is  
very often set to "loading content from.." and stays like that  
even when the content has been totally loaded.

The status never gets to "Done."
Is there any trick to display the status correctly or is the problem  
inhrent to Flash ?


Thanx

Gilles
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] flash media server2 installation query

2007-08-20 Thread creativity
Hi,

i was just trying to use flash media server on windowsxp machine without IIS
but with apache. I have installed windows version of flash media server2. I
also downloded sample files and followed instructions, but video is not
playing. whether i need to use linux version or is there a simple  way to
check flash media server is working properly. What will be the path for
video if mediaserver is installed in macromedia folder under program files.

-- 
Abhishek Kumar
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Ron Wheeler
They do claim that men never pass the emotional age of 12 and I have 
with guys who were 5 with 30 years of experience.. So 4 and 14 are not 
so far apart (on the male side at least).



T. Michael Keesey wrote:

On 8/19/07, Ron Wheeler <[EMAIL PROTECTED]> wrote:
  

Some of the Heads Up Design Patterns examples are fun and designed to
appeal to the 14 year old in all of us. (How does your duck quack? What
if it is a rubber duck?)



14-year-old or 4-year-old?

  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Need special 3D Charting / Graphing solution...

2007-08-20 Thread Mankowski, Chris
Does anyone know where I can find a nice-looking charting component that
can not only draw a line graph, but *also* allow me to scroll left or
right ...  In a perfect world this will download a dynamically generated
XML file that matches up with the position of the scroll bar.

 

I'm open to free, or commercial implementation...

 

Thanks!

-Chris

 


Notice:  This e-mail message and any attachment to this e-mail 
message may contain information that is confidential, proprietary, 
privileged, legally privileged and/or exempt from disclosure under 
applicable law.  If you are not the intended recipient, please accept 
this as notice that any disclosure, copying, distribution or use of the
information contained in this transmission is strictly prohibited.  
National Financial Partners Corp. reserves the right, to the extent 
and under circumstances permitted by applicable law, to retain, 
monitor and intercept e-mail messages to and from its systems.

Any views or opinions expressed in this e-mail are those of the 
sender and do not necessarily express those of National Financial 
Partners Corp.  Although this transmission and any attachment are 
believed to be free of any virus or other defect that might affect any 
computer system into which it is received and opened, it is the 
responsibility of the recipient to ensure that it is virus free and no 
responsibility is accepted by NFP, its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use. 
If you have received this e-mail in error, please immediately contact 
the sender by return e-mail or by telephone at 212-301-4000 and 
destroy the material in its entirety, whether electronic or hard copy 
format.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] accessing super fields

2007-08-20 Thread Kerry Thompson
Hans Wichman wrote:
> lets say i have a superclass:
> 
> class SuperClass {
>  private var _test:String = null;
> }
> 
> and a subclass:
> 
> class SubClass {
> private function _testFunction () {
>   super._test = "foo";
> trace (super._test);
> }
> }
> 
> 
> this traces undefined.
> 
> If I remove the super. it works, but I like to know when I'm referencing
> super class fields.

Actually, you're not referring to a superclass field in this instance. Your
subclass inherits all the methods and variables of the superclass, so _test
is a member of the object you create using SubClass.

You need to use super when you have overridden a method or variable. For
example, if you have an Init() method in both, and you want to run the
superclass's Init() first, you would call super.Init();

Otherwise, you treat inherited methods and vars as if they were part of the
subclass--which they are. They're just inherited, not declared.

Cordially,

Kerry Thompson


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] accessing super fields

2007-08-20 Thread Benny
On a second look: first you don't need the super statement because
SuperClass' _test is already inherited by the SubClass and second super is
only supported with method members, see LiveDocs:
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.h
tm?context=LiveDocs_Parts&file=1337.html

Greetz 
Benny

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Hans Wichman
Verzonden: maandag 20 augustus 2007 15:40
Aan: flashcoders@chattyfig.figleaf.com
Onderwerp: Re: [Flashcoders] accessing super fields

Hi Benny,

"Sorry, copy paste error, of course the subclass looks like:  subclass
extends superclass etc"

:)

Still no go :)

greetz
JC




On 8/20/07, Benny <[EMAIL PROTECTED]> wrote:
>
> Looks like you forgot to actually extend the superclass, try
>
> class SubClass extends superclass {
>
> - Benny
>
> -Oorspronkelijk bericht-
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Namens Hans Wichman
> Verzonden: maandag 20 augustus 2007 13:51
> Aan: Flashcoders mailing list
> Onderwerp: [Flashcoders] accessing super fields
>
> Hi,
>
> lets say i have a superclass:
>
> class SuperClass {
> private var _test:String = null;
> }
>
> and a subclass:
>
> class SubClass {
>private function _testFunction () {
>  super._test = "foo";
> trace (super._test);
> }
> }
>
>
> this traces undefined.
>
> If I remove the super. it works, but I like to know when I'm referencing
> super class fields.
>
> It is fixed as well, when I nicely wrap the setting of _test in a
> function,
> as I should, but I'm still wondering why it fails.
>
> Any ideas?
>
> greetz
> JC
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


__ NOD32 2470 (20070819) Informatie __

Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
http://www.nod32.nl


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] save swf

2007-08-20 Thread Alan MacDougall

bassam mohaisen wrote:

Hi all
I'm trying to do e-tshirt design where the user can desgin his shirt and add 
text or images so I need to know how can I save the design as image or swf for 
the design how can I take screenshot , if somebody know the concept and the 
code .
all the text and photos will be load  inside movie clip so if i need know how can i save the movie clip at runtime 
  
This is actually an extremely difficult problem. Flash is not able to 
create files in the way that you're thinking. Your best bet is to record 
the T-shirt design in descriptive terms: "this text field uses 24-point 
Impact, is at coordinates xy, is rotated 30 degrees; this image is 
blahblah.jpg, it's scaled to 120%, positioned at xy". Then send that 
information to a server-side script, written in PHP, Java, C#, or 
something, which uses an imaging library to create an image.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Ron Wheeler
What is a "subroutine"? Not used in this millennium. Seems to be a 
concept from the distant past.


Start with OOP. We did not get  here by accident.
It is easier. It is less prone to errors. It makes your coding examples 
much smaller and much easier to grasp.


Their code exists in a small context. You can write the test programs to 
get them started and let the students start by programming simple 
classes that compile on their own and can be incorporated into your test 
environment which they do not have to deal with until you are ready to 
show them the object that uses their simple class.


Define the interface that their code must implement (might as well get 
them used to programming to an interface), let them extend your interface.
Show them how the interface is the "contract" between the user and the 
class.
If you give them the interface class with lots of comments about the 
functionality required for each method, you have the description of the 
assignment.


Ron


Johannes Nel wrote:

i think teaching someone OOP from the begining is not a bad idea, you are
still teching them to code but around classes. you do not need to introduce
more advanced concepts until later.  the best free book i think is thinking
in java by bruce eckel and should be easily adaptable for your needs.
i also think as3 is a good place to start, you would be equipping them with
a better language while still allowing them to do graphics. those who want
to learn more coding will slot easier into languages like java, c# etc.

On 8/20/07, Ricky Bacon <[EMAIL PROTECTED]> wrote:
  

Steven Sacks wrote:


I think you should consider teaching programming basics, focusing on
clean code, best practices, naming conventions, etc. and touch on OOP
towards the end.  The people who are most interested will seek out more
information, but I think you will lose people if you try to teach OOP
concepts right out the gate before they even know how to iterate through
an Array, or before they know what a subroutine is.
  

LISP?  Just sayin...

-Ricky
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com






  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] AS3 Bitmap class

2007-08-20 Thread Max Kaufmann
According to the AS3 documentation: 

>> A BitmapData object can be drawn to the screen by a Bitmap object in one
of two ways: by using the vector renderer as a fill-bitmap shape, or by
using a faster pixel-copying routine. The pixel-copying routine is
substantially faster than the vector renderer, but the Bitmap object must
meet certain conditions to use it:
. No stretching, rotation, or skewing can be applied to the Bitmap object. 
. No color transform can be applied to the Bitmap object. 
. No blend mode can be applied to the Bitmap object. 
. No clipping can be done through mask layers or setMask() methods. 
. The image itself cannot be a mask. 
. The destination coordinates must be on a whole pixel boundary. 

This is very ambiguous.  How can you poll which renderer it's using?  Also,
does "bmp.scaleX=-1;" count as "stretching"?

max


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Norman Cousineau
Interesting thread.  Please let me get back to work ! ;)

In line with Steve Sacks' message, I can recommend Steve McConnell's Code 
Complete 2nd ed.
It deals with best practices in general, and is well written. (http://cc2e.com/)

However, pedagogically (not that I'm an expert), I think it's ok for Mike 
Reilly to whet the appetite of his students.  Considering they're only in high 
school, they have a long road ahead, and lots of opportunity to learn other 
things.

Norm Cousineau (Deseloper)


-Original Message-
From: Steven Sacks [mailto:[EMAIL PROTECTED]
Sent: Monday, August 20, 2007 2:43 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Intro to OOP using ActionScript


If these students have no experience programming, you just can't start 
with OOP.  They have no foundation to understand the concepts.  You have 
to walk before you can run, and OOP is definitely runners territory. 
Students with no programming experience are barely crawling.  Arrays, 
Strings, Objects, Functions, Variables - these things are your first 
steps.  You can't learn those while learning about Classes, Inheritance, 
  and Design Patterns.  Those things are based on solid foundations.

Anyone here who says they would have been better off if they learned OOP 
from the get-go is dismissing everything it took to get where they are. 
  Procedural code has its purpose sometimes and knowing how and when to 
use it is important, especially in Flash.

I disagree with the statement that AS2 is on the way out.  Jesse Warden 
blogged about that very subject which mirrored my own feelings on the 
subject.  AS2 will be around for some time to come.  The fact is, AS3 is 
such a leap from AS2 most Flash developers will not be able to (or want 
to) make the leap.  Only senior level coders will, and certain bright 
designer/coder types.  Eventually, people might, but agencies will be 
able to turn out great Flash sites with AS2 (even AS1) for years to come.

The fact is, you can still do a lot in Flash by hacking AS1 procedural 
code, and this skill is an absolute requirement in agency work where 
you're working with short timelines, ridiculous client changes 
throughout the process, and the site is a churn and burn never to be 
touched again after it goes live.  AS2/AS1 is going to remain king in 
that very large sect of Flash development for some time to come.

If you were teaching Java or Ruby, I would say go OOP right away.  But 
Flash is only now becoming OOP strong and AS3, while a good step in the 
right direction, is not the absolute best OOP language to teach because 
of all the other things that make up Flash development that have less to 
do with Actionscript and more to do with Flash itself.  Ruby is a 
fantastic OOP language, though it might be a bit heady for newbies.

I think you should consider teaching programming basics, focusing on 
clean code, best practices, naming conventions, etc. and touch on OOP 
towards the end.  The people who are most interested will seek out more 
information, but I think you will lose people if you try to teach OOP 
concepts right out the gate before they even know how to iterate through 
an Array, or before they know what a subroutine is.


Steven Sacks
Flash Maestro
Los Angeles, CA
--
blog: http://www.stevensacks.net

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Ron Wheeler



Mike Reilly wrote:

Thanks Ron, I think you've found my wavelength (as fluctuating as it
might be).  I agree on that patterns would be awesome to teach, as
early as they can conceive what an object is.

The book "Objects First" by Kolling is my inspiration for doing this,
it's aimed at the right level.  Take a game apart, understand the
objects, understand the classes that make them up, tweak the classes,
build some classes, inheritance, etc.

  
I like the coding techniques that are used in the patterns. It does show 
how a lot of functionality can be produced with minimal code by 
intelligent use of objects.
I am not sure that I would teach them as "Patterns". I would just use 
the patterns as examples of how to get things done. It is nice that they 
have names and "everyone" knows what you mean when you say "decorator" 
but I am not sure that the names are as important as knowing how to get 
things done well.


Patterns are not separate from OOP, they are just best practices for 
using OOP in an intelligent way.


The "Head First Design Pattern" book is very good in this regard and the 
examples are very short and use entertaining examples that everyone can 
understand - make a duck quack and fly - then throw in a rubber duck and 
see how little it takes to modify the duck objects to deal with squeaky, 
non-flying ducks.
Their Decorator pattern makes a nice introduction into the power of 
objects which is a lot more concrete than a whole discussion about the 
theory.
The examples are in Java so you have to make some small adjustments and 
you probably want to give them a MovieClip to draw on rather than a 
console to write on so your standard "main" test program will be different.


If you are going to try to use games in Flash as the theme, you want to 
walk them through the Listener pattern early on since you will need this 
one to avoid a real mess in handling user events.



I'll also take a look at Sandy, 3D would be so cool!

If you have the time (I'm assuming you don't, so no pressure), could
you teach me about how I would use intervals for something like a
simple Paddle class in Pong?  Just something for KeyListeners, to move
the paddle object.
Use events to find out about user inputs. Keys being released means the 
user wants something done.
Use intervals to generate events that are time related (wake up every 
1/x of a second to move the ball.) When you wake up, check the state of 
things, do what needs to be done (move the ball, update the clock or 
timer, ) and set a new interval.
You can also do these things when the user presses a key, just cancel 
your pending interval and set a new one.
If you use the Listener pattern it gets very easy to add functions to 
the list of things that need to get done when the central event handler 
wakes up or responds.

  This is one of the first lessons I would like to
get across, using a "class" from the Library of a movie for two
"instances".  After Pong I was going to move toward Space Invaders, to
throw in Arrays and reinforce the class -> objects relationship.

  
Teach them about arrays of objects. Don't let them put anything 
else in an array. It would be nice to find a bunch of programmers that 
are surprised to find out that you can put numbers in an array rather 
than the current case where the opposite is true and people create 
horrible messes of parallel, multidimensional arrays when an array of 
objects would be much clearer and require a lot less code and infinitely 
less debugging time. 

Thanks again!
Mike

On 8/19/07, Ron Wheeler <[EMAIL PROTECTED]> wrote:
  

You might also want to look at Sandy.
It is a 3D engine for Actionscript.
Very easy to build 3D applications that might be fun for the kids.

Check out Script_in_Action forum for resources and links.


Mike Reilly wrote:


Thanks so much to all of you for such quick responses.  I'm sure my
students will benefit from many of the links that you've already sent.

Since I'm not the best at clarity when writing, I'll throw out what
started this thinking.  I read Andy Harris' "Beginning Flash Game
Programming For Dummies", and I think the level of that book was
awesome for intro.  I have also been using Greenfoot.org as a
supplement to teach Java, as kids love games whether it's intro or
more advanced (remember, these are 14-17 year olds, and we're trying
to generate an interest in programming).

So this semester I'll be trying to develop an OO approach, using
Actionscript (can't install anything else without formal district
approval).  Some of the resources forwarded should be very helpful,
and I truly appreciate all support.

I'll be reading Moock's "Essential ActionScript 2.0", combining it
with Harris' "Dummies", to create "Essential Games for Dummies"!

On a serious note, how do you get an "enter_frame" event handler to
work inside an AS file?

  

It works but you shouldn't use it . Look at using intervals.
Try not to teach bad programming practices to kids at that age.


[Flashcoders] I have problem executing playlist streaming example macromedia

2007-08-20 Thread creativity
I have read these articles
http://www.adobe.com/devnet/flash/articles/video_player_03.html

downloaded sample files and placed files as directed. I have also installed
flash media server 2 trial. Play list is showing all videos. videoplayer
component is visible but no video is displayed in video player component.
i am using apache server on windows not IIS.

-- 
Abhishek Kumar
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Hans Wichman
Hi Benny,

"Sorry, copy paste error, of course the subclass looks like:  subclass
extends superclass etc"

:)

Still no go :)

greetz
JC




On 8/20/07, Benny <[EMAIL PROTECTED]> wrote:
>
> Looks like you forgot to actually extend the superclass, try
>
> class SubClass extends superclass {
>
> - Benny
>
> -Oorspronkelijk bericht-
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Namens Hans Wichman
> Verzonden: maandag 20 augustus 2007 13:51
> Aan: Flashcoders mailing list
> Onderwerp: [Flashcoders] accessing super fields
>
> Hi,
>
> lets say i have a superclass:
>
> class SuperClass {
> private var _test:String = null;
> }
>
> and a subclass:
>
> class SubClass {
>private function _testFunction () {
>  super._test = "foo";
> trace (super._test);
> }
> }
>
>
> this traces undefined.
>
> If I remove the super. it works, but I like to know when I'm referencing
> super class fields.
>
> It is fixed as well, when I nicely wrap the setting of _test in a
> function,
> as I should, but I'm still wondering why it fails.
>
> Any ideas?
>
> greetz
> JC
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] accessing super fields

2007-08-20 Thread Benny
Looks like you forgot to actually extend the superclass, try

class SubClass extends superclass {

- Benny

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Hans Wichman
Verzonden: maandag 20 augustus 2007 13:51
Aan: Flashcoders mailing list
Onderwerp: [Flashcoders] accessing super fields

Hi,

lets say i have a superclass:

class SuperClass {
 private var _test:String = null;
}

and a subclass:

class SubClass {
private function _testFunction () {
  super._test = "foo";
trace (super._test);
}
}


this traces undefined.

If I remove the super. it works, but I like to know when I'm referencing
super class fields.

It is fixed as well, when I nicely wrap the setting of _test in a function,
as I should, but I'm still wondering why it fails.

Any ideas?

greetz
JC

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Hans Wichman
Hi Mark,

why is it static? Its declared as private var not as private static var?

(if i remove super it works fine btw and for different instances with
different values).

greetz
JC


On 8/20/07, Mark Winterhalder <[EMAIL PROTECTED]> wrote:
>
> Hi Hans,
>
> 'super' refers to the instance, but your static _test isn't part of
> the instance, it is part of the class (technically, of the constructor
> function). Imagine it as this.prototype.prototype, although it
> technically isn't the same (well, maybe it is, I haven't tested it).
> It behaves like super would, with the exception of the super() call of
> the constructor.
> To do what you want, super.constructor._test would probably work (but
> again, I haven't tested it).
>
> HTH,
> Mark
>
>
> On 8/20/07, Hans Wichman <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > lets say i have a superclass:
> >
> > class SuperClass {
> >  private var _test:String = null;
> > }
> >
> > and a subclass:
> >
> > class SubClass {
> > private function _testFunction () {
> >   super._test = "foo";
> > trace (super._test);
> > }
> > }
> >
> >
> > this traces undefined.
> >
> > If I remove the super. it works, but I like to know when I'm referencing
> > super class fields.
> >
> > It is fixed as well, when I nicely wrap the setting of _test in a
> function,
> > as I should, but I'm still wondering why it fails.
> >
> > Any ideas?
> >
> > greetz
> > JC
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Hans Wichman
Hi Pedro,

the question is not about what is the best approach :), but about 'why the
heck isnt this working?'.
>From a programming point of view my example is bad practice anyway

greetz
JC


On 8/20/07, Pedro Taranto <[EMAIL PROTECTED]> wrote:
>
> I think you should use composition in this case, not inheritance.
>
> --
> Pedro Taranto
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Mark Winterhalder
Hi Hans,

'super' refers to the instance, but your static _test isn't part of
the instance, it is part of the class (technically, of the constructor
function). Imagine it as this.prototype.prototype, although it
technically isn't the same (well, maybe it is, I haven't tested it).
It behaves like super would, with the exception of the super() call of
the constructor.
To do what you want, super.constructor._test would probably work (but
again, I haven't tested it).

HTH,
Mark


On 8/20/07, Hans Wichman <[EMAIL PROTECTED]> wrote:
> Hi,
>
> lets say i have a superclass:
>
> class SuperClass {
>  private var _test:String = null;
> }
>
> and a subclass:
>
> class SubClass {
> private function _testFunction () {
>   super._test = "foo";
> trace (super._test);
> }
> }
>
>
> this traces undefined.
>
> If I remove the super. it works, but I like to know when I'm referencing
> super class fields.
>
> It is fixed as well, when I nicely wrap the setting of _test in a function,
> as I should, but I'm still wondering why it fails.
>
> Any ideas?
>
> greetz
> JC
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] accessing super fields

2007-08-20 Thread Pedro Taranto

I think you should use composition in this case, not inheritance.

--
Pedro Taranto

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Re: Intro to OOP using ActionScript --a useful book

2007-08-20 Thread Cyrelle Gerson
I didn't see this book listed among the many suggestions in this thread.

Object-Oriented Actionscript for Flash 8 by Peter Elst and Todd Yard
ISBN-10: 1590596196

I have found it to be quite useful, well-written, and a good review of OO
design principles.

Cyrelle Gerson
eLearning Developer
Webucate Us
Email: [EMAIL PROTECTED]
Web: www.webucateus.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] accessing super fields

2007-08-20 Thread Hans Wichman
Hi,

lets say i have a superclass:

class SuperClass {
 private var _test:String = null;
}

and a subclass:

class SubClass {
private function _testFunction () {
  super._test = "foo";
trace (super._test);
}
}


this traces undefined.

If I remove the super. it works, but I like to know when I'm referencing
super class fields.

It is fixed as well, when I nicely wrap the setting of _test in a function,
as I should, but I'm still wondering why it fails.

Any ideas?

greetz
JC
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Mark Winterhalder
On 8/20/07, Steven Sacks <[EMAIL PROTECTED]> wrote:
> If these students have no experience programming, you just can't start
> with OOP.

Sure you can. Just look at what Alan Kay did with kids and Squeak
(essentially Smalltalk). Here's a good talk by him, btw, much about
learning and computer/interface history:


(Get the Mpeg2, it contains very old footage filmed off a screen)

> I disagree with the statement that AS2 is on the way out.

That it'll take it some time to make it through the door doesn't mean
it's not on the way out.
Yes, some folks will use it for a long time to come, because of legacy
code bases, admins refusing to allow FP9 on their systems, and
unwillingness to learn. But those kids don't have a code base yet,
they don't have corporate clients and they have to learn anyway.

> If you were teaching Java or Ruby, I would say go OOP right away.

Because Java and Ruby don't have arrays? :)

> But
> Flash is only now becoming OOP strong and AS3, while a good step in the
> right direction, is not the absolute best OOP language to teach because
> of all the other things that make up Flash development that have less to
> do with Actionscript and more to do with Flash itself.  Ruby is a
> fantastic OOP language, though it might be a bit heady for newbies.

He's not teaching them Flash development, he'll be teaching them
(OOP-) Programming and using ActionScript as an example. There's a
difference.
But you have a point, at least as long as we're talking about AS2. We
still have a question open, and it explains why AS3 would have been
more appropriate:

"On a serious note, how do you get an "enter_frame" event handler to
work inside an AS file?"

If by AS file you mean a class instance where you would like to call a
method called 'handleEnterFrame', here's how you'd do it with AS3
(from within the class, say, in the constructor):

anyDisplayObject.addEventListener( Event.ENTER_FRAME, handleEnterFrame );

In AS2, it's a bit more complicated. If the class inherits from
MovieClip and assigned to a clip in the library, then you can just
give it a method called 'onEnterFrame'. Otherwise you have to deal
with the scope, which caused problems for so many that they introduced
Delegate to help you with it:

anyMovieClip.onEnterFrame = Delegate.create( this. handleEnterFrame );

For AS2, keep in mind that you can have only one onEnterFrame per
MovieClip, so if you have multiple instance that need the event, you
have to have one MovieClip for each. Or write a class that relays the
event to multiple listeners, essentially mimicking the behaviour AS3
would give you out of the box. (Btw, it may be a good idea to provide
such a class to the students)

Finally, the Bruce Eckel book Johannes mentioned is available online:


Regarding patterns, I would mention them but not put much emphasis on
the subject, at least not if it's a beginner course.

Anyway, I think Flash is a good choice. Mainly because you get to see
results so quickly. It's very easy to make something appear and move
it around, so you have a feeling of accomplishment very early.

Mark


On 8/20/07, Steven Sacks <[EMAIL PROTECTED]> wrote:
> If these students have no experience programming, you just can't start
> with OOP.  They have no foundation to understand the concepts.  You have
> to walk before you can run, and OOP is definitely runners territory.
> Students with no programming experience are barely crawling.  Arrays,
> Strings, Objects, Functions, Variables - these things are your first
> steps.  You can't learn those while learning about Classes, Inheritance,
>   and Design Patterns.  Those things are based on solid foundations.
>
> Anyone here who says they would have been better off if they learned OOP
> from the get-go is dismissing everything it took to get where they are.
>   Procedural code has its purpose sometimes and knowing how and when to
> use it is important, especially in Flash.
>
> I disagree with the statement that AS2 is on the way out.  Jesse Warden
> blogged about that very subject which mirrored my own feelings on the
> subject.  AS2 will be around for some time to come.  The fact is, AS3 is
> such a leap from AS2 most Flash developers will not be able to (or want
> to) make the leap.  Only senior level coders will, and certain bright
> designer/coder types.  Eventually, people might, but agencies will be
> able to turn out great Flash sites with AS2 (even AS1) for years to come.
>
> The fact is, you can still do a lot in Flash by hacking AS1 procedural
> code, and this skill is an absolute requirement in agency work where
> you're working with short timelines, ridiculous client changes
> throughout the process, and the site is a churn and burn never to be
> touched again after it goes live.  AS2/AS1 is going to remain king in
> that very large sect of Flash development for some time to come.
>
> I

Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Mike Reilly
Thanks Ron, I think you've found my wavelength (as fluctuating as it
might be).  I agree on that patterns would be awesome to teach, as
early as they can conceive what an object is.

The book "Objects First" by Kolling is my inspiration for doing this,
it's aimed at the right level.  Take a game apart, understand the
objects, understand the classes that make them up, tweak the classes,
build some classes, inheritance, etc.

I'll also take a look at Sandy, 3D would be so cool!

If you have the time (I'm assuming you don't, so no pressure), could
you teach me about how I would use intervals for something like a
simple Paddle class in Pong?  Just something for KeyListeners, to move
the paddle object.  This is one of the first lessons I would like to
get across, using a "class" from the Library of a movie for two
"instances".  After Pong I was going to move toward Space Invaders, to
throw in Arrays and reinforce the class -> objects relationship.

Thanks again!
Mike

On 8/19/07, Ron Wheeler <[EMAIL PROTECTED]> wrote:
> You might also want to look at Sandy.
> It is a 3D engine for Actionscript.
> Very easy to build 3D applications that might be fun for the kids.
>
> Check out Script_in_Action forum for resources and links.
>
>
> Mike Reilly wrote:
> > Thanks so much to all of you for such quick responses.  I'm sure my
> > students will benefit from many of the links that you've already sent.
> >
> > Since I'm not the best at clarity when writing, I'll throw out what
> > started this thinking.  I read Andy Harris' "Beginning Flash Game
> > Programming For Dummies", and I think the level of that book was
> > awesome for intro.  I have also been using Greenfoot.org as a
> > supplement to teach Java, as kids love games whether it's intro or
> > more advanced (remember, these are 14-17 year olds, and we're trying
> > to generate an interest in programming).
> >
> > So this semester I'll be trying to develop an OO approach, using
> > Actionscript (can't install anything else without formal district
> > approval).  Some of the resources forwarded should be very helpful,
> > and I truly appreciate all support.
> >
> > I'll be reading Moock's "Essential ActionScript 2.0", combining it
> > with Harris' "Dummies", to create "Essential Games for Dummies"!
> >
> > On a serious note, how do you get an "enter_frame" event handler to
> > work inside an AS file?
> >
> It works but you shouldn't use it . Look at using intervals.
> Try not to teach bad programming practices to kids at that age.
>
> You might also want to read "Heads Up Design Patterns" just to find out
> the "right" way to do many things. It is oriented to Java but all
> relevant to ActionScript.
>
> Ron
> > Thanks again, I won't bother you all much more.  Please take a look at
> > last year's kids work:  www.nghsit.com/studyhall
> >
> > Mike
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> >
> >
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Johannes Nel
i think teaching someone OOP from the begining is not a bad idea, you are
still teching them to code but around classes. you do not need to introduce
more advanced concepts until later.  the best free book i think is thinking
in java by bruce eckel and should be easily adaptable for your needs.
i also think as3 is a good place to start, you would be equipping them with
a better language while still allowing them to do graphics. those who want
to learn more coding will slot easier into languages like java, c# etc.

On 8/20/07, Ricky Bacon <[EMAIL PROTECTED]> wrote:
>
> Steven Sacks wrote:
> > I think you should consider teaching programming basics, focusing on
> > clean code, best practices, naming conventions, etc. and touch on OOP
> > towards the end.  The people who are most interested will seek out more
> > information, but I think you will lose people if you try to teach OOP
> > concepts right out the gate before they even know how to iterate through
> > an Array, or before they know what a subroutine is.
>
> LISP?  Just sayin...
>
> -Ricky
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



-- 
j:pn
http://www.memorphic.com/news/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread Ricky Bacon

Steven Sacks wrote:
I think you should consider teaching programming basics, focusing on 
clean code, best practices, naming conventions, etc. and touch on OOP 
towards the end.  The people who are most interested will seek out more 
information, but I think you will lose people if you try to teach OOP 
concepts right out the gate before they even know how to iterate through 
an Array, or before they know what a subroutine is.


LISP?  Just sayin...

-Ricky
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com