[Flashcoders] BitmapData subtract from every pixel

2007-08-21 Thread Bojil Vassilev

Hey List,

I have BitmapData A and BitmapData B;
Is there a fast routine that from every pixel in A will subtract the 
color of the coresponding pixel in B?
I'm looking for a solution using the built-in BitmapData functions, 
since a manual looop on every pixel will be somewhat intensive (even if 
I use the getPixelsloop ByteArraysetPixels hack to set the pixels, 
instead of a setPixel() loop);


BitmapData.merge() is a nice and fast way to add pixels from one bitmap 
to another, specifing te amount to be added via a Multiplier param. It 
would be cool if one can set a multiplier of a negative value, which 
will result in substracting the amount instead of adding it, but that's 
not possible.


Maybe a soluton is to have the display object of BitmapData A stacked 
above that of BitmapData B, with some BlendMode setting (SCREEN?) that 
will subtract B pixels from A pixels?

Other ideas?

Thanks,
Bojil





___
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] BitmapData subtract from every pixel

2007-08-21 Thread Ian Thomas
Bojil,
  Can you use colorTransform to invert the colour values, then do a merge()?

Ian

On 8/21/07, Bojil Vassilev [EMAIL PROTECTED] wrote:

 Hey List,

 I have BitmapData A and BitmapData B;
 Is there a fast routine that from every pixel in A will subtract the
 color of the coresponding pixel in B?
 I'm looking for a solution using the built-in BitmapData functions,
 since a manual looop on every pixel will be somewhat intensive (even if
 I use the getPixelsloop ByteArraysetPixels hack to set the pixels,
 instead of a setPixel() loop);

 BitmapData.merge() is a nice and fast way to add pixels from one bitmap
 to another, specifing te amount to be added via a Multiplier param. It
 would be cool if one can set a multiplier of a negative value, which
 will result in substracting the amount instead of adding it, but that's
 not possible.

 Maybe a soluton is to have the display object of BitmapData A stacked
 above that of BitmapData B, with some BlendMode setting (SCREEN?) that
 will subtract B pixels from A pixels?
 Other ideas?

 Thanks,
 Bojil





 ___
 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] BitmapData subtract from every pixel

2007-08-21 Thread Danny Kodicek
 
 I have BitmapData A and BitmapData B;
 Is there a fast routine that from every pixel in A will 
 subtract the color of the coresponding pixel in B?
 I'm looking for a solution using the built-in BitmapData 
 functions, since a manual looop on every pixel will be 
 somewhat intensive (even if I use the getPixelsloop 
 ByteArraysetPixels hack to set the pixels, instead of a 
 setPixel() loop);

Interestingly, in Director this is easy using copyPixels and the #subtract
ink, so as the BitmapData object is essentially an updating of Director's
Image object, I'd have expected the same routine to be available in Flash.
Is there some undocumented parameter of the copyPixels function?

Danny

___
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] Q:Flash Player update and Impact on 3D in Flash

2007-08-21 Thread moveup
Great news!
http://www.kaourantin.net/2007/08/what-just-happened-to-video-on-web_20.html

I was just wondering what impact if any this will have on the future of 3d in 
Flash.

One of the drawbacks of 3d in Flash (Sandy , PV3D) has been the lack of 
hardware acceleration .
Any thoughts?


[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca

...all improvisation is life in search of a style.
 - Bruce Mau,'LifeStyle'
___
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] FocusManager

2007-08-21 Thread Bart Wttewaall
Hi list,

I'm having trouble with the focusmanager. I created a Joystick
component that should be able to receive focus using the tab-key
(tabIndex) or by clicking it.

Since it extends UIComponent, implementing the tabIndex version is
easy; at init, set tabEnabled to true and tabChildren to false.

Now when the user clicks the component, it should also receive focus.
I've tried to call setFocus(this) or getFocusManager().setFocus(), but
the result is no focus, and worse, the joystick element with which you
control the component stops functioning as if the mouse is ignored.

Does anyone have an example or a good source about the FocusManager?
Thanks in advance.

Bart Wttewaall
___
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-21 Thread Jer Brand
Coming from someone who's never done this, and doesn't know if it's
possible, but:

Would it be possible to capture your user created design in BitmapData (I
was fairly sure there's a method to extract pixel info from a MovieClip,
correct?) then transmit that back to the server and use PHP and the image
libs to create a bitmap image?

Again, complete shot in the dark here.. I'm not even sure if the BD produced
by Flash is usable by any graphics library, PHP or otherwise.

On 8/20/07, Alan MacDougall [EMAIL PROTECTED] wrote:

 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

___
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] FocusManager

2007-08-21 Thread John laPlante

Are you using calling this relative to _root or _level0?
_root.focusManager.setFocus

Bart Wttewaall wrote:

Hi list,

I'm having trouble with the focusmanager. I created a Joystick
component that should be able to receive focus using the tab-key
(tabIndex) or by clicking it.

Since it extends UIComponent, implementing the tabIndex version is
easy; at init, set tabEnabled to true and tabChildren to false.

Now when the user clicks the component, it should also receive focus.
I've tried to call setFocus(this) or getFocusManager().setFocus(), but
the result is no focus, and worse, the joystick element with which you
control the component stops functioning as if the mouse is ignored.

Does anyone have an example or a good source about the FocusManager?
Thanks in advance.

Bart Wttewaall
___
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] Q:Flash Player update and Impact on 3D in Flash

2007-08-21 Thread Ian Thomas
Um... that is a really good announcement. But I don't understand your
question's relevance - I don't see any announcement about hardware
acceleration or 3D?

Don't mistake MPEG4 video support for MPEG4 multimedia/3D support.

Ian

On 8/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Great news!

 http://www.kaourantin.net/2007/08/what-just-happened-to-video-on-web_20.html

 I was just wondering what impact if any this will have on the future of 3d
 in Flash.

 One of the drawbacks of 3d in Flash (Sandy , PV3D) has been the lack of
 hardware acceleration .
 Any thoughts?


 [e] jbach at bitstream.ca
 [c] 416.668.0034
 [w] www.bitstream.ca
 
 ...all improvisation is life in search of a style.
  - Bruce Mau,'LifeStyle'
 ___
 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] Flash CMS

2007-08-21 Thread Corban Baxter
Is there a good Flash CMS available for us that allows users to add sections
to nav and sub navs based on templates we setup via XML. Or just a large
robust Flash System that you all would recommend the cheaper the better. :)

-- 
corbanb
___
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 8/AS2/WinXP/Control Key combo question

2007-08-21 Thread Vaughn, David (Contractor) (J6B)
Hello all. I've been working with a couple of developers over on the
FlashNewbie list on this without success. I'm hoping that with the
larger Flash developer audience on this list someone may have an answer.

I'm trying to assign keypress combinations to buttons such as Control+a,
Control+b, and so on. Problem is that I cannot find any code that
captures the Control+a or Control+c key combos. The theory is that
Windows XP is intercepting the keys since those key combos are used by
the Windows OS for selecting and copying. I've tried several variations
of code but all fail on Control+a and Control+c. Here is my latest
attempt (mind the wrap):

createTextField(message_txt, 100, 0, 0, 550, 400);

var ctrlPressed:Boolean = false;
var ctrlKeyListener:Object = new Object();
var letterKeyListener:Object = new Object();

ctrlKeyListener.onKeyDown = function() {
if (Key.getCode() == 17) {
ctrlPressed = true;
message_txt.text = CTRL down;
}
};

letterKeyListener.onKeyDown = function() {
if (ctrlPressed == true  Key.getCode() == 65) {
message_txt.text = CTRL+A down;
}
};

Key.addListener(ctrlKeyListener);
Key.addListener(letterKeyListener);

If I change the key code to B (66) rather than A (65) this code works
great.

Is there a simple way to make this work or will Control+a and Control+c
fail under all circumstances?

Thanks.

Dave
___
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] Q:Flash Player update and Impact on 3D in Flash

2007-08-21 Thread Jon Bradley


On Aug 21, 2007, at 9:10 AM, [EMAIL PROTECTED] wrote:

I was just wondering what impact if any this will have on the  
future of 3d in Flash.


