Re: [Flashcoders] Custom MovieClip Classes

2008-03-24 Thread Steven Sacks
Beginners should not be coding AS3.  It's really that simple.  AS3 
requires a whole new level of strict coding practices and is not for 
beginners.  Null pointer exceptions are extremely important to catch 
because they can cause a Flash app to crash, and the foresight to know 
where and how those will trip you up requires a lot of coding 
experience.  I've been programming over 13 years and I still get caught 
by the occasional null pointer.


You have to cast everything in AS3 anyway, and understanding why you 
have to cast requires understanding of OOP and strict coding practices.  
AS3 is very strict.  It's not for everyone, in fact, it's not for most 
people.  There's a reason that AS2 won't be going anywhere for awhile, 
and it's because it's forgiving and fails gracefully and both 
non-programmers and lazy programmers appreciate that.  I know I miss it 
sometimes.  Writing try catches with nothing in the catch in order to 
fail gracefully is hacky, but when I've got a deadline looming, I'm glad 
it's there because there's no way I'm going back to AS2 again.  ;)

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


[Flashcoders] books for flash programming

2008-03-24 Thread Naveen Bhaskar
Hi,

I am a flash designer and I am in intermediate in programming.(AS2).

anybody pls tellme what are the good books I can refer.
or is there any good website for learning programming and also have good
tutorials...


thanks in advance

navii
-
thanks and regards
Naveen Bhaskar Menon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Calling Event methods and Other Classes methods.

2008-03-24 Thread Cor
NO, ofcourse it has to be  set to public and static.
That’s the way to secure your objects and events being triggered or not

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Omar Fouad
Verzonden: zondag 23 maart 2008 20:49
Aan: Flash Coders List
Onderwerp: Re: [Flashcoders] Calling Event methods and Other Classes
methods.

Even if myButton is not static?

and even so,  if in main

myButton.addEventListener(MouseEvent.CLICK, fun);

and in other Class

Main.myButton.  now what?



On Sun, Mar 23, 2008 at 3:52 PM, Cor [EMAIL PROTECTED] wrote:

 I noticed I didn't answer your question.

 In another class file you can trigger the button like this:

 Main.myButton.whatever...

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Namens Omar Fouad
 Verzonden: zondag 23 maart 2008 14:28
 Aan: Flash Coders List
 Onderwerp: [Flashcoders] Calling Event methods and Other Classes methods.

 look at this.

 Main FLA Document Class

 public class Main extends Sprite {
   public function Main() {
  myButton.addEventListener(MouseEvent.CLICK, fun)
   }

   public function fun(e:MouseEvent):void {
  trace(Clicked);
   }
 }

 Now supposed I need to call the function fun by some other function or 
 object. How?

 And If i have another Class, How can i reach this function and call it?


 Thanks in advance.

 --
 Omar M. Fouad - Digital Emotions
 http://www.omarfouad.net

 This e-mail and any attachment is for authorised use by the intended
 recipient(s) only. It may contain proprietary material, confidential 
 information and/or be subject to legal privilege. It should not be 
 copied, disclosed to, retained or used by, any other party. If you are 
 not an intended recipient then please promptly delete this e-mail and 
 any attachment and all copies and inform the sender. Thank you.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 --
 No virus found in this incoming message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 
 22-3-2008
 16:43


 No virus found in this incoming message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 
 22-3-2008
 16:43


 No virus found in this outgoing message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 
 22-3-2008
 16:43


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




--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


--
No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008
16:43

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008
16:43
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008
16:43
 


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


RE: [Flashcoders] Variable scope within for loops: reusing iteratorvariables

2008-03-24 Thread Cor
Using it youre way is possible when you do it within  a function or class
because then they are private by default

Other you could use it this way
Example 1:

for (var i:int = 0; i  someArray.length; i ++) {
  // do something cool
}

for (i = 0; i  someOtherArray.length; i ++) {
  // do something even cooler
}

---
Example 2:
var i:int; //or uint if I is never negative

for (i = 0; i  someArray.length; i ++) {
  // do something cool
}

for (i = 0; i  someOtherArray.length; i ++) {
  // do something even cooler
}

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50
 

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


Re: [Flashcoders] Variable scope within for loops: reusing iteratorvariables

2008-03-24 Thread jonathan howe
Hmm... it is within a class... and that's when I'm getting the warnings. Or
did you mean just in general to reiterate that variables are locally scoped
to functions and classes and not to for loops?

I should have mentioned in my subject that this is AS3. So far everyone's
alternatives and explanations make sense, I am just curious now as to the
reasoning. Either this is a change from AS2 - AS3 or since AS2 wasn't as
strict, it let me do it before. Maybe the explanation lies in the ECMA
guidelines somewhere. Anyway, thanks for the discussion, gang.

-jonathan


On Mon, Mar 24, 2008 at 3:53 AM, Cor [EMAIL PROTECTED] wrote:

 Using it youre way is possible when you do it within  a function or class
 because then they are private by default

 Other you could use it this way
 Example 1:

 for (var i:int = 0; i  someArray.length; i ++) {
  // do something cool
 }

 for (i = 0; i  someOtherArray.length; i ++) {
  // do something even cooler
 }

 ---
 Example 2:
 var i:int; //or uint if I is never negative

 for (i = 0; i  someArray.length; i ++) {
  // do something cool
 }

 for (i = 0; i  someOtherArray.length; i ++) {
  // do something even cooler
 }

 No virus found in this outgoing message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
 18:50


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




-- 
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Variable scope within for loops: reusingiteratorvariables

2008-03-24 Thread Cor
Indeed, I was talking about AS3 too.

For reasoning: Its like the real world - every object is UNIQUE, therefor
there can only exist ONE of it.
You can make copies (instances) but they will have there own unique name.
You can use it as much as you like but you can't CREATE the same object
(within its scope) again.

Does this explain it for you?

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens jonathan howe
Verzonden: maandag 24 maart 2008 9:14
Aan: Flash Coders List
Onderwerp: Re: [Flashcoders] Variable scope within for loops:
reusingiteratorvariables

Hmm... it is within a class... and that's when I'm getting the warnings. Or
did you mean just in general to reiterate that variables are locally scoped
to functions and classes and not to for loops?

I should have mentioned in my subject that this is AS3. So far everyone's
alternatives and explanations make sense, I am just curious now as to the
reasoning. Either this is a change from AS2 - AS3 or since AS2 wasn't as
strict, it let me do it before. Maybe the explanation lies in the ECMA
guidelines somewhere. Anyway, thanks for the discussion, gang.

-jonathan


On Mon, Mar 24, 2008 at 3:53 AM, Cor [EMAIL PROTECTED] wrote:

 Using it youre way is possible when you do it within  a function or 
 class because then they are private by default

 Other you could use it this way
 Example 1:

 for (var i:int = 0; i  someArray.length; i ++) {
  // do something cool
 }

 for (i = 0; i  someOtherArray.length; i ++) {
  // do something even cooler
 }

 ---
 Example 2:
 var i:int; //or uint if I is never negative

 for (i = 0; i  someArray.length; i ++) {
  // do something cool
 }

 for (i = 0; i  someOtherArray.length; i ++) {
  // do something even cooler
 }

 No virus found in this outgoing message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 
 23-3-2008 18:50


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




--
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-- 
No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50
 

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


Re: [Flashcoders] Variable scope within for loops: reusingiteratorvariables

2008-03-24 Thread jonathan howe
I totally agree with your explanation, and the part that I am being pouty
about is: Why isn't the variable's scope confined to the loop?

a la:

for (var i:int = 0; i  limit; i ++) {  // variable is instantiated
   // scope of variable
} // variable is discarded

instead of it being what several of you have described.

-jonathan

