Re: [Flashcoders] AS3 Coding Conventions Question

2008-03-17 Thread eric e. dolecki
Well, you're only going to use the FOO_BAR, so I don't think it really
matters. Instead of a string, you could use a number and just have it be 1,
etc. as well.

On Mon, Mar 17, 2008 at 12:05 AM, Jason Van Cleave [EMAIL PROTECTED]
wrote:

 This is a pretty nice doc and I agree/use most of these while doing as3
 development. The use of ALL_CAPS constants makes sense to me but I am not
 understanding what the purpose would be to not make the variable be the
 same
 as the value.

 For instance, this is what Adobe says and does from:

 http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions

 --
 Constant names

 Use all uppercase letters with underscores between words: OFF,
 DEFAULT_WIDTH
 .

 The words in the identifier must match the words in the constant value if
 it
 is a String:

 public static const FOO_BAR:String = fooBar;

 --

 For me it makes more sense and helps consistency to make it:

 public static const FOO_BAR:String = FOO_BAR;


 Anyone have a defense to Adobe's position?
 ___
 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] AS3 Coding Conventions Question

2008-03-17 Thread Ian Thomas
On Mon, Mar 17, 2008 at 8:27 AM, eric e. dolecki [EMAIL PROTECTED] wrote:
 Well, you're only going to use the FOO_BAR, so I don't think it really
  matters. Instead of a string, you could use a number and just have it be 1,
  etc. as well.
Except having it as a meaningful string makes it much easier to trace
when debugging. :-)

As for Jason's question - I can't see a particular reason for it to be
lowercase rather than upper. I guess it's just the convention in
Adobe's existing codebase.

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


Re: [Flashcoders] frameworks and classes for flash cs3

2008-03-17 Thread Pedro Kostelec
OK. When i'll have some time i'll use it to read about it on osflash.
Thanks anyway

Pedro

On Mon, Mar 17, 2008 at 1:22 AM, Pedro Taranto [EMAIL PROTECTED] wrote:

 what are the 'best' framework/classes is very subjective, there isnt an
 UNIQUE framework that will solve all your problems

 you have to choose and use the ones that speed up your workflow

 In most of my projects I use pixlib (as2) and lowra (as3), but there are a
 lot of frameworks that is better in each case

 you should try all of them and use the one you feel more confortable to
 use,
 maybe try to do the same thing using differents frameworks that have the
 same purpose/focus:

 for example:
 Tweener vs TweenLite vs
 Papervision3D vs Sandy vs Away3D
 ..

 --
 Pedro Taranto


 On Sun, Mar 16, 2008 at 8:57 PM, Pedro Kostelec [EMAIL PROTECTED]
 wrote:

  If I start searching this two sites (which i did once) i will fill my
  computer with stuff i will surely never use. I just want to get the best
  ones, the most used...which for a curious person like me is impossible.
 
  So, can't you just tell which one are the best? I mean i am mostly using
  fLASH  for as3 motion.
 
  On Sun, Mar 16, 2008 at 11:58 PM, Pedro Taranto [EMAIL PROTECTED]
  wrote:
 
   look at osflash.org and code.google.com
  
   --
   Pedro Taranto
  
  
   On Sun, Mar 16, 2008 at 7:36 PM, Pedro Kostelec [EMAIL PROTECTED]
   wrote:
  
Hi coders
   
I want to start coding with frameworks and classes like TweenLite. I
   would
be pretty new at it, so i'd like you to recommend me some of them
 that
makes
flash coding easier or faster and improving performence.
   
Thanks
   
--
Pedro D.K.
___
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
  
 
 
 
  --
  Pedro D.K.
  ___
  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




-- 
Pedro D.K.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 Classes and FLA not working together

2008-03-17 Thread Andrei Thomaz
Yes, you can put stop() in the first frame and still extend Sprite. I just
think that this is a bit contradictory with the definition of Sprite class:

A Sprite object is similar to a movie clip, but does not have a timeline. 

And, in the Sprite documentation, stop() doesn't exist. Although that, the
stop() in the first frame will work, independently on the document class
extending Sprite or MovieClip.


[]'s
andrei



On Mon, Mar 17, 2008 at 6:00 AM, Kenneth Kawamoto [EMAIL PROTECTED]
wrote:

 Then why don't you extend Sprite???

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Andrei Thomaz wrote:
  The only problem I had was that I had to
  make it extend MovieClip, and put a stop() in its first frame.
 ___
 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] AS3 Classes and FLA not working together

2008-03-17 Thread Omar Fouad
Ok fellas... I'll try all this and I'll feedback.
Thanks for the help.

On Mon, Mar 17, 2008 at 11:00 AM, Kenneth Kawamoto 
[EMAIL PROTECTED] wrote:

 Then why don't you extend Sprite???

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Andrei Thomaz wrote:
  The only problem I had was that I had to
  make it extend MovieClip, and put a stop() in its first frame.
 ___
 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] AS3 Classes and FLA not working together

2008-03-17 Thread Kenneth Kawamoto
No, what I meant was if you're extending MovieClip and placing stop(), 
then you can just extent Sprite and forget about messy stop().


Kenneth Kawamoto
http://www.materiaprima.co.uk/

Andrei Thomaz wrote:
Yes, you can put stop() in the first frame and still extend Sprite. I 
just think that this is a bit contradictory with the definition of 
Sprite class:


A Sprite object is similar to a movie clip, but does not have a timeline. 

And, in the Sprite documentation, stop() doesn't exist. Although that, 
the stop() in the first frame will work, independently on the document 
class extending Sprite or MovieClip.



[]'s
andrei



On Mon, Mar 17, 2008 at 6:00 AM, Kenneth Kawamoto 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:


Then why don't you extend Sprite???

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Andrei Thomaz wrote:
  The only problem I had was that I had to
  make it extend MovieClip, and put a stop() in its first frame.



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


Re: [Flashcoders] AS3 Classes and FLA not working together

2008-03-17 Thread Andrei Thomaz
Kenneth, you're right, sorry. I had some strange problems after uninstalling
the last AIR beta and installing the release version. One of these things
was that, when I published an app without a stop(), it acted as a movieclip
flashing on the screen. It works fine now (I cleaned and updated all AIR
pieces in last week).

best,
andrei


On Mon, Mar 17, 2008 at 10:32 AM, Kenneth Kawamoto 
[EMAIL PROTECTED] wrote:

 No, what I meant was if you're extending MovieClip and placing stop(),
 then you can just extent Sprite and forget about messy stop().

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Andrei Thomaz wrote:
  Yes, you can put stop() in the first frame and still extend Sprite. I
  just think that this is a bit contradictory with the definition of
  Sprite class:
 
  A Sprite object is similar to a movie clip, but does not have a
 timeline. 
 
  And, in the Sprite documentation, stop() doesn't exist. Although that,
  the stop() in the first frame will work, independently on the document
  class extending Sprite or MovieClip.
 
 
  []'s
  andrei
 
 
 
  On Mon, Mar 17, 2008 at 6:00 AM, Kenneth Kawamoto
  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  Then why don't you extend Sprite???
 
  Kenneth Kawamoto
  http://www.materiaprima.co.uk/
 
  Andrei Thomaz wrote:
The only problem I had was that I had to
make it extend MovieClip, and put a stop() in its first frame.
 
 

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


Re: [Flashcoders] AS3 Classes and FLA not working together

2008-03-17 Thread Kenneth Kawamoto

Then why don't you extend Sprite???

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Andrei Thomaz wrote:

The only problem I had was that I had to
make it extend MovieClip, and put a stop() in its first frame. 

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


Re: [Flashcoders] AS3 Coding Conventions Question

2008-03-17 Thread Muzak

Maybe it's because alot (most?) static constants refer to an event type:

Event.CHANGE - change
Event.CLICK - click
REMOVED_FROM_STAGE - removedFromStage

I've noticed that in Flex, if you define Event metada, and you follow those rules, you'll get automatic codehints for that event, 
even though you haven't defined any constant for that event type.


package com.muzakdeezign.sample.controls {
import mx.core.UIComponent;

[Event(name=myEvent,type=mx.events.Event)]

public class MyClass extends UIComponent {
 public function MyClass() {
 }
}
}

If you then create an instance of that class add a listener to the instance, 
MY_EVENT will show up in the codehints.

mx:Script
 ![CDATA[

  import mx.events.Event;
  import com.muzakdeezign.sample.controls.MyClass;

  private function appInit():void {
   var instance:MyClass = new MyClass();
   instance.addEventListener(Event.MY_EVENT ...
  }

 ]]
/mx:Script

Just typing Event. will show MY_EVENT as one of the event types in the codehints, even though I haven't defined that constant 
anywhere.
So I guess it picks up those constants from the metadata: [Event(name=myEvent,type=mx.events.Event)] and splits the words on 
each uppercase character and sticking an underscore in between.


Only problem is that it doesn't actually work, since there's no 
Event.MY_EVENTconstant.

regards,
Muzak

- Original Message - 
From: Jason Van Cleave [EMAIL PROTECTED]

To: Flash Coders List Flashcoders@chattyfig.figleaf.com
Sent: Monday, March 17, 2008 5:05 AM
Subject: [Flashcoders] AS3 Coding Conventions Question



This is a pretty nice doc and I agree/use most of these while doing as3
development. The use of ALL_CAPS constants makes sense to me but I am not
understanding what the purpose would be to not make the variable be the same
as the value.

For instance, this is what Adobe says and does from:

http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions

--
Constant names

Use all uppercase letters with underscores between words: OFF, DEFAULT_WIDTH
.

The words in the identifier must match the words in the constant value if it
is a String:

public static const FOO_BAR:String = fooBar;

--

For me it makes more sense and helps consistency to make it:

public static const FOO_BAR:String = FOO_BAR;


Anyone have a defense to Adobe's position?


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


[Flashcoders] Error #1009

2008-03-17 Thread Pedro Kostelec
Hi
 (posted in flashnewbies but the list is not very active and i need to
solve this problemas soon as possible)
 i have a problem while creating a as3 short animation:

 When i test the movie(all done with as3) i get this:

 TypeError: Error #1009: Cannot access a property or method of a null
 object reference.
at Mountain/init2()
at Mountain$iinit()
at RisingCroix/::init()
at RisingCroix$iinit()


 my code:
 package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;

public class RisingCroix extends Sprite {
private var croix:Croix;
private var croix2L:Croix2;
private var croix2R:Croix2;

private var vy:Number=5;
private var glowFilter:GlowFilter;
private var blurFilter:BlurFilter;
private var blurFilter2:BlurFilter;

public function RisingCroix() {
init();
}
private function init():void {
croix=new Croix;
addChild(croix);
croix.x=stage.stageWidth / 2;
croix.y=stage.stageHeight;

croix2L = new Croix2;
addChild(croix2L);
croix2L.x=stage.stageWidth /4;
croix2L.y = stage.stageHeight;

croix2R = new Croix2;
addChild(croix2R);
croix2R.x = stage.stageWidth /4 *3;
croix2R.y = stage.stageHeight;

var mountain:Mountain = new Mountain //i guess
it is here wher it stucks
addChild(mountain);
mountain.x = stage.stageWidth / 2;
mountain.y = stage.stageHeight / 2;

glowFilter = new GlowFilter(0x00, 0.6, 30,
30, 2, 1);
blurFilter = new BlurFilter(6,6,1);
blurFilter2 = new BlurFilter(13,13,3);

addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(event:Event):void {
if (croix.ystage.stageHeight/2) {
croix.y -=vy;
}
if (croix2R.ystage.stageHeight/2-10) {
croix2R.y -= vy/3*2;
croix2L.y  -= vy/3*2;
}
croix.filters = [blurFilter, glowFilter];
croix2R.filters = croix2L.filters =[blurFilter2];

}
}
 }

 and the Mountain CLass

 package {
import flash.display.Sprite;

public class Mountain extends Sprite {
private var color1:uint=0x003300;
private var color2:uint=0x001700;

public function Mountain() {
init2();
}
public function init2():void {

graphics.beginFill(color1);
graphics.drawRect(0,0,stage.stageWidth,
stage.stageHeight/2);
graphics.endFill();
}
}
 }



 --
 Pedro D.K.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Error #1009

2008-03-17 Thread jonathan howe
Missing () after Mountain instantiation, first of all...

var mountain:Mountain = new Mountain();



On Mon, Mar 17, 2008 at 3:36 PM, Pedro Kostelec [EMAIL PROTECTED] wrote:

 Hi
  (posted in flashnewbies but the list is not very active and i need to
 solve this problemas soon as possible)
  i have a problem while creating a as3 short animation:

  When i test the movie(all done with as3) i get this:

  TypeError: Error #1009: Cannot access a property or method of a null
  object reference.
at Mountain/init2()
at Mountain$iinit()
at RisingCroix/::init()
at RisingCroix$iinit()


  my code:
  package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;

public class RisingCroix extends Sprite {
private var croix:Croix;
private var croix2L:Croix2;
private var croix2R:Croix2;

private var vy:Number=5;
private var glowFilter:GlowFilter;
private var blurFilter:BlurFilter;
private var blurFilter2:BlurFilter;

public function RisingCroix() {
init();
}
private function init():void {
croix=new Croix;
addChild(croix);
croix.x=stage.stageWidth / 2;
croix.y=stage.stageHeight;

croix2L = new Croix2;
addChild(croix2L);
croix2L.x=stage.stageWidth /4;
croix2L.y = stage.stageHeight;

croix2R = new Croix2;
addChild(croix2R);
croix2R.x = stage.stageWidth /4 *3;
croix2R.y = stage.stageHeight;

var mountain:Mountain = new Mountain //i guess
 it is here wher it stucks
addChild(mountain);
mountain.x = stage.stageWidth / 2;
mountain.y = stage.stageHeight / 2;

glowFilter = new GlowFilter(0x00, 0.6, 30,
 30, 2, 1);
blurFilter = new BlurFilter(6,6,1);
blurFilter2 = new BlurFilter(13,13,3);

addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(event:Event):void {
if (croix.ystage.stageHeight/2) {
croix.y -=vy;
}
if (croix2R.ystage.stageHeight/2-10) {
croix2R.y -= vy/3*2;
croix2L.y  -= vy/3*2;
}
croix.filters = [blurFilter, glowFilter];
croix2R.filters = croix2L.filters =[blurFilter2];

}
}
  }

  and the Mountain CLass

  package {
import flash.display.Sprite;

public class Mountain extends Sprite {
private var color1:uint=0x003300;
private var color2:uint=0x001700;

public function Mountain() {
init2();
}
public function init2():void {

graphics.beginFill(color1);
graphics.drawRect(0,0,stage.stageWidth,
 stage.stageHeight/2);
graphics.endFill();
}
}
  }



  --
  Pedro D.K.
 ___
 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


[Flashcoders] Paragraph spacing in AS2

2008-03-17 Thread Marc Hoffman
I'm using style sheets to control text appearance in a Flash 8 site 
(AS2). I've been able to control the spacing between lines, but have 
not found a way to control spacing between paragraphs. Thus my 
paragraph spacing equals two line breaks, which is too tall.


Anyone have an AS2 technique for setting inter-paragraph spacing? 
Ideally I'd want it to be about 1.5x the regular line spacing.


Thanks!

Marc Hoffman 
___

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


RE: [Flashcoders] Writing Custom MovieClip Classes

2008-03-17 Thread Merrill, Jason

Try this instead, this is how I would do it (you have a few screwy
things in the code you posted, too many to bother commenting on :) ):