Well, all the video updates will have zero effect. Those have nothing  
to do with 3d. This is basically the inclusion of the MainConcept  
MPEG4 decoding engine - which is the same code in FlipFactory and  
almost all other licensed h.264 decoders.


The multi-threaded (multi-core CPU) work they are doing will have an  
effect though.


cheers,

jon
___
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-21 Thread Jer Brand

  English Windows 3.1? I would have died if it hadn't been for Paetzold.


Heh, and I was just peeking at the Win32 API book last night. Didn't expect
to see that name again. ; )

On the subject of teaching OOP to non-programmers, I'm torn. I've seen the
method of We'll explain later but for now just type this code work in
Java. I've also see it leave an entire class of Java students dazed and
confused.

The time it worked, Java was taught starting completely with swing where we
were asked to build something on day one using the swing classes/controls
and the OO concepts kept appearing in a natural way along with basic
concepts. The class seemed to take the concepts in stride.

The time it didn't work was my second trip through Java with a different
instructor. This class went through the basics of programming in a linear
way and when the OOP concepts started (or the what we've been doing
lecture), I'm not sure I've ever so many people rubbing their heads and
staring blankly.

Granted, I think it came down to the instructor and how she ran the class,
but at the same time, it felt like the content switched gears on the second
class. Some people couldn't adapt their thinking. In a later conversation
with that instructor she mentioned that she always has about 40% (pulling a
sufficiently high number out of the air) of the class drop at that lesson.

Thinking about the swing+Java class, I'm not sure how you could translate
that to AS2 without hoops that muddy the OOP waters (attachMovieClip,
createEmptyMovieClip).

Heh, sorry, long post simply because seeing Petzold's name gave me warm
fuzzies.

Jer
___
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] Q:Flash Player update and Impact on 3D in Flash

2007-08-21 Thread eric e. dolecki
The updated support will allow Flash Player to take advantage of hardware
acceleration provided in computer video cards



On 8/21/07, Ian Thomas [EMAIL PROTECTED] wrote:

 Um... that is a really good announcement. But I don't understand your
 question's relevance - I don't see any announcement about hardware
 acceleration or 3D?

 Don't mistake MPEG4 video support for MPEG4 multimedia/3D support.

 Ian

 On 8/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  Great news!
 
 
 http://www.kaourantin.net/2007/08/what-just-happened-to-video-on-web_20.html
 
  I was just wondering what impact if any this will have on the future of
 3d
  in Flash.
 
  One of the drawbacks of 3d in Flash (Sandy , PV3D) has been the lack of
  hardware acceleration .
  Any thoughts?
 
 
  [e] jbach at bitstream.ca
  [c] 416.668.0034
  [w] www.bitstream.ca
  
  ...all improvisation is life in search of a style.
   - Bruce Mau,'LifeStyle'
  ___
  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] Q:Flash Player update and Impact on 3D in Flash

2007-08-21 Thread Paul Venton
In the context of video acceleration since the hardware, of not available then 
software, will be decoding and displaying the video.  There's no mention of 
hardware being used to accelerate non video playback.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eric e. dolecki
Sent: 21 August 2007 15:49
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Q:Flash Player update and Impact on 3D in Flash

The updated support will allow Flash Player to take advantage of hardware
acceleration provided in computer video cards




___
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] Q:Flash Player update and Impact on 3D in Flash

2007-08-21 Thread Ian Thomas
Eric - firstly, what's that quote from? I can't find it on either Tinic's
site or the Yahoo site he links to.

Secondly, the Adobe press announcement seems quite clear:

as well as hardware accelerated, multi-core enhanced full screen video
playback.

That's hardware acceleration _for the playback of video_.

That's nothing to do with talking to the 3D rendering pipeline.

Ian

On 8/21/07, eric e. dolecki [EMAIL PROTECTED] wrote:

 The updated support will allow Flash Player to take advantage of hardware
 acceleration provided in computer video cards


___
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] Q:Flash Player update and Impact on 3D in Flash

2007-08-21 Thread eric e. dolecki
Ahh true. H.264 support for playback with the aid of video cards.

Wondering if BitmapData stuff will see any improvement along with video
(pushing pixels to screen with less software). I would guess yes. If so,
Papervision3D use bitmap data.

- eric

On 8/21/07, Paul Venton [EMAIL PROTECTED] wrote:

 In the context of video acceleration since the hardware, of not available
 then software, will be decoding and displaying the video.  There's no
 mention of hardware being used to accelerate non video playback.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] On Behalf Of eric e. dolecki
 Sent: 21 August 2007 15:49
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Q:Flash Player update and Impact on 3D in Flash

 The updated support will allow Flash Player to take advantage of hardware
 acceleration provided in computer video cards




 ___
 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] Flash 8/AS2/WinXP/Control Key combo question

2007-08-21 Thread Jer Brand
I'm fairly sure that the browser is what's intercepting your keystrokes.

As for a fix in Flash, in general I don't think there is one. But there are
smarter people than me on this list, so someone else may have a solution I
don't.

However, if capturing those keystrokes are important to ya, you could try
seeing if JavaScript can capture them. I've seen some elearning pass through
our shop that uses JS to capture keys and send them to flash using
ExternalInterface, but I've never tested them against existing browser
shortcuts. It's on my  to do list to test out, but rush projects keep
getting in the way.

On 8/21/07, Vaughn, David (Contractor) (J6B) [EMAIL PROTECTED]
wrote:

 Hello all. I've been working with a couple of developers over on the
 FlashNewbie list on this without success. I'm hoping that with the
 larger Flash developer audience on this list someone may have an answer.

 I'm trying to assign keypress combinations to buttons such as Control+a,
 Control+b, and so on. Problem is that I cannot find any code that
 captures the Control+a or Control+c key combos. The theory is that
 Windows XP is intercepting the keys since those key combos are used by
 the Windows OS for selecting and copying. I've tried several variations
 of code but all fail on Control+a and Control+c. Here is my latest
 attempt (mind the wrap):

 createTextField(message_txt, 100, 0, 0, 550, 400);

 var ctrlPressed:Boolean = false;
 var ctrlKeyListener:Object = new Object();
 var letterKeyListener:Object = new Object();

 ctrlKeyListener.onKeyDown = function() {
 if (Key.getCode() == 17) {
 ctrlPressed = true;
 message_txt.text = CTRL down;
 }
 };

 letterKeyListener.onKeyDown = function() {
 if (ctrlPressed == true  Key.getCode() == 65) {
 message_txt.text = CTRL+A down;
 }
 };

 Key.addListener(ctrlKeyListener);
 Key.addListener(letterKeyListener);

 If I change the key code to B (66) rather than A (65) this code works
 great.

 Is there a simple way to make this work or will Control+a and Control+c
 fail under all circumstances?

 Thanks.

 Dave
 ___
 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] BitmapData subtract from every pixel

2007-08-21 Thread Bojil Vassilev
Thank you both for the replies. There is some urgent stuff at work right 
now, but I'll test more later and report what I found out.

Cheers.

Danny Kodicek написа:
 
  

I have BitmapData A and BitmapData B;
Is there a fast routine that from every pixel in A will 
subtract the color of the coresponding pixel in B?
I'm looking for a solution using the built-in BitmapData 
functions, since a manual looop on every pixel will be 
somewhat intensive (even if I use the getPixelsloop 
ByteArraysetPixels hack to set the pixels, instead of a 
setPixel() loop);



Interestingly, in Director this is easy using copyPixels and the #subtract
ink, so as the BitmapData object is essentially an updating of Director's
Image object, I'd have expected the same routine to be available in Flash.
Is there some undocumented parameter of the copyPixels function?

Danny

___
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] Q:Flash Player update and Impact on 3D in Flash

2007-08-21 Thread eric e. dolecki
Saw that quote in an Apple Dev forum, so it could be wrong.

I'll take this news at face value for now then - it kicks ASS.

- eric