On Mon, Mar 24, 2008 at 4:22 AM, Cor [EMAIL PROTECTED] wrote:

 Indeed, I was talking about AS3 too.

 For reasoning: Its like the real world - every object is UNIQUE, therefor
 there can only exist ONE of it.
 You can make copies (instances) but they will have there own unique name.
 You can use it as much as you like but you can't CREATE the same object
 (within its scope) again.

 Does this explain it for you?

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Namens jonathan howe
 Verzonden: maandag 24 maart 2008 9:14
 Aan: Flash Coders List
 Onderwerp: Re: [Flashcoders] Variable scope within for loops:
 reusingiteratorvariables

 Hmm... it is within a class... and that's when I'm getting the warnings.
 Or
 did you mean just in general to reiterate that variables are locally
 scoped
 to functions and classes and not to for loops?

 I should have mentioned in my subject that this is AS3. So far everyone's
 alternatives and explanations make sense, I am just curious now as to the
 reasoning. Either this is a change from AS2 - AS3 or since AS2 wasn't as
 strict, it let me do it before. Maybe the explanation lies in the ECMA
 guidelines somewhere. Anyway, thanks for the discussion, gang.

 -jonathan


 On Mon, Mar 24, 2008 at 3:53 AM, Cor [EMAIL PROTECTED] wrote:

  Using it youre way is possible when you do it within  a function or
  class because then they are private by default
 
  Other you could use it this way
  Example 1:
 
  for (var i:int = 0; i  someArray.length; i ++) {
   // do something cool
  }
 
  for (i = 0; i  someOtherArray.length; i ++) {
   // do something even cooler
  }
 
  ---
  Example 2:
  var i:int; //or uint if I is never negative
 
  for (i = 0; i  someArray.length; i ++) {
   // do something cool
  }
 
  for (i = 0; i  someOtherArray.length; i ++) {
   // do something even cooler
  }
 
  No virus found in this outgoing message.
  Checked by AVG.
  Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date:
  23-3-2008 18:50
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 --
 No virus found in this incoming message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
 18:50

 No virus found in this incoming message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
 18:50


 No virus found in this outgoing message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
 18:50


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




-- 
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Custom MovieClip Classes

2008-03-24 Thread jonathan howe
Here's another reason why I found using that setting to be troublesome. I
haven't confirmed it but I believe it interferes with inheritance.
For example, let's say I make a symbolA and link it to class SuperClass.
Inside symbolA I have a TextField called _txt
Then I make a symbolB based on symbolA, and maybe I change something visual
but it also has a TextField called _txt
Finally, I link symbolB to a class SubClass and then create an as file for
that class and in it I declare SubClass extends SuperClass.

So my belief is that, because Flash is not smart enough to omit the
declaration of the _txt in SymbolB,  you'll get the following error:

1152: A conflict exists with inherited definition test:SuperClass._txt in
namespace public.

There doesn't seem to be a way around this, short of naming it something
different in symbolB, which may defeat some of your reasoning for using
inheritance.

When I discovered this, that was the moment I abandoned the setting for
good. For a while, it seemed like a nice feature that resembled
code-behind/markup pairings seen in other frameworks like WPF. Nope!

-jonathan


On Mon, Mar 24, 2008 at 3:02 AM, Steven Sacks [EMAIL PROTECTED]
wrote:

 Beginners should not be coding AS3.  It's really that simple.  AS3
 requires a whole new level of strict coding practices and is not for
 beginners.  Null pointer exceptions are extremely important to catch
 because they can cause a Flash app to crash, and the foresight to know
 where and how those will trip you up requires a lot of coding
 experience.  I've been programming over 13 years and I still get caught
 by the occasional null pointer.

 You have to cast everything in AS3 anyway, and understanding why you
 have to cast requires understanding of OOP and strict coding practices.
 AS3 is very strict.  It's not for everyone, in fact, it's not for most
 people.  There's a reason that AS2 won't be going anywhere for awhile,
 and it's because it's forgiving and fails gracefully and both
 non-programmers and lazy programmers appreciate that.  I know I miss it
 sometimes.  Writing try catches with nothing in the catch in order to
 fail gracefully is hacky, but when I've got a deadline looming, I'm glad
 it's there because there's no way I'm going back to AS2 again.  ;)
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] reparent child to halt scroll

2008-03-24 Thread Allandt Bik-Elliott (Receptacle)

i guess this one's not something you guys want to touch eh?

never mind then

a


On 21 Mar 2008, at 10:16, Allandt Bik-Elliott (Receptacle) wrote:


noone have the time to look at this one?


On 20 Mar 2008, at 15:25, Allandt Bik-Elliott (Receptacle) wrote:


hi guys

i'm a bit stuck with a project i'm working on. I have a timeline  
which all runs off a scrollbar similar to the one in the kirupa  
forum (http://www.kirupa.com/forum/showthread.php?t=245468 -  
amended to go horizontal and us Tweener to act a bit more smoothly)


at the moment, i have 2 sprites, 1 scrolls with the scrollbar and  
1 doesn't.
on the scrolling sprite i have several panels and the start of  
some ticks plus a mask for the non-scrolling textfield which is on  
the other sprite


everything works as it should with this, however - i'd like to  
push it a bit further so that the title (mainTitle) scrolls with  
the rest of the panels but when it hits the left hand side, it  
reparents to the non-scrolling sprite and stays there
you can see an example of this at http://www.bbc.co.uk/history/ 
british/launch_tl_british.shtml - which i think is a really  
elegant solution to the problem of overlong panels, designed to  
take several points of interest


i've tried having everything on the scrollable sprite and  moving  
the title backwards using a SliderEvent (custom event for the  
scrollbar) but the globalToLocal() method just gets really jumpy  
and doesn't seem to put the titles in the right place or return  
them correctly


this is my class:

CODE
package
{
//package imports
import flash.display.Sprite;

//scrollbar imports
import com.caurina.transitions.*;
import flash.geom.*;
import flash.events.*;
import flash.text.TextFormat;
import com.receptacle.utils.*;

internal class TimelineArea extends Sprite
{
// class variable declarations
private var cp:CommonProperties;
private var taTitleBarY;
private var taPanelY:uint;
private var taPanelHeight:uint
private var scrollableBase:Sprite;
private var scrollbar:Scrollbar
private var stage_width:uint;
private var stage_height:uint;

private var panelY:uint;
private var panelColour:uint;
private var taTitleBarHeight:uint;
private var nonScrollableBase:Sprite;
private var commonGrey:uint;
private var subheadingFont:String;
private var headingFont:String;

// constructor
public function TimelineArea():void
{
setVars();
addTicks();
addPanels();
addPeriodBars();
addImageLandmark();
initialiseTimelineScrollBar();
}

private function setVars()
{
scrollbar = new Scrollbar();
cp = new CommonProperties();
stage_width  = cp.stage_width;
stage_height = cp.stage_height;
taTitleBarHeight = cp.taTitleBarHeight;
taTitleBarY  = cp.taTitleBarY;
taPanelY = cp.taPanelY;
taPanelHeight= cp.taPanelHeight;
commonGrey   = cp.tickColour;
headingFont  = cp.headingFont;
subheadingFont   = cp.subheadingFont;

scrollbar.x = 16;
scrollbar.y = 550-cp.titleBarHeight;

scrollableBase = new Sprite();
nonScrollableBase = new Sprite();
scrollableBase.y = 0;

addChild(scrollableBase);
addChild(nonScrollableBase);
}

private function addPanels():void
{
trace (Background panels added);

			createPanel(0, 1000, 0xB6, Prehistory, c. 1.7 million -  
4000 B.C.E.);
			createPanel(1000, 2000, 0xB65B00, Early Civilisations, c.  
1.7 million - 4000 B.C.E.);
			createPanel(3000, 2000, 0x123456, Sumfink Else, c. 1.7  
million - 4000 B.C.E.);



}

		private function createPanel(panelX:Number, panelWidth:int,  
panelColour:uint, pTitle:String, date:String):void

{
			// SimpleRectangle class (rColour:uint, rOutlineColour:uint,  
rX:Number, rY:Number, rWidth:uint, rHeight:uint)
			var 

RE: [Flashcoders] Variable scope within for loops:reusingiteratorvariables

2008-03-24 Thread Cor
You should ask the creators of AS3 that.
Its their choice 

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens jonathan howe
Verzonden: maandag 24 maart 2008 9:35
Aan: Flash Coders List
Onderwerp: Re: [Flashcoders] Variable scope within for
loops:reusingiteratorvariables

I totally agree with your explanation, and the part that I am being pouty
about is: Why isn't the variable's scope confined to the loop?

a la:

for (var i:int = 0; i  limit; i ++) {  // variable is instantiated
   // scope of variable
} // variable is discarded

instead of it being what several of you have described.

-jonathan

On Mon, Mar 24, 2008 at 4:22 AM, Cor [EMAIL PROTECTED] wrote:

 Indeed, I was talking about AS3 too.

 For reasoning: Its like the real world - every object is UNIQUE, 
 therefor there can only exist ONE of it.
 You can make copies (instances) but they will have there own unique name.
 You can use it as much as you like but you can't CREATE the same 
 object (within its scope) again.

 Does this explain it for you?

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Namens jonathan 
 howe
 Verzonden: maandag 24 maart 2008 9:14
 Aan: Flash Coders List
 Onderwerp: Re: [Flashcoders] Variable scope within for loops:
 reusingiteratorvariables

 Hmm... it is within a class... and that's when I'm getting the warnings.
 Or
 did you mean just in general to reiterate that variables are locally 
 scoped to functions and classes and not to for loops?

 I should have mentioned in my subject that this is AS3. So far 
 everyone's alternatives and explanations make sense, I am just curious 
 now as to the reasoning. Either this is a change from AS2 - AS3 or 
 since AS2 wasn't as strict, it let me do it before. Maybe the 
 explanation lies in the ECMA guidelines somewhere. Anyway, thanks for the
discussion, gang.

 -jonathan


 On Mon, Mar 24, 2008 at 3:53 AM, Cor [EMAIL PROTECTED] wrote:

  Using it youre way is possible when you do it within  a function or 
  class because then they are private by default
 
  Other you could use it this way
  Example 1:
 
  for (var i:int = 0; i  someArray.length; i ++) {
   // do something cool
  }
 
  for (i = 0; i  someOtherArray.length; i ++) {
   // do something even cooler
  }
 
  ---
  Example 2:
  var i:int; //or uint if I is never negative
 
  for (i = 0; i  someArray.length; i ++) {
   // do something cool
  }
 
  for (i = 0; i  someOtherArray.length; i ++) {
   // do something even cooler
  }
 
  No virus found in this outgoing message.
  Checked by AVG.
  Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date:
  23-3-2008 18:50
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 
 04101 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 --
 No virus found in this incoming message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 
 23-3-2008 18:50

 No virus found in this incoming message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 
 23-3-2008 18:50


 No virus found in this outgoing message.
 Checked by AVG.
 Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 
 23-3-2008 18:50


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




--
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-- 
No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50
 

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


Re: [Flashcoders] books for flash programming

2008-03-24 Thread Allandt Bik-Elliott (Receptacle)

gotoandlearn.com
learnflash.com
flashkit.com

essential actionscript 3.0 (colin moock)

i'd start at these

a


On 24 Mar 2008, at 07:21, Naveen Bhaskar wrote:



I am a flash designer and I am in intermediate in programming.(AS2).

anybody pls tellme what are the good books I can refer.
or is there any good website for learning programming and also have  
good

tutorials...


thanks in advance



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


[Flashcoders] Help needed AS3 -- [Embed(source='library.swf' symbol='backgroud_mc')]

2008-03-24 Thread Cor
Hi list,

I have a library.swf with a movie clip Background_mc in the library
I am trying to embed from this swf into another through a class.
In this  document class I do:
[Embed(source='library.swf'  symbol='Backgroud_mc')]
Private var Background_mc:Class;
Private var _myBG:MovieClip

Function init():void{
myBG = new  Background_mc();
addChild(myBG)
}

This throws an error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.

What am I doing wrong?

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50
 

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


Re: [Flashcoders] Variable scope within for loops: reusing iterator variables

2008-03-24 Thread Andrew Sinning
You are correct Jonathan, but loop blocks are delimited by brackets, so 
the for ( ... ) declaration is outside of the loop block.


jonathan howe wrote:

I had always thought that the scope of variables declared in the
initialization part of the for loop were local to the loop block


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


Re: [Flashcoders] Help needed AS3 -- [Embed(source='library.swf' symbol='backgroud_mc')]

2008-03-24 Thread Glen Pike

Try

_myBG = new instead of myBG = new


Cor wrote:

Hi list,

I have a library.swf with a movie clip Background_mc in the library
I am trying to embed from this swf into another through a class.
In this  document class I do:
[Embed(source='library.swf'  symbol='Backgroud_mc')]
Private var Background_mc:Class;
Private var _myBG:MovieClip

Function init():void{
myBG = new  Background_mc();
addChild(myBG)
}

This throws an error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.

What am I doing wrong?

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008

18:50
 


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


  


--

Glen Pike
01736 759321
www.glenpike.co.uk http://www.glenpike.co.uk
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Help needed AS3 -- [Embed(source='library.swf'symbol='backgroud_mc')]

2008-03-24 Thread Cor
I know, typo in this topic mail but not in my class.
Thanks! 

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Glen Pike
Verzonden: maandag 24 maart 2008 14:16
Aan: Flash Coders List
Onderwerp: Re: [Flashcoders] Help needed AS3 --
[Embed(source='library.swf'symbol='backgroud_mc')]

Try

_myBG = new instead of myBG = new


Cor wrote:
 Hi list,

 I have a library.swf with a movie clip Background_mc in the library I 
 am trying to embed from this swf into another through a class.
 In this  document class I do:
 [Embed(source='library.swf'  symbol='Backgroud_mc')] Private var 
 Background_mc:Class; Private var _myBG:MovieClip

 Function init():void{
   myBG = new  Background_mc();
   addChild(myBG)
 }

 This throws an error:
 TypeError: Error #1007: Instantiation attempted on a non-constructor.

 What am I doing wrong?

 No virus found in this outgoing message.
 Checked by AVG. 
 Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 
 23-3-2008 18:50
  

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


   

-- 

Glen Pike
01736 759321
www.glenpike.co.uk http://www.glenpike.co.uk
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


--
No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50


No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50
 

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


Re: [Flashcoders] Help needed AS3 -- [Embed(source='library.swf' symbol='backgroud_mc')]

2008-03-24 Thread Jon Bradley


On Mar 24, 2008, at 8:30 AM, Cor wrote:



This throws an error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.

What am I doing wrong?



You can't call new Background_mc() when it's an instance of Class -  
there's no constructor for it that the compiler recognizes.


My suggestion if you don't need to extend UIMovieClip is as follows.

In your Library.fla file, check your export for the Background_mc  
symbol.


Give it a class name (com.something.myBackground) and have it extend  
flash.display.MovieClip.


Export an SWC of the Library file and then set your compiler prefs to  
include that SWC into the project.


Then, in your class just do:

import com.something.myBackground

and the usage is:

private var myBG : MovieClip;
private var Background_mc:MovieClip;

myBG = MovieClip( new Background_mc() );

At least, that's one way of doing it. I do it that way for non- 
component UI elements that do not need to extend UIMovieClip. Also  
because I use the same SWC as an SWF file for CSS embedding of  
graphical elements.


good luck,

jon

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


Re: [Flashcoders] Help needed AS3 -- [Embed(source='library.swf' symbol='backgroud_mc')]

2008-03-24 Thread Glen Pike

Hi,

   When Embedding symbols in AS3, you do construct instances of your 
assets using new VariableName -


   http://www.bit-101.com/blog/?p=853

   However, I don't think that the Flash IDE supports this as it does 
not support the [Embed] metadata type...
  
   The only way around this is to use Flash Develop or Flex to create 
your app.


   http://www.actionscript.org/forums/showthread.php3?t=134499

   Glen

Jon Bradley wrote:


On Mar 24, 2008, at 8:30 AM, Cor wrote:



This throws an error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.

What am I doing wrong?



You can't call new Background_mc() when it's an instance of Class - 
there's no constructor for it that the compiler recognizes.


My suggestion if you don't need to extend UIMovieClip is as follows.

In your Library.fla file, check your export for the Background_mc symbol.

Give it a class name (com.something.myBackground) and have it extend 
flash.display.MovieClip.


Export an SWC of the Library file and then set your compiler prefs to 
include that SWC into the project.


Then, in your class just do:

import com.something.myBackground

and the usage is:

private var myBG : MovieClip;
private var Background_mc:MovieClip;

myBG = MovieClip( new Background_mc() );

At least, that's one way of doing it. I do it that way for 
non-component UI elements that do not need to extend UIMovieClip. Also 
because I use the same SWC as an SWF file for CSS embedding of 
graphical elements.


good luck,

jon

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




--

Glen Pike
01736 759321
www.glenpike.co.uk http://www.glenpike.co.uk
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Help needed AS3 -- [Embed(source='library.swf' symbol='backgroud_mc')]

2008-03-24 Thread Jon Bradley
Oops... my last email was kinda based on the idea that you were  
running this in Flex.


My bad - replying to two lists at once.

http://www.digitalflipbook.com/archives/2007/03/associating_cus.php

- jb

On Mar 24, 2008, at 8:30 AM, Cor wrote:

This throws an error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.

What am I doing wrong?

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


Re: [Flashcoders] books for flash programming

2008-03-24 Thread Stuart (FunkDaWeb)
 have purchased these following books...

 Adobe Flash CS3 Professional Bible

 ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application 
Developers

 How to Cheat in Adobe Flash CS3: The Art of Design and Animation

 Advanced Actionscript 3 with Design Patterns 

   Flash CS3 Professional for Windows and Macintosh:Visual QuickStart Guide 


SM
  - Original Message - 
  From: Allandt Bik-Elliott (Receptacle) 
  To: Flash Coders List 
  Sent: Monday, March 24, 2008 11:56 AM
  Subject: Re: [Flashcoders] books for flash programming


  gotoandlearn.com
  learnflash.com
  flashkit.com

  essential actionscript 3.0 (colin moock)

  i'd start at these

  a


  On 24 Mar 2008, at 07:21, Naveen Bhaskar wrote:

  
   I am a flash designer and I am in intermediate in programming.(AS2).
  
   anybody pls tellme what are the good books I can refer.
   or is there any good website for learning programming and also have  
   good
   tutorials...
  
  
   thanks in advance
  

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


RE: [Flashcoders] How to expand import * statements?

2008-03-24 Thread Merrill, Jason
FWIW, (just noticed you said AS 2.0... the following only works in AS3
in Flex2/3 ) in Flexbuilder if  you type in  a dummy var statement:

private var b:MyClassIAmUsing (where the class name auto-completes) it
will automatically add the import statement if you haven't already. I
use this technique a lot to ease my laziness - saves me from figuring
out the exact path. If you need to, after the class import statement is
inserted , you can delete the var statement.



Jason Merrill
Bank of America  
GTO and Risk LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community


Are you a Bank of America associate interested in innovative learning
ideas and technologies? 
Check out our internal  GTO Innovative Learning Blog  subscribe.




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


RE: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Merrill, Jason
I'll second TweenLite...

Jason Merrill
Bank of America  
GTO and Risk LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community


Are you a Bank of America associate interested in innovative learning
ideas and technologies? 
Check out our internal  GTO Innovative Learning Blog  subscribe.




 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Steven Sacks
Sent: Saturday, March 22, 2008 5:35 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Tweening Engines for AS3

TweenLite and TweenFilterLite are the undisputed kings of 
Tween engines.  They're the most efficient, best performing 
and most lightweight.  I distribute them with my Gaia 
framework.  Jack Doyle is actually working on an improved 
version of TweenFilterLite right now which should be released soon.

http://blog.greensock.com/tweenliteas3/
http://blog.greensock.com/tweenfilterliteas3/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] books for flash programming

2008-03-24 Thread William Chadwick
 Adobe Developer Connection ActionScript Technology Center
http://www.adobe.com/devnet/actionscript/

There's also the LiveDocs site for ActionScript:
http://livedocs.adobe.com/flex/3/html/help.html?content=Part6_ProgAS_1.html

Lynda.com has a collection of eLearning by Joey Lott that is pretty good.

Essential ActionScript 3.0 by Colin Moock
Publisher: O'ReillyPub Date: June 15, 2007
Print ISBN-10: 0-596-52694-6 Print ISBN-13: 978-0-59-652694-8
Pages: 946

Advanced ActionScript 3 with Design Patterns  by Joey Lott, Danny
Patterson
Publisher: Adobe Press  Pub Date: November 02, 2006
Print ISBN-10: 0-321-42656-8 Print ISBN-13: 978-0-321-42656-7
Programming FlexTM 2 by Chafic Kazoun; Joey Lott
Publisher: O'Reilly Pub Date: April 15, 2007
Print ISBN-10: 0-596-52689-X Print ISBN-13: 978-0-59-652689-4
Pages: 502

ActionScript 3.0 Cookbook by Joey Lott; Keith Peters; Darron Schall
Publisher: O'Reilly Pub Date: October 01, 2006
Print ISBN-10: 0-596-52695-4 Print ISBN-13: 978-0-59-652695-5
Pages: 592

ActionScript 3.0 Design Patterns by William B. Sanders; Chandima
Cumaranatunge
Publisher: O'Reilly Pub Date: July 01, 2007
Print ISBN-13: 978-0-59-652846-1
Pages: 532

Here you go!

William

On 3/24/08, Naveen Bhaskar [EMAIL PROTECTED] wrote:

 Hi,

 I am a flash designer and I am in intermediate in programming.(AS2).

 anybody pls tellme what are the good books I can refer.
 or is there any good website for learning programming and also have good
 tutorials...


 thanks in advance

 navii
 -
 thanks and regards

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

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


Re: [Flashcoders] How to expand import * statements?

2008-03-24 Thread Andy Herrman
FlashDevelop does that for you in AS2 (and I think AS3, I just haven't
gotten to play with that yet).  I've pretty much stopped writing
imports manually. :)

  -Andy

On Mon, Mar 24, 2008 at 10:21 AM, Merrill, Jason
[EMAIL PROTECTED] wrote:
 FWIW, (just noticed you said AS 2.0... the following only works in AS3
  in Flex2/3 ) in Flexbuilder if  you type in  a dummy var statement:

  private var b:MyClassIAmUsing (where the class name auto-completes) it
  will automatically add the import statement if you haven't already. I
  use this technique a lot to ease my laziness - saves me from figuring
  out the exact path. If you need to, after the class import statement is
  inserted , you can delete the var statement.



  Jason Merrill
  Bank of America
  GTO and Risk LLD Solutions Design  Development
  eTools  Multimedia

  Bank of America Flash Platform Developer Community


  Are you a Bank of America associate interested in innovative learning
  ideas and technologies?
  Check out our internal  GTO Innovative Learning Blog  subscribe.







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

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


[Flashcoders] Delete ASO Files

2008-03-24 Thread Andrew Sinning
I was getting this error Error creating Flash movie. There was not 
enough memory available when I tried to compile a project this 
morning.  I went back to last Thursday's backup and got the same 
result.  Then I loaded the project onto my old laptop and it compiled 
just fine.


Finally, I ran Delete ASO File and Test Movie and the problem is 
gone.  I'm working in AS2 using CS3.


I've never seen this before.  I'm wondering what could have happened.  
The comments in the live docs mention that there are some issues with 
shared libraries


One of the last things I was doing on Friday was checking out an example 
that I downloaded that extends the UIObject class.  It's a technique for 
dynamically loading embedded fonts at runtime, and it uses shared 
libraries.  I've tried to reproduce the symptoms by opening up and 
compiling this project but nothing.


Anyway, I don't have a lot more information, and I do seem to have fixed 
the problem, but I don't like not knowing.


Thanks!


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


Re: [Flashcoders] Delete ASO Files

2008-03-24 Thread Andrew Sinning
To clarify: the comment in the live docs that mentions problems with 
shared libraries is in the section under Delete ASO Files and Test Movie.


Andrew Sinning wrote:
The comments in the live docs mention that there are some issues with 
shared libraries 

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


Re: [Flashcoders] Variable scope within for loops: reusing iterator variables

2008-03-24 Thread Cory Petosky
Jonathon:

In any other language, the scope would be as you describe. AS3 doesn't
have block-level scoping -- the most local scope is always the
function. Declaring a variable anywhere but the first line of a
function is a lie -- the VM declares all variables as the first set of
operations after pushing the function call on the stack.

On Mon, Mar 24, 2008 at 7:36 AM, Andrew Sinning [EMAIL PROTECTED] wrote:
 You are correct Jonathan, but loop blocks are delimited by brackets, so
  the for ( ... ) declaration is outside of the loop block.


  jonathan howe wrote:
   I had always thought that the scope of variables declared in the
   initialization part of the for loop were local to the loop block



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




-- 
Cory Petosky : Lead Developer : PUNY
1618 Central Ave NE Suite 130
Minneapolis, MN 55413
Office: 612.216.3924
Mobile: 240.422.9652
Fax: 612.605.9216
http://www.punyentertainment.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Variable scope within for loops: reusing iterator variables

2008-03-24 Thread Meinte van't Kruis
besides, the compiler only warns you that you're about the overwrite the
variable, by
re-assigning it. In case of 2 loops(where the variable is only used within
the loop),
it doesn't have any real consequences.

On Mon, Mar 24, 2008 at 4:56 PM, Cory Petosky [EMAIL PROTECTED]
wrote:

 Jonathon:

 In any other language, the scope would be as you describe. AS3 doesn't
 have block-level scoping -- the most local scope is always the
 function. Declaring a variable anywhere but the first line of a
 function is a lie -- the VM declares all variables as the first set of
 operations after pushing the function call on the stack.

 On Mon, Mar 24, 2008 at 7:36 AM, Andrew Sinning [EMAIL PROTECTED]
 wrote:
  You are correct Jonathan, but loop blocks are delimited by brackets, so
   the for ( ... ) declaration is outside of the loop block.
 
 
   jonathan howe wrote:
I had always thought that the scope of variables declared in the
initialization part of the for loop were local to the loop block
 
 
 
  ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 Cory Petosky : Lead Developer : PUNY
 1618 Central Ave NE Suite 130
 Minneapolis, MN 55413
 Office: 612.216.3924
 Mobile: 240.422.9652
 Fax: 612.605.9216
 http://www.punyentertainment.com
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
M.A. van't Kruis
http://www.malatze.nl/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to expand import * statements?

2008-03-24 Thread Steven Sacks
Instead of writing var myVar:WhateverClass in FlashDevelop, you can just 
say new WhateverClass and it will autocomplete it for you.  Less to 
type, less to erase.

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


Re: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Dave Mennenoh
I prefer Tweener, and if you've ever used Fuse you'll like it's syntax. It's 
also quite small - adds about 8K.


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


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


Re: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Cory Petosky
TweenLite doesn't have bezier curve support, can't store the duration
in the options object, doesn't support auto-rounding of pixels, and
has significantly fewer transition options. I think TweenLite is great
-- if I ever need to tween 1200 things at once, I'll certainly choose
it -- but these features in Tweener make it a better choice for many
of my projects.

On Mon, Mar 24, 2008 at 1:16 PM, Steven Sacks [EMAIL PROTECTED] wrote:
 Tweener is proven to be significantly slower than TweenLite, and it's
  almost 300% larger (TweenLite is 3k vs Tweener's 8k).

  I'm not telling you what to do. You're welcome to your preference. I
  prefer to write better, faster, smaller, more efficient code.  Different
  strokes for different folks, I guess.  :)




  Dave Mennenoh wrote:
   I prefer Tweener, and if you've ever used Fuse you'll like it's
   syntax. It's also quite small - adds about 8K.
  
   Dave -
   Head Developer
   http://www.blurredistinction.com
   Adobe Community Expert
   http://www.adobe.com/communities/experts/
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  

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




-- 
Cory Petosky : Lead Developer : PUNY
1618 Central Ave NE Suite 130
Minneapolis, MN 55413
Office: 612.216.3924
Mobile: 240.422.9652
Fax: 612.605.9216
http://www.punyentertainment.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Variable scope within for loops: reusing iteratorvariables

2008-03-24 Thread Kerry Thompson
jonathan howe wrote:

 Hmm... it is within a class... and that's when I'm getting the warnings.
Or
 did you mean just in general to reiterate that variables are locally
scoped
 to functions and classes and not to for loops?

If you declare a variable within a function, its scope is limited to that
function. It really doesn't relate to where in the function you use it (or
declare it). In my example, this:

function doSomething
{
   var i:int;
   for(i=0;i++;i10)
   {
   }
}

Is functionally identical to this:

function doSomething
{
   for(var i:int =0;i++;i10)
   {
   }
}

You're correct that AS3 is more strict about these sorts of things than AS2.
AS2 was really just syntactic sugar for AS1, and wasn't strict at all.

Cordially,

Kerry Thompson


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


Re: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Meinte van't Kruis
Tweenlite has one lil thingy against it though; tweens aren't synchronised.
It doesn't happen much that this becomes a problem, though I can imagine
projects where people want lots of tweens ending at the same time, which
simply won't happen with lots of objects in TweenLite, other than
that it's pretty sweet.

On Mon, Mar 24, 2008 at 7:20 PM, eric e. dolecki [EMAIL PROTECTED] wrote:

 third TweenLite and TweenFilterLite

 On Mon, Mar 24, 2008 at 1:51 PM, Dave Mennenoh [EMAIL PROTECTED]
 
 wrote:

  I prefer Tweener, and if you've ever used Fuse you'll like it's syntax.
  It's
  also quite small - adds about 8K.
 
  Dave -
  Head Developer
  http://www.blurredistinction.com
  Adobe Community Expert
  http://www.adobe.com/communities/experts/
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
M.A. van't Kruis
http://www.malatze.nl/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Zeh Fernando
While I agree with the speed thing, let's just keep this in context - 
it's so when you have a lot of tweenings going on at the exact same 
time. A few tweens won't produce a difference in terms of framerate. If 
they do, there's something else wrong.