package 
{

 import flash.display.MovieClip
 import flash.text.*;

 public class DataCard extends MovieClip 
 {
  public function set name(value:String):void 
  {
   theTextField.text = value;
   }
 }
}

And in the .fla with the clip's class set to DataCard:

var dc:DataCard = new DataCard();
dc.name = Hello;



Jason Merrill
Bank of America  
GTO 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: Sunday, March 16, 2008 9:24 AM
To: Flash Coders List
Subject: [Flashcoders] Writing Custom MovieClip Classes

I have a MovieClip in my project that I put in the library. 
This MovieClip is used in the application lots of times and I 
attach it on the stage on run time when required like

var DC:DataCard = new DataCard();
DC.x = Math.random()*550;
DC.y = Math.random()*400;
addChild(DC);

In the Identifier Dialogue Box I set the Class name to 
DataCard and I am trying to associate it to a Class file 
DataCard.as This MovieClip has a text field for example, and 
it is named nameTF.
I want to be able to control the components of the DataCard 
MovieClip from the Class Itself, in this case to change the 
text in the nameTF TextField.

So in the Class I worte:

package {
 import flash.display.MovieClip

 import flash.display.MovieClip;
 import flash.text.*;

 public class DataCard extends MovieClip {

  var cardName:String;

  static public function DataCard():void {
   nameTF.text = cardName;
  }
  public function set cardName(Name:String):void {
   cardName = Name;
  }
 }
}

It shows me many errors and it does not work.

when I tried:

public class DataCard extends MovieClip {

  public function CardName(CN:String):void {
   nameTF.text = CN;
  }
}

and in the FLA:

 var DC:DataCard = new DataCard();

DC.CardName(here is the name);

DC.x = Math.random()*550;
DC.y = Math.random()*400;
DC.name = dataCard;
addChild(DC);

this worked. But how can I use a Constructor, setters and 
getters in this case? Also how can I set the name of the 
MovieClip like I would do in the FLA DC.name = DCName; in 
the class itself?


Thanks for the Help.



--
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] AS3 Coding Conventions Question

2008-03-17 Thread Merrill, Jason
public static const FILEUPDATED:String = fileUpdated;

With that convention, I always thought perahaps so there were no value
conflicts, if there happened to be one somehow - by naming it the same
as the constant name, you pretty much ensure that, and the lower case
was just to distinguish it from the constant itself - it could be the
significant number 42 for that matter.  

Jason Merrill
Bank of America  
GTO 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 Muzak
Sent: Monday, March 17, 2008 10:12 AM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 Coding Conventions Question

Maybe it's because alot (most?) static constants refer to an 
event type:

Event.CHANGE - change
Event.CLICK - click
REMOVED_FROM_STAGE - removedFromStage

I've noticed that in Flex, if you define Event metada, and 
you follow those rules, you'll get automatic codehints for 
that event, even though you haven't defined any constant for 
that event type.

package com.muzakdeezign.sample.controls {  import 
mx.core.UIComponent;

 [Event(name=myEvent,type=mx.events.Event)]

 public class MyClass extends UIComponent {
  public function MyClass() {
  }
 }
}

If you then create an instance of that class add a listener 
to the instance, MY_EVENT will show up in the codehints.

 mx:Script
  ![CDATA[

   import mx.events.Event;
   import com.muzakdeezign.sample.controls.MyClass;

   private function appInit():void {
var instance:MyClass = new MyClass();
instance.addEventListener(Event.MY_EVENT ...
   }

  ]]
 /mx:Script

Just typing Event. will show MY_EVENT as one of the event 
types in the codehints, even though I haven't defined that 
constant anywhere.
So I guess it picks up those constants from the metadata: 
[Event(name=myEvent,type=mx.events.Event)] and splits the 
words on each uppercase character and sticking an underscore 
in between.

Only problem is that it doesn't actually work, since there's 
no Event.MY_EVENTconstant.

regards,
Muzak

- Original Message -
From: Jason Van Cleave [EMAIL PROTECTED]
To: Flash Coders List Flashcoders@chattyfig.figleaf.com
Sent: Monday, March 17, 2008 5:05 AM
Subject: [Flashcoders] AS3 Coding Conventions Question


 This is a pretty nice doc and I agree/use most of these 
while doing as3
 development. The use of ALL_CAPS constants makes sense to 
me but I am not
 understanding what the purpose would be to not make the 
variable be the same
 as the value.

 For instance, this is what Adobe says and does from:

 http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions

 --
 Constant names

 Use all uppercase letters with underscores between words: 
OFF, DEFAULT_WIDTH
 .

 The words in the identifier must match the words in the 
constant value if it
 is a String:

 public static const FOO_BAR:String = fooBar;

 --

 For me it makes more sense and helps consistency to make it:

 public static const FOO_BAR:String = FOO_BAR;


 Anyone have a defense to Adobe's position?

___
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] Paragraph spacing in AS2

2008-03-17 Thread Glen Pike
In CSS it is margin and margin-top, etc. that sets your spacing between 
elements - don't know if this will work with AS2, e.g.


p {
   margin-bottom:10px;
}

Marc Hoffman wrote:
I'm using style sheets to control text appearance in a Flash 8 site 
(AS2). I've been able to control the spacing between lines, but have 
not found a way to control spacing between paragraphs. Thus my 
paragraph spacing equals two line breaks, which is too tall.


Anyone have an AS2 technique for setting inter-paragraph spacing? 
Ideally I'd want it to be about 1.5x the regular line spacing.


Thanks!

Marc Hoffman ___
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] Error #1009

2008-03-17 Thread Sidney de Koning

Have you tried importing the Mountain Class?

Cheers,

Sid

On Mar 17, 2008, at 4:28 PM, Pedro Kostelec wrote:


I added the () to it but still doesn't work:

package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;

public class RisingCroix extends Sprite {
private var croix:Croix;
private var croix2L:Croix2;
private var croix2R:Croix2;
private var sun:Sun;
private var mountain:Mountain;

private var vy:Number=5;
private var glowFilter:GlowFilter;
private var glowSun:GlowFilter;
private var blurFilter:BlurFilter;
private var blurFilter2:BlurFilter;

public function RisingCroix() {
init();
}
private function init():void {
sun = new Sun();
addChild(sun);
sun.x = stage.stageWidth / 2;
sun.y=stage.stageHeight;

croix=new Croix();
addChild(croix);
croix.x=stage.stageWidth / 2;
croix.y=stage.stageHeight;

croix2L = new Croix2();
addChild(croix2L);
croix2L.x=stage.stageWidth /4;
croix2L.y = stage.stageHeight;

croix2R = new Croix2();
addChild(croix2R);
croix2R.x = stage.stageWidth /4 *3;
croix2R.y = stage.stageHeight;

mountain= new Mountain();
addChild(mountain);
mountain.x = stage.stageWidth/2;
mountain.y = stage.stageHeight/2;

glowFilter = new GlowFilter(0xCC, 0.6, 30, 30, 3, 
1);
blurFilter = new BlurFilter(3,3,1);
blurFilter2 = new BlurFilter(13,13,3);
glowSun = new GlowFilter(0xFF6600, 1, 50, 50, 2, 1, 
true);

croix.filters = [blurFilter, glowFilter];
croix2R.filters = croix2L.filters =[blurFilter2];
sun.filters = [glowSun, blurFilter2];

addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(event:Event):void {
//...
}

}
}
}

Mountain class final:

package {
import flash.display.Sprite;

public class Mountain extends Sprite {
private var x0:Number =0;
private var y0:Number =stage.stageHeight -150;
private var x1:Number=stage.stageWidth/2;
private var y1:Number=100;
private var x2:Number =stage.stageWidth;
private var y2:Number =stage.stageHeight -150;

public function Mountain() {
init();
}
public function init():void {
graphics.beginFill(0x256251);
graphics.moveTo(x0,y0);
graphics.curveTo(x1,y1,x2,y2);
graphics.lineTo(x2, stage.stageHeight);
graphics.lineTo(0, stage.stageHeight);
graphics.endFill();
}
}
}

On Mon, Mar 17, 2008 at 3:58 PM, jonathan howe [EMAIL PROTECTED] 
 wrote:

Missing () after Mountain instantiation, first of all...

var mountain:Mountain = new Mountain();





On Mon, Mar 17, 2008 at 3:36 PM, Pedro Kostelec  
[EMAIL PROTECTED] wrote:



Hi
(posted in flashnewbies but the list is not very active and i need  
to

solve this problemas soon as possible)
i have a problem while creating a as3 short animation:

When i test the movie(all done with as3) i get this:

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
  at Mountain/init2()
  at Mountain$iinit()
  at RisingCroix/::init()
  at RisingCroix$iinit()