On 8/21/07, Ian Thomas [EMAIL PROTECTED] wrote:

 Eric - firstly, what's that quote from? I can't find it on either Tinic's
 site or the Yahoo site he links to.

 Secondly, the Adobe press announcement seems quite clear:

 as well as hardware accelerated, multi-core enhanced full screen video
 playback.

 That's hardware acceleration _for the playback of video_.

 That's nothing to do with talking to the 3D rendering pipeline.

 Ian

 On 8/21/07, eric e. dolecki [EMAIL PROTECTED] wrote:
 
  The updated support will allow Flash Player to take advantage of
 hardware
  acceleration provided in computer video cards
 
 
 ___
 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] Flash CMS

2007-08-21 Thread Gilles Roquefeuil

Hello Corban,

I've been working on such a CMS for 2 years now, but i haven't yet  
totally finished (no doc, code optimisation not done, etc...)
As for today, this CMS lacks a 'creation' module, i.e. I generate by  
hand the first site with chapters, subchapters,etc as a 'template'.  
Then everything is editable.

The CMS doesn't require database, just PHP.
If you're interested, i can provide links and access to test sites.


Gilles
[EMAIL PROTECTED]
___
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-21 Thread Alan MacDougall

Jer Brand wrote:

Coming from someone who's never done this, and doesn't know if it's
possible, but:

Would it be possible to capture your user created design in BitmapData (I
was fairly sure there's a method to extract pixel info from a MovieClip,
correct?) then transmit that back to the server and use PHP and the image
libs to create a bitmap image?

Again, complete shot in the dark here.. I'm not even sure if the BD produced
by Flash is usable by any graphics library, PHP or otherwise.
  
Yes, technically, but transmitting that much bitmap data from Flash to 
the server, pixel by pixel, takes a great deal of time and bandwidth. I 
strongly recommend against the attempt.


___
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] BitmapData subtract from every pixel

2007-08-21 Thread Glen Pike

Hi,

   Could you not put the two bitmaps in separate movieclips, set the 
blend mode of the appropriate one to subtract, then draw the result 
into another Bitmap??


   Glen

Ian Thomas wrote:

Bojil,
  Can you use colorTransform to invert the colour values, then do a merge()?

Ian

On 8/21/07, Bojil Vassilev [EMAIL PROTECTED] wrote:
  

Hey List,

I have BitmapData A and BitmapData B;
Is there a fast routine that from every pixel in A will subtract the
color of the coresponding pixel in B?
I'm looking for a solution using the built-in BitmapData functions,
since a manual looop on every pixel will be somewhat intensive (even if
I use the getPixelsloop ByteArraysetPixels hack to set the pixels,
instead of a setPixel() loop);

BitmapData.merge() is a nice and fast way to add pixels from one bitmap
to another, specifing te amount to be added via a Multiplier param. It
would be cool if one can set a multiplier of a negative value, which
will result in substracting the amount instead of adding it, but that's
not possible.

Maybe a soluton is to have the display object of BitmapData A stacked
above that of BitmapData B, with some BlendMode setting (SCREEN?) that
will subtract B pixels from A pixels?
Other ideas?

Thanks,
Bojil





___
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-21 Thread Alan MacDougall
Start small and work your way up. You don't need classes until the 
functions start to get unmanageable. That won't happen until you've 
thoroughly covered variables and control structures. By the time classes 
are necessary, the students should be relieved to have a way to organize 
their forest of elaborate functions. Even if they're introduced in an 
organic and natural way, like building a Swing application, they're 
going to just be one more distraction for people who are struggling with 
the syntax of a for loop. They're an intermediate topic, treat them as one.


___
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] BitmapData subtract from every pixel

2007-08-21 Thread Brian Williams
You can also use the subtract blendmode.  BitmapData.draw supports using a
blendmode, and subtract does exactly what you want.

--Brian

On 8/21/07, Bojil Vassilev [EMAIL PROTECTED] wrote:

 Thank you both for the replies. There is some urgent stuff at work right
 now, but I'll test more later and report what I found out.
 Cheers.

 Danny Kodicek написа:
 
 
  I have BitmapData A and BitmapData B;
  Is there a fast routine that from every pixel in A will
  subtract the color of the coresponding pixel in B?
  I'm looking for a solution using the built-in BitmapData
  functions, since a manual looop on every pixel will be
  somewhat intensive (even if I use the getPixelsloop
  ByteArraysetPixels hack to set the pixels, instead of a
  setPixel() loop);
 
 
  Interestingly, in Director this is easy using copyPixels and the
 #subtract
  ink, so as the BitmapData object is essentially an updating of
 Director's
  Image object, I'd have expected the same routine to be available in
 Flash.
  Is there some undocumented parameter of the copyPixels function?
 
  Danny
 
  ___
  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] Flash 8/AS2/WinXP/Control Key combo question

2007-08-21 Thread andrew . lucking
|-+-
| |   Vaughn, David (Contractor)   |
| |   (J6B)|
| |   [EMAIL PROTECTED]|
| |   Sent by:  |
| |   [EMAIL PROTECTED]|
| |   figleaf.com   |
| | |
| | |
| |   08-21-07 10:21 AM |
| |   Please respond to flashcoders |
|-+-
  
---|
  | 
  |
  |   To:   flashcoders@chattyfig.figleaf.com 
  |
  |   cc:   
  |
  |   Subject:  [Flashcoders] Flash 8/AS2/WinXP/Control Key combo question  
  |
  
---|





 Is there a simple way to make this work or will Control+a and Control+c
 fail under all circumstances?



Hiya Dave,

I guess you could always poll for it in an onEnterFrame:

createTextField(message_txt, 100, 0, 0, 550, 400);
onEnterFrame = function() {
  message_txt.text = ;
  if (Key.isDown(Key.CONTROL)  Key.isDown(65))  message_txt.text =
Ctrl+A;
}


Cheers,
A.

___
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 8/AS2/WinXP/Control Key combo question

2007-08-21 Thread Vaughn, David (Contractor) (J6B)
Andrew, thanks very much for your suggestion. I experimented a bit with
your code. The Control+A combo *DOES* work with this method. However,
when run through the IE browser pressing Control+B brings up the IE
Organize Favorites dialog box, Control+P brings up the Print dialog box,
etc. so IE is intercepting the key combo. Unless there is some method of
shielding the key combos from IE on the web or the Flash player in
standalone mode I think we'll have to switch over to the Shift key
instead of Control.

Thanks Andrew!

___
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-21 Thread Ron Wheeler
I do not believe that starting people out doing things the wrong way is 
ever a good start.
Teach OOP from the day one. Not as a name or a theory but as a normal 
way to program.
Just start with simple classes and give the students a framework for 
testing that they do not have to deal with.


You can start with very simple classes representing everyday objects 
that everyone can understand.
You can introduce various types of variables very easily - one at a 
time. (Cats have a name, add in age, later add date of birth)
You can add Arrarys very easily in the context of a real world object. 
(Add in an array of offspring)


If you provide the Pet interface with the test program, the students 
will see how their names for properties do not matter.


By the time you have to explain what OOP is, the kids will already be 
programming OOP and wonder why anyone ever did it any other way.


Ron

Alan MacDougall wrote:
Start small and work your way up. You don't need classes until the 
functions start to get unmanageable. That won't happen until you've 
thoroughly covered variables and control structures. By the time 
classes are necessary, the students should be relieved to have a way 
to organize their forest of elaborate functions. Even if they're 
introduced in an organic and natural way, like building a Swing 
application, they're going to just be one more distraction for people 
who are struggling with the syntax of a for loop. They're an 
intermediate topic, treat them as one.


___
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-21 Thread Ian Thomas
For the record, I completely agree, Ron.

Ian

On 8/21/07, Ron Wheeler [EMAIL PROTECTED] wrote:

 I do not believe that starting people out doing things the wrong way is
 ever a good start.
 Teach OOP from the day one. Not as a name or a theory but as a normal
 way to program.
 Just start with simple classes and give the students a framework for
 testing that they do not have to deal with.


___
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-21 Thread Steven Sacks
Procedural isn't wrong.  OOP isn't right.  They're used for different 
purposes.  The fact is, OOP is a trade off for flexibility and 
scalability over speed; speed in development, speed in execution. 
Procedural programming has its place (ask any game developer).


Procedural programming is a necessary and important first step in 
learning how to code.  It's the best way to learn how programming works 
because it's a simplified approach and won't get in the way of learning 
basic syntax.