Still, I think we should be glad there are so many alternatives. :)


Zeh

Steven Sacks wrote:
Tweener is proven to be significantly slower than TweenLite, and it's 
almost 300% larger (TweenLite is 3k vs Tweener's 8k).


I'm not telling you what to do. You're welcome to your preference. I 
prefer to write better, faster, smaller, more efficient code.  Different 
strokes for different folks, I guess.  :)



Dave Mennenoh wrote:
I prefer Tweener, and if you've ever used Fuse you'll like it's 
syntax. It's also quite small - adds about 8K.


Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


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


Re: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Steven Sacks
For things like Papervision 3D, where bezier curves are important, 
Tweener is the obvious choice.  For general purposes, though, Tweener is 
probably overkill.  I'm not bashing Tweener or Fuse or any of the other 
tweening engines out there.  For a lot of situations, TweenLite is more 
than sufficient.  When you need the special functionality that Tweener 
provides, TweenLite is obviously not going to cut it.






Zeh Fernando wrote:
While I agree with the speed thing, let's just keep this in context - 
it's so when you have a lot of tweenings going on at the exact same 
time. A few tweens won't produce a difference in terms of framerate. 
If they do, there's something else wrong.


Still, I think we should be glad there are so many alternatives. :)


Zeh

Steven Sacks wrote:
Tweener is proven to be significantly slower than TweenLite, and it's 
almost 300% larger (TweenLite is 3k vs Tweener's 8k).


I'm not telling you what to do. You're welcome to your preference. I 
prefer to write better, faster, smaller, more efficient code.  
Different strokes for different folks, I guess.  :)