my code:
package {
  import flash.display.Sprite;
  import flash.events.Event;
  import flash.filters.*;

  public class RisingCroix extends Sprite {
  private var croix:Croix;
  private var croix2L:Croix2;
  private var croix2R:Croix2;

  private var vy:Number=5;
  private var glowFilter:GlowFilter;
  private var blurFilter:BlurFilter;
  private var blurFilter2:BlurFilter;

  public function RisingCroix() {
  init();
  }
  private function init():void {
  croix=new Croix;
  addChild(croix);
   

Re: [Flashcoders] Error #1009

2008-03-17 Thread Pedro Kostelec
I added the () to it but still doesn't work:

package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;

public class RisingCroix extends Sprite {
private var croix:Croix;
private var croix2L:Croix2;
private var croix2R:Croix2;
private var sun:Sun;
private var mountain:Mountain;

private var vy:Number=5;
private var glowFilter:GlowFilter;
private var glowSun:GlowFilter;
private var blurFilter:BlurFilter;
private var blurFilter2:BlurFilter;

public function RisingCroix() {
init();
}
private function init():void {
sun = new Sun();
addChild(sun);
sun.x = stage.stageWidth / 2;
sun.y=stage.stageHeight;

croix=new Croix();
addChild(croix);
croix.x=stage.stageWidth / 2;
croix.y=stage.stageHeight;

croix2L = new Croix2();
addChild(croix2L);
croix2L.x=stage.stageWidth /4;
croix2L.y = stage.stageHeight;

croix2R = new Croix2();
addChild(croix2R);
croix2R.x = stage.stageWidth /4 *3;
croix2R.y = stage.stageHeight;

mountain= new Mountain();
addChild(mountain);
mountain.x = stage.stageWidth/2;
mountain.y = stage.stageHeight/2;

glowFilter = new GlowFilter(0xCC, 0.6, 30, 30, 3, 
1);
blurFilter = new BlurFilter(3,3,1);
blurFilter2 = new BlurFilter(13,13,3);
glowSun = new GlowFilter(0xFF6600, 1, 50, 50, 2, 1, 
true);

croix.filters = [blurFilter, glowFilter];
croix2R.filters = croix2L.filters =[blurFilter2];
sun.filters = [glowSun, blurFilter2];

addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(event:Event):void {
//...
}

}
}
}

Mountain class final:

package {
import flash.display.Sprite;

public class Mountain extends Sprite {
private var x0:Number =0;
private var y0:Number =stage.stageHeight -150;
private var x1:Number=stage.stageWidth/2;
private var y1:Number=100;
private var x2:Number =stage.stageWidth;
private var y2:Number =stage.stageHeight -150;

public function Mountain() {
init();
}
public function init():void {
graphics.beginFill(0x256251);
graphics.moveTo(x0,y0);
graphics.curveTo(x1,y1,x2,y2);
graphics.lineTo(x2, stage.stageHeight);
graphics.lineTo(0, stage.stageHeight);
graphics.endFill();
}
}
}

On Mon, Mar 17, 2008 at 3:58 PM, jonathan howe [EMAIL PROTECTED] wrote:
 Missing () after Mountain instantiation, first of all...

  var mountain:Mountain = new Mountain();





  On Mon, Mar 17, 2008 at 3:36 PM, Pedro Kostelec [EMAIL PROTECTED] wrote:

   Hi
(posted in flashnewbies but the list is not very active and i need to
   solve this problemas soon as possible)
i have a problem while creating a as3 short animation:
  
When i test the movie(all done with as3) i get this:
  
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
  at Mountain/init2()
  at Mountain$iinit()
  at RisingCroix/::init()
  at RisingCroix$iinit()
  
  
my code:
package {
  import flash.display.Sprite;
  import flash.events.Event;
  import flash.filters.*;
  
  public class RisingCroix extends Sprite {
  private var croix:Croix;
  private var croix2L:Croix2;
  private var croix2R:Croix2;
  
  private var vy:Number=5;
  private var glowFilter:GlowFilter;
  private var blurFilter:BlurFilter;
  private var blurFilter2:BlurFilter;
  
  public function RisingCroix() {
  init();
  }
  private function init():void {
  croix=new Croix;
  

Re: [Flashcoders] Error #1009

2008-03-17 Thread Pedro Kostelec
NO , ihaven't. I am only in a learning process of as3, so if you can
help me importing a class

On Mon, Mar 17, 2008 at 4:35 PM, Sidney de Koning
[EMAIL PROTECTED] wrote:
 Have you tried importing the Mountain Class?

  Cheers,

  Sid



  On Mar 17, 2008, at 4:28 PM, Pedro Kostelec wrote:

   I added the () to it but still doesn't work:
  
   package {
 import flash.display.Sprite;
 import flash.events.Event;
 import flash.filters.*;
  
 public class RisingCroix extends Sprite {
 private var croix:Croix;
 private var croix2L:Croix2;
 private var croix2R:Croix2;
 private var sun:Sun;
 private var mountain:Mountain;
  
 private var vy:Number=5;
 private var glowFilter:GlowFilter;
 private var glowSun:GlowFilter;
 private var blurFilter:BlurFilter;
 private var blurFilter2:BlurFilter;
  
 public function RisingCroix() {
 init();
 }
 private function init():void {
 sun = new Sun();
 addChild(sun);
 sun.x = stage.stageWidth / 2;
 sun.y=stage.stageHeight;
  
 croix=new Croix();
 addChild(croix);
 croix.x=stage.stageWidth / 2;
 croix.y=stage.stageHeight;
  
 croix2L = new Croix2();
 addChild(croix2L);
 croix2L.x=stage.stageWidth /4;
 croix2L.y = stage.stageHeight;
  
 croix2R = new Croix2();
 addChild(croix2R);
 croix2R.x = stage.stageWidth /4 *3;
 croix2R.y = stage.stageHeight;
  
 mountain= new Mountain();
 addChild(mountain);
 mountain.x = stage.stageWidth/2;
 mountain.y = stage.stageHeight/2;
  
 glowFilter = new GlowFilter(0xCC, 0.6, 30, 30, 
 3, 1);
 blurFilter = new BlurFilter(3,3,1);
 blurFilter2 = new BlurFilter(13,13,3);
 glowSun = new GlowFilter(0xFF6600, 1, 50, 50, 2, 1, 
 true);
  
 croix.filters = [blurFilter, glowFilter];
 croix2R.filters = croix2L.filters =[blurFilter2];
 sun.filters = [glowSun, blurFilter2];
  
 addEventListener(Event.ENTER_FRAME, onEnterFrame);
 }
 public function onEnterFrame(event:Event):void {
 //...
 }
  
 }
 }
   }
  
   Mountain class final:
  
   package {
 import flash.display.Sprite;
  
 public class Mountain extends Sprite {
 private var x0:Number =0;
 private var y0:Number =stage.stageHeight -150;
 private var x1:Number=stage.stageWidth/2;
 private var y1:Number=100;
 private var x2:Number =stage.stageWidth;
 private var y2:Number =stage.stageHeight -150;
  
 public function Mountain() {
 init();
 }
 public function init():void {
 graphics.beginFill(0x256251);
 graphics.moveTo(x0,y0);
 graphics.curveTo(x1,y1,x2,y2);
 graphics.lineTo(x2, stage.stageHeight);
 graphics.lineTo(0, stage.stageHeight);
 graphics.endFill();
 }
 }
   }
  
   On Mon, Mar 17, 2008 at 3:58 PM, jonathan howe [EMAIL PROTECTED]
wrote:
   Missing () after Mountain instantiation, first of all...
  
   var mountain:Mountain = new Mountain();
  
  
  
  
  
   On Mon, Mar 17, 2008 at 3:36 PM, Pedro Kostelec
   [EMAIL PROTECTED] wrote:
  
   Hi
   (posted in flashnewbies but the list is not very active and i need
   to
   solve this problemas soon as possible)
   i have a problem while creating a as3 short animation:
  
   When i test the movie(all done with as3) i get this:
  
   TypeError: Error #1009: Cannot access a property or method of a null
   object reference.
 at Mountain/init2()
 at Mountain$iinit()
 at RisingCroix/::init()
 at RisingCroix$iinit()
  
  
   my code:
   package {
 import flash.display.Sprite;
 import flash.events.Event;
 import flash.filters.*;
  
 public class RisingCroix extends Sprite {
 private var croix:Croix;
 private var croix2L:Croix2;
 private var croix2R:Croix2;
  
 private var 

Re: [Flashcoders] Error #1009

2008-03-17 Thread Cory Petosky
Jonathan, that's actually legal in ActionScript. Ugly and misleading, but legal.

Pedro, change Mountain2 to this:

 import flash.events.Event;
 import flash.display.Sprite;
 public class Mountain extends Sprite {
   private var color1:uint=0x003300;
   private var color2:uint=0x001700;

   public function Mountain() {
   addEventListener(Event.ADDED_TO_STAGE, stageListener);
   }
   public function stageListener(event:Event):void {

   graphics.beginFill(color1);
   graphics.drawRect(0,0,stage.stageWidth,
stage.stageHeight/2);
   graphics.endFill();
   }

You don't have a reference to the stage until the object is actually
added -- using an event listener to wait until you're added to the
stage solves the problem.


On 3/17/08, jonathan howe [EMAIL PROTECTED] wrote:
 Missing () after Mountain instantiation, first of all...

  var mountain:Mountain = new Mountain();




  On Mon, Mar 17, 2008 at 3:36 PM, Pedro Kostelec [EMAIL PROTECTED] wrote:

   Hi
(posted in flashnewbies but the list is not very active and i need to
   solve this problemas soon as possible)
i have a problem while creating a as3 short animation:
  
When i test the movie(all done with as3) i get this:
  
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
  at Mountain/init2()
  at Mountain$iinit()
  at RisingCroix/::init()
  at RisingCroix$iinit()
  
  
my code:
package {
  import flash.display.Sprite;
  import flash.events.Event;
  import flash.filters.*;
  
  public class RisingCroix extends Sprite {
  private var croix:Croix;
  private var croix2L:Croix2;
  private var croix2R:Croix2;
  
  private var vy:Number=5;
  private var glowFilter:GlowFilter;
  private var blurFilter:BlurFilter;
  private var blurFilter2:BlurFilter;
  
  public function RisingCroix() {
  init();
  }
  private function init():void {
  croix=new Croix;
  addChild(croix);
  croix.x=stage.stageWidth / 2;
  croix.y=stage.stageHeight;
  
  croix2L = new Croix2;
  addChild(croix2L);
  croix2L.x=stage.stageWidth /4;
  croix2L.y = stage.stageHeight;
  
  croix2R = new Croix2;
  addChild(croix2R);
  croix2R.x = stage.stageWidth /4 *3;
  croix2R.y = stage.stageHeight;
  
  var mountain:Mountain = new Mountain //i guess
   it is here wher it stucks
  addChild(mountain);
  mountain.x = stage.stageWidth / 2;
  mountain.y = stage.stageHeight / 2;
  
  glowFilter = new GlowFilter(0x00, 0.6, 30,
   30, 2, 1);
  blurFilter = new BlurFilter(6,6,1);
  blurFilter2 = new BlurFilter(13,13,3);
  
  addEventListener(Event.ENTER_FRAME, onEnterFrame);
  }
  public function onEnterFrame(event:Event):void {
  if (croix.ystage.stageHeight/2) {
  croix.y -=vy;
  }
  if (croix2R.ystage.stageHeight/2-10) {
  croix2R.y -= vy/3*2;
  croix2L.y  -= vy/3*2;
  }
  croix.filters = [blurFilter, glowFilter];
  croix2R.filters = croix2L.filters =[blurFilter2];
  
  }
  }
}
  
and the Mountain CLass
  
package {
  import flash.display.Sprite;
  
  public class Mountain extends Sprite {
  private var color1:uint=0x003300;
  private var color2:uint=0x001700;
  
  public function Mountain() {
  init2();
  }
  public function init2():void {
  
  graphics.beginFill(color1);
  graphics.drawRect(0,0,stage.stageWidth,
   stage.stageHeight/2);
  graphics.endFill();
  }
  }
}
  
  
  
--
Pedro D.K.
   ___
   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

 

Re: [Flashcoders] Error #1009

2008-03-17 Thread Sidney de Koning

Just rewrite this:


package {
 import flash.display.Sprite;
 import flash.events.Event;
 import flash.filters.*;

 public class RisingCroix extends Sprite {
 private var croix:Croix;


to this:


package {
 import flash.display.Sprite;
 import flash.events.Event;
 import flash.filters.*;

import classpath.to.mountain.class.Mountain;



 public class RisingCroix extends Sprite {
 private var croix:Croix;


Then the datatype Mountain exists and your class will be available in  
this class.

Hope that works for you, let me know.

Cheers,

Sid

PS. Just a tip, its good practice to rename your private member  
variables (class variables: private var nameOfVar) with an underscore,  
like so: private var _nameOfVar so you can easily distinguish between  
class variables and local variables in functions or parameters.



On Mar 17, 2008, at 4:53 PM, Pedro Kostelec wrote:


NO , ihaven't. I am only in a learning process of as3, so if you can
help me importing a class

On Mon, Mar 17, 2008 at 4:35 PM, Sidney de Koning
[EMAIL PROTECTED] wrote:

Have you tried importing the Mountain Class?

Cheers,

Sid



On Mar 17, 2008, at 4:28 PM, Pedro Kostelec wrote:


I added the () to it but still doesn't work:

package {
 import flash.display.Sprite;
 import flash.events.Event;
 import flash.filters.*;

 public class RisingCroix extends Sprite {
 private var croix:Croix;
 private var croix2L:Croix2;
 private var croix2R:Croix2;
 private var sun:Sun;
 private var mountain:Mountain;

 private var vy:Number=5;
 private var glowFilter:GlowFilter;
 private var glowSun:GlowFilter;
 private var blurFilter:BlurFilter;
 private var blurFilter2:BlurFilter;

 public function RisingCroix() {
 init();
 }
 private function init():void {
 sun = new Sun();
 addChild(sun);
 sun.x = stage.stageWidth / 2;
 sun.y=stage.stageHeight;

 croix=new Croix();
 addChild(croix);
 croix.x=stage.stageWidth / 2;
 croix.y=stage.stageHeight;

 croix2L = new Croix2();
 addChild(croix2L);
 croix2L.x=stage.stageWidth /4;
 croix2L.y = stage.stageHeight;

 croix2R = new Croix2();
 addChild(croix2R);
 croix2R.x = stage.stageWidth /4 *3;
 croix2R.y = stage.stageHeight;

 mountain= new Mountain();
 addChild(mountain);
 mountain.x = stage.stageWidth/2;
 mountain.y = stage.stageHeight/2;

 glowFilter = new GlowFilter(0xCC, 0.6,  
30, 30, 3, 1);

 blurFilter = new BlurFilter(3,3,1);
 blurFilter2 = new BlurFilter(13,13,3);
 glowSun = new GlowFilter(0xFF6600, 1, 50, 50,  
2, 1, true);


 croix.filters = [blurFilter, glowFilter];
 croix2R.filters = croix2L.filters  
=[blurFilter2];

 sun.filters = [glowSun, blurFilter2];

 addEventListener(Event.ENTER_FRAME,  
onEnterFrame);

 }
 public function onEnterFrame(event:Event):void {
 //...
 }

 }
 }
}

Mountain class final:

package {
 import flash.display.Sprite;

 public class Mountain extends Sprite {
 private var x0:Number =0;
 private var y0:Number =stage.stageHeight -150;
 private var x1:Number=stage.stageWidth/2;
 private var y1:Number=100;
 private var x2:Number =stage.stageWidth;
 private var y2:Number =stage.stageHeight -150;

 public function Mountain() {
 init();
 }
 public function init():void {
 graphics.beginFill(0x256251);
 graphics.moveTo(x0,y0);
 graphics.curveTo(x1,y1,x2,y2);
 graphics.lineTo(x2, stage.stageHeight);
 graphics.lineTo(0, stage.stageHeight);
 graphics.endFill();
 }
 }
}

On Mon, Mar 17, 2008 at 3:58 PM, jonathan howe [EMAIL PROTECTED]

wrote:
Missing () after Mountain instantiation, first of all...

var mountain:Mountain = new Mountain();





On Mon, Mar 17, 2008 at 3:36 PM, Pedro Kostelec
[EMAIL PROTECTED] wrote:


Hi
(posted in flashnewbies but the list is not very active and i need
to
solve this problemas soon as possible)
i have a problem while creating a as3 short animation:

When i test the movie(all done with as3) i get this:

TypeError: Error 

Re: [Flashcoders] Paragraph spacing in AS2

2008-03-17 Thread Marc Hoffman

Thank you, Glen. I will try this.

Marc

At 08:16 AM 3/17/2008, Glen Pike wrote:
In CSS it is margin and margin-top, etc. that sets your spacing 
between elements - don't know if this will work with AS2, e.g.


p {
   margin-bottom:10px;
}

Marc Hoffman wrote:
I'm using style sheets to control text appearance in a Flash 8 site 
(AS2). I've been able to control the spacing between lines, but 
have not found a way to control spacing between paragraphs. Thus my 
paragraph spacing equals two line breaks, which is too tall.


Anyone have an AS2 technique for setting inter-paragraph spacing? 
Ideally I'd want it to be about 1.5x the regular line spacing.


Thanks!

Marc Hoffman ___
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] Error #1009

2008-03-17 Thread Pedro Kostelec
I doesn't. I posted the iles on the net.
Can you please throw a look at?
http://www.box.net/shared/wettvhs84s

Thanks

On Mon, Mar 17, 2008 at 4:50 PM, Cory Petosky
[EMAIL PROTECTED] wrote:
 Jonathan, that's actually legal in ActionScript. Ugly and misleading, but 
 legal.

  Pedro, change Mountain2 to this:

  import flash.events.Event;

  import flash.display.Sprite;
  public class Mountain extends Sprite {
private var color1:uint=0x003300;
private var color2:uint=0x001700;

public function Mountain() {
addEventListener(Event.ADDED_TO_STAGE, stageListener);
}
public function stageListener(event:Event):void {


graphics.beginFill(color1);
graphics.drawRect(0,0,stage.stageWidth,
  stage.stageHeight/2);
graphics.endFill();
}

  You don't have a reference to the stage until the object is actually
  added -- using an event listener to wait until you're added to the
  stage solves the problem.




  On 3/17/08, jonathan howe [EMAIL PROTECTED] wrote:
   Missing () after Mountain instantiation, first of all...
  
var mountain:Mountain = new Mountain();
  
  
  
  
On Mon, Mar 17, 2008 at 3:36 PM, Pedro Kostelec [EMAIL PROTECTED] wrote:
  
 Hi
  (posted in flashnewbies but the list is not very active and i need to
 solve this problemas soon as possible)
  i have a problem while creating a as3 short animation:

  When i test the movie(all done with as3) i get this:

  TypeError: Error #1009: Cannot access a property or method of a null
  object reference.
at Mountain/init2()
at Mountain$iinit()
at RisingCroix/::init()
at RisingCroix$iinit()


  my code:
  package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;

public class RisingCroix extends Sprite {
private var croix:Croix;
private var croix2L:Croix2;
private var croix2R:Croix2;

private var vy:Number=5;
private var glowFilter:GlowFilter;
private var blurFilter:BlurFilter;
private var blurFilter2:BlurFilter;

public function RisingCroix() {
init();
}
private function init():void {
croix=new Croix;
addChild(croix);
croix.x=stage.stageWidth / 2;
croix.y=stage.stageHeight;

croix2L = new Croix2;
addChild(croix2L);
croix2L.x=stage.stageWidth /4;
croix2L.y = stage.stageHeight;

croix2R = new Croix2;
addChild(croix2R);
croix2R.x = stage.stageWidth /4 *3;
croix2R.y = stage.stageHeight;

var mountain:Mountain = new Mountain //i guess
 it is here wher it stucks
addChild(mountain);
mountain.x = stage.stageWidth / 2;
mountain.y = stage.stageHeight / 2;

glowFilter = new GlowFilter(0x00, 0.6, 30,
 30, 2, 1);
blurFilter = new BlurFilter(6,6,1);
blurFilter2 = new BlurFilter(13,13,3);

addEventListener(Event.ENTER_FRAME, 
 onEnterFrame);
}
public function onEnterFrame(event:Event):void {
if (croix.ystage.stageHeight/2) {
croix.y -=vy;
}
if (croix2R.ystage.stageHeight/2-10) {
croix2R.y -= vy/3*2;
croix2L.y  -= vy/3*2;
}
croix.filters = [blurFilter, glowFilter];
croix2R.filters = croix2L.filters =[blurFilter2];

}
}
  }

  and the Mountain CLass

  package {
import flash.display.Sprite;

public class Mountain extends Sprite {
private var color1:uint=0x003300;
private var color2:uint=0x001700;

public function Mountain() {
init2();
}
public function init2():void {

graphics.beginFill(color1);

Re: [Flashcoders] Error #1009

2008-03-17 Thread Jason Van Cleave
you can't reference the stage in the Mountain class until it is added to the
Display List. try this

package {
   import flash.display.Sprite;
import flash.events.Event;

   public class Mountain extends Sprite {
   private var x0:Number;
   private var y0:Number;
   private var x1:Number;
   private var y1:Number;
   private var x2:Number;
   private var y2:Number;

   public function Mountain() {
   this.addEventListener(Event.ADDED_TO_STAGE, onStageAdded);


   }
   public function init():void {
   graphics.beginFill(0x256251);
   graphics.moveTo(x0,y0);
   graphics.curveTo(x1,y1,x2,y2);
   graphics.lineTo(x2, stage.stageHeight);
   graphics.lineTo(0, stage.stageHeight);
   graphics.endFill();
   }
   public function onStageAdded(e:Event):void
   {
   x0:Number =0;
  y0 =stage.stageHeight -150;
   x1=stage.stageWidth/2;
  y1:Number=100;
   x2 =stage.stageWidth;
   y2:Number =stage.stageHeight -150;
   init();

  }
 }

On Mon, Mar 17, 2008 at 11:28 AM, Pedro Kostelec [EMAIL PROTECTED]
wrote:

 I added the () to it but still doesn't work:

 package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;

public class RisingCroix extends Sprite {
private var croix:Croix;
private var croix2L:Croix2;
private var croix2R:Croix2;
 private var sun:Sun;
private var mountain:Mountain;

private var vy:Number=5;
private var glowFilter:GlowFilter;
 private var glowSun:GlowFilter;
 private var blurFilter:BlurFilter;
private var blurFilter2:BlurFilter;

public function RisingCroix() {
init();
}
private function init():void {
 sun = new Sun();
addChild(sun);
sun.x = stage.stageWidth / 2;
sun.y=stage.stageHeight;

croix=new Croix();
addChild(croix);
croix.x=stage.stageWidth / 2;
croix.y=stage.stageHeight;

croix2L = new Croix2();
addChild(croix2L);
croix2L.x=stage.stageWidth /4;
croix2L.y = stage.stageHeight;

croix2R = new Croix2();
addChild(croix2R);
croix2R.x = stage.stageWidth /4 *3;
croix2R.y = stage.stageHeight;

 mountain= new Mountain();
 addChild(mountain);
mountain.x = stage.stageWidth/2;
mountain.y = stage.stageHeight/2;

 glowFilter = new GlowFilter(0xCC, 0.6, 30, 30,
 3, 1);
blurFilter = new BlurFilter(3,3,1);
 blurFilter2 = new BlurFilter(13,13,3);
 glowSun = new GlowFilter(0xFF6600, 1, 50, 50, 2,
 1, true);

croix.filters = [blurFilter, glowFilter];
croix2R.filters = croix2L.filters =[blurFilter2];
 sun.filters = [glowSun, blurFilter2];

addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(event:Event):void {
 //...
}

}
}
 }

 Mountain class final:

 package {
import flash.display.Sprite;

public class Mountain extends Sprite {
 private var x0:Number =0;
private var y0:Number =stage.stageHeight -150;
private var x1:Number=stage.stageWidth/2;
private var y1:Number=100;
private var x2:Number =stage.stageWidth;
private var y2:Number =stage.stageHeight -150;

public function Mountain() {
init();
}
public function init():void {
graphics.beginFill(0x256251);
graphics.moveTo(x0,y0);
graphics.curveTo(x1,y1,x2,y2);
graphics.lineTo(x2, stage.stageHeight);
graphics.lineTo(0, stage.stageHeight);
graphics.endFill();
 }
}
 }

 On Mon, Mar 17, 2008 at 3:58 PM, jonathan howe [EMAIL PROTECTED]
 

Re: [Flashcoders] Error #1009

2008-03-17 Thread jonathan howe
Hi, Cory,

That is really interesting. I played with it a little and I got this
Warning:

Warning: 3553: Function value used where type void was expected.  Possibly
the parentheses () are missing after this function reference.
and of course it threw an actual error when I set up the function with
arguments.
I wonder if there is some sort of precedent/reasoning for that working... If
you write something like this, it behaves like almost like a property:

function stuff():int {

return 1;
}
var a = stuff;

but this:

function stuff():int {

return 1;
}
stuff;

shows that warning.

Anyway, it's curious and thanks for setting me straight!

-jonathan


On Mon, Mar 17, 2008 at 5:25 PM, Pedro Kostelec [EMAIL PROTECTED] wrote:

 I doesn't. I posted the iles on the net.
 Can you please throw a look at?
 http://www.box.net/shared/wettvhs84s

 Thanks

 On Mon, Mar 17, 2008 at 4:50 PM, Cory Petosky
 [EMAIL PROTECTED] wrote:
  Jonathan, that's actually legal in ActionScript. Ugly and misleading,
 but legal.
 
   Pedro, change Mountain2 to this:
 
   import flash.events.Event;
 
   import flash.display.Sprite;
   public class Mountain extends Sprite {
 private var color1:uint=0x003300;
 private var color2:uint=0x001700;
 
 public function Mountain() {
 addEventListener(Event.ADDED_TO_STAGE,
 stageListener);
 }
 public function stageListener(event:Event):void {
 
 
 graphics.beginFill(color1);
 graphics.drawRect(0,0,stage.stageWidth,
   stage.stageHeight/2);
 graphics.endFill();
 }
 
   You don't have a reference to the stage until the object is actually
   added -- using an event listener to wait until you're added to the
   stage solves the problem.
  
 
 
 
   On 3/17/08, jonathan howe [EMAIL PROTECTED] wrote:
Missing () after Mountain instantiation, first of all...
   
 var mountain:Mountain = new Mountain();
   
   
   
   
 On Mon, Mar 17, 2008 at 3:36 PM, Pedro Kostelec [EMAIL PROTECTED]
 wrote:
   
  Hi
   (posted in flashnewbies but the list is not very active and i
 need to
  solve this problemas soon as possible)
   i have a problem while creating a as3 short animation:
 
   When i test the movie(all done with as3) i get this:
 
   TypeError: Error #1009: Cannot access a property or method of a
 null
   object reference.
 at Mountain/init2()
 at Mountain$iinit()
 at RisingCroix/::init()
 at RisingCroix$iinit()
 
 
   my code:
   package {
 import flash.display.Sprite;
 import flash.events.Event;
 import flash.filters.*;
 
 public class RisingCroix extends Sprite {
 private var croix:Croix;
 private var croix2L:Croix2;
 private var croix2R:Croix2;
 
 private var vy:Number=5;
 private var glowFilter:GlowFilter;
 private var blurFilter:BlurFilter;
 private var blurFilter2:BlurFilter;
 
 public function RisingCroix() {
 init();
 }
 private function init():void {
 croix=new Croix;
 addChild(croix);
 croix.x=stage.stageWidth / 2;
 croix.y=stage.stageHeight;
 
 croix2L = new Croix2;
 addChild(croix2L);
 croix2L.x=stage.stageWidth /4;
 croix2L.y = stage.stageHeight;
 
 croix2R = new Croix2;
 addChild(croix2R);
 croix2R.x = stage.stageWidth /4 *3;
 croix2R.y = stage.stageHeight;
 
 var mountain:Mountain = new Mountain //i
 guess
  it is here wher it stucks
 addChild(mountain);
 mountain.x = stage.stageWidth / 2;
 mountain.y = stage.stageHeight / 2;
 
 glowFilter = new GlowFilter(0x00, 0.6,
 30,
  30, 2, 1);
 blurFilter = new BlurFilter(6,6,1);
 blurFilter2 = new BlurFilter(13,13,3);
 
 addEventListener(Event.ENTER_FRAME,
 onEnterFrame);
 }
 public function onEnterFrame(event:Event):void {
 if (croix.ystage.stageHeight/2) {
 croix.y -=vy;
 }
 if (croix2R.ystage.stageHeight/2-10) {
 

Re: [Flashcoders] Error #1009

2008-03-17 Thread Pedro Kostelec
Joson, i tried yours too.

I had to add var x0:Number and so on... (The var was missing)
But it hasn't worked neither. Well i get no more error but the sprite
isn't drawn



On Mon, Mar 17, 2008 at 5:14 PM, Jason Van Cleave
[EMAIL PROTECTED] wrote:
 you can't reference the stage in the Mountain class until it is added to the
  Display List. try this


  package {
import flash.display.Sprite;
  import flash.events.Event;


public class Mountain extends Sprite {
private var x0:Number;
private var y0:Number;
private var x1:Number;
private var y1:Number;
private var x2:Number;
private var y2:Number;

public function Mountain() {
this.addEventListener(Event.ADDED_TO_STAGE, onStageAdded);



}
public function init():void {
graphics.beginFill(0x256251);
graphics.moveTo(x0,y0);
graphics.curveTo(x1,y1,x2,y2);
graphics.lineTo(x2, stage.stageHeight);
graphics.lineTo(0, stage.stageHeight);
graphics.endFill();
}
public function onStageAdded(e:Event):void
{
x0:Number =0;
   y0 =stage.stageHeight -150;
x1=stage.stageWidth/2;
   y1:Number=100;
x2 =stage.stageWidth;

y2:Number =stage.stageHeight -150;
init();

   }
   }

  On Mon, Mar 17, 2008 at 11:28 AM, Pedro Kostelec [EMAIL PROTECTED]


 wrote:

   I added the () to it but still doesn't work:
  
   package {
  import flash.display.Sprite;
  import flash.events.Event;
  import flash.filters.*;
  
  public class RisingCroix extends Sprite {
  private var croix:Croix;
  private var croix2L:Croix2;
  private var croix2R:Croix2;
   private var sun:Sun;
  private var mountain:Mountain;
  
  private var vy:Number=5;
  private var glowFilter:GlowFilter;
   private var glowSun:GlowFilter;
   private var blurFilter:BlurFilter;
  private var blurFilter2:BlurFilter;
  
  public function RisingCroix() {
  init();
  }
  private function init():void {
   sun = new Sun();
  addChild(sun);
  sun.x = stage.stageWidth / 2;
  sun.y=stage.stageHeight;
  
  croix=new Croix();
  addChild(croix);
  croix.x=stage.stageWidth / 2;
  croix.y=stage.stageHeight;
  
  croix2L = new Croix2();
  addChild(croix2L);
  croix2L.x=stage.stageWidth /4;
  croix2L.y = stage.stageHeight;
  
  croix2R = new Croix2();
  addChild(croix2R);
  croix2R.x = stage.stageWidth /4 *3;
  croix2R.y = stage.stageHeight;
  
   mountain= new Mountain();
   addChild(mountain);
  mountain.x = stage.stageWidth/2;
  mountain.y = stage.stageHeight/2;
  
   glowFilter = new GlowFilter(0xCC, 0.6, 30, 30,
   3, 1);
  blurFilter = new BlurFilter(3,3,1);
   blurFilter2 = new BlurFilter(13,13,3);
   glowSun = new GlowFilter(0xFF6600, 1, 50, 50, 2,
   1, true);
  
  croix.filters = [blurFilter, glowFilter];
  croix2R.filters = croix2L.filters =[blurFilter2];
   sun.filters = [glowSun, blurFilter2];
  
  addEventListener(Event.ENTER_FRAME, onEnterFrame);
  }
  public function onEnterFrame(event:Event):void {
   //...
  }
  
  }
  }
   }
  
   Mountain class final:
  
   package {
  import flash.display.Sprite;
  
  public class Mountain extends Sprite {
   private var x0:Number =0;
  private var y0:Number =stage.stageHeight -150;
  private var x1:Number=stage.stageWidth/2;
  private var y1:Number=100;
  private var x2:Number =stage.stageWidth;
  private var y2:Number =stage.stageHeight -150;
  
  public function Mountain() {
  init();
  }
 

Re: [Flashcoders] Error #1009

2008-03-17 Thread Pedro Kostelec
I tried import Mountain; and import com.Mountain but it hasn't worked.
Always get the same error

I supose there is no path if the files are in the same folder,no?

On Mon, Mar 17, 2008 at 5:15 PM, Sidney de Koning
[EMAIL PROTECTED] wrote:
 Just rewrite this:


   package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;
  
public class RisingCroix extends Sprite {
private var croix:Croix;

  to this:


   package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;
  import classpath.to.mountain.class.Mountain;

 
  
public class RisingCroix extends Sprite {
private var croix:Croix;

  Then the datatype Mountain exists and your class will be available in
  this class.
  Hope that works for you, let me know.

  Cheers,

  Sid

  PS. Just a tip, its good practice to rename your private member
  variables (class variables: private var nameOfVar) with an underscore,
  like so: private var _nameOfVar so you can easily distinguish between
  class variables and local variables in functions or parameters.




  On Mar 17, 2008, at 4:53 PM, Pedro Kostelec wrote:

   NO , ihaven't. I am only in a learning process of as3, so if you can
   help me importing a class
  
   On Mon, Mar 17, 2008 at 4:35 PM, Sidney de Koning
   [EMAIL PROTECTED] wrote:
   Have you tried importing the Mountain Class?
  
   Cheers,
  
   Sid
  
  
  
   On Mar 17, 2008, at 4:28 PM, Pedro Kostelec wrote:
  
   I added the () to it but still doesn't work:
  
   package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;
  
public class RisingCroix extends Sprite {
private var croix:Croix;
private var croix2L:Croix2;
private var croix2R:Croix2;
private var sun:Sun;
private var mountain:Mountain;
  
private var vy:Number=5;
private var glowFilter:GlowFilter;
private var glowSun:GlowFilter;
private var blurFilter:BlurFilter;
private var blurFilter2:BlurFilter;
  
public function RisingCroix() {
init();
}
private function init():void {
sun = new Sun();
addChild(sun);
sun.x = stage.stageWidth / 2;
sun.y=stage.stageHeight;
  
croix=new Croix();
addChild(croix);
croix.x=stage.stageWidth / 2;
croix.y=stage.stageHeight;
  
croix2L = new Croix2();
addChild(croix2L);
croix2L.x=stage.stageWidth /4;
croix2L.y = stage.stageHeight;
  
croix2R = new Croix2();
addChild(croix2R);
croix2R.x = stage.stageWidth /4 *3;
croix2R.y = stage.stageHeight;
  
mountain= new Mountain();
addChild(mountain);
mountain.x = stage.stageWidth/2;
mountain.y = stage.stageHeight/2;
  
glowFilter = new GlowFilter(0xCC, 0.6,
   30, 30, 3, 1);
blurFilter = new BlurFilter(3,3,1);
blurFilter2 = new BlurFilter(13,13,3);
glowSun = new GlowFilter(0xFF6600, 1, 50, 50,
   2, 1, true);
  
croix.filters = [blurFilter, glowFilter];
croix2R.filters = croix2L.filters
   =[blurFilter2];
sun.filters = [glowSun, blurFilter2];
  
addEventListener(Event.ENTER_FRAME,
   onEnterFrame);
}
public function onEnterFrame(event:Event):void {
//...
}
  
}
}
   }
  
   Mountain class final:
  
   package {
import flash.display.Sprite;
  
public class Mountain extends Sprite {
private var x0:Number =0;
private var y0:Number =stage.stageHeight -150;
private var x1:Number=stage.stageWidth/2;
private var y1:Number=100;
private var x2:Number =stage.stageWidth;
private var y2:Number =stage.stageHeight -150;
  
public function Mountain() {
init();
}
public function init():void {
graphics.beginFill(0x256251);
graphics.moveTo(x0,y0);
graphics.curveTo(x1,y1,x2,y2);
graphics.lineTo(x2, stage.stageHeight);

Re: [Flashcoders] Error #1009

2008-03-17 Thread Sidney de Koning
I think that in AS3, there is  only one file that can exsist in the  
'root' of the package, the only entry point you have for a  
application. The rest has to live in packages. Most of the time you  
call this class 'Main'. And use it as your document class or  
instanciate it on the timeline, then you place all your other files in  
packages and reference them i Main where you have to.

so like this (read this like a directory structure)

root folder: Main  (- class files)
package: com.something.Mountain (- class files)
package: com.something.RisingCroix  (- class files)

etc.

And in Main you reference your imports like import  
com.something.ClassName.


I hope it is clear for you. Do you understand?

Cheers,

Sid

On Mar 17, 2008, at 5:46 PM, Pedro Kostelec wrote:


I tried import Mountain; and import com.Mountain but it hasn't worked.
Always get the same error

I supose there is no path if the files are in the same folder,no?

On Mon, Mar 17, 2008 at 5:15 PM, Sidney de Koning
[EMAIL PROTECTED] wrote:

Just rewrite this:



package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;

public class RisingCroix extends Sprite {
private var croix:Croix;


to this:



package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;

import classpath.to.mountain.class.Mountain;




public class RisingCroix extends Sprite {
private var croix:Croix;


Then the datatype Mountain exists and your class will be available in
this class.
Hope that works for you, let me know.

Cheers,

Sid

PS. Just a tip, its good practice to rename your private member
variables (class variables: private var nameOfVar) with an  
underscore,

like so: private var _nameOfVar so you can easily distinguish between
class variables and local variables in functions or parameters.




On Mar 17, 2008, at 4:53 PM, Pedro Kostelec wrote:


NO , ihaven't. I am only in a learning process of as3, so if you can
help me importing a class

On Mon, Mar 17, 2008 at 4:35 PM, Sidney de Koning
[EMAIL PROTECTED] wrote:

Have you tried importing the Mountain Class?

Cheers,

Sid



On Mar 17, 2008, at 4:28 PM, Pedro Kostelec wrote:


I added the () to it but still doesn't work:

package {
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;

public class RisingCroix extends Sprite {
private var croix:Croix;
private var croix2L:Croix2;
private var croix2R:Croix2;
private var sun:Sun;
private var mountain:Mountain;

private var vy:Number=5;
private var glowFilter:GlowFilter;
private var glowSun:GlowFilter;
private var blurFilter:BlurFilter;
private var blurFilter2:BlurFilter;

public function RisingCroix() {
init();
}
private function init():void {
sun = new Sun();
addChild(sun);
sun.x = stage.stageWidth / 2;
sun.y=stage.stageHeight;

croix=new Croix();
addChild(croix);
croix.x=stage.stageWidth / 2;
croix.y=stage.stageHeight;

croix2L = new Croix2();
addChild(croix2L);
croix2L.x=stage.stageWidth /4;
croix2L.y = stage.stageHeight;

croix2R = new Croix2();
addChild(croix2R);
croix2R.x = stage.stageWidth /4 *3;
croix2R.y = stage.stageHeight;

mountain= new Mountain();
addChild(mountain);
mountain.x = stage.stageWidth/2;
mountain.y = stage.stageHeight/2;

glowFilter = new GlowFilter(0xCC, 0.6,
30, 30, 3, 1);
blurFilter = new BlurFilter(3,3,1);
blurFilter2 = new BlurFilter(13,13,3);
glowSun = new GlowFilter(0xFF6600, 1, 50, 50,
2, 1, true);

croix.filters = [blurFilter, glowFilter];
croix2R.filters = croix2L.filters
=[blurFilter2];
sun.filters = [glowSun, blurFilter2];

addEventListener(Event.ENTER_FRAME,
onEnterFrame);
}
public function onEnterFrame(event:Event):void {
//...
}

}
}
}

Mountain class final:

package {
import flash.display.Sprite;

public class Mountain extends Sprite {
private var x0:Number =0;
private var y0:Number =stage.stageHeight -150;
private var x1:Number=stage.stageWidth/2;
private var y1:Number=100;
private var x2:Number =stage.stageWidth;
private var y2:Number =stage.stageHeight -150;


Re: [Flashcoders] Error #1009

2008-03-17 Thread Sidney de Koning
Start tracing out the variables, because there is a variable undefined  
or null and you try to perform an operation on it. Since its undefined  
or null the operation halts.


It can also be that your function init2 does not return void but  
returns a sprite.

On Mar 17, 2008, at 5:47 PM, Pedro Kostelec wrote:


Joson, i tried yours too.

I had to add var x0:Number and so on... (The var was missing)
But it hasn't worked neither. Well i get no more error but the sprite
isn't drawn



On Mon, Mar 17, 2008 at 5:14 PM, Jason Van Cleave
[EMAIL PROTECTED] wrote:
you can't reference the stage in the Mountain class until it is  
added to the

Display List. try this


package {
  import flash.display.Sprite;
import flash.events.Event;


  public class Mountain extends Sprite {
  private var x0:Number;
  private var y0:Number;
  private var x1:Number;
  private var y1:Number;
  private var x2:Number;
  private var y2:Number;

  public function Mountain() {
  this.addEventListener(Event.ADDED_TO_STAGE,  
onStageAdded);




  }
  public function init():void {
  graphics.beginFill(0x256251);
  graphics.moveTo(x0,y0);
  graphics.curveTo(x1,y1,x2,y2);
  graphics.lineTo(x2, stage.stageHeight);
  graphics.lineTo(0, stage.stageHeight);
  graphics.endFill();
  }
  public function onStageAdded(e:Event):void
  {
  x0:Number =0;
 y0 =stage.stageHeight -150;
  x1=stage.stageWidth/2;
 y1:Number=100;
  x2 =stage.stageWidth;

  y2:Number =stage.stageHeight -150;
  init();

 }
 }

On Mon, Mar 17, 2008 at 11:28 AM, Pedro Kostelec  
[EMAIL PROTECTED]



wrote:


I added the () to it but still doesn't work:

package {
  import flash.display.Sprite;
  import flash.events.Event;
  import flash.filters.*;

  public class RisingCroix extends Sprite {
  private var croix:Croix;
  private var croix2L:Croix2;
  private var croix2R:Croix2;
   private var sun:Sun;
  private var mountain:Mountain;

  private var vy:Number=5;
  private var glowFilter:GlowFilter;
   private var glowSun:GlowFilter;
   private var blurFilter:BlurFilter;
  private var blurFilter2:BlurFilter;

  public function RisingCroix() {
  init();
  }
  private function init():void {
   sun = new Sun();
  addChild(sun);
  sun.x = stage.stageWidth / 2;
  sun.y=stage.stageHeight;

  croix=new Croix();
  addChild(croix);
  croix.x=stage.stageWidth / 2;
  croix.y=stage.stageHeight;

  croix2L = new Croix2();
  addChild(croix2L);
  croix2L.x=stage.stageWidth /4;
  croix2L.y = stage.stageHeight;

  croix2R = new Croix2();
  addChild(croix2R);
  croix2R.x = stage.stageWidth /4 *3;
  croix2R.y = stage.stageHeight;

   mountain= new Mountain();
   addChild(mountain);
  mountain.x = stage.stageWidth/2;
  mountain.y = stage.stageHeight/2;

   glowFilter = new GlowFilter(0xCC, 0.6,  
30, 30,

3, 1);
  blurFilter = new BlurFilter(3,3,1);
   blurFilter2 = new BlurFilter(13,13,3);
   glowSun = new GlowFilter(0xFF6600, 1, 50,  
50, 2,

1, true);

  croix.filters = [blurFilter, glowFilter];
  croix2R.filters = croix2L.filters  
=[blurFilter2];

   sun.filters = [glowSun, blurFilter2];

  addEventListener(Event.ENTER_FRAME,  
onEnterFrame);

  }
  public function onEnterFrame(event:Event):void {
   //...
  }

  }
  }
}

Mountain class final:

package {
  import flash.display.Sprite;

  public class Mountain extends Sprite {
   private var x0:Number =0;
  private var y0:Number =stage.stageHeight -150;
  private var x1:Number=stage.stageWidth/2;
  private var y1:Number=100;
  private var x2:Number =stage.stageWidth;
  private var y2:Number =stage.stageHeight -150;

  public function Mountain() {
  init();
  }
  public function init():void {
  

[Flashcoders] classpath issues

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

hi guys

 i hope you can help me with this:

i am trying to set up a library of classes that i can re-use in my  
actionscript but i keep getting the following errors:
1046: Type was not found or was not a compile-time constant:  
SimpleRectangle.

1180: Call to a possibly undefined method SimpleRectangle.

i have set up a folder called 'Actionscript Classes' and set the  
classpath for as3 (tried as2 as well) to point to it

the folder structure within this folder is: com/receptacle/utils
within the utils folder i have a class called SimpleRectangle.as  
which is as follows:

[code]package com.receptacle.utils
{
//package imports
import flash.display.Sprite;
import flash.display.Shape;

internal class SimpleRectangle extends Sprite
{
// class variable declarations

// constructor
		public function SimpleRectangle(colour:uint, outlineColour:uint,  
rectX:Number, rectY:Number, rectWidth:uint, rectHeight:uint)

{
			simpleRectangle(colour, outlineColour, rectX, rectY, rectWidth,  
rectHeight);

}

		private function simpleRectangle(colour:uint, outlineColour:uint,  
rectX:Number, rectY:Number, rectWidth:uint, rectHeight:uint):Shape

{
trace(Rectangle Drawn);
var r:Shape = new Shape();
r.graphics.lineStyle(1,outlineColour);
r.graphics.beginFill(colour, 1);
r.graphics.drawRect(0, 0, rectWidth, rectHeight);
r.graphics.endFill();
r.x = rectX;
r.y = rectY;
addChild(r);
return r;
}

}
}[/code]

the code for my document class is
[code]package
{
//package imports
import com.receptacle.utils.*;
import flash.display.*;

internal class TestApp extends Sprite
{
// class variable declarations

// constructor
public function TestApp()
{
setVars();
}

private function setVars()
{
var simpleText:SimpleRectangle = new SimpleRectangle();
}
}
}[/code]


when i had the SimpleRectangle class in the same folder as the rest  
of my app (with amended package), everything was working fine but now  
that i've tried to import from my own library it's not - my best  
guess is that i've messed the classpath up somewhere but i can't see it


thanks a lot

a



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


Re: [Flashcoders] Error #1009

2008-03-17 Thread Jason Van Cleave
some typos in there (coding in gmail)

public function onStageAdded(e:Event):void
 {
x0 =0;
y0 =stage.stageHeight -150;
x1=stage.stageWidth/2;
y1=100;
x2 =stage.stageWidth;
 y2 =stage.stageHeight -150;
 init();

  }

On Mon, Mar 17, 2008 at 12:14 PM, Jason Van Cleave [EMAIL PROTECTED]
wrote:

 you can't reference the stage in the Mountain class until it is added to
 the Display List. try this

 package {
import flash.display.Sprite;
 import flash.events.Event;

public class Mountain extends Sprite {
private var x0:Number;
private var y0:Number;
private var x1:Number;
private var y1:Number;
private var x2:Number;
private var y2:Number;

public function Mountain() {
this.addEventListener(Event.ADDED_TO_STAGE, onStageAdded);


}
public function init():void {
graphics.beginFill(0x256251);
graphics.moveTo(x0,y0);
graphics.curveTo(x1,y1,x2,y2);
graphics.lineTo(x2, stage.stageHeight);
graphics.lineTo(0, stage.stageHeight);
graphics.endFill();
}
public function onStageAdded(e:Event):void
{
x0:Number =0;
   y0 =stage.stageHeight -150;
x1=stage.stageWidth/2;
   y1:Number=100;
x2 =stage.stageWidth;
y2:Number =stage.stageHeight -150;
init();


   }
  }

 On Mon, Mar 17, 2008 at 11:28 AM, Pedro Kostelec [EMAIL PROTECTED]
 wrote:

  I added the () to it but still doesn't work:
 
  package {
 import flash.display.Sprite;
 import flash.events.Event;
 import flash.filters.*;
 
 public class RisingCroix extends Sprite {
 private var croix:Croix;
 private var croix2L:Croix2;
 private var croix2R:Croix2;
  private var sun:Sun;
 private var mountain:Mountain;
 
 private var vy:Number=5;
 private var glowFilter:GlowFilter;
  private var glowSun:GlowFilter;
  private var blurFilter:BlurFilter;
 private var blurFilter2:BlurFilter;
 
 public function RisingCroix() {
 init();
 }
 private function init():void {
  sun = new Sun();
 addChild(sun);
 sun.x = stage.stageWidth / 2;
 sun.y=stage.stageHeight;
 
 croix=new Croix();
 addChild(croix);
 croix.x=stage.stageWidth / 2;
 croix.y=stage.stageHeight;
 
 croix2L = new Croix2();
 addChild(croix2L);
 croix2L.x=stage.stageWidth /4;
 croix2L.y = stage.stageHeight;
 
 croix2R = new Croix2();
 addChild(croix2R);
 croix2R.x = stage.stageWidth /4 *3;
 croix2R.y = stage.stageHeight;
 
  mountain= new Mountain();
  addChild(mountain);
 mountain.x = stage.stageWidth/2;
 mountain.y = stage.stageHeight/2;
 
  glowFilter = new GlowFilter(0xCC, 0.6, 30,
  30, 3, 1);
 blurFilter = new BlurFilter(3,3,1);
  blurFilter2 = new BlurFilter(13,13,3);
  glowSun = new GlowFilter(0xFF6600, 1, 50, 50, 2,
  1, true);
 
 croix.filters = [blurFilter, glowFilter];
 croix2R.filters = croix2L.filters =[blurFilter2];
  sun.filters = [glowSun, blurFilter2];
 
 addEventListener(Event.ENTER_FRAME,
  onEnterFrame);
 }
 public function onEnterFrame(event:Event):void {
  //...
 }
 
 }
 }
  }
 
  Mountain class final:
 
  package {
 import flash.display.Sprite;
 
 public class Mountain extends Sprite {
  private var x0:Number =0;
 private var y0:Number =stage.stageHeight -150;
 private var x1:Number=stage.stageWidth/2;
 private var y1:Number=100;
 private var x2:Number =stage.stageWidth;
 private var y2:Number =stage.stageHeight -150;
 
 public function Mountain() {
 init();
 }
 public 

Re: [Flashcoders] frameworks and classes for flash cs3

2008-03-17 Thread Steven Sacks

You could also google flash frameworks.  Google is a great tool.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Error #1009

2008-03-17 Thread Steven Sacks
It is exceedingly rare that the compiler is telling you something is 
wrong that isn't.  If you're getting an error thrown, like it or not, 
you made a mistake somewhere.  Flash does what you tell it to do.


Unfortunately, it's not always easy to figure out where the error is 
coming from if you don't use the debugging tools provided.  Using try 
catch and throwing meaningful error messages will help you debug much 
more quickly.


If you're getting null pointer exceptions, you're experiencing the 
growing pains of going from AS1 to AS3.  It'll take time, but the more 
you get burned by them, the more your code will account for them and the 
less you'll have to deal with them.

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


Re: [Flashcoders] Error #1009

2008-03-17 Thread Pedro Kostelec
Jason IT WORKED

Thanks to you and to all that took the time reply.

//
root folder: Main  (- class files)
package: com.something.Mountain (- class files)
package: com.something.RisingCroix  (- class files)
//
ISOrry don't really get it. Is com actually a file?
On Mon, Mar 17, 2008 at 5:18 PM, Jason Van Cleave
[EMAIL PROTECTED] wrote:
 some typos in there (coding in gmail)


  public function onStageAdded(e:Event):void
   {
 x0 =0;

 y0 =stage.stageHeight -150;
 x1=stage.stageWidth/2;
 y1=100;
 x2 =stage.stageWidth;
  y2 =stage.stageHeight -150;
  init();

   }

  On Mon, Mar 17, 2008 at 12:14 PM, Jason Van Cleave [EMAIL PROTECTED]
  wrote:



   you can't reference the stage in the Mountain class until it is added to
   the Display List. try this
  
   package {
  import flash.display.Sprite;
   import flash.events.Event;
  
  public class Mountain extends Sprite {
  private var x0:Number;
  private var y0:Number;
  private var x1:Number;
  private var y1:Number;
  private var x2:Number;
  private var y2:Number;
  
  public function Mountain() {
  this.addEventListener(Event.ADDED_TO_STAGE, onStageAdded);
  
  
  }
  public function init():void {
  graphics.beginFill(0x256251);
  graphics.moveTo(x0,y0);
  graphics.curveTo(x1,y1,x2,y2);
  graphics.lineTo(x2, stage.stageHeight);
  graphics.lineTo(0, stage.stageHeight);
  graphics.endFill();
  }
  public function onStageAdded(e:Event):void
  {
  x0:Number =0;
 y0 =stage.stageHeight -150;
  x1=stage.stageWidth/2;
 y1:Number=100;
  x2 =stage.stageWidth;
  y2:Number =stage.stageHeight -150;
  init();
  
  
 }
}
  
   On Mon, Mar 17, 2008 at 11:28 AM, Pedro Kostelec [EMAIL PROTECTED]
   wrote:
  
I added the () to it but still doesn't work:
   
package {
   import flash.display.Sprite;
   import flash.events.Event;
   import flash.filters.*;
   
   public class RisingCroix extends Sprite {
   private var croix:Croix;
   private var croix2L:Croix2;
   private var croix2R:Croix2;
private var sun:Sun;
   private var mountain:Mountain;
   
   private var vy:Number=5;
   private var glowFilter:GlowFilter;
private var glowSun:GlowFilter;
private var blurFilter:BlurFilter;
   private var blurFilter2:BlurFilter;
   
   public function RisingCroix() {
   init();
   }
   private function init():void {
sun = new Sun();
   addChild(sun);
   sun.x = stage.stageWidth / 2;
   sun.y=stage.stageHeight;
   
   croix=new Croix();
   addChild(croix);
   croix.x=stage.stageWidth / 2;
   croix.y=stage.stageHeight;
   
   croix2L = new Croix2();
   addChild(croix2L);
   croix2L.x=stage.stageWidth /4;
   croix2L.y = stage.stageHeight;
   
   croix2R = new Croix2();
   addChild(croix2R);
   croix2R.x = stage.stageWidth /4 *3;
   croix2R.y = stage.stageHeight;
   
mountain= new Mountain();
addChild(mountain);
   mountain.x = stage.stageWidth/2;
   mountain.y = stage.stageHeight/2;
   
glowFilter = new GlowFilter(0xCC, 0.6, 30,
30, 3, 1);
   blurFilter = new BlurFilter(3,3,1);
blurFilter2 = new BlurFilter(13,13,3);
glowSun = new GlowFilter(0xFF6600, 1, 50, 50, 2,
1, true);
   
   croix.filters = [blurFilter, glowFilter];
   croix2R.filters = croix2L.filters =[blurFilter2];
sun.filters = [glowSun, blurFilter2];
   
   addEventListener(Event.ENTER_FRAME,
onEnterFrame);
   }
   public function onEnterFrame(event:Event):void {
//...
   }
   
   }
   }
}
   

RE: [Flashcoders] classpath issues

2008-03-17 Thread Merrill, Jason
Why are you using internal for the class definition?

From the Flex help docs:

If you do not want a class to be publicly visible outside a package,
place the class inside a package and mark the class with the internal
attribute.


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 Allandt Bik-Elliott (Receptacle)
Sent: Monday, March 17, 2008 1:14 PM
To: flashcoders
Subject: [Flashcoders] classpath issues

hi guys

  i hope you can help me with this:

i am trying to set up a library of classes that i can re-use 
in my actionscript but i keep getting the following errors:
1046: Type was not found or was not a compile-time constant:  
SimpleRectangle.
1180: Call to a possibly undefined method SimpleRectangle.

i have set up a folder called 'Actionscript Classes' and set 
the classpath for as3 (tried as2 as well) to point to it the 
folder structure within this folder is: com/receptacle/utils 
within the utils folder i have a class called 
SimpleRectangle.as which is as follows:
[code]package com.receptacle.utils
{
  //package imports
  import flash.display.Sprite;
  import flash.display.Shape;
  
  internal class SimpleRectangle extends Sprite
  {
  // class variable declarations
  
  // constructor
  public function SimpleRectangle(colour:uint, 
outlineColour:uint, rectX:Number, rectY:Number, 
rectWidth:uint, rectHeight:uint)
  {
  simpleRectangle(colour, outlineColour, 
rectX, rectY, rectWidth, rectHeight);
  }
  
  private function simpleRectangle(colour:uint, 
outlineColour:uint, rectX:Number, rectY:Number, 
rectWidth:uint, rectHeight:uint):Shape
  {
  trace(Rectangle Drawn);
  var r:Shape = new Shape();
  r.graphics.lineStyle(1,outlineColour);
  r.graphics.beginFill(colour, 1);
  r.graphics.drawRect(0, 0, rectWidth, 
rectHeight);
  r.graphics.endFill();
  r.x = rectX;
  r.y = rectY;
  addChild(r);
  return r;
  }

  }
}[/code]

the code for my document class is
[code]package
{
  //package imports
  import com.receptacle.utils.*;
  import flash.display.*;
  
  internal class TestApp extends Sprite
  {
  // class variable declarations
  
  // constructor
  public function TestApp()
  {
  setVars();
  }
  
  private function setVars()
  {
  var simpleText:SimpleRectangle = new 
SimpleRectangle();
  }
  }
}[/code]


when i had the SimpleRectangle class in the same folder as 
the rest of my app (with amended package), everything was 
working fine but now that i've tried to import from my own 
library it's not - my best guess is that i've messed the 
classpath up somewhere but i can't see it

thanks a lot

a



___
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] need:: Flex 3 AS3 // tutorials, links, book recs.

2008-03-17 Thread artur

2nd try..

can ANYONE please send me their links and book recommendations
for migrating from Flex2--3 and AS2--3

it would be greatly appreciated.

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


RE: [Flashcoders] frameworks and classes for flash cs3

2008-03-17 Thread Merrill, Jason
There are some good Caringorm tutorials out there - that's one of the
Adobe sanctioned ones, and it's really nice... the first one that made
sense to me.  Check on the Adobe Developer Network for the tutorial - or
some others if you Google Cairngorm Tutorial

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: Monday, March 17, 2008 1:35 PM
To: Flash Coders List
Subject: Re: [Flashcoders] frameworks and classes for flash cs3

You could also google flash frameworks.  Google is a great tool.
___
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] classpath issues

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

yep that was it - thanks jason

it's left in from when it was a part of the app

thanks again
a



On 17 Mar 2008, at 17:27, Merrill, Jason wrote:


Why are you using internal for the class definition?


From the Flex help docs:


If you do not want a class to be publicly visible outside a package,
place the class inside a package and mark the class with the internal
attribute.


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 Allandt Bik-Elliott (Receptacle)
Sent: Monday, March 17, 2008 1:14 PM
To: flashcoders
Subject: [Flashcoders] classpath issues

hi guys

 i hope you can help me with this:

i am trying to set up a library of classes that i can re-use
in my actionscript but i keep getting the following errors:
1046: Type was not found or was not a compile-time constant:
SimpleRectangle.
1180: Call to a possibly undefined method SimpleRectangle.

i have set up a folder called 'Actionscript Classes' and set
the classpath for as3 (tried as2 as well) to point to it the
folder structure within this folder is: com/receptacle/utils
within the utils folder i have a class called
SimpleRectangle.as which is as follows:
[code]package com.receptacle.utils
{
//package imports
import flash.display.Sprite;
import flash.display.Shape;

internal class SimpleRectangle extends Sprite
{
// class variable declarations

// constructor
public function SimpleRectangle(colour:uint,
outlineColour:uint, rectX:Number, rectY:Number,
rectWidth:uint, rectHeight:uint)
{
simpleRectangle(colour, outlineColour,
rectX, rectY, rectWidth, rectHeight);
}

private function simpleRectangle(colour:uint,
outlineColour:uint, rectX:Number, rectY:Number,
rectWidth:uint, rectHeight:uint):Shape
{
trace(Rectangle Drawn);
var r:Shape = new Shape();
r.graphics.lineStyle(1,outlineColour);
r.graphics.beginFill(colour, 1);
r.graphics.drawRect(0, 0, rectWidth,
rectHeight);
r.graphics.endFill();
r.x = rectX;
r.y = rectY;
addChild(r);
return r;
}

}
}[/code]

the code for my document class is
[code]package
{
//package imports
import com.receptacle.utils.*;
import flash.display.*;

internal class TestApp extends Sprite
{
// class variable declarations

// constructor
public function TestApp()
{
setVars();
}

private function setVars()
{
var simpleText:SimpleRectangle = new
SimpleRectangle();
}
}
}[/code]


when i had the SimpleRectangle class in the same folder as
the rest of my app (with amended package), everything was
working fine but now that i've tried to import from my own
library it's not - my best guess is that i've messed the
classpath up somewhere but i can't see it

thanks a lot

a



___
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] to mac or not to mac

2008-03-17 Thread Kerry Thompson
 Is anyone using Vista and enjoying it?

I am. Vista Home Premium. There are a few things you have to figure out to
work with Vista's security, but overall it seems a fairly solid OS. I'm
using the CS3 developer bundle, and FlexBuilder 3, for most of my
development tools, plus an assortment of audio, video, and graphics tools.

Cordially,

Kerry Thompson


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


Re: [Flashcoders] need:: Flex 3 AS3 // tutorials, links, book recs.

2008-03-17 Thread Fabio Pinatti
On Mon, Mar 17, 2008 at 2:48 PM, artur [EMAIL PROTECTED] wrote:

 2nd try..

 can ANYONE please send me their links and book recommendations
 for migrating from Flex2--3 and AS2--3

 it would be greatly appreciated.

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



I recently bought Essential Actionscript 3.0, from Colin Moock (o-reilly),
was a very good choice in my oppinion.
-- 
Fábio Pinatti
:: web.developer
 www.pinatti.com.br
:: 19. 9184.3745 / 3342.1130
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] need:: Flex 3 AS3 // tutorials, links, book recs.

2008-03-17 Thread Merrill, Jason
http://www.actionscriptcheatsheet.com/

Invaluable!

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 artur
Sent: Monday, March 17, 2008 1:48 PM
To: flashcoders
Subject: [Flashcoders] need:: Flex 3  AS3 // tutorials, 
links, book recs.

2nd try..

can ANYONE please send me their links and book 
recommendations for migrating from Flex2--3 and AS2--3

it would be greatly appreciated.

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

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


Re: [Flashcoders] need:: Flex 3 AS3 // tutorials, links, book recs.

2008-03-17 Thread Pedro Kostelec
Well, i've bought
Foundation ActionScript Animation: Making Things Move! By Keith Peters
http://books.google.com/books?id=zK7zaGGVi60Cprintsec=frontcoverdq=making+things+moveei=AL7eR-rgEKjuiQGO_LDtCgsig=B_aMb6DhRR2DYLfrQBRiTUtCr2AI
actaully haven't known a lot of as2 when i started reading it but i learned
quite something (not only as3 but animation with code)

If you'are not sure which book to buy you can look here: books.google.com
Google is recopying the(full) books on the net so you can look which one is
better for you

Pedro D.K.

On Mon, Mar 17, 2008 at 7:32 PM, Fabio Pinatti [EMAIL PROTECTED] wrote:

 On Mon, Mar 17, 2008 at 2:48 PM, artur [EMAIL PROTECTED] wrote:

  2nd try..
 
  can ANYONE please send me their links and book recommendations
  for migrating from Flex2--3 and AS2--3
 
  it would be greatly appreciated.
 
  thanks
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 


 I recently bought Essential Actionscript 3.0, from Colin Moock (o-reilly),
 was a very good choice in my oppinion.
 --
 Fábio Pinatti
 :: web.developer
  www.pinatti.com.br
 :: 19. 9184.3745 / 3342.1130
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Pedro D.K.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] need:: Flex 3 AS3 // tutorials, links, book recs.

2008-03-17 Thread Stuart (FunkDaWeb)
I 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: artur 
  To: flashcoders 
  Sent: Monday, March 17, 2008 5:48 PM
  Subject: [Flashcoders] need:: Flex 3  AS3 // tutorials, links, book recs.


  2nd try..

  can ANYONE please send me their links and book recommendations
  for migrating from Flex2--3 and AS2--3

  it would be greatly appreciated.

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


Re: [Flashcoders] need:: Flex 3 AS3 // tutorials, links, book recs.

2008-03-17 Thread artur

aha!!

knew this list was alive!!

thanks..and keep em coming!!


*artur :.*

- *www.artur.com*
- [EMAIL PROTECTED]
- *ph:646.797.3320*



Stuart (FunkDaWeb) wrote:

I 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: artur 
  To: flashcoders 
  Sent: Monday, March 17, 2008 5:48 PM

  Subject: [Flashcoders] need:: Flex 3  AS3 // tutorials, links, book recs.


  2nd try..

  can ANYONE please send me their links and book recommendations
  for migrating from Flex2--3 and AS2--3

  it would be greatly appreciated.

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


  

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


Re: [Flashcoders] need:: Flex 3 AS3 // tutorials, links, book recs.

2008-03-17 Thread artur

aha!!

i knew this list was alive!!

thanks..and keep em coming!!


*artur :.*

- *www.artur.com*
- [EMAIL PROTECTED]
- *ph:646.797.3320*



Stuart (FunkDaWeb) wrote:

I 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: artur 
  To: flashcoders 
  Sent: Monday, March 17, 2008 5:48 PM

  Subject: [Flashcoders] need:: Flex 3  AS3 // tutorials, links, book recs.


  2nd try..

  can ANYONE please send me their links and book recommendations
  for migrating from Flex2--3 and AS2--3

  it would be greatly appreciated.

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


  

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


Re: [Flashcoders] Writing Custom MovieClip Classes

2008-03-17 Thread Omar Fouad
Wow..

On Mon, Mar 17, 2008 at 5:08 PM, Merrill, Jason 
[EMAIL PROTECTED] wrote:


 Try this instead, this is how I would do it (you have a few screwy
 things in the code you posted, too many to bother commenting on :) ):


 package
 {

  import flash.display.MovieClip
  import flash.text.*;

  public class DataCard extends MovieClip
  {
   public function set name(value:String):void
  {
   theTextField.text = value;
   }
  }
 }

 And in the .fla with the clip's class set to DataCard:

 var dc:DataCard = new DataCard();
 dc.name = Hello;



 Jason Merrill
 Bank of America
 GTO 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: Sunday, March 16, 2008 9:24 AM
 To: Flash Coders List
 Subject: [Flashcoders] Writing Custom MovieClip Classes
 
 I have a MovieClip in my project that I put in the library.
 This MovieClip is used in the application lots of times and I
 attach it on the stage on run time when required like
 
 var DC:DataCard = new DataCard();
 DC.x = Math.random()*550;
 DC.y = Math.random()*400;
 addChild(DC);
 
 In the Identifier Dialogue Box I set the Class name to
 DataCard and I am trying to associate it to a Class file
 DataCard.as This MovieClip has a text field for example, and
 it is named nameTF.
 I want to be able to control the components of the DataCard
 MovieClip from the Class Itself, in this case to change the
 text in the nameTF TextField.
 
 So in the Class I worte:
 
 package {
  import flash.display.MovieClip
 
  import flash.display.MovieClip;
  import flash.text.*;
 
  public class DataCard extends MovieClip {
 
   var cardName:String;
 
   static public function DataCard():void {
nameTF.text = cardName;
   }
   public function set cardName(Name:String):void {
cardName = Name;
   }
  }
 }
 
 It shows me many errors and it does not work.
 
 when I tried:
 
 public class DataCard extends MovieClip {
 
   public function CardName(CN:String):void {
nameTF.text = CN;
   }
 }
 
 and in the FLA:
 
  var DC:DataCard = new DataCard();
 
 DC.CardName(here is the name);
 
 DC.x = Math.random()*550;
 DC.y = Math.random()*400;
 DC.name = dataCard;
 addChild(DC);
 
 this worked. But how can I use a Constructor, setters and
 getters in this case? Also how can I set the name of the
 MovieClip like I would do in the FLA DC.name = DCName; in
 the class itself?
 
 
 Thanks for the Help.
 
 
 
 --
 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




-- 
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] Writing Custom MovieClip Classes

2008-03-17 Thread Steven Sacks

Which is exactly what I told you to do and you brushed me off.  :p

Brilliant minds think alike, Jason.


Omar Fouad wrote:

Wow..

On Mon, Mar 17, 2008 at 5:08 PM, Merrill, Jason 
[EMAIL PROTECTED] wrote:

  

Try this instead, this is how I would do it (you have a few screwy
things in the code you posted, too many to bother commenting on :) ):


package
{

 import flash.display.MovieClip
 import flash.text.*;

 public class DataCard extends MovieClip
 {
  public function set name(value:String):void
 {
  theTextField.text = value;
  }
 }
}

And in the .fla with the clip's class set to DataCard:

var dc:DataCard = new DataCard();
dc.name = Hello;



Jason Merrill
Bank of America
GTO 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: Sunday, March 16, 2008 9:24 AM
To: Flash Coders List
Subject: [Flashcoders] Writing Custom MovieClip Classes

I have a MovieClip in my project that I put in the library.
This MovieClip is used in the application lots of times and I
attach it on the stage on run time when required like

var DC:DataCard = new DataCard();
DC.x = Math.random()*550;
DC.y = Math.random()*400;
addChild(DC);

In the Identifier Dialogue Box I set the Class name to
DataCard and I am trying to associate it to a Class file
DataCard.as This MovieClip has a text field for example, and
it is named nameTF.
I want to be able to control the components of the DataCard
MovieClip from the Class Itself, in this case to change the
text in the nameTF TextField.

So in the Class I worte:

package {
import flash.display.MovieClip

import flash.display.MovieClip;
import flash.text.*;

public class DataCard extends MovieClip {

 var cardName:String;

 static public function DataCard():void {
  nameTF.text = cardName;
 }
 public function set cardName(Name:String):void {
  cardName = Name;
 }
}
}

It shows me many errors and it does not work.

when I tried:

public class DataCard extends MovieClip {

 public function CardName(CN:String):void {
  nameTF.text = CN;
 }
}

and in the FLA:

var DC:DataCard = new DataCard();

DC.CardName(here is the name);

DC.x = Math.random()*550;
DC.y = Math.random()*400;
DC.name = dataCard;
addChild(DC);

this worked. But how can I use a Constructor, setters and
getters in this case? Also how can I set the name of the
MovieClip like I would do in the FLA DC.name = DCName; in
the class itself?


Thanks for the Help.



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






  


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


RE: [Flashcoders] Writing Custom MovieClip Classes

2008-03-17 Thread Merrill, Jason
Brilliant minds think alike, Jason.

validation is a pretty sweet fruit.


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: Monday, March 17, 2008 4:18 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Writing Custom MovieClip Classes

Which is exactly what I told you to do and you brushed me off.  :p

Brilliant minds think alike, Jason.


Omar Fouad wrote:
 Wow..

 On Mon, Mar 17, 2008 at 5:08 PM, Merrill, Jason  
 [EMAIL PROTECTED] wrote:

   
 Try this instead, this is how I would do it (you have a few screwy 
 things in the code you posted, too many to bother 
commenting on :) ):


 package
 {

  import flash.display.MovieClip
  import flash.text.*;

  public class DataCard extends MovieClip  {
   public function set name(value:String):void  {
   theTextField.text = value;
   }
  }
 }

 And in the .fla with the clip's class set to DataCard:

 var dc:DataCard = new DataCard();
 dc.name = Hello;



 Jason Merrill
 Bank of America
 GTO 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: Sunday, March 16, 2008 9:24 AM
 To: Flash Coders List
 Subject: [Flashcoders] Writing Custom MovieClip Classes

 I have a MovieClip in my project that I put in the library.
 This MovieClip is used in the application lots of times and I 
 attach it on the stage on run time when required like

 var DC:DataCard = new DataCard();
 DC.x = Math.random()*550;
 DC.y = Math.random()*400;
 addChild(DC);

 In the Identifier Dialogue Box I set the Class name to 
DataCard and 
 I am trying to associate it to a Class file DataCard.as This 
 MovieClip has a text field for example, and it is named nameTF.
 I want to be able to control the components of the DataCard 
 MovieClip from the Class Itself, in this case to change 
the text in 
 the nameTF TextField.

 So in the Class I worte:

 package {
 import flash.display.MovieClip

 import flash.display.MovieClip;
 import flash.text.*;

 public class DataCard extends MovieClip {

  var cardName:String;

  static public function DataCard():void {
   nameTF.text = cardName;
  }
  public function set cardName(Name:String):void {
   cardName = Name;
  }
 }
 }

 It shows me many errors and it does not work.

 when I tried:

 public class DataCard extends MovieClip {

  public function CardName(CN:String):void {
   nameTF.text = CN;
  }
 }

 and in the FLA:

 var DC:DataCard = new DataCard();

 DC.CardName(here is the name);

 DC.x = Math.random()*550;
 DC.y = Math.random()*400;
 DC.name = dataCard;
 addChild(DC);

 this worked. But how can I use a Constructor, setters 
and getters 
 in this case? Also how can I set the name of the 
MovieClip like I 
 would do in the FLA DC.name = DCName; in the class itself?


 Thanks for the Help.



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

 



   

___
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] Writing Custom MovieClip Classes

2008-03-17 Thread Omar Fouad
ok this worked But the DataCard Clip has a CloseButton so
In the DataCard Class:

this.CloseButton.addEventListener(MouseEvent.CLICK, close);

public function close(e:MouseEvent) {
   removeChild(this);

}

but it is throwing an error message.
I know this could be a silly question, I have not been into AS3 for a long
time. :)

Thanks for your effort !

On Mon, Mar 17, 2008 at 9:51 PM, Omar Fouad [EMAIL PROTECTED] wrote:

 Wow..


 On Mon, Mar 17, 2008 at 5:08 PM, Merrill, Jason 
 [EMAIL PROTECTED] wrote:

 
  Try this instead, this is how I would do it (you have a few screwy
  things in the code you posted, too many to bother commenting on :) ):
 
 
  package
  {
 
   import flash.display.MovieClip
   import flash.text.*;
 
   public class DataCard extends MovieClip
   {
public function set name(value:String):void
   {
theTextField.text = value;
}
   }
  }
 
  And in the .fla with the clip's class set to DataCard:
 
  var dc:DataCard = new DataCard();
  dc.name = Hello;
 
 
 
  Jason Merrill
  Bank of America
  GTO 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: Sunday, March 16, 2008 9:24 AM
  To: Flash Coders List
  Subject: [Flashcoders] Writing Custom MovieClip Classes
  
  I have a MovieClip in my project that I put in the library.
  This MovieClip is used in the application lots of times and I
  attach it on the stage on run time when required like
  
  var DC:DataCard = new DataCard();
  DC.x = Math.random()*550;
  DC.y = Math.random()*400;
  addChild(DC);
  
  In the Identifier Dialogue Box I set the Class name to
  DataCard and I am trying to associate it to a Class file
  DataCard.as This MovieClip has a text field for example, and
  it is named nameTF.
  I want to be able to control the components of the DataCard
  MovieClip from the Class Itself, in this case to change the
  text in the nameTF TextField.
  
  So in the Class I worte:
  
  package {
   import flash.display.MovieClip
  
   import flash.display.MovieClip;
   import flash.text.*;
  
   public class DataCard extends MovieClip {
  
var cardName:String;
  
static public function DataCard():void {
 nameTF.text = cardName;
}
public function set cardName(Name:String):void {
 cardName = Name;
}
   }
  }
  
  It shows me many errors and it does not work.
  
  when I tried:
  
  public class DataCard extends MovieClip {
  
public function CardName(CN:String):void {
 nameTF.text = CN;
}
  }
  
  and in the FLA:
  
   var DC:DataCard = new DataCard();
  
  DC.CardName(here is the name);
  
  DC.x = Math.random()*550;
  DC.y = Math.random()*400;
  DC.name = dataCard;
  addChild(DC);
  
  this worked. But how can I use a Constructor, setters and
  getters in this case? Also how can I set the name of the
  MovieClip like I would do in the FLA DC.name = DCName; in
  the class itself?
  
  
  Thanks for the Help.
  
  
  
  --
  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
 



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




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

Re: [Flashcoders] frameworks and classes for flash cs3

2008-03-17 Thread Meinte van't Kruis
it also depends if you want a structural framework (which would be
cairngorn)
or an application framework(this of would be something like papervision) the
difference beeing
that structural frameworks help you structurise and patternize your own
code,
whereas application frameworks actually do stuff ;).


On Mon, Mar 17, 2008 at 6:49 PM, Merrill, Jason 
[EMAIL PROTECTED] wrote:

 There are some good Caringorm tutorials out there - that's one of the
 Adobe sanctioned ones, and it's really nice... the first one that made
 sense to me.  Check on the Adobe Developer Network for the tutorial - or
 some others if you Google Cairngorm Tutorial

 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: Monday, March 17, 2008 1:35 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] frameworks and classes for flash cs3
 
 You could also google flash frameworks.  Google is a great tool.
 ___
 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] Writing Custom MovieClip Classes

2008-03-17 Thread Merrill, Jason
You wouldn't have the class close itself, it doesn't know where it
lives, it could live anywhere.  Instead, you would have the class (i.e,
your timeline I'm guessing) that creates an instance of the class listen
for a close event and then remove the child.  The DataCard class could
broadcast when the close occurs and your other class (timeline) would
listen for that event and then remove it, or you could listen to the
button event in the DataCard class for the close event - easiest way to
do that is set the listener to listen for bubbles = true.  Here is an
example of the former way, though the latter (event bubbling) is
probably better:


var dc:DataCard = new DataCard();
dc.name = Hello;
dc.addEventListener(dc.CLOSE, onClose);
addChild(dc);

private function onClose(event:Event):void
{
removeChild(dc);
}

package
{

 import flash.display.MovieClip
 import flash.text.*;
 import flash.events.MouseEvent

 public class DataCard extends MovieClip  
{

  public static const CLOSE:String = close;

  public function DataCard()
  {
initListeners()
  }

private function initListeners():void
{
CloseButton.addEventListener(MouseEvent.CLICK, disptachClose);
}

  private function dispatchClose(e:MouseEvent) 
  {
 dispatchEvent(DataCard.CLOSE)
   }
  public function set name(value:String):void
  {
   theTextField.text = value;
   }
 }
}


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 17, 2008 5:16 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Writing Custom MovieClip Classes

ok this worked But the DataCard Clip has a CloseButton so 
In the DataCard Class:

this.CloseButton.addEventListener(MouseEvent.CLICK, close);

public function close(e:MouseEvent) {
   removeChild(this);

}

but it is throwing an error message.
I know this could be a silly question, I have not been into 
AS3 for a long time. :)

Thanks for your effort !

On Mon, Mar 17, 2008 at 9:51 PM, Omar Fouad 
[EMAIL PROTECTED] wrote:

 Wow..


 On Mon, Mar 17, 2008 at 5:08 PM, Merrill, Jason  
 [EMAIL PROTECTED] wrote:

 
  Try this instead, this is how I would do it (you have a 
few screwy 
  things in the code you posted, too many to bother 
commenting on :) ):
 
 
  package
  {
 
   import flash.display.MovieClip
   import flash.text.*;
 
   public class DataCard extends MovieClip  {
public function set name(value:String):void  {
theTextField.text = value;
}
   }
  }
 
  And in the .fla with the clip's class set to DataCard:
 
  var dc:DataCard = new DataCard();
  dc.name = Hello;
 
 
 
  Jason Merrill
  Bank of America
  GTO 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: Sunday, March 16, 2008 9:24 AM
  To: Flash Coders List
  Subject: [Flashcoders] Writing Custom MovieClip Classes
  
  I have a MovieClip in my project that I put in the library.
  This MovieClip is used in the application lots of times and I 
  attach it on the stage on run time when required like
  
  var DC:DataCard = new DataCard();
  DC.x = Math.random()*550;
  DC.y = Math.random()*400;
  addChild(DC);
  
  In the Identifier Dialogue Box I set the Class name to DataCard 
  and I am trying to associate it to a Class file 
DataCard.as This 
  MovieClip has a text field for example, and it is named 
nameTF.
  I want to be able to control the components of the DataCard 
  MovieClip from the Class Itself, in this case to change 
the text 
  in the nameTF TextField.
  
  So in the Class I worte:
  
  package {
   import flash.display.MovieClip
  
   import flash.display.MovieClip;
   import flash.text.*;
  
   public class DataCard extends MovieClip {
  
var cardName:String;
  
static public function DataCard():void {
 nameTF.text = cardName;
}
public function set cardName(Name:String):void {
 cardName = Name;
}
   }
  }
  
  It shows me many errors and it does not work.
  
  when I tried:
  
  public class DataCard extends MovieClip {
  
public function CardName(CN:String):void {
 nameTF.text = CN;
}
  }
  
  and in the FLA:
  
   var DC:DataCard = new DataCard();
  
  DC.CardName(here is the name);
  
  DC.x = Math.random()*550;
  DC.y = Math.random()*400;
  DC.name = dataCard;
  addChild(DC);
  
  this worked. But how can I use a 

Re: [Flashcoders] need:: Flex 3 AS3 // tutorials, links, book recs.

2008-03-17 Thread Muzak

Read the docs. that's what I did :-)

If you already know Flex2, Flex 3 isn't that different. 
Just some added IDE functionality/wizards/skinning stuff.



- Original Message - 
From: artur [EMAIL PROTECTED]

To: flashcoders flashcoders@chattyfig.figleaf.com
Sent: Monday, March 17, 2008 6:48 PM
Subject: [Flashcoders] need:: Flex 3  AS3 // tutorials, links, book recs.



2nd try..

can ANYONE please send me their links and book recommendations
for migrating from Flex2--3 and AS2--3

it would be greatly appreciated.

thanks


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


[Flashcoders] Color to black white

2008-03-17 Thread laurent

Hi,

What would you suggest to make an image go from color to black and white ?

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


[Flashcoders] Color to black and white

2008-03-17 Thread laurent

ok, got it in filters :)
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] We're looking for a Sr. Flash AS3 Developer/Engineer

2008-03-17 Thread Michelle Soleau

We're looking for a Sr. Flash AS3 Developer

We're a pre-venture startup in the media/music space. We launched the  
first

version of our product in December 2007 to great reaction and strong and
growing user growth. We're about to complete a major upgrade that we  
think

will take the company over the top. We're well funded and ready for that
growth, but still small enough to be interesting.

THE ROLE
You'll be involved with the creation and maintenance of
cutting edge, data-driven flash applications and visualizations.
While working on projects you will be creating and contributing to a
rich library of robust, reusable components and tools to streamline
future development.  You must be passionate about satisfying users, and
creative about implementing a killer UI. The position requires extensive
experience building AS3 Flash applications and a strong commitment to
building robust applications on a rapid development cycle. This is a
Flash AS3  engineering position - please do not apply if you are a
designer.

REQUIREMENTS
. 3+ years of solid software development experience (SDLC)
* Expert level experience with AS2/AS3
* Audio and video application experience
* Familiar with Red5
. Expertise in Adobe Flash Development: Actionscript, CPU/Memory
optimization, JavaScript, Flash bridging, Cross-browser compatibility
. Knowledge of HTML, XML, JSON and HTTP
. Good understanding of AMF (Action Message Format), SOAP, data
exchanges (between Flash app and back-end database)
. Extensive design experience
. B.S. in Computer Science, or equivalent experience
. Strong analytical skills and ability to assist other team members in
problem solving as well as work independently, complete projects and
communicate status updates with minimum supervision
* Proven experience in developing apps for social networks

GENERAL REQUIREMENTS
.Object oriented programming and design patterns
.Comfortable in a minimal spec, agile environment
.Creates maintainable code and architecture (not just one off's or
prototypes)

WHY YOU SHOULD APPLY
We pay competitive salaries, but you're also looking at at an early  
stage company with very
substantial equity upside. You'll be working with a small experienced  
team on a
fun, compelling, and cutting-edge consumer application. And you'll be  
responsible for making

a key component of that application happen.


APPLICATION
Please send an email with your resume, cover letter and salary history  
to: [EMAIL PROTECTED]

include 'Flash Developer' in the subject line of your email.




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