People with no programming experience will not understand abstract 
concepts like classes, inheritance, polymorphism, and encapsulation - 
the very things that make up OOP.


OOP is a specialized dialect, built upon the basic language of 
programming.  If you don't learn the basics, you can't truly learn the 
dialect.  It's akin to learning phrases from a French phrase book and 
going to Paris on vacation versus learning how conjugation and verb 
tenses work combined with vocabulary.  Who is going to be more 
successful at carrying on rudimentary conversations, or understanding 
what's being said to them?


If we take two students and you teach them OOP for 1 month and I teach 
them procedural for two weeks and then OOP for two weeks, my student 
will be further along than your student. The reason is simple.  When you 
learn the fundamentals first you have a greater capacity for 
understanding of more advanced topics.


If you take somebody snowboarding and force them to learn how to do a 
720 without teaching them anything else, they will eventually be able to 
do a 720.  If you instead teach them all the basic moves, how to enter 
and exit tricks, and then move into 180s, 270s and 360s, they'll be much 
better at snowboarding in general and will naturally learn 720s soon after.


Plus, if you sit down with non-programmers to teach them OOP, and you 
have to teach them the basics first, you will find yourself naturally 
teaching them procedural programming because every time you try to move 
into topics OOP, your students will get lost and you'll end up circling 
back to explain the basics again.


OOP is not a beginner topic.

___
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-21 Thread Ian Thomas
On 8/21/07, Steven Sacks [EMAIL PROTECTED] wrote:


 If we take two students and you teach them OOP for 1 month and I teach
 them procedural for two weeks and then OOP for two weeks, my student
 will be further along than your student. The reason is simple.  When you
 learn the fundamentals first you have a greater capacity for
 understanding of more advanced topics.



I really don't agree -- and I'd like to see you back that assertion up with
some hard data. Getting across the idea that (for example) a game object has
a bunch of attributes/properties (speed, direction, score, colour) -- that
doesn't require prior programming knowledge. Getting across the idea that an
object has an x value and if you increment it, it goes right - that requires
a bit of geometry, but again, not prior programming knowledge.

Inheritance, abstraction, interfaces et al - these are all advanced topics
and require a firm base to be working from (and there I agree with you). But
there's no reason why that base can't be objects, methods and properties
rather than procedures. Objects are easy to relate to real-world examples.

Given that nearly every language - not to mention data representation - in
common use these days either uses, or is capable of using a model that uses
objects, methods and properties, it'd be vastly helpful to have students
working from that basis.

Ian
___
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-21 Thread Kerry Thompson
Steven Sacks wrote:
 
 Procedural programming is a necessary and important first step in
 learning how to code

I've been following this debate, and I pretty much agree with Steven.

I remember when I took my first programming course, and the professor told
us we'd need a 5 1/4 floppy disk. I asked what's that? He told me, and I
went down to the local office supply store and put down my $5 for my very
first floppy.

The point is that we're way up here, and the students may not even
understand what a variable is. They need the basic concepts of a
function/procedure/subroutine/method, variables, and more advanced concepts
like control (if) and iteration (for, while).

Backtracking a bit, do you remember when you took your first algebra class,
and were first introduced to the concept of a variable? To me, that's the
dividing line between arithmetic and mathematics. Just the idea of a
variable is a tough concept to grasp at first.

I don't think you need to call it procedural. Just call it the basic
building blocks that they will need for OOP (or procedural, for that
matter).

There's not that much difference, really, between OOP and procedural. OOP
just encapsulates chunks of procedural code and its data. ActionScript's
built-in classes are much like the libraries I used in Turbo Pascal in the
80s.

Modern programming requires that you understand OOP, and I would move the
students very quickly to an OOP paradigm. But, like Steven says, they need
the basics, which are really neither procedural nor OOP. They're just the
basics.

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-21 Thread T. Michael Keesey
On 8/21/07, Ian Thomas [EMAIL PROTECTED] wrote:
 On 8/21/07, Steven Sacks [EMAIL PROTECTED] wrote:

  If we take two students and you teach them OOP for 1 month and I teach
  them procedural for two weeks and then OOP for two weeks, my student
  will be further along than your student.s.

 I really don't agree -- and I'd like to see you back that assertion up with
 some hard data.

I actually wonder how much of us are qualified to judge. Most of us
probably learned procedural programming first, so that seems natural
to us. When I taught myself BASIC on my family's TI 99/4A back in the
early '80s (and later on our Commodore 64 circa 1990), OOP didn't even
exist. Of course, it laid out the fundamentals so that, by the time I
was in high school and OOP was gaining impetus, I was ready to learn
it--with a bit of initial struggling. So that route worked, in the
end.

But was it the best route? Some of the basics I learned early on,
like GOTO and line numbers, are barely present in programming anymore
(assembly language excepted). And would it have been easier to segue
into OOP if I had been used to dealing with variables that had fields
and methods? Would it have been that much harder to learn to use
Math.abs() rather than ABS(), or bitmapData.getPixel(row, col) rather
than peek offset + screenwidth * row + col? I feel like it might have
been beneficial to start using objects, even without understanding
everything about them, shortly after learning about simple variables.
But, then again, I don't really know.

When I taught children how to program in the late '90s, some of the
languages I taught required using objects (Visual Basic) and others
didn't (LOGO). I really don't recall there being much difference in
the difficulty. Of course I didn't go very deeply into OOP, just how
to use existing APIs. But maybe that was a better approach,
ultimately. I don't know--I haven't kept in touch with any of the
kids.

Is there any younger person or latecomer out there who started using
OOP basics when learning to program for the first time? What are your
thoughts?
-- 
Mike Keesey
___
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-21 Thread Hershell Bryant
If you want to teach kids about forests, making them look at leaves under a
microscope for 6-12 months is not the way to go about it. While a leaf may
be fundamental to the life of a tree, a complete understanding of that leaf
is not even remotely necessary to understanding what a forest is about.

OOP is a great approach to programming, and there's absolutely no reason to
ensure that students are seeing strings in their dreams before teaching it.

Whether you teach a procedural or an OOP methodology, you're going to have
to teach basics concurrently...there's no getting around it.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas
Sent: Tuesday, August 21, 2007 11:17 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Intro to OOP using ActionScript

On 8/21/07, Steven Sacks [EMAIL PROTECTED] wrote:


 If we take two students and you teach them OOP for 1 month and I teach
 them procedural for two weeks and then OOP for two weeks, my student
 will be further along than your student. The reason is simple.  When you
 learn the fundamentals first you have a greater capacity for
 understanding of more advanced topics.



I really don't agree -- and I'd like to see you back that assertion up with
some hard data. Getting across the idea that (for example) a game object has
a bunch of attributes/properties (speed, direction, score, colour) -- that
doesn't require prior programming knowledge. Getting across the idea that an
object has an x value and if you increment it, it goes right - that requires
a bit of geometry, but again, not prior programming knowledge.

Inheritance, abstraction, interfaces et al - these are all advanced topics
and require a firm base to be working from (and there I agree with you). But
there's no reason why that base can't be objects, methods and properties
rather than procedures. Objects are easy to relate to real-world examples.

Given that nearly every language - not to mention data representation - in
common use these days either uses, or is capable of using a model that uses
objects, methods and properties, it'd be vastly helpful to have students
working from that basis.

Ian
___
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-21 Thread T. Michael Keesey
On 8/21/07, Steven Sacks [EMAIL PROTECTED] wrote:

 Object-oriented programming (OOP) is a programming paradigm that uses
 objects and their interactions to design applications and computer
 programs. It is based on several techniques, including inheritance,
 modularity, polymorphism, and encapsulation.

 OOP is based on the things you acknowledge are advanced topics.  Ipso
 facto, OOP is advanced, right?  ;)

I think there's actually more agreement than disagreement here. Nobody
is arguing that you should be teaching polymorphism on the second day,
just that you can start to introduce objects at an early stage. I
mean, if you can start with:

x = 500;
trace(x);

... you could certainly also start with:

myShape.x = 500;

The core basics of OOP--using fields and methods--are not that far
beyond the core basics of programming--using variables and functions.
Of course inheritance, polymorphism, encapsulation, etc. come much
later, and design patterns even later. No one would dispute that, I
think.
-- 
Mike Keesey
___
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-21 Thread [p e r c e p t i c o n]
most college programming courses have prerequisites right?