Dave Mennenoh wrote:
I prefer Tweener, and if you've ever used Fuse you'll like it's 
syntax. It's also quite small - adds about 8K.


Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


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



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


RE: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Dwayne Neckles
ALso 
Tweener allows you to tween frames in movieclips WITH easy... 
which is pretty darn useful and amazing if you ask me..

I dunno if tweenlite allows that..

Dwayne



 Date: Mon, 24 Mar 2008 12:08:44 -0700
 From: [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Tweening Engines for AS3
 
 For things like Papervision 3D, where bezier curves are important, 
 Tweener is the obvious choice.  For general purposes, though, Tweener is 
 probably overkill.  I'm not bashing Tweener or Fuse or any of the other 
 tweening engines out there.  For a lot of situations, TweenLite is more 
 than sufficient.  When you need the special functionality that Tweener 
 provides, TweenLite is obviously not going to cut it.
 
 
 
 
 
 Zeh Fernando wrote:
  While I agree with the speed thing, let's just keep this in context - 
  it's so when you have a lot of tweenings going on at the exact same 
  time. A few tweens won't produce a difference in terms of framerate. 
  If they do, there's something else wrong.
 
  Still, I think we should be glad there are so many alternatives. :)
 
 
  Zeh
 
  Steven Sacks wrote:
  Tweener is proven to be significantly slower than TweenLite, and it's 
  almost 300% larger (TweenLite is 3k vs Tweener's 8k).
 
  I'm not telling you what to do. You're welcome to your preference. I 
  prefer to write better, faster, smaller, more efficient code.  
  Different strokes for different folks, I guess.  :)
 
 
  Dave Mennenoh wrote:
  I prefer Tweener, and if you've ever used Fuse you'll like it's 
  syntax. It's also quite small - adds about 8K.
 
  Dave -
  Head Developer
  http://www.blurredistinction.com
  Adobe Community Expert
  http://www.adobe.com/communities/experts/
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_
How well do you know your celebrity gossip?
http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Steven Sacks

Dwayne Neckles wrote:
ALso 
Tweener allows you to tween frames in movieclips WITH easy... 
which is pretty darn useful and amazing if you ask me..


I dunno if tweenlite allows that..

Dwayne
  


TweenLite:

*Frame tweening* - you can tween to any frame in a MovieClip, like 
TweenLite.to(my_mc, 2, {frame:125});

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


RE: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Dwayne Neckles
Cool didn't know.. take that back..



 Date: Mon, 24 Mar 2008 13:00:57 -0700
 From: [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Tweening Engines for AS3
 
 Dwayne Neckles wrote:
  ALso 
  Tweener allows you to tween frames in movieclips WITH easy... 
  which is pretty darn useful and amazing if you ask me..
 
  I dunno if tweenlite allows that..
 
  Dwayne

 
 TweenLite:
 
 *Frame tweening* - you can tween to any frame in a MovieClip, like 
 TweenLite.to(my_mc, 2, {frame:125});
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_
Test your Star IQ
http://club.live.com/red_carpet_reveal.aspx?icid=redcarpet_HMTAGMAR___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Custom DrawRectangle Question

2008-03-24 Thread Omar Fouad
I am creating a custom Class that draws a simple rectangle for an
application. Here is the class

DrawRectangle.as

public class DrawRectangle extends MovieClip {

public var _w:Number;
public var _h:Number;
public var _x:Number;
public var _y:Number;

public function DrawRectangle(w:Number, h:Number, x:Number,
y:Number) {
this._w = w;
this._h = h;
this._x = x;
this._y = y;
Init();
}
private function Init():void {
var MC:MovieClip = new MovieClip();
MC.graphics.lineStyle(1, 0xFF);
MC.graphics.beginFill(0xFF, .3);
MC.graphics.drawRect(_x,_y,_w,_h);
addChild(MC);
}

}
}

I wrote it without the last line ( addChild(MC) ) and it didnt work. It did
not work Event when In the Main Class I added the addChild() like this:


var M:DrawRectangle = new Rectangle(100,100,20,100);

addChild(M);


I thought The addChild should be put outside the class. And No It only
worked when I add the addChild() in the class and out the class... It works
But I want to understand Why??
How can I set it to draw from the class iteself??

Thanks.


-- 
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Custom DrawRectangle Question

2008-03-24 Thread Merrill, Jason
Because within your class which extends MovieClip, you are creating a
new MovieClip, which you draw on, and thus also has to be added to the
display list.

Also, you do know about :

sprite.graphics.drawRect() 

right?  So what is this class going to accomplish?

Any reason you are using MovieClip over Sprite? MovieClip just adds
unecessary overhead in this case.


Jason Merrill
Bank of America  
GTO and Risk LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community


Are you a Bank of America associate interested in innovative learning
ideas and technologies? 
Check out our internal  GTO Innovative Learning Blog  subscribe.




 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Omar Fouad
Sent: Monday, March 24, 2008 5:01 PM
To: Flash Coders List
Subject: [Flashcoders] Custom DrawRectangle Question

I am creating a custom Class that draws a simple rectangle 
for an application. Here is the class

DrawRectangle.as

public class DrawRectangle extends MovieClip {

public var _w:Number;
public var _h:Number;
public var _x:Number;
public var _y:Number;

public function DrawRectangle(w:Number, h:Number, x:Number,
y:Number) {
this._w = w;
this._h = h;
this._x = x;
this._y = y;
Init();
}
private function Init():void {
var MC:MovieClip = new MovieClip();
MC.graphics.lineStyle(1, 0xFF);
MC.graphics.beginFill(0xFF, .3);
MC.graphics.drawRect(_x,_y,_w,_h);
addChild(MC);
}

}
}

I wrote it without the last line ( addChild(MC) ) and it 
didnt work. It did not work Event when In the Main Class I 
added the addChild() like this:


var M:DrawRectangle = new Rectangle(100,100,20,100);

addChild(M);


I thought The addChild should be put outside the class. And 
No It only worked when I add the addChild() in the class and 
out the class... It works But I want to understand Why??
How can I set it to draw from the class iteself??

Thanks.


--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, 
confidential information and/or be subject to legal 
privilege. It should not be copied, disclosed to, retained or 
used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any 
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Custom DrawRectangle Question

2008-03-24 Thread Cory Petosky
To clarify Jason's response:

You're adding two different things. In the first case, you're adding a
child movieclip (with a rectangle drawn inside it) to the empty
DrawRectangle instance. In the second case, you're adding the
DrawRectangle instance to the screen.

You should rewrite your init function so that it draws directly to the instance:

   private function Init():void {
   graphics.lineStyle(1, 0xFF);
   graphics.beginFill(0xFF, .3);
   graphics.drawRect(_x,_y,_w,_h);
   graphics.endFill();
   }

Finally, since this class does not have frames, it should extend
Sprite, not MovieClip.