personally i know many programmers who don't have a background in
programming who jumped right into oop...just looking at the code i can tell
what they understand about programming let alone oop...


my 0.02 pieces of lint

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


Re: [Flashcoders] FocusManager

2007-08-21 Thread Bart Wttewaall
Thanks for replying John,

But no, I never use _root, nor _level.
I'm calling this from a clickHandler within my component's class.
Like this (pseudocode):

class Joystick extends UIComponent {

...

public function init() {
...
tabEnabled = true;
tabChildren = false;
...
}

private function onRelease() {
getFocusManager().setFocus(this);
}

}

2007/8/21, John laPlante [EMAIL PROTECTED]:
 Are you using calling this relative to _root or _level0?
 _root.focusManager.setFocus

 Bart Wttewaall wrote:
  Hi list,
 
  I'm having trouble with the focusmanager. I created a Joystick
  component that should be able to receive focus using the tab-key
  (tabIndex) or by clicking it.
 
  Since it extends UIComponent, implementing the tabIndex version is
  easy; at init, set tabEnabled to true and tabChildren to false.
 
  Now when the user clicks the component, it should also receive focus.
  I've tried to call setFocus(this) or getFocusManager().setFocus(), but
  the result is no focus, and worse, the joystick element with which you
  control the component stops functioning as if the mouse is ignored.
 
  Does anyone have an example or a good source about the FocusManager?
  Thanks in advance.
 
  Bart Wttewaall
  ___
  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-21 Thread chris duke
I see it as something of a Math class (my degree is in math so bear with
me). People aren't just going to be thrown into Calculus before at least
learning algebra. There is some argument that teaching calculus sooner could
be beneficial (i'm in that camp but theres a whole different set of issues
there), but at the same time its hard to imagine learning calculus without
at least having some concept of what infinite means. Same would go for OOP
- you couldn't learn it without first knowing what function means. Sure
you could teach it during the class, but why not get all of that out of the
way along with other simpler concepts in a foundations class before actually
brining OOP into the picture. Much the same way you are taught how to
compute area, and limits, before being thrown into derivatives and
integrals.

-CD

On 8/21/07, [p e r c e p t i c o n] [EMAIL PROTECTED] wrote:

 most college programming courses have prerequisites right?

 personally i know many programmers who don't have a background in
 programming who jumped right into oop...just looking at the code i can
 tell
 what they understand about programming let alone oop...


 my 0.02 pieces of lint

 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-21 Thread Troy Rollins


On Aug 21, 2007, at 3:54 PM, Ron Wheeler wrote:

Lesson 2 How do you set/change a cats name? How do you create 2  
cats with different names? Now they know about setters and getters  
and methods with parameters.


Now you are *really* talking about encapsulation...

since everyone knows that cats don't know their own names.

--
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-21 Thread Alan MacDougall


I don't think you need to call it procedural. Just call it the basic
building blocks that they will need for OOP (or procedural, for that
matter).

There's not that much difference, really, between OOP and procedural. OOP
just encapsulates chunks of procedural code and its data.
This is the correct answer. OOP probably isn't a bad framework in which 
to teach these things, but when you start teaching you may be surprised 
by how many students have a hard time grasping concepts that may seem 
simple to you, even as simple as the relationship between a class and an 
instance. You will also see students who blur through the work and get 
bored five minutes after each class starts... but they aren't the ones 
we're worried about.


So rather than engage in an argument as to whether OOP or procedural is 
better, we're basically asking: Do the additional distractions of OOP 
justify the payoff from learning it up front? If you're teaching fellow 
geeks, then yes. If you're teaching people with a more casual interest 
in programming, or (shudder) people who are required to take the class, 
you may want to keep it script-simple. Compare:


var foo:Number = 1;
var bar:Number = 2;
trace(foo + bar);

vs.

class Cat
{
   private var age:Number;
   public function setAge(age:Number):Void   {this.age = age;}
   public function getAge():Number   {return age;}
}

var whiskers:Cat = new Cat();
whiskers.setAge(1);
var patches:Cat = new Cat();
patches.setAge(2);
trace(whiskers.getAge() + patches.getAge());

Is it so unrealistic to suggest that the second example, while having a 
pleasant real-world basis, involves many more steps and logical leaps 
for an absolute beginner to understand?


Maybe this is a strawman... I guess you could start with how getters and 
setters work in the first place, and use that to explain 
functions/methods. It just seems like a bit too much drapery to start 
out with.


___
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-21 Thread Ron Wheeler

Can you explain to me how a function is intrinsically simpler than a method?

I have a feeling that there is a lot more mythology about OOP than there 
should be.

1) OOP uses the same compiler as spaghetti code.
2) OOP is written using procedural languages (the opposite of procedural 
is declarative)
3)OOP is based on some interesting theory and has a funny vocabulary but 
if you ignore all of these linguistic shortcuts and just explain what 
you mean, it is pretty simple.
4) OOP generally results in the average programmer producing code that 
is easier to debug and maintain that the average programmer used to be 
capable of doing. It is not a cure-all for stupidity or lazy thinking. 
It is just easier to spot and fix poorly written code.
5) OOP is a way to approach design; more beginning programmers (and 
experienced programmers) have trouble with design than coding.
6) OOP will not cure baldness but it will reduce the number of times you 
are pulling your hair out in frustration over a programming error.


Ron


chris duke wrote:

I see it as something of a Math class (my degree is in math so bear with
me). People aren't just going to be thrown into Calculus before at least
learning algebra. There is some argument that teaching calculus sooner could
be beneficial (i'm in that camp but theres a whole different set of issues
there), but at the same time its hard to imagine learning calculus without
at least having some concept of what infinite means. Same would go for OOP
- you couldn't learn it without first knowing what function means. Sure
you could teach it during the class, but why not get all of that out of the
way along with other simpler concepts in a foundations class before actually
brining OOP into the picture. Much the same way you are taught how to
compute area, and limits, before being thrown into derivatives and
integrals.

-CD

On 8/21/07, [p e r c e p t i c o n] [EMAIL PROTECTED] wrote:
  

most college programming courses have prerequisites right?

personally i know many programmers who don't have a background in
programming who jumped right into oop...just looking at the code i can
tell
what they understand about programming let alone oop...


my 0.02 pieces of lint

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


  

___
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-21 Thread Ron Wheeler

They do know their names.
They are just not going to give you the satisfaction of coming just 
because you called them.

That is what dogs were invented for.

Ron


Troy Rollins wrote:


On Aug 21, 2007, at 3:54 PM, Ron Wheeler wrote:

Lesson 2 How do you set/change a cats name? How do you create 2 cats 
with different names? Now they know about setters and getters and 
methods with parameters.


Now you are *really* talking about encapsulation...

since everyone knows that cats don't know their own names.

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



___
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] H264/AAC live online ;)

2007-08-21 Thread eric e. dolecki
http://www.ericd.net/2007/08/h264-playing-in-flash-player.html

from Apple's trailer site. H264 with AAC. Nothing changed whatsoever and
there it is ;)

KICK ASS.

- edolecki
___
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] FocusManager

2007-08-21 Thread John laPlante

Go ahead and try that and I bet it will work.

Bart Wttewaall wrote:

Thanks for replying John,

But no, I never use _root, nor _level.
I'm calling this from a clickHandler within my component's class.
Like this (pseudocode):

class Joystick extends UIComponent {

...

public function init() {
...
tabEnabled = true;
tabChildren = false;
...
}

private function onRelease() {
getFocusManager().setFocus(this);
}

}

2007/8/21, John laPlante [EMAIL PROTECTED]:
  

Are you using calling this relative to _root or _level0?
_root.focusManager.setFocus

Bart Wttewaall wrote:


Hi list,

I'm having trouble with the focusmanager. I created a Joystick
component that should be able to receive focus using the tab-key
(tabIndex) or by clicking it.

Since it extends UIComponent, implementing the tabIndex version is
easy; at init, set tabEnabled to true and tabChildren to false.

Now when the user clicks the component, it should also receive focus.
I've tried to call setFocus(this) or getFocusManager().setFocus(), but
the result is no focus, and worse, the joystick element with which you
control the component stops functioning as if the mouse is ignored.

Does anyone have an example or a good source about the FocusManager?
Thanks in advance.

Bart Wttewaall
___
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] Intro to OOP using ActionScript

2007-08-21 Thread Mark Winterhalder
 If you take somebody snowboarding and force them to learn how to do a
 720 without teaching them anything else, they will eventually be able to
 do a 720.  If you instead teach them all the basic moves, how to enter
 and exit tricks, and then move into 180s, 270s and 360s, they'll be much
 better at snowboarding in general and will naturally learn 720s soon after.

You can't just teach somebody to snowboard without first teaching them
how to ski.
They need to get a feeling for the snow first, on two boards, learn
how to use the lift and so on.

But in terms of programming, I agree with Ron. OOP is more natural and
closer to real life experiences.

Mark


On 8/21/07, Steven Sacks [EMAIL PROTECTED] wrote:
 Procedural isn't wrong.  OOP isn't right.  They're used for different
 purposes.  The fact is, OOP is a trade off for flexibility and
 scalability over speed; speed in development, speed in execution.
 Procedural programming has its place (ask any game developer).

 Procedural programming is a necessary and important first step in
 learning how to code.  It's the best way to learn how programming works
 because it's a simplified approach and won't get in the way of learning
 basic syntax.

 People with no programming experience will not understand abstract
 concepts like classes, inheritance, polymorphism, and encapsulation -
 the very things that make up OOP.

 OOP is a specialized dialect, built upon the basic language of
 programming.  If you don't learn the basics, you can't truly learn the
 dialect.  It's akin to learning phrases from a French phrase book and
 going to Paris on vacation versus learning how conjugation and verb
 tenses work combined with vocabulary.  Who is going to be more
 successful at carrying on rudimentary conversations, or understanding
 what's being said to them?

 If we take two students and you teach them OOP for 1 month and I teach
 them procedural for two weeks and then OOP for two weeks, my student
 will be further along than your student. The reason is simple.  When you
 learn the fundamentals first you have a greater capacity for
 understanding of more advanced topics.

 If you take somebody snowboarding and force them to learn how to do a
 720 without teaching them anything else, they will eventually be able to
 do a 720.  If you instead teach them all the basic moves, how to enter
 and exit tricks, and then move into 180s, 270s and 360s, they'll be much
 better at snowboarding in general and will naturally learn 720s soon after.

 Plus, if you sit down with non-programmers to teach them OOP, and you
 have to teach them the basics first, you will find yourself naturally
 teaching them procedural programming because every time you try to move
 into topics OOP, your students will get lost and you'll end up circling
 back to explain the basics again.

 OOP is not a beginner topic.

 ___
 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-21 Thread Ron Wheeler

Interesting point.

My counter would be that at the age of 14, these kids already have a 
good understanding of  foo+bar (and knowing to days kids fubar as well.)


I am not trying to teach them arithmetic. I am interested in showing 
them how arithmetic is used in the context of programming to accomplish 
something worthwhile like adding up the age of 2 cats.
Fortunately the + operation maps pretty well into the vocabulary of 
arithmetic so I would not expect students shown either example to 
flounder on the + sign.


I really want to teach them the right way to represent cats as things 
inside a computer and to manipulate these abstractions as easily or more 
easily than they can manipulate realworld cats. And to be able to extend 
this same approach to dogs, credit cards, photographs, etc.


Ron


Alan MacDougall wrote:


I don't think you need to call it procedural. Just call it the basic
building blocks that they will need for OOP (or procedural, for that
matter).

There's not that much difference, really, between OOP and procedural. 
OOP

just encapsulates chunks of procedural code and its data.
This is the correct answer. OOP probably isn't a bad framework in 
which to teach these things, but when you start teaching you may be 
surprised by how many students have a hard time grasping concepts that 
may seem simple to you, even as simple as the relationship between a 
class and an instance. You will also see students who blur through the 
work and get bored five minutes after each class starts... but they 
aren't the ones we're worried about.


So rather than engage in an argument as to whether OOP or procedural 
is better, we're basically asking: Do the additional distractions of 
OOP justify the payoff from learning it up front? If you're teaching 
fellow geeks, then yes. If you're teaching people with a more casual 
interest in programming, or (shudder) people who are required to take 
the class, you may want to keep it script-simple. Compare:


var foo:Number = 1;
var bar:Number = 2;
trace(foo + bar);

vs.

class Cat
{
   private var age:Number;
   public function setAge(age:Number):Void   {this.age = age;}
   public function getAge():Number   {return age;}
}

var whiskers:Cat = new Cat();
whiskers.setAge(1);
var patches:Cat = new Cat();
patches.setAge(2);
trace(whiskers.getAge() + patches.getAge());

Is it so unrealistic to suggest that the second example, while having 
a pleasant real-world basis, involves many more steps and logical 
leaps for an absolute beginner to understand?


Maybe this is a strawman... I guess you could start with how getters 
and setters work in the first place, and use that to explain 
functions/methods. It just seems like a bit too much drapery to start 
out with.


___
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-21 Thread Ron Wheeler



T. Michael Keesey wrote:

On 8/21/07, Steven Sacks [EMAIL PROTECTED] wrote:
  

Object-oriented programming (OOP) is a programming paradigm that uses
objects and their interactions to design applications and computer
programs. It is based on several techniques, including inheritance,
modularity, polymorphism, and encapsulation.

OOP is based on the things you acknowledge are advanced topics.  Ipso
facto, OOP is advanced, right?  ;)



I think there's actually more agreement than disagreement here. Nobody
is arguing that you should be teaching polymorphism on the second day,
just that you can start to introduce objects at an early stage. I
mean, if you can start with:

x = 500;
trace(x);

... you could certainly also start with:

myShape.x = 500;
  

I hope that you meant
myshape.setX(500); 

The core basics of OOP--using fields and methods--are not that far
beyond the core basics of programming--using variables and functions.
Of course inheritance, polymorphism, encapsulation, etc. come much
later, and design patterns even later. No one would dispute that, I
think.
  

___
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-21 Thread Jer Brand
Uncompressed, yeah, that'd be ugly. But how does something like the
following (guesswork code) perform?

foo:BitmapData = new BitmapData() ;
/* put your image data in there, with whatever method */

bar:ByteArray = foo.getPixels(myImageRect) ;
var.compress() ;

Again, mostly asking because I don't know enough about AS3/FP9. It's
supposed to be using zlib compression on the ByteArray but for all I know
it's still doesn't compress enough or quickly enough to be useful. I'm
totally leaving out the question of conversion after post or Socket or
whatever used server side to get the job done, but I have to assume it
wouldn't be difficult using GD or ImageMagic.

Anyone used this?

On 8/21/07, Alan MacDougall [EMAIL PROTECTED] wrote:

 Jer Brand wrote:
  Coming from someone who's never done this, and doesn't know if it's
  possible, but:
 
  Would it be possible to capture your user created design in BitmapData
 (I
  was fairly sure there's a method to extract pixel info from a MovieClip,
  correct?) then transmit that back to the server and use PHP and the
 image
  libs to create a bitmap image?
 
  Again, complete shot in the dark here.. I'm not even sure if the BD
 produced
  by Flash is usable by any graphics library, PHP or otherwise.
 
 Yes, technically, but transmitting that much bitmap data from Flash to
 the server, pixel by pixel, takes a great deal of time and bandwidth. I
 strongly recommend against the attempt.

 ___
 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-21 Thread Kerry Thompson
Troy Rollins wrote:
 
 since everyone knows that cats don't know their own names.

Unless you believe e. e. cummings ^_^

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-21 Thread David Ngo
What kind of argument is that? I've never learned to ski and I was able to
pick up snowboarding. One is not dependant upon the other.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark
Winterhalder
Sent: Tuesday, August 21, 2007 4:41 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Intro to OOP using ActionScript

 If you take somebody snowboarding and force them to learn how to do a
 720 without teaching them anything else, they will eventually be able to
 do a 720.  If you instead teach them all the basic moves, how to enter
 and exit tricks, and then move into 180s, 270s and 360s, they'll be much
 better at snowboarding in general and will naturally learn 720s soon