On Mon, Mar 24, 2008 at 4:01 PM, Omar Fouad [EMAIL PROTECTED] wrote:
 I am creating a custom Class that draws a simple rectangle for an
  application. Here is the class

  DrawRectangle.as

  public class DrawRectangle extends MovieClip {

 public var _w:Number;
 public var _h:Number;
 public var _x:Number;
 public var _y:Number;

 public function DrawRectangle(w:Number, h:Number, x:Number,
  y:Number) {
 this._w = w;
 this._h = h;
 this._x = x;
 this._y = y;
 Init();
 }
 private function Init():void {
 var MC:MovieClip = new MovieClip();
 MC.graphics.lineStyle(1, 0xFF);
 MC.graphics.beginFill(0xFF, .3);
 MC.graphics.drawRect(_x,_y,_w,_h);
 addChild(MC);
 }

 }
  }

  I wrote it without the last line ( addChild(MC) ) and it didnt work. It did
  not work Event when In the Main Class I added the addChild() like this:


  var M:DrawRectangle = new Rectangle(100,100,20,100);

  addChild(M);


  I thought The addChild should be put outside the class. And No It only
  worked when I add the addChild() in the class and out the class... It works
  But I want to understand Why??
  How can I set it to draw from the class iteself??

  Thanks.


  --
  Omar M. Fouad - Digital Emotions
  http://www.omarfouad.net

  This e-mail and any attachment is for authorised use by the intended
  recipient(s) only. It may contain proprietary material, confidential
  information and/or be subject to legal privilege. It should not be copied,
  disclosed to, retained or used by, any other party. If you are not an
  intended recipient then please promptly delete this e-mail and any
  attachment and all copies and inform the sender. Thank you.
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Cory Petosky : Lead Developer : PUNY
1618 Central Ave NE Suite 130
Minneapolis, MN 55413
Office: 612.216.3924
Mobile: 240.422.9652
Fax: 612.605.9216
http://www.punyentertainment.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Custom DrawRectangle Question

2008-03-24 Thread Omar Fouad
Aha I get it... But can I make a work out in order not to put addChild() in
the main Class? I mean that once I Make an Instance of the class it adds it
on the stage by itself.


Thanks

On Mon, Mar 24, 2008 at 11:27 PM, Cory Petosky [EMAIL PROTECTED]
wrote:

 To clarify Jason's response:

 You're adding two different things. In the first case, you're adding a
 child movieclip (with a rectangle drawn inside it) to the empty
 DrawRectangle instance. In the second case, you're adding the
 DrawRectangle instance to the screen.

 You should rewrite your init function so that it draws directly to the
 instance:

   private function Init():void {
   graphics.lineStyle(1, 0xFF);
   graphics.beginFill(0xFF, .3);
graphics.drawRect(_x,_y,_w,_h);
graphics.endFill();
   }

 Finally, since this class does not have frames, it should extend
 Sprite, not MovieClip.

 On Mon, Mar 24, 2008 at 4:01 PM, Omar Fouad [EMAIL PROTECTED]
 wrote:
  I am creating a custom Class that draws a simple rectangle for an
   application. Here is the class
 
   DrawRectangle.as
 
   public class DrawRectangle extends MovieClip {
 
  public var _w:Number;
  public var _h:Number;
  public var _x:Number;
  public var _y:Number;
 
  public function DrawRectangle(w:Number, h:Number, x:Number,
   y:Number) {
  this._w = w;
  this._h = h;
  this._x = x;
  this._y = y;
  Init();
  }
  private function Init():void {
  var MC:MovieClip = new MovieClip();
  MC.graphics.lineStyle(1, 0xFF);
  MC.graphics.beginFill(0xFF, .3);
  MC.graphics.drawRect(_x,_y,_w,_h);
  addChild(MC);
  }
 
  }
   }
 
   I wrote it without the last line ( addChild(MC) ) and it didnt work. It
 did
   not work Event when In the Main Class I added the addChild() like this:
 
 
   var M:DrawRectangle = new Rectangle(100,100,20,100);
 
   addChild(M);
 
 
   I thought The addChild should be put outside the class. And No It only
   worked when I add the addChild() in the class and out the class... It
 works
   But I want to understand Why??
   How can I set it to draw from the class iteself??
 
   Thanks.
 
 
   --
   Omar M. Fouad - Digital Emotions
   http://www.omarfouad.net
 
   This e-mail and any attachment is for authorised use by the intended
   recipient(s) only. It may contain proprietary material, confidential
   information and/or be subject to legal privilege. It should not be
 copied,
   disclosed to, retained or used by, any other party. If you are not an
   intended recipient then please promptly delete this e-mail and any
   attachment and all copies and inform the sender. Thank you.
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 Cory Petosky : Lead Developer : PUNY
 1618 Central Ave NE Suite 130
 Minneapolis, MN 55413
 Office: 612.216.3924
 Mobile: 240.422.9652
 Fax: 612.605.9216
 http://www.punyentertainment.com
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Custom DrawRectangle Question

2008-03-24 Thread jonathan howe
You could just draw the rectangle directly on the graphics of the
DrawRectangle:

   graphics.lineStyle(1, 0xFF);
   graphics.beginFill(0xFF, .3);
   graphics.drawRect(_x,_y,_w,_h);

Because it extends MovieClip (or Sprite, hopefully, as Steven suggests, it
has its own graphics property.

Then you can think about renaming your class from DrawRectangle to
Rectangle, since it not only draws it, it is one.

-jonathan


On Mon, Mar 24, 2008 at 6:59 PM, Omar Fouad [EMAIL PROTECTED] wrote:

 Aha I get it... But can I make a work out in order not to put addChild()
 in
 the main Class? I mean that once I Make an Instance of the class it adds
 it
 on the stage by itself.


 Thanks

 On Mon, Mar 24, 2008 at 11:27 PM, Cory Petosky [EMAIL PROTECTED]
 
 wrote:

  To clarify Jason's response:
 
  You're adding two different things. In the first case, you're adding a
  child movieclip (with a rectangle drawn inside it) to the empty
  DrawRectangle instance. In the second case, you're adding the
  DrawRectangle instance to the screen.
 
  You should rewrite your init function so that it draws directly to the
  instance:
 
private function Init():void {
graphics.lineStyle(1, 0xFF);
graphics.beginFill(0xFF, .3);
 graphics.drawRect(_x,_y,_w,_h);
 graphics.endFill();
}
 
  Finally, since this class does not have frames, it should extend
  Sprite, not MovieClip.
 
  On Mon, Mar 24, 2008 at 4:01 PM, Omar Fouad [EMAIL PROTECTED]
  wrote:
   I am creating a custom Class that draws a simple rectangle for an
application. Here is the class
  
DrawRectangle.as
  
public class DrawRectangle extends MovieClip {
  
   public var _w:Number;
   public var _h:Number;
   public var _x:Number;
   public var _y:Number;
  
   public function DrawRectangle(w:Number, h:Number, x:Number,
y:Number) {
   this._w = w;
   this._h = h;
   this._x = x;
   this._y = y;
   Init();
   }
   private function Init():void {
   var MC:MovieClip = new MovieClip();
   MC.graphics.lineStyle(1, 0xFF);
   MC.graphics.beginFill(0xFF, .3);
   MC.graphics.drawRect(_x,_y,_w,_h);
   addChild(MC);
   }
  
   }
}
  
I wrote it without the last line ( addChild(MC) ) and it didnt work.
 It
  did
not work Event when In the Main Class I added the addChild() like
 this:
  
  
var M:DrawRectangle = new Rectangle(100,100,20,100);
  
addChild(M);
  
  
I thought The addChild should be put outside the class. And No It
 only
worked when I add the addChild() in the class and out the class... It
  works
But I want to understand Why??
How can I set it to draw from the class iteself??
  
Thanks.
  
  
--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net
  
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be
  copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
 
 
 
  --
  Cory Petosky : Lead Developer : PUNY
  1618 Central Ave NE Suite 130
  Minneapolis, MN 55413
  Office: 612.216.3924
  Mobile: 240.422.9652
  Fax: 612.605.9216
  http://www.punyentertainment.com
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 Omar M. Fouad - Digital Emotions
 http://www.omarfouad.net

 This e-mail and any attachment is for authorised use by the intended
 recipient(s) only. It may contain proprietary material, confidential
 information and/or be subject to legal privilege. It should not be copied,
 disclosed to, retained or used by, any other party. If you are not an
 intended recipient then please promptly delete this e-mail and any
 attachment and all copies and inform the sender. Thank you.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread laurent
Yes TweenLight shown faster than Tweener on a thousandsss tweens. Then 
for the 2k/8k size of each it does not make any difference on a 1Mo 
project. Rest this bezier functionnality that is awesome, in 3D as in 
2D. I nerver used Fuse, but choosing between TweenLight and Tweener 
depends on your project, if it needs tones of tweens like particles, or 
if it needs multiple point bezier animation.


L


Dwayne Neckles a écrit :

Cool didn't know.. take that back..



  

Date: Mon, 24 Mar 2008 13:00:57 -0700
From: [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Tweening Engines for AS3

Dwayne Neckles wrote:

ALso 
Tweener allows you to tween frames in movieclips WITH easy... 
which is pretty darn useful and amazing if you ask me..


I dunno if tweenlite allows that..

Dwayne
  
  

TweenLite:

*Frame tweening* - you can tween to any frame in a MovieClip, like 
TweenLite.to(my_mc, 2, {frame:125});

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



_
Test your Star IQ
http://club.live.com/red_carpet_reveal.aspx?icid=redcarpet_HMTAGMAR___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  


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


Re: [Flashcoders] Custom DrawRectangle Question

2008-03-24 Thread Omar Fouad
Nothing Changed..The Code is the same and it is not autoadding...

By the way I Know that There is allready drawRect() but I will be adding
some more functionalities to the class that drawRect has not.


On Tue, Mar 25, 2008 at 1:36 AM, jonathan howe [EMAIL PROTECTED]
wrote:

 You could just draw the rectangle directly on the graphics of the
 DrawRectangle:

   graphics.lineStyle(1, 0xFF);
   graphics.beginFill(0xFF, .3);
   graphics.drawRect(_x,_y,_w,_h);

 Because it extends MovieClip (or Sprite, hopefully, as Steven suggests, it
 has its own graphics property.

 Then you can think about renaming your class from DrawRectangle to
 Rectangle, since it not only draws it, it is one.

 -jonathan


 On Mon, Mar 24, 2008 at 6:59 PM, Omar Fouad [EMAIL PROTECTED]
 wrote:

  Aha I get it... But can I make a work out in order not to put addChild()
  in
  the main Class? I mean that once I Make an Instance of the class it adds
  it
  on the stage by itself.
 
 
  Thanks
 
  On Mon, Mar 24, 2008 at 11:27 PM, Cory Petosky 
 [EMAIL PROTECTED]
  
  wrote:
 
   To clarify Jason's response:
  
   You're adding two different things. In the first case, you're adding a
   child movieclip (with a rectangle drawn inside it) to the empty
   DrawRectangle instance. In the second case, you're adding the
   DrawRectangle instance to the screen.
  
   You should rewrite your init function so that it draws directly to the
   instance:
  
 private function Init():void {
 graphics.lineStyle(1, 0xFF);
 graphics.beginFill(0xFF, .3);
  graphics.drawRect(_x,_y,_w,_h);
  graphics.endFill();
 }
  
   Finally, since this class does not have frames, it should extend
   Sprite, not MovieClip.
  
   On Mon, Mar 24, 2008 at 4:01 PM, Omar Fouad [EMAIL PROTECTED]
   wrote:
I am creating a custom Class that draws a simple rectangle for an
 application. Here is the class
   
 DrawRectangle.as
   
 public class DrawRectangle extends MovieClip {
   
public var _w:Number;
public var _h:Number;
public var _x:Number;
public var _y:Number;
   
public function DrawRectangle(w:Number, h:Number, x:Number,
 y:Number) {
this._w = w;
this._h = h;
this._x = x;
this._y = y;
Init();
}
private function Init():void {
var MC:MovieClip = new MovieClip();
MC.graphics.lineStyle(1, 0xFF);
MC.graphics.beginFill(0xFF, .3);
MC.graphics.drawRect(_x,_y,_w,_h);
addChild(MC);
}
   
}
 }
   
 I wrote it without the last line ( addChild(MC) ) and it didnt
 work.
  It
   did
 not work Event when In the Main Class I added the addChild() like
  this:
   
   
 var M:DrawRectangle = new Rectangle(100,100,20,100);
   
 addChild(M);
   
   
 I thought The addChild should be put outside the class. And No It
  only
 worked when I add the addChild() in the class and out the class...
 It
   works
 But I want to understand Why??
 How can I set it to draw from the class iteself??
   
 Thanks.
   
   
 --
 Omar M. Fouad - Digital Emotions
 http://www.omarfouad.net
   
 This e-mail and any attachment is for authorised use by the
 intended
 recipient(s) only. It may contain proprietary material,
 confidential
 information and/or be subject to legal privilege. It should not be
   copied,
 disclosed to, retained or used by, any other party. If you are not
 an
 intended recipient then please promptly delete this e-mail and any
 attachment and all copies and inform the sender. Thank you.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
   
  
  
  
   --
   Cory Petosky : Lead Developer : PUNY
   1618 Central Ave NE Suite 130
   Minneapolis, MN 55413
   Office: 612.216.3924
   Mobile: 240.422.9652
   Fax: 612.605.9216
   http://www.punyentertainment.com
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
 
 
 
  --
  Omar M. Fouad - Digital Emotions
  http://www.omarfouad.net
 
  This e-mail and any attachment is for authorised use by the intended
  recipient(s) only. It may contain proprietary material, confidential
  information and/or be subject to legal privilege. It should not be
 copied,
  disclosed to, retained or used by, any other party. If you are not an
  intended recipient then please promptly delete this e-mail and any
  attachment and all copies and inform the sender. Thank you.
  ___
  Flashcoders mailing list
  

Re: [Flashcoders] AS2: Tweening a very large vector file causes shaking

2008-03-24 Thread Leandro Ferreira
video card? how come?

On 3/21/08, Merrill, Jason [EMAIL PROTECTED] wrote:

 Fuse is really really bad IMO for tweening when performance (like with
 your complex vector graphic) is a concern.  I dropped it because it
 became unusable for me in high stress situations.  My current
 tweener-of-the-month I like is TweenLite.

 Also, Flash does have a hard time, tweening aside, when very very
 complex vector graphics are used.  We designed a very complex
 photo-realistic assets representing the inside of an ATM machine, which
 took us several days to build, and had performance issues that were
 unrelated to any code (we tested it in fresh .flas with no code) - and
 these graphics were done with only Flash drawing tools.  We used a ton
 of gradients to achieve photo-realistic rendering, but it came with a
 price.  The main problem we had was sometimes the Flash player (8 at the
 time) would not load the graphic, sometimes it would - completely
 random.  We finally got it working fine, but learned there are limits to
 what the browser/player/memory can render.  Possible it was related to
 the video card too, to be fair.  Anyway, something to keep in mind.

 Jason Merrill
 Bank of America
 GTO and Risk LLD Solutions Design  Development
 eTools  Multimedia

 Bank of America Flash Platform Developer Community


 Are you a Bank of America associate interested in innovative learning
 ideas and technologies?
 Check out our internal  GTO Innovative Learning Blog  subscribe.




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

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