after.

You can't just teach somebody to snowboard without first teaching them
how to ski.
They need to get a feeling for the snow first, on two boards, learn
how to use the lift and so on.

But in terms of programming, I agree with Ron. OOP is more natural and
closer to real life experiences.

Mark


On 8/21/07, Steven Sacks [EMAIL PROTECTED] wrote:
 Procedural isn't wrong.  OOP isn't right.  They're used for different
 purposes.  The fact is, OOP is a trade off for flexibility and
 scalability over speed; speed in development, speed in execution.
 Procedural programming has its place (ask any game developer).

 Procedural programming is a necessary and important first step in
 learning how to code.  It's the best way to learn how programming works
 because it's a simplified approach and won't get in the way of learning
 basic syntax.

 People with no programming experience will not understand abstract
 concepts like classes, inheritance, polymorphism, and encapsulation -
 the very things that make up OOP.

 OOP is a specialized dialect, built upon the basic language of
 programming.  If you don't learn the basics, you can't truly learn the
 dialect.  It's akin to learning phrases from a French phrase book and
 going to Paris on vacation versus learning how conjugation and verb
 tenses work combined with vocabulary.  Who is going to be more
 successful at carrying on rudimentary conversations, or understanding
 what's being said to them?

 If we take two students and you teach them OOP for 1 month and I teach
 them procedural for two weeks and then OOP for two weeks, my student
 will be further along than your student. The reason is simple.  When you
 learn the fundamentals first you have a greater capacity for
 understanding of more advanced topics.

 If you take somebody snowboarding and force them to learn how to do a
 720 without teaching them anything else, they will eventually be able to
 do a 720.  If you instead teach them all the basic moves, how to enter
 and exit tricks, and then move into 180s, 270s and 360s, they'll be much
 better at snowboarding in general and will naturally learn 720s soon
after.

 Plus, if you sit down with non-programmers to teach them OOP, and you
 have to teach them the basics first, you will find yourself naturally
 teaching them procedural programming because every time you try to move
 into topics OOP, your students will get lost and you'll end up circling
 back to explain the basics again.

 OOP is not a beginner topic.

 ___
 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-21 Thread Kerry Thompson
Mark Winterhalder wrote:
 
 You can't just teach somebody to snowboard without first teaching them
 how to ski.

Ooh, that's going to get a reaction from the boarders. I'm going to go wax
my skis and stay out of this one ^_^

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-21 Thread Kerry Thompson
Ron Wheeler wrote:
 
 Alan MacDougall wrote:
 
  I don't think you need to call it procedural. Just call it the basic
  building blocks that they will need for OOP (or procedural, for that
  matter).
 
  There's not that much difference, really, between OOP and procedural.
  OOP

Actually, that's what Kerry Thompson wrote. Alan was quoting me.

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-21 Thread Dave Mennenoh
.I do not believe that starting people out doing things the wrong way is 
ever a good start. Teach OOP from the day one. Not as a name or a theory 
but as a normal way to program.


Right on Ron.



Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ 


___
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-21 Thread Dave Mennenoh
Of course inheritance, polymorphism, encapsulation, etc. come much later, 
and design patterns even later. No one would dispute that, I think.


I'd disagree a little. Encapsulation especially, is a really simple concept. 
It's about organization and teaching students to stay organize - ie to keep 
cats in one class and dogs in another is not advanced - no more so than 
having them build a function that can be reused.


Lots of programmers never need design patterns as they don't help much 
unless your architecting large apps, and lots of Flash programmers aren't 
developing those kinds of apps. Keeping your code organized however should 
be taught from day one and certain oop concepts are perfect for that.


It's pretty awesome to show students something like a utility class that 
might store a url for a php script - and use that script in a bunch of 
movies... then show them how one simple change in the class affects every 
movie. This is the kind of thing they will appreciate and make use of. 
Newbies figure out templates in Dreamweaver... sticking code in a class is 
about the same.


I typically use a combination of OOP and procedural - keeping code pertinent 
to a given movie in that movie if it makes sense, while using classes to 
store code I use in multiple movies. I usually find it pretty awkward to try 
and objectify an entire project - it just doesn't help. I find the combo 
works quite well for me - and besides, it's still all oop if you think about 
it...


Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ 


___
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-21 Thread Dave Watts
  You can't just teach somebody to snowboard without first 
  teaching them how to ski.
 
 Ooh, that's going to get a reaction from the boarders. I'm 
 going to go wax my skis and stay out of this one ^_^

Aaand now, this thread is completely OT. Please keep to the thread topic or
don't respond. Thanks!

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!

___
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-21 Thread T. Michael Keesey
On 8/21/07, Ron Wheeler [EMAIL PROTECTED] wrote:
 
  myShape.x = 500;

 I hope that you meant
 myshape.setX(500);

Huh?

No, that's not part of the flash.display.Shape API. And while it's
true that x in this context is actually not a true field, but a pair
of methods (__get__x and __set__x, not getX and setX) disguised as a
field, I think you can safely ignore that in an introductory class.
-- 
Mike Keesey
___
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] acrobat detector

2007-08-21 Thread nik crosina
Hi,

Is there a way I can detect if Acrobat is installed on the host
computer, when I run a projector / .exe (I create the exe from swf
with Zinc) from DVD? I know there are ways to use mdm script (Zinc's
own, but is there a way of doing this from within Flash?

Are there any issues (like, it only works on Win XP, not on Win2K, Win
98 etc, or only for certain versions of Acrobat), and is it possible?

Thanks,

Nik C
___
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] New Beta video probs on OSX

2007-08-21 Thread Radley Marx
Hey all,

Very happy to see the new release. H.264. Oh yah.

I know it's really soon, but has anyone else had problems with the new beta
build?

In particular, I'm experiencing audio artifacts and sync slipping on OSX.
Happens in both in Firefox (2.0.0.6)  Safari.

Also, the new beta resolves the wmode opaque  transparent vs.
FullScreen problem (good). Unfortunately, in some cases with Firefox, the
swf may disappear when exiting fullscreen mode (bad). Actions such as
resizing the browser and pulling up the context menu will restore it.


-radley
___
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-21 Thread Alan MacDougall

Jer Brand wrote:

Uncompressed, yeah, that'd be ugly. But how does something like the
following (guesswork code) perform?

foo:BitmapData = new BitmapData() ;
/* put your image data in there, with whatever method */

bar:ByteArray = foo.getPixels(myImageRect) ;
var.compress() ;

Again, mostly asking because I don't know enough about AS3/FP9. It's
supposed to be using zlib compression on the ByteArray but for all I know
it's still doesn't compress enough or quickly enough to be useful. I'm
totally leaving out the question of conversion after post or Socket or
whatever used server side to get the job done, but I have to assume it
wouldn't be difficult using GD or ImageMagic.
  
Well, it might be easier in Actionscript 3.0. I know that in 2.0 it was 
a major pain, even with gzip compression... I know Grant Skinner got it 
working, you might want to check out this blog entry: 
http://www.gskinner.com/blog/archives/2006/03/saving_bitmapda.html  ... 
and this attempted util: http://www.quasimondo.com/archives/000572.php


I've researched this problem before, and came to the conclusion that it 
was a last resort at best. But try out Klingermann's demo on Quasimondo 
and see how fast it runs for you. On some computers or connections it is 
very slow indeed. You may be able to optimize it, though -- if you try 
and succeed, please give back by posting it somewhere or open-sourcing 
it on a well-known site like osflash.org. If you aren't discouraged 
after all I've said, I wish you luck!


___
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: patterns derail!

2007-08-21 Thread Alan MacDougall

Dave Mennenoh wrote:


Lots of programmers never need design patterns as they don't help much 
unless your architecting large apps, and lots of Flash programmers 
aren't developing those kinds of apps. Keeping your code organized 
however should be taught from day one and certain oop concepts are 
perfect for that.


There are plenty of patterns that can apply well to small-scale 
projects: take undo. How would you cleanly support undo without Command? 
Other patterns like State, Adapter, Observer (especially to overcome the 
sadistic limitations of Flash's single callbacks -- MovieClip -- or 
single listeners -- MovieClipLoader)... all have uses even in a sporty 
little website tchotchke. Not every 'design pattern' is something like 
MVC or data mapping or dynamically-configured factories.


On the other hand, I got your point.

___
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-21 Thread Mark Winterhalder
On 8/21/07, David Ngo [EMAIL PROTECTED] wrote:
 What kind of argument is that? I've never learned to ski and I was able to
 pick up snowboarding. One is not dependant upon the other.

Sigh... I guess I should know better than attempting irony in an email.

Of course you can learn how to snowboard without first learning how to
ski. It's even easier. To claim otherwise would be silly.

I think with OOP it's the same thing.

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] Intro to OOP using ActionScript

2007-08-21 Thread Ron Wheeler
That is the problem when you have to use someone's API and it does not 
follow standards.
They probably wrote it before we know the right way to do getters and 
setters - or they never bothered to read up on the state of the art in 
programming.


Ron

T. Michael Keesey wrote:

On 8/21/07, Ron Wheeler [EMAIL PROTECTED] wrote:
  

myShape.x = 500;
  

I hope that you meant
myshape.setX(500);



Huh?

No, that's not part of the flash.display.Shape API. And while it's
true that x in this context is actually not a true field, but a pair
of methods (__get__x and __set__x, not getX and setX) disguised as a
field, I think you can safely ignore that in an introductory class.
  

___
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-21 Thread T. Michael Keesey
On 8/21/07, Ron Wheeler [EMAIL PROTECTED] wrote:

 T. Michael Keesey wrote:
  On 8/21/07, Ron Wheeler [EMAIL PROTECTED] wrote:
 
  myShape.x = 500;
 
  I hope that you meant
  myshape.setX(500);
 
 
  Huh?
 
  No, that's not part of the flash.display.Shape API. And while it's
  true that x in this context is actually not a true field, but a pair
  of methods (__get__x and __set__x, not getX and setX) disguised as a
  field, I think you can safely ignore that in an introductory class.

 That is the problem when you have to use someone's API and it does not
 follow standards.
 They probably wrote it before we know the right way to do getters and
 setters - or they never bothered to read up on the state of the art in
 programming.

Uh, you do realize that is Adobe's own API, right?

http://livedocs.adobe.com/flex/2/langref/flash/display/Shape.html#propertySummary

That is the proper way to do getters and setters in ActionScript
(2.0 and 3.0). This isn't Java.

-- 
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: patterns derail!

2007-08-21 Thread Ron Wheeler



Alan MacDougall wrote:

Dave Mennenoh wrote:


Lots of programmers never need design patterns as they don't help 
much unless your architecting large apps, and lots of Flash 
programmers aren't developing those kinds of apps. Keeping your code 
organized however should be taught from day one and certain oop 
concepts are perfect for that.


There are plenty of patterns that can apply well to small-scale 
projects: take undo. How would you cleanly support undo without 
Command? Other patterns like State, Adapter, Observer (especially to 
overcome the sadistic limitations of Flash's single callbacks -- 
MovieClip -- or single listeners -- MovieClipLoader)... all have uses 
even in a sporty little website tchotchke. Not every 'design pattern' 
is something like MVC or data mapping or dynamically-configured 
factories.


On the other hand, I got your point.
Design patterns are not some esoteric way of doing things. They are 
solutions to common programming situations that came up over and over again.
For years, we all wrote our own way to accomplish these tasks. Finally 
some experienced guys looked at what they were doing and what other 
people were doing. They had a Holy Sh*t moment when they realized that 
they had 50 ways to do exactly the same thing. They looked at the 
various ways and tried to pick the best strategy.
A design pattern book is not a road map to building an application. It 
is a collection of best practices for the tasks that come up all the time.
It hard to imagine even a small program that could not use at least one 
of the design patterns that have been identified.
It is hard to imagine a Flash program that would not be a candidate for 
several design patterns. A game with no Listener/Observer is hard to 
imagine. (How many onEnterFrames does it take to kill a program? )
How do you handle onLoad's famous scope?  There is a design pattern for 
this and it gets explained every time a new flashcoder tries to read an 
XML file. You can probably find this in the archives once every 2 weeks. 
They do not call it a Design Pattern but it is.


If you doubt the usefulness of Design Patterns, read Head First Design 
Patterns. You will read each section and sometimes be amazed at the 
simplicity of the solution and wonder why you never figured this out. In 
other sections you will say What is the big deal? I do it like this all 
the time.


It is not magic or advanced. If a pattern was shown to a new programmer 
without giving it a fancy name, they would just accept it as the best 
way to do the task and would never give it moment's thought. If you were 
trying to get the class to build a game, you would be foolish not to 
explain the Observer pattern. It is very simple and the alternatives are 
often really ugly and overly complex and frustrate the best of us.



Ron


___
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-21 Thread Ron Wheeler



T. Michael Keesey wrote:

On 8/21/07, Ron Wheeler [EMAIL PROTECTED] wrote:
  

T. Michael Keesey wrote:


On 8/21/07, Ron Wheeler [EMAIL PROTECTED] wrote:

  

myShape.x = 500;

  

I hope that you meant
myshape.setX(500);



Huh?

No, that's not part of the flash.display.Shape API. And while it's
true that x in this context is actually not a true field, but a pair
of methods (__get__x and __set__x, not getX and setX) disguised as a
field, I think you can safely ignore that in an introductory class.
  

That is the problem when you have to use someone's API and it does not
follow standards.
They probably wrote it before we know the right way to do getters and
setters - or they never bothered to read up on the state of the art in
programming.



Uh, you do realize that is Adobe's own API, right?

  
I have been building RIAs in Flash since AS1. I am under no illusions 
about  Macromedia. They wrote AS1without reading ECMA spec or even 
looking at Java. We were using Eclipse and talking about in this forum, 
2 years before Macromedia adopted it.
The lack of standardization in the old components and Classes is not 
something to emulate or teach as a good model.
To be fair, they have really got a lot better once they realized that 
there is a strong community that uses Flash for building real 
applications that have to be robust and maintainable in the real world.


Ron

http://livedocs.adobe.com/flex/2/langref/flash/display/Shape.html#propertySummary

That is the proper way to do getters and setters in ActionScript
(2.0 and 3.0). This isn't Java.

  

___
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-21 Thread Muzak
There are JPEG en PNG encoder classes for AS3
http://code.google.com/p/as3corelib/
http://as3corelib.googlecode.com/svn/trunk/src/com/adobe/images/

regards,
Muzak

- Original Message - 
From: Jer Brand [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, August 21, 2007 10:49 PM
Subject: Re: [Flashcoders] save swf


 Uncompressed, yeah, that'd be ugly. But how does something like the
 following (guesswork code) perform?

 foo:BitmapData = new BitmapData() ;
 /* put your image data in there, with whatever method */

 bar:ByteArray = foo.getPixels(myImageRect) ;
 var.compress() ;

 Again, mostly asking because I don't know enough about AS3/FP9. It's
 supposed to be using zlib compression on the ByteArray but for all I know
 it's still doesn't compress enough or quickly enough to be useful. I'm
 totally leaving out the question of conversion after post or Socket or
 whatever used server side to get the job done, but I have to assume it
 wouldn't be difficult using GD or ImageMagic.

 Anyone used this?



___
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] New Beta video probs on OSX

2007-08-21 Thread Muzak
http://www.adobe.com/cfusion/mmform/index.cfm?name=fp_beta_feedback

- Original Message - 
From: Radley Marx [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, August 22, 2007 1:00 AM
Subject: [Flashcoders] New Beta video probs on OSX


 Hey all,

 Very happy to see the new release. H.264. Oh yah.

 I know it's really soon, but has anyone else had problems with the new beta
 build?

 In particular, I'm experiencing audio artifacts and sync slipping on OSX.
 Happens in both in Firefox (2.0.0.6)  Safari.

 Also, the new beta resolves the wmode opaque  transparent vs.
 FullScreen problem (good). Unfortunately, in some cases with Firefox, the
 swf may disappear when exiting fullscreen mode (bad). Actions such as
 resizing the browser and pulling up the context menu will restore it.


 -radley


___
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