[Flashcoders] how to build a user forum in Flash

2005-10-28 Thread Marc Hoffman
I'm sure this has been covered, but can't seem to find it in any 
search. Where can I find a script (free or by license) to create a 
Flash-based, online user forum? It should have the ability to accept 
messages by thread, archive them by thread, and search/display them 
by message header or thread. This will be a low-traffic environment 
(probably under a dozen visitors at any given time).


Thanks,
Marc


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


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Spike
Sure,

Here's a slightly more complete implementation of that last example:


public class CurrencyFormatter {

private static formatter:CurrencyFormatter;

public function getInstance():CurrencyFormatter {
// use ExternalInterface or IP lookup or whatever to determine locale
if (locale == "UK") {
formatter = new UKCurrencyFormatter();
} else {
formatter = new USCurrencyFormatter();
}
return formatter;
}

class USCurrencyFormatter extends CurrencyFormatter {

public formatValue(val:Number) {
// very simplistic formatting
return "$" + String(val);
}
}

class UKCurrencyFormatter extends CurrencyFormatter {

public formatValue(val:Number) {
// very simplistic formatting
return "£" + String(val);
}
}

}

Let me know if that explains it a bit better.

Spike


On 10/29/05, JesterXL <[EMAIL PROTECTED]> wrote:
>
> Can you elaborate? Why wouldn't the static class work in that case?
>
> - Original Message -
> From: "Spike" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 9:54 PM
> Subject: Re: [Flashcoders] Newbie AS3 question
>
>
> ok,
>
> That's just a static class.
>
> Like I said, there's a subtle but important difference between singleton
> and
> a static class.
>
> Here's another example.
>
> You have a requirement to provide a currency formatter.
>
> One way to do this is to create a singleton that returns a different
> currency formatter depending on which locale you are in.
>
> So in the class you would have something like this (Omitting method
> declarations for simplicty):
>
> public class CurrencyFormatter {
>
> class USCurrencyFormatter extends CurrencyFormatter {
>
> }
>
>
> class UKCurrencyFormatter extends CurrencyFormatter {
>
> }
> }
>
> Now if I call CurrencyFormatter.getInstance() it gives me the correct
> formatter for my locale.
>
> With your static class approach you have to check in every method what the
> locale is and handle it accordingly. That's fine for one or two locales,
> but
> if you want to handle 20, it gets pretty ugly.
>
> You can solve the problem in other ways of course, but it does demonstrate
> the difference between static classes and the singleton pattern. The
> singleton pattern offers you a lot more possibilities.
>
> Spike
>
> On 10/29/05, JesterXL <[EMAIL PROTECTED]> wrote:
> >
> > To clarify:
> >
> >
> > class ServerConnection
> > {
> > private static var url;
> > private static var port;
> > private static var socket;
> >
> > public static function connect(p_url, p_port)
> > {
> > url = p_url;
> > port = p_port;
> > socket = new Socket();
> > socket.connect(url, port);
> > }
> >
> > public static function getData()
> > {
> > // Simple function that gets something from the server.
> > }
> > }
> >
> > Then to use:
> >
> > ServerConnection.connect(myURL, myPort);
> >
> > - Original Message -
> > From: "JesterXL" <[EMAIL PROTECTED]>
> > To: "Flashcoders mailing list" 
> > Sent: Friday, October 28, 2005 9:25 PM
> > Subject: Re: [Flashcoders] Newbie AS3 question
> >
> >
> > Naw, I don't know the exact way Singleton is implemented, hence my long
> > battle with finding clarification. It could of been solved in 10 seconds
> > over a beer, but email sux.
> >
> > I figured Math.abs was the Singleton pattern, and ARP, me, Sho, Steven
> > Webster, and everyone else apparently has their own version of
> Controller
> > as
> > well. I figured I knew enough to use it.
> >
> > For instance, your example makes perfect sense and I can see why you'd
> > want
> > to do it that way. I, on the other hand would just put an if then
> > statement
> > in the connect method or whatever to ensure we're connected before
> making
> > a
> > method call, else throw an exception.
> >
> > Are they both the Singleton pattern? Does it matter?
> >
> >
> > - Original Message -
> > From: "Spike" <[EMAIL PROTECTED]>
> > To: "Flashcoders mailing list" 
> > Sent: Friday, October 28, 2005 7:14 PM
> > Subject: Re: [Flashcoders] Newbie AS3 question
> >
> >
> > Hmmm
> >
> > >From your explanation, I think either I don't understand what happens
> in
> > >AS,
> > or you're misunderstanding the use of the singleton pattern.
> >
> > In an attempt to understand better, here's an example of where I would
> use
> > the singleton pattern.
> >
> > I have a requirement to talk to a socket on a server, but I need to make
> > sure that I only ever have a single connection from each user.
> >
> > So...
> >
> > I create a ServerConnection class that has something like this (ignoring
> > private constructors etc.):
> >
> > ServerConnection {
> >
> > private static instance:ServerConnection;
> >
> > static function getInstance() {
> > if (this.instance == null) {
> > instance = new ServerConnection(url,port);
> > } else {
> > // make sure that the port and url for the instance match the passed url
> > and
> > port.
> > // if not, barf an error
> > }
> > return instance;
> > }
> >
> > public function getData() {
> > // Simple function that gets something from the se

Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread JesterXL
Can you elaborate?  Why wouldn't the static class work in that case?

- Original Message - 
From: "Spike" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 9:54 PM
Subject: Re: [Flashcoders] Newbie AS3 question


ok,

That's just a static class.

Like I said, there's a subtle but important difference between singleton and
a static class.

Here's another example.

You have a requirement to provide a currency formatter.

One way to do this is to create a singleton that returns a different
currency formatter depending on which locale you are in.

So in the class you would have something like this (Omitting method
declarations for simplicty):

public class CurrencyFormatter {

class USCurrencyFormatter extends CurrencyFormatter {

}


class UKCurrencyFormatter extends CurrencyFormatter {

}
}

Now if I call CurrencyFormatter.getInstance() it gives me the correct
formatter for my locale.

With your static class approach you have to check in every method what the
locale is and handle it accordingly. That's fine for one or two locales, but
if you want to handle 20, it gets pretty ugly.

You can solve the problem in other ways of course, but it does demonstrate
the difference between static classes and the singleton pattern. The
singleton pattern offers you a lot more possibilities.

Spike

On 10/29/05, JesterXL <[EMAIL PROTECTED]> wrote:
>
> To clarify:
>
>
> class ServerConnection
> {
> private static var url;
> private static var port;
> private static var socket;
>
> public static function connect(p_url, p_port)
> {
> url = p_url;
> port = p_port;
> socket = new Socket();
> socket.connect(url, port);
> }
>
> public static function getData()
> {
> // Simple function that gets something from the server.
> }
> }
>
> Then to use:
>
> ServerConnection.connect(myURL, myPort);
>
> - Original Message -
> From: "JesterXL" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 9:25 PM
> Subject: Re: [Flashcoders] Newbie AS3 question
>
>
> Naw, I don't know the exact way Singleton is implemented, hence my long
> battle with finding clarification. It could of been solved in 10 seconds
> over a beer, but email sux.
>
> I figured Math.abs was the Singleton pattern, and ARP, me, Sho, Steven
> Webster, and everyone else apparently has their own version of Controller
> as
> well. I figured I knew enough to use it.
>
> For instance, your example makes perfect sense and I can see why you'd
> want
> to do it that way. I, on the other hand would just put an if then
> statement
> in the connect method or whatever to ensure we're connected before making
> a
> method call, else throw an exception.
>
> Are they both the Singleton pattern? Does it matter?
>
>
> - Original Message -
> From: "Spike" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 7:14 PM
> Subject: Re: [Flashcoders] Newbie AS3 question
>
>
> Hmmm
>
> >From your explanation, I think either I don't understand what happens in
> >AS,
> or you're misunderstanding the use of the singleton pattern.
>
> In an attempt to understand better, here's an example of where I would use
> the singleton pattern.
>
> I have a requirement to talk to a socket on a server, but I need to make
> sure that I only ever have a single connection from each user.
>
> So...
>
> I create a ServerConnection class that has something like this (ignoring
> private constructors etc.):
>
> ServerConnection {
>
> private static instance:ServerConnection;
>
> static function getInstance() {
> if (this.instance == null) {
> instance = new ServerConnection(url,port);
> } else {
> // make sure that the port and url for the instance match the passed url
> and
> port.
> // if not, barf an error
> }
> return instance;
> }
>
> public function getData() {
> // Simple function that gets something from the server.
> }
> }
>
> ok, so I have now guaranteed that I will only ever create a single
> connection to the server because I'm always getting the same object back
> regardless of how many times I call getInstance() in my code.
>
> So I can happily do this anywhere I like in my code:
>
> ServerConnection.getInstance().getData()
>
> If I had something like what you have in the Math class, the getData()
> method would have to be declared as static and it would have to check
> every
> time you called it to see if there was an active connnection to the
> server.
> If not it would have to create one and you would have to hope that 2
> method
> calls didn't step on each other and create multiple server connections.
>
> Not sure if that clarifies or confuses, but hopefully you can let me know
> if
> and how it differs in Flash.
>
> Spike
>
> On 10/28/05, JesterXL <[EMAIL PROTECTED]> wrote:
> >
> > ActionScript 2, no, no difference. You actually have to do a tincy bit
> of
> > extra work to get AS2 to support getInstance like I've seen it in Java.
> >
> > This all goes way in AS3 since prototype is 

Re: [Flashcoders] Free and open source software

2005-10-28 Thread Ron Wheeler

Eclipse, Doxygen, eclox,  ArgoUML, Pixia, Ant  for development.

GanttProject,OpenOffice and FreeMind for management tools

Ron

Patrick Matte wrote:


Hi, I'm rounding up a list of free and open source software.

For flash, I have found MTASC and swfmil.

Does anyboby know of any other free software for editing sound, video,
bitmap and vector images?


___
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] Newbie AS3 question

2005-10-28 Thread Spike
ok,

That's just a static class.

Like I said, there's a subtle but important difference between singleton and
a static class.

Here's another example.

You have a requirement to provide a currency formatter.

One way to do this is to create a singleton that returns a different
currency formatter depending on which locale you are in.

So in the class you would have something like this (Omitting method
declarations for simplicty):

public class CurrencyFormatter {

class USCurrencyFormatter extends CurrencyFormatter {

}


class UKCurrencyFormatter extends CurrencyFormatter {

}
}

Now if I call CurrencyFormatter.getInstance() it gives me the correct
formatter for my locale.

With your static class approach you have to check in every method what the
locale is and handle it accordingly. That's fine for one or two locales, but
if you want to handle 20, it gets pretty ugly.

You can solve the problem in other ways of course, but it does demonstrate
the difference between static classes and the singleton pattern. The
singleton pattern offers you a lot more possibilities.

Spike

On 10/29/05, JesterXL <[EMAIL PROTECTED]> wrote:
>
> To clarify:
>
>
> class ServerConnection
> {
> private static var url;
> private static var port;
> private static var socket;
>
> public static function connect(p_url, p_port)
> {
> url = p_url;
> port = p_port;
> socket = new Socket();
> socket.connect(url, port);
> }
>
> public static function getData()
> {
> // Simple function that gets something from the server.
> }
> }
>
> Then to use:
>
> ServerConnection.connect(myURL, myPort);
>
> - Original Message -
> From: "JesterXL" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 9:25 PM
> Subject: Re: [Flashcoders] Newbie AS3 question
>
>
> Naw, I don't know the exact way Singleton is implemented, hence my long
> battle with finding clarification. It could of been solved in 10 seconds
> over a beer, but email sux.
>
> I figured Math.abs was the Singleton pattern, and ARP, me, Sho, Steven
> Webster, and everyone else apparently has their own version of Controller
> as
> well. I figured I knew enough to use it.
>
> For instance, your example makes perfect sense and I can see why you'd
> want
> to do it that way. I, on the other hand would just put an if then
> statement
> in the connect method or whatever to ensure we're connected before making
> a
> method call, else throw an exception.
>
> Are they both the Singleton pattern? Does it matter?
>
>
> - Original Message -
> From: "Spike" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 7:14 PM
> Subject: Re: [Flashcoders] Newbie AS3 question
>
>
> Hmmm
>
> >From your explanation, I think either I don't understand what happens in
> >AS,
> or you're misunderstanding the use of the singleton pattern.
>
> In an attempt to understand better, here's an example of where I would use
> the singleton pattern.
>
> I have a requirement to talk to a socket on a server, but I need to make
> sure that I only ever have a single connection from each user.
>
> So...
>
> I create a ServerConnection class that has something like this (ignoring
> private constructors etc.):
>
> ServerConnection {
>
> private static instance:ServerConnection;
>
> static function getInstance() {
> if (this.instance == null) {
> instance = new ServerConnection(url,port);
> } else {
> // make sure that the port and url for the instance match the passed url
> and
> port.
> // if not, barf an error
> }
> return instance;
> }
>
> public function getData() {
> // Simple function that gets something from the server.
> }
> }
>
> ok, so I have now guaranteed that I will only ever create a single
> connection to the server because I'm always getting the same object back
> regardless of how many times I call getInstance() in my code.
>
> So I can happily do this anywhere I like in my code:
>
> ServerConnection.getInstance().getData()
>
> If I had something like what you have in the Math class, the getData()
> method would have to be declared as static and it would have to check
> every
> time you called it to see if there was an active connnection to the
> server.
> If not it would have to create one and you would have to hope that 2
> method
> calls didn't step on each other and create multiple server connections.
>
> Not sure if that clarifies or confuses, but hopefully you can let me know
> if
> and how it differs in Flash.
>
> Spike
>
> On 10/28/05, JesterXL <[EMAIL PROTECTED]> wrote:
> >
> > ActionScript 2, no, no difference. You actually have to do a tincy bit
> of
> > extra work to get AS2 to support getInstance like I've seen it in Java.
> >
> > This all goes way in AS3 since prototype is strictly in the hands of
> > flash.util.Proxy; basically, prototype is now read-only, and Proxy is
> the
> > only one who can wriggle around the rules in the new AVM.
> >
> > That's the one thing that always pissed me off about Cairngorm, and I
> > debat

Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread JesterXL
To clarify:


class ServerConnection
{
private static var url;
private static var port;
private static var socket;

public static function connect(p_url, p_port)
{
url = p_url;
port = p_port;
socket = new Socket();
socket.connect(url, port);
}

public static function getData()
{
// Simple function that gets something from the server.
}
  }

Then to use:

ServerConnection.connect(myURL, myPort);

- Original Message - 
From: "JesterXL" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 9:25 PM
Subject: Re: [Flashcoders] Newbie AS3 question


Naw, I don't know the exact way Singleton is implemented, hence my long
battle with finding clarification.  It could of been solved in 10 seconds
over a beer, but email sux.

I figured Math.abs was the Singleton pattern, and ARP, me, Sho, Steven
Webster, and everyone else apparently has their own version of Controller as
well.  I figured I knew enough to use it.

For instance, your example makes perfect sense and I can see why you'd want
to do it that way.  I, on the other hand would just put an if then statement
in the connect method or whatever to ensure we're connected before making a
method call, else throw an exception.

Are they both the Singleton pattern?  Does it matter?


- Original Message - 
From: "Spike" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 7:14 PM
Subject: Re: [Flashcoders] Newbie AS3 question


Hmmm

>From your explanation, I think either I don't understand what happens in
>AS,
or you're misunderstanding the use of the singleton pattern.

In an attempt to understand better, here's an example of where I would use
the singleton pattern.

I have a requirement to talk to a socket on a server, but I need to make
sure that I only ever have a single connection from each user.

So...

I create a ServerConnection class that has something like this (ignoring
private constructors etc.):

ServerConnection {

private static instance:ServerConnection;

static function getInstance() {
if (this.instance == null) {
instance = new ServerConnection(url,port);
} else {
// make sure that the port and url for the instance match the passed url and
port.
// if not, barf an error
}
return instance;
}

public function getData() {
// Simple function that gets something from the server.
}
}

ok, so I have now guaranteed that I will only ever create a single
connection to the server because I'm always getting the same object back
regardless of how many times I call getInstance() in my code.

So I can happily do this anywhere I like in my code:

ServerConnection.getInstance().getData()

If I had something like what you have in the Math class, the getData()
method would have to be declared as static and it would have to check every
time you called it to see if there was an active connnection to the server.
If not it would have to create one and you would have to hope that 2 method
calls didn't step on each other and create multiple server connections.

Not sure if that clarifies or confuses, but hopefully you can let me know if
and how it differs in Flash.

Spike

On 10/28/05, JesterXL <[EMAIL PROTECTED]> wrote:
>
> ActionScript 2, no, no difference. You actually have to do a tincy bit of
> extra work to get AS2 to support getInstance like I've seen it in Java.
>
> This all goes way in AS3 since prototype is strictly in the hands of
> flash.util.Proxy; basically, prototype is now read-only, and Proxy is the
> only one who can wriggle around the rules in the new AVM.
>
> That's the one thing that always pissed me off about Cairngorm, and I
> debated for days on the ARP Advisory list till I was overulled merely by
> strength of numbers of opposing viewpoints.
>
> First, to clarify, when I speak of Singleton.getInstance(), I speak of the
> only way to utilize the Singleton's methods, so yes, if you want to call
> it
> calling a method on an instance, that's fine, but it's still spoken of as
> a
> Singleton only has 1 instance.
>
> That being the case, what I used to like to do was, even from AS1:
>
> class MyClass
> {
> public static function sup()
> {
> trace("yo");
> }
> }
>
> Which boils down to:
>
> function MyClass()
> {
> }
>
> MyClass.sup = function()
> {
> trace("yo");
> };
>
> Therefore, allowing this:
>
> MyClass.sup();
>
> Since Functions are objects in ActionScript 1 & 2, and about the same in
> 3.
>
> However, when talking about why EventDispatcher in Cairngorm, and
> Controller
> in ARP both have the getInstance method, I was told that it was to ensure
> that there was only ever 1 instance of it.
>
> I replied that there is; it's already defined, use it. Math.abs() works
> just fine, you don't do Math.getInstance().abs(), so why should I have to
> do
> that extra function when I know there is only 1 instance, and it's static,
> and ready to go?
>
> Fast-forward 4 days, class based vs. protoytpe languages, and 

Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread JesterXL
Naw, I don't know the exact way Singleton is implemented, hence my long 
battle with finding clarification.  It could of been solved in 10 seconds 
over a beer, but email sux.

I figured Math.abs was the Singleton pattern, and ARP, me, Sho, Steven 
Webster, and everyone else apparently has their own version of Controller as 
well.  I figured I knew enough to use it.

For instance, your example makes perfect sense and I can see why you'd want 
to do it that way.  I, on the other hand would just put an if then statement 
in the connect method or whatever to ensure we're connected before making a 
method call, else throw an exception.

Are they both the Singleton pattern?  Does it matter?


- Original Message - 
From: "Spike" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 7:14 PM
Subject: Re: [Flashcoders] Newbie AS3 question


Hmmm

>From your explanation, I think either I don't understand what happens in 
>AS,
or you're misunderstanding the use of the singleton pattern.

In an attempt to understand better, here's an example of where I would use
the singleton pattern.

I have a requirement to talk to a socket on a server, but I need to make
sure that I only ever have a single connection from each user.

So...

I create a ServerConnection class that has something like this (ignoring
private constructors etc.):

ServerConnection {

private static instance:ServerConnection;

static function getInstance() {
if (this.instance == null) {
instance = new ServerConnection(url,port);
} else {
// make sure that the port and url for the instance match the passed url and
port.
// if not, barf an error
}
return instance;
}

public function getData() {
// Simple function that gets something from the server.
}
}

ok, so I have now guaranteed that I will only ever create a single
connection to the server because I'm always getting the same object back
regardless of how many times I call getInstance() in my code.

So I can happily do this anywhere I like in my code:

ServerConnection.getInstance().getData()

If I had something like what you have in the Math class, the getData()
method would have to be declared as static and it would have to check every
time you called it to see if there was an active connnection to the server.
If not it would have to create one and you would have to hope that 2 method
calls didn't step on each other and create multiple server connections.

Not sure if that clarifies or confuses, but hopefully you can let me know if
and how it differs in Flash.

Spike

On 10/28/05, JesterXL <[EMAIL PROTECTED]> wrote:
>
> ActionScript 2, no, no difference. You actually have to do a tincy bit of
> extra work to get AS2 to support getInstance like I've seen it in Java.
>
> This all goes way in AS3 since prototype is strictly in the hands of
> flash.util.Proxy; basically, prototype is now read-only, and Proxy is the
> only one who can wriggle around the rules in the new AVM.
>
> That's the one thing that always pissed me off about Cairngorm, and I
> debated for days on the ARP Advisory list till I was overulled merely by
> strength of numbers of opposing viewpoints.
>
> First, to clarify, when I speak of Singleton.getInstance(), I speak of the
> only way to utilize the Singleton's methods, so yes, if you want to call
> it
> calling a method on an instance, that's fine, but it's still spoken of as
> a
> Singleton only has 1 instance.
>
> That being the case, what I used to like to do was, even from AS1:
>
> class MyClass
> {
> public static function sup()
> {
> trace("yo");
> }
> }
>
> Which boils down to:
>
> function MyClass()
> {
> }
>
> MyClass.sup = function()
> {
> trace("yo");
> };
>
> Therefore, allowing this:
>
> MyClass.sup();
>
> Since Functions are objects in ActionScript 1 & 2, and about the same in
> 3.
>
> However, when talking about why EventDispatcher in Cairngorm, and
> Controller
> in ARP both have the getInstance method, I was told that it was to ensure
> that there was only ever 1 instance of it.
>
> I replied that there is; it's already defined, use it. Math.abs() works
> just fine, you don't do Math.getInstance().abs(), so why should I have to
> do
> that extra function when I know there is only 1 instance, and it's static,
> and ready to go?
>
> Fast-forward 4 days, class based vs. protoytpe languages, and demographics
> exploration later, and I see their point; if you don't understand how
> ActionScript is written, doing things like Math.random() really doesn't
> make
> any sense to traditional programmers, and having to know that much about
> how
> a language works is really unfair, doesn't make people want to dive in
> without it being familiar & comfortable, and is an elitist stance.
>
> So, although I think getIstance() isn't technically needed (in AS1 or
> AS2),
> I still see the need for it, and respect it from a traditional developer
> standpoint.
>
> - Original Message -
> From: "Spike" <[EMAIL PROTECTED]>
> To: "Flashcoders ma

Re: [Flashcoders] File under BIZARRE: FIXED

2005-10-28 Thread Rich Rodecker
i dont know about the bug but you should look into flashObject for the
detection: http://blog.deconcept.com/flashobject/



On 10/28/05, Buck Ruckman <[EMAIL PROTECTED]> wrote:
>
>
> Sorry for hijacking the list with this problem today, folks.
>
> When we installed the Flash 8 Player on the broken machines, the problem
> was
> solved.
>
> Conclusion: my game aggravated a bug in Flash Player 7 in IE.
>
> Does that sound accurate?
>
> - Ryan Creighton
>
>
> (PS if that DOES sound accurate, can someone please point me to the most
> recent and tastiest Flash 8 detection script so's i can force all of my
> users to experience the joys of a working game? Thanks!!)
>
> _
> Take charge with a pop-up guard built on patented Microsoft(r) SmartScreen
> Technology
>
> http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
> Start enjoying all the benefits of MSN(r) Premium right now and get the
> first two months FREE*.
>
> ___
> 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] Re: Newbie AS3 question

2005-10-28 Thread Muzak
You do know that it (this.) is being added for you at compile time in AS2, 
right?

Muzak

- Original Message - 
From: "Frédéric v. Bochmann" <[EMAIL PROTECTED]>
To: "'Flashcoders mailing list'" 
Sent: Saturday, October 29, 2005 12:53 AM
Subject: RE: [Flashcoders] Re: Newbie AS3 question


> No need to get hyper about "this".
> The matter stays that "this" used to be essential in AS1, thus probably why
> people still like to implicate him in their code. But I agree that putting
> "this" in an AS2 Class should be used only when necessary.
>
>


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


Re: [Flashcoders] Cannot assign text component from array with href / asfunction

2005-10-28 Thread Miles Thompson

At 12:26 PM 10/28/2005, you wrote:


> >
> > > 
> > > BRUCE CLARKE'S SON > > />COPS A SECURITIES ACT PLEA
> >
> >



> When I click, nothing happens, unless it is trying
> to open a browser and
> I'm testing in the debugger or simply running the
> movie. I've added a
> trace() to addStory, nothing appears in the output
> window.


 Miles, My suggestion. is to try the simpliest case
that could work, get that working and go from there.
have you tried someting ultra simple like:

In html: 

In ActionScript:

function myFunction() {
   _root.myText.txt = "Called myFunction";
}

You'd have to put a textfield on the stage with an
instance name of myText of course. This way you can
test your code in a browser.

best of luck,
-Steven


Steven,

Good suggestion, and thank you, but it made no difference.

I pared down the addStory() function just as you suggested, even removing 
the trace() calls in case the movie was tripping over those. Just a simple 
assignment of "In addStory" to _root.txtNews.text. Like so:


function addStory(){
_root.txtNews.text = "In addStory";
}

A click on this link, taken from the output window:
 NEIL LEBLANC WANTS TOP JOB
should fire addStory.

addStory is in frame 1 of the movie, but then so is all of  the other code 
(Which all works, including the function which build the lists and assigns 
it to the left-side text area, txtHead.)


It's starting to get bizarre. (Maybe txtNews and txtHead have to be on 
separate levels?) I have used asfunction() to call functions which load 
data from text files, etc.


I've tried putting a breakpoint ins addStory. It just does not seem to get 
called.


This thing is just playing DUMB, or more accurately it is as if asfunction 
doesn't exist, but won't throw a compile-time error.


I double-checked the Flash player that's running, it's version 7,0,19,0. 
Flash MX 2004 itself is version 7.2, Licensing version 4.0.0.32. And I've 
tried all of these things in IE 6, and in simple preview mode (Ctrl+Enter). 
The text area names and settings have been double-checked, yes they are 
enabled, HTML is set to true, etc. etc.


Do I need to compile with the "named anchors: option? Obviously not, just 
tried it and it made no difference.


Heck, I've even resorted to that venerable Windows 3.x trick and 
cold-booted the computer. 



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


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Weyert de Boer
I always understood that the richtext support of Flash sucks, but I 
suppose to be mistaken? I always hear people complaining about images etc.

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


Re: [Flashcoders] Re: Newbie AS3 question

2005-10-28 Thread Spike
In a perfect world all methods would be short and succinct.

Unfortunately we don't live in a perfect world and it's sometimes more
confusing to split things up than to just leave longer methods. I've seen
plenty of code where 200 lines was the realistic minimum without creating
methods that had 15 or more parameters. Try implementing DES, or any other
encryption algorithm for that matter, and you'll probably find that your
methods are a lot longer than you'd really like.

I do agree though that use of this is a stylistic thing more than anything
else.

Spike

On 10/28/05, Martin Wood <[EMAIL PROTECTED]> wrote:
>
> > If you come along maintain someone's code 6 months from now and you find
> a
> > complex method of 200 lines of so, it's useful to have the this prefix
> to
> > distinguish between variables that are local to the function and those
> that
> > are available to the instance.
>
> true, but i would also immediately re-factor it into shorter, clearer
> methods.
>
> anyway, i think its more a matter of taste rather than good or bad
> programming.
>
> theres places where you need to use it, but otherwise do what you like. :)
>
>
>
>
> martin
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Spike
Hmmm

>From your explanation, I think either I don't understand what happens in AS,
or you're misunderstanding the use of the singleton pattern.

In an attempt to understand better, here's an example of where I would use
the singleton pattern.

I have a requirement to talk to a socket on a server, but I need to make
sure that I only ever have a single connection from each user.

So...

I create a ServerConnection class that has something like this (ignoring
private constructors etc.):

ServerConnection {

private static instance:ServerConnection;

static function getInstance() {
if (this.instance == null) {
instance = new ServerConnection(url,port);
} else {
// make sure that the port and url for the instance match the passed url and
port.
// if not, barf an error
}
return instance;
}

public function getData() {
// Simple function that gets something from the server.
}
}

ok, so I have now guaranteed that I will only ever create a single
connection to the server because I'm always getting the same object back
regardless of how many times I call getInstance() in my code.

So I can happily do this anywhere I like in my code:

ServerConnection.getInstance().getData()

If I had something like what you have in the Math class, the getData()
method would have to be declared as static and it would have to check every
time you called it to see if there was an active connnection to the server.
If not it would have to create one and you would have to hope that 2 method
calls didn't step on each other and create multiple server connections.

Not sure if that clarifies or confuses, but hopefully you can let me know if
and how it differs in Flash.

Spike

On 10/28/05, JesterXL <[EMAIL PROTECTED]> wrote:
>
> ActionScript 2, no, no difference. You actually have to do a tincy bit of
> extra work to get AS2 to support getInstance like I've seen it in Java.
>
> This all goes way in AS3 since prototype is strictly in the hands of
> flash.util.Proxy; basically, prototype is now read-only, and Proxy is the
> only one who can wriggle around the rules in the new AVM.
>
> That's the one thing that always pissed me off about Cairngorm, and I
> debated for days on the ARP Advisory list till I was overulled merely by
> strength of numbers of opposing viewpoints.
>
> First, to clarify, when I speak of Singleton.getInstance(), I speak of the
> only way to utilize the Singleton's methods, so yes, if you want to call
> it
> calling a method on an instance, that's fine, but it's still spoken of as
> a
> Singleton only has 1 instance.
>
> That being the case, what I used to like to do was, even from AS1:
>
> class MyClass
> {
> public static function sup()
> {
> trace("yo");
> }
> }
>
> Which boils down to:
>
> function MyClass()
> {
> }
>
> MyClass.sup = function()
> {
> trace("yo");
> };
>
> Therefore, allowing this:
>
> MyClass.sup();
>
> Since Functions are objects in ActionScript 1 & 2, and about the same in
> 3.
>
> However, when talking about why EventDispatcher in Cairngorm, and
> Controller
> in ARP both have the getInstance method, I was told that it was to ensure
> that there was only ever 1 instance of it.
>
> I replied that there is; it's already defined, use it. Math.abs() works
> just fine, you don't do Math.getInstance().abs(), so why should I have to
> do
> that extra function when I know there is only 1 instance, and it's static,
> and ready to go?
>
> Fast-forward 4 days, class based vs. protoytpe languages, and demographics
> exploration later, and I see their point; if you don't understand how
> ActionScript is written, doing things like Math.random() really doesn't
> make
> any sense to traditional programmers, and having to know that much about
> how
> a language works is really unfair, doesn't make people want to dive in
> without it being familiar & comfortable, and is an elitist stance.
>
> So, although I think getIstance() isn't technically needed (in AS1 or
> AS2),
> I still see the need for it, and respect it from a traditional developer
> standpoint.
>
> - Original Message -
> From: "Spike" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 6:38 PM
> Subject: Re: [Flashcoders] Newbie AS3 question
>
>
> *snip*
> AS3 and Flex both hammer the point that this really has little use other
> than confirming for those programmers who are not familiar with
> ActionScript. Same goes for the Singleton.method vs.
> Singleton.getInstance().method argument; the latter is for those
> programmers
> who don't know ActionScript well.
> *snip*
>
> Maybe there's something I don't understand, or maybe you typed it wrong,
> but
> in every other OO language I've dealt with there's a significant but
> subtle
> difference between
>
> Singleton.getInstance().method()
>
> and
>
> Singleton.method()
>
> The former is calling an instance method and the latter is calling a
> static
> method.
>
> Instance methods have access to instance data that is persisted as long as
> the instance exists,

Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread JesterXL
You don't need the DisplayList to do that; it just gives you a nice 
seperation of what's drawn, and where.

http://flashtexteditor.com/


- Original Message - 
From: "Weyert de Boer" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 7:07 PM
Subject: Re: [Flashcoders] Newbie AS3 question


Can't we use DisplayList to make our own richtext editor in Flash?
___
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] Newbie AS3 question

2005-10-28 Thread Weyert de Boer

Can't we use DisplayList to make our own richtext editor in Flash?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Frédéric v . Bochmann
What's drawn at each frame is it only the BitmapData representation of the
movieclip or is it the actual movieclip? I know technically that could
end-up to the same thing, that's why I'm curious.

Just trying to get a good grasp of how addChild and new MovieClip work
internally.

Anyone know?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of JesterXL
Sent: October 28, 2005 6:58 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Newbie AS3 question

Close; the MovieClip IS instantiated, just not drawn.  I think Ryan said it 
best earlier when you think of:

var a:MovieClip = createEmptyMovieClip("mc");

as:

var a:MovieClip = new MovieClip();
addChild(a);

addChild merely tells Flash to draw it each frame.

So yeah, you could have a list, and choose which one you want to draw, when,

and where in the DL.

Absolutely; you can screw with the movieclips as much as you want without 
having them drawn; they are valid movieclip objects with all the methods and

properties to boot.

- Original Message - 
From: "Michael Bedar" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 6:40 PM
Subject: Re: [Flashcoders] Newbie AS3 question


ok, so if in AS 3.0 i make an array of "new MovieClip()" objects, i
can choose to only keep one actually instantiated by only adding the
one i want to the display list?  Can such movieclip objects that are
not in the display list be manipulated?





On Oct 28, 2005, at 2:21 PM, Spike wrote:

> Good lord!
>
> Why do you say that?
>
> It's an extra 2 lines of code and it allows you to reparent any of the
> children of any of the movie clipse.
>
> I'd be more inclined to say it's awesome!
>
> Spike
>
> On 10/28/05, Andreas Rønning <[EMAIL PROTECTED]> wrote:
>
>>
>> Shaw, Matt wrote:
>>
>>
>>> Assuming the Game class is your root/stage class:
>>>
>>> 
>>> Public class Game extends MovieClip {
>>> public function Game(){
>>> var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
>>> this.addChild( gameworld );
>>>
>>> var game_bg:MovieClip = new MovieClip();
>>> gameworld.addChild( game_bg );
>>> }
>>>
>>>
>>>
>>> -Original Message-
>>> From: [EMAIL PROTECTED] [mailto:
>>>
>> [EMAIL PROTECTED] On Behalf Of Andreas
>> Rønning
>>
>>> Sent: Friday, October 28, 2005 1:08 PM
>>> To: Flashcoders mailing list
>>> Subject: [Flashcoders] Newbie AS3 question
>>>
>>> AS3 noob question ahoy!
>>>
>>> I'm reading the AS3 reference trying to get accustomed to the
>>> idea, but
>>>
>> some things (though they look better) i don't really get right
>> away :) Hence
>> my feeling of incredible stupidity.
>>
>>>
>>> I realise the AS3 in the reference is Flex-related, but in Flash IDE
>>>
>> terms, how would i do something like this in AS3:
>>
>>>
>>> var baseClip = _root.createEmptyMovieClip("gameworld",1);
>>> var backGround = baseClip.createEmptyMovieClip("game_bg",1);
>>>
>>> I get how much more practical myClip = new MovieClip(); looks, but i
>>>
>> don't get how i connect a clip created this way with the
>> traditional clip
>> hierarchy. Is that out the window as well?
>>
>>> The reference describes |DisplayObjectContainer.addChild(), but i'm
>>>
>> guessing this doesnt really count for how it'll work in the Flash
>> IDE?
>>
>>>
>>> Any helpful hints at what the future holds? :)
>>> |
>>> - Andreas
>>> ___
>>> 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
>>>
>>>
>>>
>>  That's horrifying.
>>
>> - Andreas
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>
>
>
> --
> 
> Stephen Milligan
> Do you do the Badger?
> http://www.yellowbadger.com
>
> Do you cfeclipse? http://www.cfeclipse.org
> ___
> 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] Newbie AS3 question

2005-10-28 Thread JesterXL
Example:

var a:MovieClip = new MovieClip();
a.graphics.beginFill(0x00);
a.graphics.lineTo(100, 0);
a.graphics.endFill();

That creates a new MovieClip, and draws a black line in it.

But, you won't see anything drawn on the screen until you actually add it to 
the DL.

- Original Message - 
From: "JesterXL" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 6:58 PM
Subject: Re: [Flashcoders] Newbie AS3 question


Close; the MovieClip IS instantiated, just not drawn.  I think Ryan said it
best earlier when you think of:

var a:MovieClip = createEmptyMovieClip("mc");

as:

var a:MovieClip = new MovieClip();
addChild(a);

addChild merely tells Flash to draw it each frame.

So yeah, you could have a list, and choose which one you want to draw, when,
and where in the DL.

Absolutely; you can screw with the movieclips as much as you want without
having them drawn; they are valid movieclip objects with all the methods and
properties to boot.

- Original Message - 
From: "Michael Bedar" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 6:40 PM
Subject: Re: [Flashcoders] Newbie AS3 question


ok, so if in AS 3.0 i make an array of "new MovieClip()" objects, i
can choose to only keep one actually instantiated by only adding the
one i want to the display list?  Can such movieclip objects that are
not in the display list be manipulated?





On Oct 28, 2005, at 2:21 PM, Spike wrote:

> Good lord!
>
> Why do you say that?
>
> It's an extra 2 lines of code and it allows you to reparent any of the
> children of any of the movie clipse.
>
> I'd be more inclined to say it's awesome!
>
> Spike
>
> On 10/28/05, Andreas Rønning <[EMAIL PROTECTED]> wrote:
>
>>
>> Shaw, Matt wrote:
>>
>>
>>> Assuming the Game class is your root/stage class:
>>>
>>> 
>>> Public class Game extends MovieClip {
>>> public function Game(){
>>> var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
>>> this.addChild( gameworld );
>>>
>>> var game_bg:MovieClip = new MovieClip();
>>> gameworld.addChild( game_bg );
>>> }
>>>
>>>
>>>
>>> -Original Message-
>>> From: [EMAIL PROTECTED] [mailto:
>>>
>> [EMAIL PROTECTED] On Behalf Of Andreas
>> Rønning
>>
>>> Sent: Friday, October 28, 2005 1:08 PM
>>> To: Flashcoders mailing list
>>> Subject: [Flashcoders] Newbie AS3 question
>>>
>>> AS3 noob question ahoy!
>>>
>>> I'm reading the AS3 reference trying to get accustomed to the
>>> idea, but
>>>
>> some things (though they look better) i don't really get right
>> away :) Hence
>> my feeling of incredible stupidity.
>>
>>>
>>> I realise the AS3 in the reference is Flex-related, but in Flash IDE
>>>
>> terms, how would i do something like this in AS3:
>>
>>>
>>> var baseClip = _root.createEmptyMovieClip("gameworld",1);
>>> var backGround = baseClip.createEmptyMovieClip("game_bg",1);
>>>
>>> I get how much more practical myClip = new MovieClip(); looks, but i
>>>
>> don't get how i connect a clip created this way with the
>> traditional clip
>> hierarchy. Is that out the window as well?
>>
>>> The reference describes |DisplayObjectContainer.addChild(), but i'm
>>>
>> guessing this doesnt really count for how it'll work in the Flash
>> IDE?
>>
>>>
>>> Any helpful hints at what the future holds? :)
>>> |
>>> - Andreas
>>> ___
>>> 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
>>>
>>>
>>>
>>  That's horrifying.
>>
>> - Andreas
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>
>
>
> --
> 
> Stephen Milligan
> Do you do the Badger?
> http://www.yellowbadger.com
>
> Do you cfeclipse? http://www.cfeclipse.org
> ___
> 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] Newbie AS3 question

2005-10-28 Thread JesterXL
Close; the MovieClip IS instantiated, just not drawn.  I think Ryan said it 
best earlier when you think of:

var a:MovieClip = createEmptyMovieClip("mc");

as:

var a:MovieClip = new MovieClip();
addChild(a);

addChild merely tells Flash to draw it each frame.

So yeah, you could have a list, and choose which one you want to draw, when, 
and where in the DL.

Absolutely; you can screw with the movieclips as much as you want without 
having them drawn; they are valid movieclip objects with all the methods and 
properties to boot.

- Original Message - 
From: "Michael Bedar" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 6:40 PM
Subject: Re: [Flashcoders] Newbie AS3 question


ok, so if in AS 3.0 i make an array of "new MovieClip()" objects, i
can choose to only keep one actually instantiated by only adding the
one i want to the display list?  Can such movieclip objects that are
not in the display list be manipulated?





On Oct 28, 2005, at 2:21 PM, Spike wrote:

> Good lord!
>
> Why do you say that?
>
> It's an extra 2 lines of code and it allows you to reparent any of the
> children of any of the movie clipse.
>
> I'd be more inclined to say it's awesome!
>
> Spike
>
> On 10/28/05, Andreas Rønning <[EMAIL PROTECTED]> wrote:
>
>>
>> Shaw, Matt wrote:
>>
>>
>>> Assuming the Game class is your root/stage class:
>>>
>>> 
>>> Public class Game extends MovieClip {
>>> public function Game(){
>>> var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
>>> this.addChild( gameworld );
>>>
>>> var game_bg:MovieClip = new MovieClip();
>>> gameworld.addChild( game_bg );
>>> }
>>>
>>>
>>>
>>> -Original Message-
>>> From: [EMAIL PROTECTED] [mailto:
>>>
>> [EMAIL PROTECTED] On Behalf Of Andreas
>> Rønning
>>
>>> Sent: Friday, October 28, 2005 1:08 PM
>>> To: Flashcoders mailing list
>>> Subject: [Flashcoders] Newbie AS3 question
>>>
>>> AS3 noob question ahoy!
>>>
>>> I'm reading the AS3 reference trying to get accustomed to the
>>> idea, but
>>>
>> some things (though they look better) i don't really get right
>> away :) Hence
>> my feeling of incredible stupidity.
>>
>>>
>>> I realise the AS3 in the reference is Flex-related, but in Flash IDE
>>>
>> terms, how would i do something like this in AS3:
>>
>>>
>>> var baseClip = _root.createEmptyMovieClip("gameworld",1);
>>> var backGround = baseClip.createEmptyMovieClip("game_bg",1);
>>>
>>> I get how much more practical myClip = new MovieClip(); looks, but i
>>>
>> don't get how i connect a clip created this way with the
>> traditional clip
>> hierarchy. Is that out the window as well?
>>
>>> The reference describes |DisplayObjectContainer.addChild(), but i'm
>>>
>> guessing this doesnt really count for how it'll work in the Flash
>> IDE?
>>
>>>
>>> Any helpful hints at what the future holds? :)
>>> |
>>> - Andreas
>>> ___
>>> 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
>>>
>>>
>>>
>>  That's horrifying.
>>
>> - Andreas
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>
>
>
> --
> 
> Stephen Milligan
> Do you do the Badger?
> http://www.yellowbadger.com
>
> Do you cfeclipse? http://www.cfeclipse.org
> ___
> 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] Re: Newbie AS3 question

2005-10-28 Thread Martin Wood

If you come along maintain someone's code 6 months from now and you find a
complex method of 200 lines of so, it's useful to have the this prefix to
distinguish between variables that are local to the function and those that
are available to the instance.


true, but i would also immediately re-factor it into shorter, clearer 
methods.


anyway, i think its more a matter of taste rather than good or bad 
programming.


theres places where you need to use it, but otherwise do what you like. :)




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


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread JesterXL
ActionScript 2, no, no difference.  You actually have to do a tincy bit of 
extra work to get AS2 to support getInstance like I've seen it in Java.

This all goes way in AS3 since prototype is strictly in the hands of 
flash.util.Proxy; basically, prototype is now read-only, and Proxy is the 
only one who can wriggle around the rules in the new AVM.

That's the one thing that always pissed me off about Cairngorm, and I 
debated for days on the ARP Advisory list till I was overulled merely by 
strength of numbers of opposing viewpoints.

First, to clarify, when I speak of Singleton.getInstance(), I speak of the 
only way to utilize the Singleton's methods, so yes, if you want to call it 
calling a method on an instance, that's fine, but it's still spoken of as a 
Singleton only has 1 instance.

That being the case, what I used to like to do was, even from AS1:

class MyClass
{
public static function sup()
{
trace("yo");
}
}

Which boils down to:

function MyClass()
{
}

MyClass.sup = function()
{
trace("yo");
};

Therefore, allowing this:

MyClass.sup();

Since Functions are objects in ActionScript 1 & 2, and about the same in 3.

However, when talking about why EventDispatcher in Cairngorm, and Controller 
in ARP both have the getInstance method, I was told that it was to ensure 
that there was only ever 1 instance of it.

I replied that there is; it's already defined, use it.  Math.abs() works 
just fine, you don't do Math.getInstance().abs(), so why should I have to do 
that extra function when I know there is only 1 instance, and it's static, 
and ready to go?

Fast-forward 4 days, class based vs. protoytpe languages, and demographics 
exploration later, and I see their point; if you don't understand how 
ActionScript is written, doing things like Math.random() really doesn't make 
any sense to traditional programmers, and having to know that much about how 
a language works is really unfair, doesn't make people want to dive in 
without it being familiar & comfortable, and is an elitist stance.

So, although I think getIstance() isn't technically needed (in AS1 or AS2), 
I still see the need for it, and respect it from a traditional developer 
standpoint.

- Original Message - 
From: "Spike" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 6:38 PM
Subject: Re: [Flashcoders] Newbie AS3 question


*snip*
AS3 and Flex both hammer the point that this really has little use other
than confirming for those programmers who are not familiar with
ActionScript. Same goes for the Singleton.method vs.
Singleton.getInstance().method argument; the latter is for those programmers
who don't know ActionScript well.
*snip*

Maybe there's something I don't understand, or maybe you typed it wrong, but
in every other OO language I've dealt with there's a significant but subtle
difference between

Singleton.getInstance().method()

and

Singleton.method()

The former is calling an instance method and the latter is calling a static
method.

Instance methods have access to instance data that is persisted as long as
the instance exists, static methods have access only to static data and that
data passed in to the method call.

Is this not true in ActionScript?

Spike

On 10/28/05, JesterXL <[EMAIL PROTECTED]> wrote:
>
> I'm the opposite end of the spectrum. This:
>
> class Box extends UIObject
> {
> function doStuff()
> {
> move(x + 10, y + 10);
> setSize(width + 100, height + 100);
> visible = !visible;
> }
> }
>
> looks more readable to me than:
>
> class Box extends UIObject
> {
> function doStuff()
> {
> this.move(this.x + 10, this.y + 10);
> this.setSize(this.width + 100, this.height + 100);
> this.visible = !this.visible;
> }
> }
>
> To each their own. I can see it justified in extending intrinsic classes,
> as the first parameter to setInterval, and the first parameter in
> Delegate.
>
> AS3 and Flex both hammer the point that this really has little use other
> than confirming for those programmers who are not familiar with
> ActionScript. Same goes for the Singleton.method vs.
> Singleton.getInstance().method argument; the latter is for those
> programmers
> who don't know ActionScript well.
>
> If you do it every day, there is no point.
>
> - Original Message -
> From: "Muzak" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 5:37 PM
> Subject: Re: [Flashcoders] Newbie AS3 question
>
>
> Well, to me it's the other way around.
> Code that doesn't use proper references looks messy to me.
>
> Whe I'm lazy or in a hurry, I do skip them, but I usually find myself
> adding
> them afterwards anyway.
>
> So, I'm with ryanm on this one ;-)
>
> regards,
> Muzak
>
> - Original Message -
> From: "Martin Wood" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 11:03 PM
> Subject: Re: [Flashcoders] Newbie AS3 question
>
>
> >
> >
> > ryanm wrote:
> >>> What I don't get is why it nee

RE: [Flashcoders] Re: Newbie AS3 question

2005-10-28 Thread Frédéric v . Bochmann
No need to get hyper about "this".
The matter stays that "this" used to be essential in AS1, thus probably why
people still like to implicate him in their code. But I agree that putting
"this" in an AS2 Class should be used only when necessary.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of A.Cicak
Sent: October 28, 2005 6:33 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Re: Newbie AS3 question

Well, I dont agree, "this" keyword refers to current class, so its only more

typing to include it, and making code less
readable. Only reason keyword "this" exists is if you want to pass reference

to current object somewhere, in which case
you must use "this". To me using "this" in your code makes you look like 
wannabe-programmer, :) But I gues its matter of taste. btw, old VB does not 
have "this" keyword, and if you were reffering to VB(.NET), it is more OOP 
and more complex than AS3, so I gues programmers in VB.NET (if there are 
some, since C# is there) are not wannabe-programmers :)


"ryanm" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>> What I don't get is why it needs "this.addChild" instead of just 
>> addChild. I've been sick of the keyword "this" for a long time and have 
>> since avoided it in AS2.
>>
>> Any reason that it needs to be back in for AS3?
>>
>Maybe because it's one of the most useful scope references ever 
> invented?
>
>The fundamental concept that you seem to miss is that "addChild" is 
> meaningless by itself, it is a method of an object (in proper OOP 
> development), and if you just say "addChild", who is adding the child? You

> need a reference. You could do it like this if you like:
>
> class Game extends MovieClip {
>var world:MovieClip;
>var bg:MovieClip;
>function Game(){
>var GameReference:Game = this;
>world = new MovieClip();
>
>GameReference.addChild( world );
>
>bg = new MovieClip();
>world.addChild( bg );
>}
> }
>
>The point is, you shouldn't use functions that aren't attached to 
> objects, it's bad form, and it's thoroughlly confusing to people who later

> have to maintain your code. Besides, it makes you look like one of those 
> wannabe-programmer VB guys. ;-)
>
> ryanm
> ___
> 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] Why Flex?

2005-10-28 Thread David Mendels
Hi,

Partly right :)

The plan has always been to support AS3 in both Flash authoring and Flex
and that is still true.

At one point we were looking stretching to get AS3 in Flash Player 8 and
Flash Professional 8, but we realized that was a *bad* idea...we just
couldn't do it with the quality and results we wanted.

So we still are planning on having AS3 in both products, but the sync-up
comes with the next major release.  That said, we will be working to get
Flash authoring with AS3 in public alpha or beta on the labs site so
folks can give us feedback. 

In general, we did step back a while ago and realized that we were not
meeting our customers needs (and future customer needs) by trying to be
"all things to all people" in a single tool.  While we did add much
great "developer oriented" functionality to Flash authoring, we felt
from talking to customers that in many cases designers felt confused or
even ignored and yet programmers still didn't feel we were meeting their
needs.  We talked with customers and found more folks wanted us to (a)
make a great tool and model that was really designed for
designers/videographers/multimedia professionals and (b) also a great
tool and model that was really designed for programmers, and *most
importantly* (c) make it so that teams could work together and bring
together designers and developers to build great experiences.  

We are not going to ignore developers in Flash authoring--you'll see
continued improvements across the functionality in Flash authoring in
future releases, but you will see us continuing to have a different
focus across Flex and Flash authoring and increasingly over releases
improving the ability for them to work together.

HTH,
David
Macromedia

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Muzak
> Sent: Friday, October 28, 2005 5:51 PM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] Why Flex?
> 
> I guess we'll have to wait and see what they come up with in F9.
> 
> And if I have to guess some more, I think the initial 
> intention was to have this in F8 (or part of it).
> Remember that screenshot of the Flash 8 IDE that had 
> 'ActionScript 3' in it somewhere?
> Someone from MM (Mike Chambers??) then said it was an error 
> in the (beta) IDE.
> 
> Somewhere along the line they decided to not go that route 
> and wait for F9 to implement AS3 stuff.
> 
> Anyways, I was kinda disappointed with F8, but Flex 2 makes 
> it all good again (and then some more)..
> 
> Muzak
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Newbie AS3 question

2005-10-28 Thread Spike
Forgot to mention, the other common place you'll see it is in constructors
or anywhere else you find yourself with method arguments that match the name
of an instance variable.

public function Person(fname:String,lname:String) {
this.fame = fname;
this.lname = lname;
}

Is it good practice? Probably not.

is it commonly seen in code? Definitely.

Spike

On 10/28/05, Spike <[EMAIL PROTECTED]> wrote:
>
> Passing a reference to the current object is not the only place where
> using the this prefix is useful.
>
> If you come along maintain someone's code 6 months from now and you find a
> complex method of 200 lines of so, it's useful to have the this prefix to
> distinguish between variables that are local to the function and those that
> are available to the instance.
>
> Using the this prefix in your code is more likely to make you look like an
> obsessively meticulious programmer than a newbie in my experience.
>
> If the IDE you use automatically highlights the instance variables then
> there isn't much point in using the this prefix that way, but it's certainly
> a valid excuse for doing it.
>
> Spike
>
> On 10/28/05, A.Cicak <[EMAIL PROTECTED]> wrote:
> >
> > Well, I dont agree, "this" keyword refers to current class, so its only
> > more
> > typing to include it, and making code less
> > readable. Only reason keyword "this" exists is if you want to pass
> > reference
> > to current object somewhere, in which case
> > you must use "this". To me using "this" in your code makes you look like
> > wannabe-programmer, :) But I gues its matter of taste. btw, old VB does
> > not
> > have "this" keyword, and if you were reffering to VB(.NET), it is more
> > OOP
> > and more complex than AS3, so I gues programmers in 
> > VB.NET(if there are
> > some, since C# is there) are not wannabe-programmers :)
> >
> >
> > "ryanm" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > >> What I don't get is why it needs "this.addChild " instead of just
> > >> addChild. I've been sick of the keyword "this" for a long time and
> > have
> > >> since avoided it in AS2.
> > >>
> > >> Any reason that it needs to be back in for AS3?
> > >>
> > > Maybe because it's one of the most useful scope references ever
> > > invented?
> > >
> > > The fundamental concept that you seem to miss is that "addChild" is
> > > meaningless by itself, it is a method of an object (in proper OOP
> > > development), and if you just say "addChild", who is adding the child?
> > You
> > > need a reference. You could do it like this if you like:
> > >
> > > class Game extends MovieClip {
> > > var world:MovieClip;
> > > var bg:MovieClip;
> > > function Game(){
> > > var GameReference:Game = this;
> > > world = new MovieClip();
> > >
> > > GameReference.addChild( world );
> > >
> > > bg = new MovieClip();
> > > world.addChild( bg );
> > > }
> > > }
> > >
> > > The point is, you shouldn't use functions that aren't attached to
> > > objects, it's bad form, and it's thoroughlly confusing to people who
> > later
> > > have to maintain your code. Besides, it makes you look like one of
> > those
> > > wannabe-programmer VB guys. ;-)
> > >
> > > ryanm
> > > ___
> > > 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
> >
>
>
>
> --
> 
> Stephen Milligan
> Do you do the Badger?
> http://www.yellowbadger.com
>
> Do you cfeclipse? http://www.cfeclipse.org
>
>


--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Newbie AS3 question

2005-10-28 Thread Spike
Passing a reference to the current object is not the only place where using
the this prefix is useful.

If you come along maintain someone's code 6 months from now and you find a
complex method of 200 lines of so, it's useful to have the this prefix to
distinguish between variables that are local to the function and those that
are available to the instance.

Using the this prefix in your code is more likely to make you look like an
obsessively meticulious programmer than a newbie in my experience.

If the IDE you use automatically highlights the instance variables then
there isn't much point in using the this prefix that way, but it's certainly
a valid excuse for doing it.

Spike

On 10/28/05, A.Cicak <[EMAIL PROTECTED]> wrote:
>
> Well, I dont agree, "this" keyword refers to current class, so its only
> more
> typing to include it, and making code less
> readable. Only reason keyword "this" exists is if you want to pass
> reference
> to current object somewhere, in which case
> you must use "this". To me using "this" in your code makes you look like
> wannabe-programmer, :) But I gues its matter of taste. btw, old VB does
> not
> have "this" keyword, and if you were reffering to VB(.NET), it is more OOP
> and more complex than AS3, so I gues programmers in VB.NET (if 
> there are
> some, since C# is there) are not wannabe-programmers :)
>
>
> "ryanm" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >> What I don't get is why it needs "this.addChild" instead of just
> >> addChild. I've been sick of the keyword "this" for a long time and have
> >> since avoided it in AS2.
> >>
> >> Any reason that it needs to be back in for AS3?
> >>
> > Maybe because it's one of the most useful scope references ever
> > invented?
> >
> > The fundamental concept that you seem to miss is that "addChild" is
> > meaningless by itself, it is a method of an object (in proper OOP
> > development), and if you just say "addChild", who is adding the child?
> You
> > need a reference. You could do it like this if you like:
> >
> > class Game extends MovieClip {
> > var world:MovieClip;
> > var bg:MovieClip;
> > function Game(){
> > var GameReference:Game = this;
> > world = new MovieClip();
> >
> > GameReference.addChild( world );
> >
> > bg = new MovieClip();
> > world.addChild( bg );
> > }
> > }
> >
> > The point is, you shouldn't use functions that aren't attached to
> > objects, it's bad form, and it's thoroughlly confusing to people who
> later
> > have to maintain your code. Besides, it makes you look like one of those
> > wannabe-programmer VB guys. ;-)
> >
> > ryanm
> > ___
> > 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
>



--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Michael Bedar
ok, so if in AS 3.0 i make an array of "new MovieClip()" objects, i  
can choose to only keep one actually instantiated by only adding the  
one i want to the display list?  Can such movieclip objects that are  
not in the display list be manipulated?






On Oct 28, 2005, at 2:21 PM, Spike wrote:


Good lord!

Why do you say that?

It's an extra 2 lines of code and it allows you to reparent any of the
children of any of the movie clipse.

I'd be more inclined to say it's awesome!

Spike

On 10/28/05, Andreas Rønning <[EMAIL PROTECTED]> wrote:



Shaw, Matt wrote:



Assuming the Game class is your root/stage class:


Public class Game extends MovieClip {
public function Game(){
var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
this.addChild( gameworld );

var game_bg:MovieClip = new MovieClip();
gameworld.addChild( game_bg );
}



-Original Message-
From: [EMAIL PROTECTED] [mailto:

[EMAIL PROTECTED] On Behalf Of Andreas  
Rønning



Sent: Friday, October 28, 2005 1:08 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Newbie AS3 question

AS3 noob question ahoy!

I'm reading the AS3 reference trying to get accustomed to the  
idea, but


some things (though they look better) i don't really get right  
away :) Hence

my feeling of incredible stupidity.



I realise the AS3 in the reference is Flex-related, but in Flash IDE


terms, how would i do something like this in AS3:



var baseClip = _root.createEmptyMovieClip("gameworld",1);
var backGround = baseClip.createEmptyMovieClip("game_bg",1);

I get how much more practical myClip = new MovieClip(); looks, but i

don't get how i connect a clip created this way with the  
traditional clip

hierarchy. Is that out the window as well?


The reference describes |DisplayObjectContainer.addChild(), but i'm

guessing this doesnt really count for how it'll work in the Flash  
IDE?




Any helpful hints at what the future holds? :)
|
- Andreas
___
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




 That's horrifying.

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






--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
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] Newbie AS3 question

2005-10-28 Thread JesterXL
addChild merely adds an object to the top of the DisplayList.  Every frame, 
the Flash Player renders objects in the display list; it loops through the 
list from bottom to top, and renders each in turn to the screen.  So, those 
higher are rendered above those in lower.

All you are doing is putting the child to the top of the list again; you 
won't see anything change, nor will any errors be thrown, if it is the only 
one in the list.  However...

This, shows how a blue box is drawn on top of a black one; think about it 
like the blue box being in depth 1, and the black box in depth 0.

package
{
 import flash.display.MovieClip;

 public class MooGoo extends MovieClip
 {
  public function MooGoo()
  {
   var a:MovieClip = new MovieClip();
   a.graphics.beginFill(0x00);
   a.graphics.lineTo(300, 0);
   a.graphics.lineTo(300, 300);
   a.graphics.lineTo(0, 300);
   a.graphics.lineTo(0, 0);
   a.graphics.endFill();

   var b:MovieClip = new MovieClip();
   b.graphics.beginFill(0xFF);
   b.graphics.lineTo(100, 0);
   b.graphics.lineTo(100, 100);
   b.graphics.lineTo(0, 100);
   b.graphics.lineTo(0, 0);
   b.graphics.endFill();

   addChild(a);
   addChild(b);

  }
 }
}

Notice, if I then call:

addChild(a);

It'll move the black box higher in the displaylist, and redraw it, thus 
covering the blue box.  If I then do:

addChild(b);

It'll put the blue box on top again, and draw it over top of the black one. 
Think swapDepths with the difference in that you can actually remove it from 
being drawn to the screen altogether, with the benefit of your movieclip 
still existing.

BTW, MovieClip's aren't the coolest kids on the block now.  Sprite is the 
new fad.  He's like a MovieClip, but has no timeline.


- Original Message - 
From: "Derek Vadneau" <[EMAIL PROTECTED]>
To: 
Sent: Friday, October 28, 2005 5:58 PM
Subject: Re: [Flashcoders] Newbie AS3 question


The keyword "this" makes sense to me.  I use it for instance variables.  I
guess at the end of the day, though, as long as you're consistent anyone
can pick up your code.

For MovieClip and addChild, is this similar to the way we use XML in AS2?
As in, you use createElement, then appendChild?

I'm a little confused like Frédéric about what happens when you add a
child multiple times.  Is a new instance created for each addChild?  If
so, is the return a reference to the new instance? (again, in the same
metaphor as XML children)

If this is not the case, then would adding multiple times just cause an
error or overwrite the previous addChild?  Just wondering how you
reference the child(ren).


Derek Vadneau



___
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] Newbie AS3 question

2005-10-28 Thread Spike
*snip*
AS3 and Flex both hammer the point that this really has little use other
than confirming for those programmers who are not familiar with
ActionScript. Same goes for the Singleton.method vs.
Singleton.getInstance().method argument; the latter is for those programmers
who don't know ActionScript well.
*snip*

Maybe there's something I don't understand, or maybe you typed it wrong, but
in every other OO language I've dealt with there's a significant but subtle
difference between

Singleton.getInstance().method()

and

Singleton.method()

The former is calling an instance method and the latter is calling a static
method.

Instance methods have access to instance data that is persisted as long as
the instance exists, static methods have access only to static data and that
data passed in to the method call.

Is this not true in ActionScript?

Spike

On 10/28/05, JesterXL <[EMAIL PROTECTED]> wrote:
>
> I'm the opposite end of the spectrum. This:
>
> class Box extends UIObject
> {
> function doStuff()
> {
> move(x + 10, y + 10);
> setSize(width + 100, height + 100);
> visible = !visible;
> }
> }
>
> looks more readable to me than:
>
> class Box extends UIObject
> {
> function doStuff()
> {
> this.move(this.x + 10, this.y + 10);
> this.setSize(this.width + 100, this.height + 100);
> this.visible = !this.visible;
> }
> }
>
> To each their own. I can see it justified in extending intrinsic classes,
> as the first parameter to setInterval, and the first parameter in
> Delegate.
>
> AS3 and Flex both hammer the point that this really has little use other
> than confirming for those programmers who are not familiar with
> ActionScript. Same goes for the Singleton.method vs.
> Singleton.getInstance().method argument; the latter is for those
> programmers
> who don't know ActionScript well.
>
> If you do it every day, there is no point.
>
> - Original Message -
> From: "Muzak" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 5:37 PM
> Subject: Re: [Flashcoders] Newbie AS3 question
>
>
> Well, to me it's the other way around.
> Code that doesn't use proper references looks messy to me.
>
> Whe I'm lazy or in a hurry, I do skip them, but I usually find myself
> adding
> them afterwards anyway.
>
> So, I'm with ryanm on this one ;-)
>
> regards,
> Muzak
>
> - Original Message -
> From: "Martin Wood" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 11:03 PM
> Subject: Re: [Flashcoders] Newbie AS3 question
>
>
> >
> >
> > ryanm wrote:
> >>> What I don't get is why it needs "this.addChild" instead of just
> >>> addChild. I've been sick of the keyword "this" for a long time
> >>> and have since avoided it in AS2.
> >>>
> >>> Any reason that it needs to be back in for AS3?
> >>>
> >> Maybe because it's one of the most useful scope references ever
> >> invented?
> >>
> >> The fundamental concept that you seem to miss is that "addChild" is
> >> meaningless by itself, it is a method of an object (in
> >> proper OOP development), and if you just say "addChild", who is adding
> >> the child?
> >
> > the context is the current class. Occasionally 'this' is useful if you
> > happen to name a method parameter or local variable the
> > same as a member variable and need to distinguish the two.
> >
> > But, I dont agree that its bad form to leave it out, nor is it any more
> > difficult to maintain.
> >
> > in my opinion putting 'this' in everywhere to me just makes things
> harder
> > to read.
> >
> > thanks,
> >
> > Martin
>
>
> ___
> 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
>



--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Newbie AS3 question

2005-10-28 Thread A.Cicak
Well, I dont agree, "this" keyword refers to current class, so its only more 
typing to include it, and making code less
readable. Only reason keyword "this" exists is if you want to pass reference 
to current object somewhere, in which case
you must use "this". To me using "this" in your code makes you look like 
wannabe-programmer, :) But I gues its matter of taste. btw, old VB does not 
have "this" keyword, and if you were reffering to VB(.NET), it is more OOP 
and more complex than AS3, so I gues programmers in VB.NET (if there are 
some, since C# is there) are not wannabe-programmers :)


"ryanm" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>> What I don't get is why it needs "this.addChild" instead of just 
>> addChild. I've been sick of the keyword "this" for a long time and have 
>> since avoided it in AS2.
>>
>> Any reason that it needs to be back in for AS3?
>>
>Maybe because it's one of the most useful scope references ever 
> invented?
>
>The fundamental concept that you seem to miss is that "addChild" is 
> meaningless by itself, it is a method of an object (in proper OOP 
> development), and if you just say "addChild", who is adding the child? You 
> need a reference. You could do it like this if you like:
>
> class Game extends MovieClip {
>var world:MovieClip;
>var bg:MovieClip;
>function Game(){
>var GameReference:Game = this;
>world = new MovieClip();
>
>GameReference.addChild( world );
>
>bg = new MovieClip();
>world.addChild( bg );
>}
> }
>
>The point is, you shouldn't use functions that aren't attached to 
> objects, it's bad form, and it's thoroughlly confusing to people who later 
> have to maintain your code. Besides, it makes you look like one of those 
> wannabe-programmer VB guys. ;-)
>
> ryanm
> ___
> 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] Newbie AS3 question

2005-10-28 Thread JesterXL
I'm the opposite end of the spectrum.  This:

class Box extends UIObject
{
function doStuff()
{
move(x + 10, y + 10);
setSize(width + 100, height + 100);
visible = !visible;
}
}

looks more readable to me than:

class Box extends UIObject
{
function doStuff()
{
this.move(this.x + 10, this.y + 10);
this.setSize(this.width + 100, this.height + 100);
this.visible = !this.visible;
}
}

To each their own.  I can see it justified in extending intrinsic classes, 
as the first parameter to setInterval, and the first parameter in Delegate.

AS3 and Flex both hammer the point that this really has little use other 
than confirming for those programmers who are not familiar with 
ActionScript.  Same goes for the Singleton.method vs. 
Singleton.getInstance().method argument; the latter is for those programmers 
who don't know ActionScript well.

If you do it every day, there is no point.

- Original Message - 
From: "Muzak" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 5:37 PM
Subject: Re: [Flashcoders] Newbie AS3 question


Well, to me it's the other way around.
Code that doesn't use proper references looks messy to me.

Whe I'm lazy or in a hurry, I do skip them, but I usually find myself adding 
them afterwards anyway.

So, I'm with ryanm on this one ;-)

regards,
Muzak

- Original Message - 
From: "Martin Wood" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 11:03 PM
Subject: Re: [Flashcoders] Newbie AS3 question


>
>
> ryanm wrote:
>>> What I don't get is why it needs "this.addChild" instead of just 
>>> addChild. I've been sick of the keyword "this" for a long time
>>> and have since avoided it in AS2.
>>>
>>> Any reason that it needs to be back in for AS3?
>>>
>>Maybe because it's one of the most useful scope references ever 
>> invented?
>>
>>The fundamental concept that you seem to miss is that "addChild" is 
>> meaningless by itself, it is a method of an object (in
>> proper OOP development), and if you just say "addChild", who is adding 
>> the child?
>
> the context is the current class. Occasionally 'this' is useful if you 
> happen to name a method parameter or local variable the
> same as a member variable and need to distinguish the two.
>
> But, I dont agree that its bad form to leave it out, nor is it any more 
> difficult to maintain.
>
> in my opinion putting 'this' in everywhere to me just makes things harder 
> to read.
>
> thanks,
>
> Martin


___
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] Newbie AS3 question

2005-10-28 Thread Derek Vadneau
The keyword "this" makes sense to me.  I use it for instance variables.  I 
guess at the end of the day, though, as long as you're consistent anyone 
can pick up your code.

For MovieClip and addChild, is this similar to the way we use XML in AS2? 
As in, you use createElement, then appendChild?

I'm a little confused like Frédéric about what happens when you add a 
child multiple times.  Is a new instance created for each addChild?  If 
so, is the return a reference to the new instance? (again, in the same 
metaphor as XML children)

If this is not the case, then would adding multiple times just cause an 
error or overwrite the previous addChild?  Just wondering how you 
reference the child(ren).


Derek Vadneau



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


Re: [Flashcoders] scroll dynamic MC help

2005-10-28 Thread Kent Humphrey



Can  I have a peek at your code? :>




i don't mind sharing ... you can probably cook up more than a few ways 
to streamline my code.  (If so, pass it back! :)   But it'll have to 
wait until later tonight for me to grab the file from another machine.


That would be great, thanks. I'll be sure to pass anything back if I feel I have 
improved it :>


Feel free to send off list if you wish.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Why Flex?

2005-10-28 Thread Muzak
I guess we'll have to wait and see what they come up with in F9.

And if I have to guess some more, I think the initial intention was to have 
this in F8 (or part of it).
Remember that screenshot of the Flash 8 IDE that had 'ActionScript 3' in it 
somewhere?
Someone from MM (Mike Chambers??) then said it was an error in the (beta) IDE.

Somewhere along the line they decided to not go that route and wait for F9 to 
implement AS3 stuff.

Anyways, I was kinda disappointed with F8, but Flex 2 makes it all good again 
(and then some more)..

Muzak

- Original Message - 
From: "ryanm" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 7:16 PM
Subject: Re: [Flashcoders] Why Flex?


>One might ask, however, why, instead of creating a whole new development 
> platform, they didn't just release better components 
> that are easier to skin, better CSS support, better html support, and just 
> make Flash a whole lot more capable and eay to develop 
> for. Sure, skinning is easy in Flex, but why not make skinning components 
> easy in Flash, rather than making "skinning is easier in 
> Flex" a marketing campaign for Flex?
>
> ryanm


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


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Andreas Rønning
The this keyword is genius. What's wrong with it, don't look techy 
enough for ya? :P I can't imagine scripting without it.


- Andreas

Muzak wrote:


Well, to me it's the other way around.
Code that doesn't use proper references looks messy to me.

Whe I'm lazy or in a hurry, I do skip them, but I usually find myself adding 
them afterwards anyway.

So, I'm with ryanm on this one ;-)

regards,
Muzak

- Original Message - 
From: "Martin Wood" <[EMAIL PROTECTED]>

To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 11:03 PM
Subject: Re: [Flashcoders] Newbie AS3 question


 


ryanm wrote:
   

What I don't get is why it needs "this.addChild" instead of just addChild. I've been sick of the keyword "this" for a long time 
and have since avoided it in AS2.


Any reason that it needs to be back in for AS3?

   


  Maybe because it's one of the most useful scope references ever invented?

  The fundamental concept that you seem to miss is that "addChild" is meaningless by itself, it is a method of an object (in 
proper OOP development), and if you just say "addChild", who is adding the child?
 

the context is the current class. Occasionally 'this' is useful if you happen to name a method parameter or local variable the 
same as a member variable and need to distinguish the two.


But, I dont agree that its bad form to leave it out, nor is it any more 
difficult to maintain.

in my opinion putting 'this' in everywhere to me just makes things harder to 
read.

thanks,

Martin
   




___
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] Newbie AS3 question

2005-10-28 Thread Andreas Rønning
Still weirding me out. To me part of the appeal of working with 
movieclips is their inherent hierarchy, which makes a kind of basic 
sense that's easy to grasp.
This new method seems to place "more" control in the hands of the 
developer, but at the same time complicating what has always been a 
really simple mechanism.
At the very least i'd expect the MovieClip constructor to accept an arg 
for its parent or somesuch so as to simplify the method.


I'm guessing part of why we're waiting til Flash 9 for this stuff is 
because it doesn't make immediate sense in a Flash IDE context yet. 
Makes a world of sense in a forms context, but with my way of working

it almost seems counterintuitive. Probably just developer paranoia though :)
I can imagine Flash 9 will look quite different to 8ball..

- Andreas

Frédéric v. Bochmann wrote:


This example makes me wonder:

If I was to write this in AS2, it would probably look like:


class Game extends MovieClip {
public function Game(){
var gameworld:MovieClip = new
createEmptyMovieClip("gameworld_mc",getNextHighestDepth()); //new
GameWorld()?

var game_bg:MovieClip = gameworld.createEmptyMovieClip("game_bg_mc",
gameworld.getNextHighestDepth());

}

I wouldn't have access to addChild in AS2, how does that addChild actually
work in AS3? Are Child movieclips that are added still independent? 


For example, if I was to add two time the Background movieclip to the
gameworld movieclip in AS3.
Take for example:
...
var game_bg:MovieClip = new MovieClip();
gameworld.addChild( game_bg );
gameworld.addChild( game_bg );
...

What would happen if I affected game_bg _width or _height?
How does this go?

Just curious :)




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Shaw, Matt
Sent: October 28, 2005 1:55 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Newbie AS3 question

Assuming the Game class is your root/stage class:


Public class Game extends MovieClip {
public function Game(){
var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
this.addChild( gameworld );

var game_bg:MovieClip = new MovieClip();
gameworld.addChild( game_bg );
}



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andreas
Rønning
Sent: Friday, October 28, 2005 1:08 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Newbie AS3 question

AS3 noob question ahoy!

I'm reading the AS3 reference trying to get accustomed to the idea, but some
things (though they look better) i don't really get right away :) Hence my
feeling of incredible stupidity.

I realise the AS3 in the reference is Flex-related, but in Flash IDE terms,
how would i do something like this in AS3:

var baseClip = _root.createEmptyMovieClip("gameworld",1);
var backGround = baseClip.createEmptyMovieClip("game_bg",1);

I get how much more practical myClip = new MovieClip(); looks, but i don't
get how i connect a clip created this way with the traditional clip
hierarchy. Is that out the window as well?
The reference describes |DisplayObjectContainer.addChild(), but i'm guessing
this doesnt really count for how it'll work in the Flash IDE?

Any helpful hints at what the future holds? :)
|
- Andreas
___
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] Newbie AS3 question

2005-10-28 Thread Muzak
Well, to me it's the other way around.
Code that doesn't use proper references looks messy to me.

Whe I'm lazy or in a hurry, I do skip them, but I usually find myself adding 
them afterwards anyway.

So, I'm with ryanm on this one ;-)

regards,
Muzak

- Original Message - 
From: "Martin Wood" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 11:03 PM
Subject: Re: [Flashcoders] Newbie AS3 question


>
>
> ryanm wrote:
>>> What I don't get is why it needs "this.addChild" instead of just addChild. 
>>> I've been sick of the keyword "this" for a long time 
>>> and have since avoided it in AS2.
>>>
>>> Any reason that it needs to be back in for AS3?
>>>
>>Maybe because it's one of the most useful scope references ever invented?
>>
>>The fundamental concept that you seem to miss is that "addChild" is 
>> meaningless by itself, it is a method of an object (in 
>> proper OOP development), and if you just say "addChild", who is adding the 
>> child?
>
> the context is the current class. Occasionally 'this' is useful if you happen 
> to name a method parameter or local variable the 
> same as a member variable and need to distinguish the two.
>
> But, I dont agree that its bad form to leave it out, nor is it any more 
> difficult to maintain.
>
> in my opinion putting 'this' in everywhere to me just makes things harder to 
> read.
>
> thanks,
>
> Martin


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


Re: [Flashcoders] Why Flex?

2005-10-28 Thread hank williams
I think that flex is a developer friendly environment and flash is not.

By that I mean, for one thing, that flex is built around the eclipse
environment, which is the gold standard for developers. Macromedia
wanted to grow the community. That meant designing a tool that would
appeal to rank and file developers. That meant making a new more
programmer friendly (like eclipse or MS Visual Studio) environment.

I dont think you can make the flash IDE look enough like a programmer
friendly environment to get your typical java or MS developer to like
it.

I code in Java and Flash and for me, Flex is heaven.

I dont think they were 80% or 90% there as a programmer friendly
development tool. I think if you become familiar with the kinds of
tools java and c# developers use, you wouldnt say that. They are miles
apart.

That said, I do think that some of the things in flex can/should
migrate to the flash IDE. I think flex builder and mxml can be done in
a designer friendly way. Just look at Dreamweaver. But, while
Macromedia is a big company, they could not develop two totally
different metaphors at the same time. Flex took a lot of work and a
long time to get right. Once they are done (which is still 6 or so
months away) I suspect some of the things will end up in the Flash
IDE. But it is not reasonable to expect they could do all this at
once. What they have done so far is amazing work.

Regards
Hank

On 10/28/05, Judah Frangipane <[EMAIL PROTECTED]> wrote:
> right on. that's what i'm talking about. flash was about 80%-90% there
> for developers and then they forked the sucker. are they focus on
> developers in the next version of flash authoring since 8 was a designer
> oriented release? i like flex and where it can be used but i'd like to
> see the features in flex syncronized in/with flash authoring. that would
> be killer.
>
> ryanm wrote:
>
> >One might ask, however, why, instead of creating a whole new
> > development platform, they didn't just release better components that
> > are easier to skin, better CSS support, better html support, and just
> > make Flash a whole lot more capable and eay to develop for. Sure,
> > skinning is easy in Flex, but why not make skinning components easy in
> > Flash, rather than making "skinning is easier in Flex" a marketing
> > campaign for Flex?
> >
> > ryanm
> > ___
> > 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] > Quiz and MVC+multi language support

2005-10-28 Thread Weyert de Boer
Hmm, I am currently working on the "good" version of the quiz only I 
have a question how I should implementate some part. The quiz should ask 
yes/no questions and the user should only have three to six seconds to 
answer the question. If the user fails to answer the question within 
this time, the answer should be fault. Currently I used a setInterval() 
with 3000ms only I never get stuff with intervals right. Always it goes 
all fine the first question, but the second it fals. Does anyone know a 
good way to implementate this? Maybe through event delegation instead of 
a interval callback method?


Yours,

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


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread ryanm

This example makes me wonder:

If I was to write this in AS2, it would probably look like:

   Think of it like this: "createEmptyMovieClip" is functionally equivilent 
to "new MovieClip" PLUS "addChild". The benefit of seperating them is that 
you can add things to and remove things from the display list anytime you 
want, instead of creating a new movie clip and having it stuck in the scope 
you created it in.


   Think, for example, of a drag and drop paradigm. You can literally have 
something start dragging when you click it, only instead of just dragging, 
it is removed from its current container and placed in "_root", so that it's 
on top of everything, and then when you drop it on another container, it is 
actually, physically (as far as that goes in the world of computers) added 
to that container. You didn't just move it from one array to another behind 
the scenes, you actually took the movie clip itself and changed which 
timeline it exists on, all without losing the state of the object.



var game_bg:MovieClip = new MovieClip();
gameworld.addChild( game_bg );
gameworld.addChild( game_bg );
...


   Think of the DisplayList as the stage, and addChild adds the movie clip 
to the stage at the next highest depth. Adding it again would do one of two 
things (depending on exactly how it was implemented), either remove it from 
the display list and add it back, which effectively did nothing, or throw an 
error because it was already on the display list. I'm pretty sure display 
objects can only have one parent.


ryanm 


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


Re: [Flashcoders] Best charting components?

2005-10-28 Thread Andy Makely
If you have big money, you could try PopChart.

http://www.corda.com/products/#dev


--
andy makely

On 10/25/05, Wade Arnold <[EMAIL PROTECTED] > wrote:
>
> I am trying to figure out what charting components I should use for an
> RIA that I am working on. Anyone have any recommendation? Unfortunately
> this may be my last RIA in Flash!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Martin Wood



ryanm wrote:
What I don't get is why it needs "this.addChild" instead of just 
addChild. I've been sick of the keyword "this" for a long time and 
have since avoided it in AS2.


Any reason that it needs to be back in for AS3?

   Maybe because it's one of the most useful scope references ever 
invented?


   The fundamental concept that you seem to miss is that "addChild" is 
meaningless by itself, it is a method of an object (in proper OOP 
development), and if you just say "addChild", who is adding the child? 


the context is the current class. Occasionally 'this' is useful if you 
happen to name a method parameter or local variable the same as a member 
variable and need to distinguish the two.


But, I dont agree that its bad form to leave it out, nor is it any more 
difficult to maintain.


in my opinion putting 'this' in everywhere to me just makes things 
harder to read.


thanks,

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


Re: [Flashcoders] Open all Branches of a Tree Component

2005-10-28 Thread Martin Schafer
Eric,

Couldn't get your code to work at first.  Made some slight modifications to
get it to work in a single frame based code structure.

This code works great for relatively small tree structures.  Took around
10-15 seconds to open 1500 nodes. Meanwhile it just sits there without
feedback. 

function ExpandNode (myTree, myTreeNode:XMLNode):Void {
// Open passed in node.
myTree.setIsOpen (myTreeNode, true);
// Check to see if current node has children
if (myTreeNode.childNodes.length > 0) {
// If current node has children spawn a new process that will
"recurse" throuhg all child nodes.
// Effectively opening all nodes in tree.
var j:Number;
for (j = 0; j < myTreeNode.childNodes.length; j++) {
var myTreeSubNode:XMLNode = myTreeNode.childNodes[j];
this.ExpandNode (myTree, myTreeSubNode);
}
}
}
// This executes the initial opening...
// First attribute is the instance name of the tree component
// Second attribute is the root node of the tree component
ExpandNode (main.myBM, main.myBM.getTreeNodeAt (0));

Thanks for all the help!

Martin  :)


On 10/28/05 12:01 PM, "Martin Schafer" <[EMAIL PROTECTED]> wrote:

> Looks like it would work but I can't seem to figure out how to bind it
> to a Tree Component.  How to do you get "this" to refer to the tree
> component instance without having an attribute inside of the ExpandAll
> function? 
> 
> Thanks for the info!
> 
> Martin :)
> 
> Éric Thibault wrote:
> 



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


Re: [Flashcoders] File under BIZARRE: FIXED

2005-10-28 Thread Buck Ruckman


Sorry for hijacking the list with this problem today, folks.

When we installed the Flash 8 Player on the broken machines, the problem was 
solved.


Conclusion: my game aggravated a bug in Flash Player 7 in IE.

Does that sound accurate?

- Ryan Creighton


(PS if that DOES sound accurate, can someone please point me to the most 
recent and tastiest Flash 8 detection script so's i can force all of my 
users to experience the joys of a working game? Thanks!!)


_
Take charge with a pop-up guard built on patented Microsoft® SmartScreen 
Technology  
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.


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


Re: [Flashcoders] Free and open source software

2005-10-28 Thread hank williams
no, but if you are interested in open source flash stuff you should
check out osflash.com

It is the home of all things open source flash.

Regards
Hank

On 10/28/05, Patrick Matte <[EMAIL PROTECTED]> wrote:
> Hi, I'm rounding up a list of free and open source software.
>
> For flash, I have found MTASC and swfmil.
>
> Does anyboby know of any other free software for editing sound, video,
> bitmap and vector images?
>
>
> ___
> 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] Free and open source software

2005-10-28 Thread Spike
Bitmap - Gimp
Vector - Inkscape

There are some for sound and video, but I don't know them off the top of my
head.

Spike

On 10/28/05, Patrick Matte <[EMAIL PROTECTED]> wrote:
>
> Hi, I'm rounding up a list of free and open source software.
>
> For flash, I have found MTASC and swfmil.
>
> Does anyboby know of any other free software for editing sound, video,
> bitmap and vector images?
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread ryanm
What I don't get is why it needs "this.addChild" instead of just addChild. 
I've been sick of the keyword "this" for a long time and have since 
avoided it in AS2.


Any reason that it needs to be back in for AS3?

   Maybe because it's one of the most useful scope references ever 
invented?


   The fundamental concept that you seem to miss is that "addChild" is 
meaningless by itself, it is a method of an object (in proper OOP 
development), and if you just say "addChild", who is adding the child? You 
need a reference. You could do it like this if you like:


class Game extends MovieClip {
   var world:MovieClip;
   var bg:MovieClip;
   function Game(){
   var GameReference:Game = this;
   world = new MovieClip();

   GameReference.addChild( world );

   bg = new MovieClip();
   world.addChild( bg );
   }
}

   The point is, you shouldn't use functions that aren't attached to 
objects, it's bad form, and it's thoroughlly confusing to people who later 
have to maintain your code. Besides, it makes you look like one of those 
wannabe-programmer VB guys. ;-)


ryanm 


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


[Flashcoders] Free and open source software

2005-10-28 Thread Patrick Matte
Hi, I'm rounding up a list of free and open source software.

For flash, I have found MTASC and swfmil.

Does anyboby know of any other free software for editing sound, video,
bitmap and vector images?


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


Re: [Flashcoders] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread Martin Wood

no problems for me, XP, IE and Firefox both FP 8.

martin

Buck Ruckman wrote:
assist.  Is this a processor thing?  Is it my file?  Is it the Flash 
player 7 in IE?



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


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread ryanm

I'd be more inclined to say it's awesome!

   I have to agree, I'm just dissapointed that it doesn't work like that in 
Flash 8.


ryanm 


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


Re: [Flashcoders] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread Buck Ruckman

The confusion continues.

i hold down a key - any - key - and the animation locks up.

While the key is held, i right-click the Flash game and the little "About" 
menu pops up.  While that pop-up is open, the animation unfreezes. If i 
click to get rid of the About menu, game locks up again.  i release the key, 
and everything plays normally.


i'm on the line for getting this thing to function properly.  PLEASE assist. 
 Is this a processor thing?  Is it my file?  Is it the Flash player 7 in 
IE?



- Ryan Creighton

_
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new 
MSN Search! Check it out!


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


RE: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Frédéric v . Bochmann
This example makes me wonder:

If I was to write this in AS2, it would probably look like:


class Game extends MovieClip {
public function Game(){
var gameworld:MovieClip = new
createEmptyMovieClip("gameworld_mc",getNextHighestDepth()); //new
GameWorld()?

var game_bg:MovieClip = gameworld.createEmptyMovieClip("game_bg_mc",
gameworld.getNextHighestDepth());

}

I wouldn't have access to addChild in AS2, how does that addChild actually
work in AS3? Are Child movieclips that are added still independent? 

For example, if I was to add two time the Background movieclip to the
gameworld movieclip in AS3.
Take for example:
...
var game_bg:MovieClip = new MovieClip();
gameworld.addChild( game_bg );
gameworld.addChild( game_bg );
...

What would happen if I affected game_bg _width or _height?
How does this go?

Just curious :)




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Shaw, Matt
Sent: October 28, 2005 1:55 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Newbie AS3 question

Assuming the Game class is your root/stage class:


Public class Game extends MovieClip {
public function Game(){
var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
this.addChild( gameworld );

var game_bg:MovieClip = new MovieClip();
gameworld.addChild( game_bg );
}



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andreas
Rønning
Sent: Friday, October 28, 2005 1:08 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Newbie AS3 question

AS3 noob question ahoy!

I'm reading the AS3 reference trying to get accustomed to the idea, but some
things (though they look better) i don't really get right away :) Hence my
feeling of incredible stupidity.

I realise the AS3 in the reference is Flex-related, but in Flash IDE terms,
how would i do something like this in AS3:

var baseClip = _root.createEmptyMovieClip("gameworld",1);
var backGround = baseClip.createEmptyMovieClip("game_bg",1);

I get how much more practical myClip = new MovieClip(); looks, but i don't
get how i connect a clip created this way with the traditional clip
hierarchy. Is that out the window as well?
The reference describes |DisplayObjectContainer.addChild(), but i'm guessing
this doesnt really count for how it'll work in the Flash IDE?

Any helpful hints at what the future holds? :)
|
- Andreas
___
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] Why Flex?

2005-10-28 Thread Spike
*snip*
i like flex and where it can be used but i'd like to
see the features in flex syncronized in/with flash authoring. that would
be killer.
*snip*

I don't see any reason why that wouldn't be good for everybody.

Personally I have always found Flash authoring a very frustrating tool to
work with, but I'm a very code centric type of person. The only time I want
to see what my app looks like is when I test it. I find any time I use a
graphical tool to build apps I end up sitting there for far too long trying
to debug something that was created visually, which I don't completely
understand, and which I probably can't control down to the finest detail.

Flex 1.5 and Flex Builder 2 give me the option of using that as my workflow.

I'm not saying Flash authoring isn't a good tool. It obviously is for a very
large number of people, but without Flex and other options for building apps
in a code centric way I doubt if I would be working with flash at all.

It's all about choice :-)

Spike

On 10/28/05, Judah Frangipane <[EMAIL PROTECTED]> wrote:
>
> right on. that's what i'm talking about. flash was about 80%-90% there
> for developers and then they forked the sucker. are they focus on
> developers in the next version of flash authoring since 8 was a designer
> oriented release? i like flex and where it can be used but i'd like to
> see the features in flex syncronized in/with flash authoring. that would
> be killer.
>
> ryanm wrote:
>
> > One might ask, however, why, instead of creating a whole new
> > development platform, they didn't just release better components that
> > are easier to skin, better CSS support, better html support, and just
> > make Flash a whole lot more capable and eay to develop for. Sure,
> > skinning is easy in Flex, but why not make skinning components easy in
> > Flash, rather than making "skinning is easier in Flex" a marketing
> > campaign for Flex?
> >
> > ryanm
> > ___
> > 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
>



--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Why Flex?

2005-10-28 Thread Judah Frangipane
right on. that's what i'm talking about. flash was about 80%-90% there 
for developers and then they forked the sucker. are they focus on 
developers in the next version of flash authoring since 8 was a designer 
oriented release? i like flex and where it can be used but i'd like to 
see the features in flex syncronized in/with flash authoring. that would 
be killer.


ryanm wrote:

   One might ask, however, why, instead of creating a whole new 
development platform, they didn't just release better components that 
are easier to skin, better CSS support, better html support, and just 
make Flash a whole lot more capable and eay to develop for. Sure, 
skinning is easy in Flex, but why not make skinning components easy in 
Flash, rather than making "skinning is easier in Flex" a marketing 
campaign for Flex?


ryanm
___
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] Newbie AS3 question

2005-10-28 Thread Geoffrey Williams
You don't need to use the 'this' keyword.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jon Bradley
Sent: Friday, October 28, 2005 2:54 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Newbie AS3 question

On Oct 28, 2005, at 1:55 PM, Shaw, Matt wrote:

> Assuming the Game class is your root/stage class:
>
> 
> Public class Game extends MovieClip {
> public function Game(){
>   var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
>   this.addChild( gameworld );
>
>   var game_bg:MovieClip = new MovieClip();
>   gameworld.addChild( game_bg );
> }

What I don't get is why it needs "this.addChild" instead of just 
addChild.  I've been sick of the keyword "this" for a long time and 
have since avoided it in AS2.

Any reason that it needs to be back in for AS3?

- Jon




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


Re: [Flashcoders] When migrate to Flash 8?

2005-10-28 Thread Rich Rodecker
tabbed windows on the mac...that's worth the price of admission for me. Hell
any improvement on the mac version was worth it.



On 28 Oct 2005 15:07:51 -, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>
> I upgraded as they increased the stage size in the IDE, for example when
> designing for 1000 x 600 with the document set to that size in the flash
> mx2004 ide I could not scroll far enough to the right when designing large
> movie clips, I'd have to to move all the symbols from 0,0 to something like
> -500 (x) to see all the symbols and then remember to move them back. In
> flash 8 the stage is about double the size of the document setting so you
> can see everything, thats was reason enough for me as I build lots of forms
> for my current client :)
>
> Grant
>
> - Original Message -
> From: JesterXL [EMAIL PROTECTED]
> To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
> Sent: 10/28/05 10:57 AM
> Subject: Re: [Flashcoders] When migrate to Flash 8?
>
> > Keep in mind too, you can still use Flash 8 and output Flash 7/AS2
> content.
> > The IDE is a big improvement in speed & resource usage as well as fixing
> a
> > few bugs in Flash MX 2004.
> >
> > I've been getting myself into trouble designing in Flash 8 with my
> clients
> > expecting me to transfer the design to Flex 1.5 which is Flash 7 only...
> but
> > it DOES render out PNG sequences so all is not lost.
> >
> > - Original Message -
> > From: "Merrill, Jason"
> > To: "Flashcoders mailing list"
> > Sent: Friday, October 28, 2005 10:44 AM
> > Subject: RE: [Flashcoders] When migrate to Flash 8?
> >
> >
> > I think you should base your decision on what the new improvements to
> > Flash actually are, and see if you would make use of them with your
> > clients... and if they are things that are going to be supported by the
> > target player your market will have.
> >
> > At the same time, even still, its important to stay on top of technology
> > as always. That's usually a good investment even if you aren't going to
> > be able to use many of the new features right away, you might see some
> > improved efficiencies.
> >
> > For me, I have upgraded Flash every time it has been upgraded, but Adobe
> > Illustrator, I am still using version 9 and don't see a need to upgrade
> > it currently since I'm just not going to use the new features, or they
> > aren't going to benefit me enough to justify the purchase.
> >
> > Jason Merrill | E-Learning Solutions | 
> > icfconsulting.com
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > >>-Original Message-
> > >>From: [EMAIL PROTECTED] [mailto:flashcoders-
> > >>[EMAIL PROTECTED] On Behalf Of Gregory
> > >>Sent: Thursday, October 27, 2005 11:14 PM
> > >>To: flashcoders@chattyfig.figleaf.com
> > >>Subject: Re: [Flashcoders] When migrate to Flash 8?
> > >>
> > >>Hello flashcoders,
> > >>
> > >> I think it's no question that one need to upgrade. And I'll do it in
> > >> 1-2 month ;-).
> > >>
> > >> Question was if (and when) it's necessary to update existing
> > >> applications (e.g. "migrate") to use new features of Flash 8.
> > >>
> > >>-Original Message-
> > >>frcfc> Date: Thu, 27 Oct 2005 13:12:10 -0500
> > >>frcfc> From: Judah Frangipane
> > >>frcfc> Subject: Re: [Flashcoders] When migrate to Flash 8?
> > >>frcfc> To: Flashcoders mailing list
> >
> > >>frcfc> Message-ID:
> > >>frcfc> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> > >>
> > >>frcfc> I'd upgrade to Flash 8 even though you are doing Flash 6 and 7.
> > It has a
> > >>frcfc> lot of little things that make development quicker. So even
> > though you
> > >>frcfc> are exporting to Flash 7 you can still take advantage of the
> > new text
> > >>frcfc> resizing handles (something I use everyday) and other neat
> > little
> > >>frcfc> changes. Or wait until 8.2 update (if one comes out).
> > >>
> > >>frcfc> Best,
> > >>frcfc> Judah
> > >>
> > >>
> > >>--
> > >>Best regards,
> > >> Gregory mailto:[EMAIL PROTECTED]
> > >>
> > >>http://GOusable.com
> > >>Flash components development.
> > >>Usability services.
> > >>
> > >>
> > >>___
> > >>Flashcoders mailing list
> > >>Flashcoders@chattyfig.figleaf.com
> > >>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > NOTICE:
> > This message is for the designated recipient only and may contain
> privileged
> > or confidential information. If you have received it in error, please
> notify
> > the sender immediately and delete the original. Any other use of this
> e-mail
> > by you is prohibited.
> > ___
> > 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] Newbie AS3 question

2005-10-28 Thread JesterXL
It doesn't; developer paranoia.

addChild puts it on the display list.

Currently, if you create a movieclip, it not only exists in memory as a 
variable, but is also on the displaylist, meaning it's rendered.

With this, you can create a movieclip, but not actually have it rendered to 
the screen.  This includes it and all of it's children.

var gameworld:MovieClip = new MovieClip();
addChild( gameworld );

To hide it, but not destroy the clip itself, do:

removeChild(gameworld);

The cool thing about this is, it retains state.  One of the big challenges 
with keeping movieclips around is that they take up resources, even if you 
turn them invisible, and move them off of the stage.

Additionally, creating & destroying movieclips is an expensive CPU 
opertation.  That's why ViewStacks in Flex are a decent implementation 
because they try to balance both.

NOW, we can remove movieclips from being rendered, but keep their state by 
keeping their variable around, and render them only when needed.

It gets even crazier when you start re-parenting stuff.

Pimp!



- Original Message - 
From: "Jon Bradley" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 2:53 PM
Subject: Re: [Flashcoders] Newbie AS3 question


On Oct 28, 2005, at 1:55 PM, Shaw, Matt wrote:

> Assuming the Game class is your root/stage class:
>
> 
> Public class Game extends MovieClip {
> public function Game(){
> var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
> this.addChild( gameworld );
>
> var game_bg:MovieClip = new MovieClip();
> gameworld.addChild( game_bg );
> }

What I don't get is why it needs "this.addChild" instead of just
addChild.  I've been sick of the keyword "this" for a long time and
have since avoided it in AS2.

Any reason that it needs to be back in for AS3?

- Jon

___
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] Newbie AS3 question

2005-10-28 Thread Shaw, Matt
Avoiding the word "this" is to avoid easy to understand code

It tells you that a variable is not a local variable but a important one
that's gonna be around to a while ;]


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jon
Bradley
Sent: Friday, October 28, 2005 2:54 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Newbie AS3 question

On Oct 28, 2005, at 1:55 PM, Shaw, Matt wrote:

> Assuming the Game class is your root/stage class:
>
> 
> Public class Game extends MovieClip {
> public function Game(){
>   var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
>   this.addChild( gameworld );
>
>   var game_bg:MovieClip = new MovieClip();
>   gameworld.addChild( game_bg );
> }

What I don't get is why it needs "this.addChild" instead of just
addChild.  I've been sick of the keyword "this" for a long time and have
since avoided it in AS2.

Any reason that it needs to be back in for AS3?

- Jon

___
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] Player 8.5 standalone on OSX?

2005-10-28 Thread Jon Bradley
No answer from MM on their labs forums, or anywhere else for that 
matter.


Anyone locate the standalone player for OS X yet? It aint in the 
FlexBuilder2 installer or in the plug-in installer.  Only the PC exe 
files are standalone.


??

thanks...

Jon

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


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Jon Bradley

On Oct 28, 2005, at 1:55 PM, Shaw, Matt wrote:


Assuming the Game class is your root/stage class:


Public class Game extends MovieClip {
public function Game(){
var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
this.addChild( gameworld );

var game_bg:MovieClip = new MovieClip();
gameworld.addChild( game_bg );
}


What I don't get is why it needs "this.addChild" instead of just 
addChild.  I've been sick of the keyword "this" for a long time and 
have since avoided it in AS2.


Any reason that it needs to be back in for AS3?

- Jon

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


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Spike
Good lord!

Why do you say that?

It's an extra 2 lines of code and it allows you to reparent any of the
children of any of the movie clipse.

I'd be more inclined to say it's awesome!

Spike

On 10/28/05, Andreas Rønning <[EMAIL PROTECTED]> wrote:
>
> Shaw, Matt wrote:
>
> >Assuming the Game class is your root/stage class:
> >
> >
> >Public class Game extends MovieClip {
> >public function Game(){
> > var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
> > this.addChild( gameworld );
> >
> > var game_bg:MovieClip = new MovieClip();
> > gameworld.addChild( game_bg );
> >}
> >
> >
> >
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] On Behalf Of Andreas Rønning
> >Sent: Friday, October 28, 2005 1:08 PM
> >To: Flashcoders mailing list
> >Subject: [Flashcoders] Newbie AS3 question
> >
> >AS3 noob question ahoy!
> >
> >I'm reading the AS3 reference trying to get accustomed to the idea, but
> some things (though they look better) i don't really get right away :) Hence
> my feeling of incredible stupidity.
> >
> >I realise the AS3 in the reference is Flex-related, but in Flash IDE
> terms, how would i do something like this in AS3:
> >
> >var baseClip = _root.createEmptyMovieClip("gameworld",1);
> >var backGround = baseClip.createEmptyMovieClip("game_bg",1);
> >
> >I get how much more practical myClip = new MovieClip(); looks, but i
> don't get how i connect a clip created this way with the traditional clip
> hierarchy. Is that out the window as well?
> >The reference describes |DisplayObjectContainer.addChild(), but i'm
> guessing this doesnt really count for how it'll work in the Flash IDE?
> >
> >Any helpful hints at what the future holds? :)
> >|
> >- Andreas
> >___
> >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
> >
> >
>  That's horrifying.
>
> - Andreas
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Why Flex?

2005-10-28 Thread Spike
>From my point of view, it's because there are a huge number of programmers
out there who simply wouldn't look at Flash as a serious development option
if they didn't have something like Flex Builder and Flex.

Flash is awesome for graphics manipulation and all sorts of very cool
things, but most enterprise business software doesn't have that as the
primary goal. The primary goal there is to fit business requirements. If you
can take advantage of all the cool stuff in Flash that's great, but it's a
secondary priority.

I've been working with Flex doing development, training and consulting for
about a year now and I can tell you that there are an awful lot of people
who are very glad that Flex is around.

Flex 1.5 was aimed at a different market than what Flash is. Now that Flex 2
pricing has been announced, a lot more people will be looking at it as an
option. I don't know how many people will move from Flash to Flex, but I
know a lot who will be moving from Java or other languages to Flex.

my 2 cents

Spike


On 10/28/05, Keith L. Miller <[EMAIL PROTECTED]> wrote:
>
> "One might ask, however, why, " Hmmm, welll let's see. Could it be $$$?
>
>
> - Original Message -
> From: "ryanm" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 12:16 PM
> Subject: Re: [Flashcoders] Why Flex?
>
>
> > > One of the downsides of Flash (7 and 8) regarding components is that
> its
> > > not easy to change the look and feel, not to mention skinning, which
> is
> a
> > > pain.
> > > With Flex 2 this has become soo easy.
> > > Everything (or almost) can be done through CSS (internal and
> external),
> > > including embedding assets (jpg, gif, png, swf, swf library symbols).
> > > Embedded assets can be used as skins for components, like Buttons for
> > > instance.
> > >
> > One might ask, however, why, instead of creating a whole new
> development
> > platform, they didn't just release better components that are easier to
> > skin, better CSS support, better html support, and just make Flash a
> whole
> > lot more capable and eay to develop for. Sure, skinning is easy in Flex,
> but
> > why not make skinning components easy in Flash, rather than making
> "skinning
> > is easier in Flex" a marketing campaign for Flex?
> >
> > ryanm
> >
> > ___
> > 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
>



--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Andreas Rønning

Shaw, Matt wrote:


Assuming the Game class is your root/stage class:


Public class Game extends MovieClip {
public function Game(){
var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
this.addChild( gameworld );

var game_bg:MovieClip = new MovieClip();
gameworld.addChild( game_bg );
}



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Rønning
Sent: Friday, October 28, 2005 1:08 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Newbie AS3 question

AS3 noob question ahoy!

I'm reading the AS3 reference trying to get accustomed to the idea, but some 
things (though they look better) i don't really get right away :) Hence my 
feeling of incredible stupidity.

I realise the AS3 in the reference is Flex-related, but in Flash IDE terms, how 
would i do something like this in AS3:

var baseClip = _root.createEmptyMovieClip("gameworld",1);
var backGround = baseClip.createEmptyMovieClip("game_bg",1);

I get how much more practical myClip = new MovieClip(); looks, but i don't get 
how i connect a clip created this way with the traditional clip hierarchy. Is 
that out the window as well?
The reference describes |DisplayObjectContainer.addChild(), but i'm guessing 
this doesnt really count for how it'll work in the Flash IDE?

Any helpful hints at what the future holds? :)
|
- Andreas
___
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
 


 That's horrifying.

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


RE: [Flashcoders] Newbie AS3 question

2005-10-28 Thread Shaw, Matt
Assuming the Game class is your root/stage class:


Public class Game extends MovieClip {
public function Game(){
var gameworld:MovieClip = new MovieClip(); //new GameWorld()?
this.addChild( gameworld );

var game_bg:MovieClip = new MovieClip();
gameworld.addChild( game_bg );
}



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Rønning
Sent: Friday, October 28, 2005 1:08 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Newbie AS3 question

AS3 noob question ahoy!

I'm reading the AS3 reference trying to get accustomed to the idea, but some 
things (though they look better) i don't really get right away :) Hence my 
feeling of incredible stupidity.

I realise the AS3 in the reference is Flex-related, but in Flash IDE terms, how 
would i do something like this in AS3:

var baseClip = _root.createEmptyMovieClip("gameworld",1);
var backGround = baseClip.createEmptyMovieClip("game_bg",1);

I get how much more practical myClip = new MovieClip(); looks, but i don't get 
how i connect a clip created this way with the traditional clip hierarchy. Is 
that out the window as well?
The reference describes |DisplayObjectContainer.addChild(), but i'm guessing 
this doesnt really count for how it'll work in the Flash IDE?

Any helpful hints at what the future holds? :)
|
- Andreas
___
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] Why Flex?

2005-10-28 Thread Keith L. Miller
"One might ask, however, why, "  Hmmm, welll let's see.  Could it be $$$?


- Original Message - 
From: "ryanm" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 12:16 PM
Subject: Re: [Flashcoders] Why Flex?


> > One of the downsides of Flash (7 and 8) regarding components is that its
> > not easy to change the look and feel, not to mention skinning, which is
a
> > pain.
> > With Flex 2 this has become soo easy.
> > Everything (or almost) can be done through CSS (internal and external),
> > including embedding assets (jpg, gif, png, swf, swf library  symbols).
> > Embedded assets can be used as skins for components, like Buttons for
> > instance.
> >
> One might ask, however, why, instead of creating a whole new
development
> platform, they didn't just release better components that are easier to
> skin, better CSS support, better html support, and just make Flash a whole
> lot more capable and eay to develop for. Sure, skinning is easy in Flex,
but
> why not make skinning components easy in Flash, rather than making
"skinning
> is easier in Flex" a marketing campaign for Flex?
>
> ryanm
>
> ___
> 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] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread Buck Ruckman


Thanks for taking a look at this.

i also have a feeling that the game's doing far too much work, so one of the 
first things i did to test the problem was to strip nearly everything out of 
the game.  Here's what i axed:


- character
- enemies
- clock (train)
- options screen
- tutorial
- win screen
- scavenger hunt list
- all enterFrame, Key, Mouse, listener and interval scripts
- nearly all code in the game (!)


i have a barenaked file that has a title screen that goes to the game frame. 
The zoo clip is attached to the stage, and 9 animal enclosures are attached 
inside that clip.  Then the animals do their thing.


That's all that i have in the file, and i still have the freezing problem.

So we took the Stick and Ball version, which plays fine, and started adding 
animals to it one by one.  The file started chugging at 4 animals (typical 
Flash slowdown), and started freezing with key presses at 5 animals.


So what's going on with these animals, you ask?  Not a lot.  Some animation 
of the different puppet pieces, some sound effects, and the code i mentioned 
earlier.  The file obviously doesn't have trouble playing the animations - 
they play just fine.  But if i hold down a keyboard key, they lock up.  Is 
there a bug in the player that constantly listens to the keyboard whether i 
want it to or not?  And why does everything unfreeze as the mouse is 
wiggled??   All of our broken (and working) machines are using Flash Player 
7, btw.


Next, i'm going to try leaving everything in the game BUT the animals.  i've 
really exhausted any bright ideas by this point.


- Ryan Creighton







From: Ian Thomas <[EMAIL PROTECTED]>
Reply-To: Flashcoders mailing list 
To: Flashcoders mailing list 
Subject: Re: [Flashcoders] File under BIZARRE: Keyboard Freezes 
Game,Wiggling Mouse Unfreezes

Date: Fri, 28 Oct 2005 17:22:08 +0100

Ah, we're getting somewhere...

In Firefox 1.07 (my default browser) running Flash 8 it all seems to work
fine.

In IE 6 running Flash 7, it does, indeed, hang when I press a key. And
restarts when I stop pressing the key. And gives me a memory error when I
quit the browser.

So is the difference that a bug in Flash has been cured from 7->8 - or that
IE is buggier than Firefox? Votes?

I will say that the whole app feels very clunky to me, like it's doing far
too much work - but then I have a slow machine.

Cheers,
Ian

On 10/28/05, Buck Ruckman <[EMAIL PROTECTED]> wrote:
>
> Here's a swf, where you can place yourself in the "Bizarre problem 
happens

> to me" or "Bizarre problem doesn't happen to me" camp.
>
> http://www.ytv.com/games/hasbro_chatnow/game.swf
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new 
MSN Search! Check it out!


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


Re: [Flashcoders] scroll dynamic MC help

2005-10-28 Thread Buck Ruckman

Works nice.  Good job!

JOR


Thanks - glad you like it!



Can  I have a peek at your code? :>



i don't mind sharing ... you can probably cook up more than a few ways to 
streamline my code.  (If so, pass it back! :)   But it'll have to wait until 
later tonight for me to grab the file from another machine.


If you wanna get a jump on it, yes - the clip moves around in a mask.  The 
code looks at the ratio between the viewable area vs. the content, and the 
dragger vs. the scroll track.  Once that conversion is done, you just 
reverse the y value and position the content.


Since the content is moving according to how the dragger moves in its track, 
i just limit the dragger so it doesn't go outside the track, and the content 
follows suit.


The hold-down-arrow-to-scroll is just a matter of setting a 1-second 
interval onPress that fires a function.  When fired, the function asks is 
the user is still pressing the arrow button.  If not, no biggie.  If so, 
create a new interval that calls a funcMoveContent("up")  (pseudocode) 
function every third of a second or so.



- Ryan Creighton




From: Kent Humphrey <[EMAIL PROTECTED]>
Reply-To: Flashcoders mailing list 
To: Flashcoders mailing list 
Subject: Re: [Flashcoders] scroll dynamic MC help
Date: Fri, 28 Oct 2005 17:36:19 +0100







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


_
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new 
MSN Search! Check it out!


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


Re: [Flashcoders] Why Flex?

2005-10-28 Thread ryanm
One of the downsides of Flash (7 and 8) regarding components is that its 
not easy to change the look and feel, not to mention skinning, which is a 
pain.

With Flex 2 this has become soo easy.
Everything (or almost) can be done through CSS (internal and external), 
including embedding assets (jpg, gif, png, swf, swf library  symbols).
Embedded assets can be used as skins for components, like Buttons for 
instance.


   One might ask, however, why, instead of creating a whole new development 
platform, they didn't just release better components that are easier to 
skin, better CSS support, better html support, and just make Flash a whole 
lot more capable and eay to develop for. Sure, skinning is easy in Flex, but 
why not make skinning components easy in Flash, rather than making "skinning 
is easier in Flex" a marketing campaign for Flex?


ryanm 


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


Re: [Flashcoders] Open all Branches of a Tree Component

2005-10-28 Thread Éric Thibault

I've placed the code on (not inside)  the tree instance ...

onClipEvent(load) {

...code...

}

;-)

Martin Schafer wrote:

Looks like it would work but I can't seem to figure out how to bind it 
to a Tree Component.  How to do you get "this" to refer to the tree 
component instance without having an attribute inside of the ExpandAll 
function?

Thanks for the info!

Martin :)



--
===

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===

Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia de 
confidencialidad 

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


[Flashcoders] Newbie AS3 question

2005-10-28 Thread Andreas Rønning

AS3 noob question ahoy!

I'm reading the AS3 reference trying to get accustomed to the idea, but 
some things (though they look better) i don't really get right away :)

Hence my feeling of incredible stupidity.

I realise the AS3 in the reference is Flex-related, but in Flash IDE 
terms, how would i do something like this in AS3:


var baseClip = _root.createEmptyMovieClip("gameworld",1);
var backGround = baseClip.createEmptyMovieClip("game_bg",1);

I get how much more practical myClip = new MovieClip(); looks, but i 
don't get how i connect a clip created this way with the traditional 
clip hierarchy. Is that out the window as well?
The reference describes |DisplayObjectContainer.addChild(), but i'm 
guessing this doesnt really count for how it'll work in the Flash IDE?


Any helpful hints at what the future holds? :)
|
- Andreas
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread James O'Reilly
I don't know if this is at all related but I experieced a problem where 
I created a swf for flash player 7 using MX 2004 Pro and it worked fine 
in a browser using the version 7 plugin or 8 plugin.


Then I installed Flash 8 and the flash 8 plugin.  I continued to develop 
my movie in MX 2004 since that's what I started with and I didn't want 
to be annoyed with that save as compatibility dialog every time I hit 
CTRL+ENTER to test.


The movie played back just fine in the flash 8 player but on a machine 
with the flash 7 player it crapped out every time even though I authored 
the swf with MX 2004.  I suspect the 2004 IDE used Flash 8 resources to 
publish the file??


I uninstalled Flash 8 and the Flash 8 player.  I reinstalled the Flash 7 
plugin and republished my movie.  It now continues to run correctly in 
either flash 8 or flash 7 plugins.


I haven't tried updating my movie to Flash 8 FLA format and publish down 
to player 7.  I have over 40 individual swfs and no interest in mucking 
around with something that currently works.



JOR


___
===  James O'Reilly
===
===  SynergyMedia, Inc.
===  www.synergymedia.net




Ian Thomas wrote:

Ah, we're getting somewhere...

In Firefox 1.07 (my default browser) running Flash 8 it all seems to work
fine.

In IE 6 running Flash 7, it does, indeed, hang when I press a key. And
restarts when I stop pressing the key. And gives me a memory error when I
quit the browser.

So is the difference that a bug in Flash has been cured from 7->8 - or that
IE is buggier than Firefox? Votes?

I will say that the whole app feels very clunky to me, like it's doing far
too much work - but then I have a slow machine.

Cheers,
Ian

On 10/28/05, Buck Ruckman <[EMAIL PROTECTED]> wrote:


Here's a swf, where you can place yourself in the "Bizarre problem happens
to me" or "Bizarre problem doesn't happen to me" camp.

http://www.ytv.com/games/hasbro_chatnow/game.swf



___
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] Open all Branches of a Tree Component

2005-10-28 Thread Martin Schafer
Looks like it would work but I can't seem to figure out how to bind it 
to a Tree Component.  How to do you get "this" to refer to the tree 
component instance without having an attribute inside of the ExpandAll 
function? 


Thanks for the info!

Martin :)

Éric Thibault wrote:


here is the code I used in a project... hope it helps!  :-)

function ExpendAll() {
 var i:Number;
   var j:Number;
   j = this.length;
 for(i = 0; i < j; i++) {
   var oNode:XMLNode = this.getTreeNodeAt(i);
   var ValeurCourrante:Number = 0;
   if(oNode != undefined) {
   if(this.getIsBranch(oNode)) {
   this.ExpandNode(oNode);
   i=0;
   j = this.length;
   }
   }
   }   }

//Ouvre un noeud incluant les enfants si présents
function ExpandNode (oNode:XMLNode) : Void {

   this._parent._parent.ActionLongeurNoeud(oNode, true);
   if(this.getIsBranch(oNode)) {
   this.setIsOpen(oNode, true);
   if(oNode.childNodes.length > 0) {
   var j:Number;
   for(j = 0; j < oNode.childNodes.length; j++) {
   var oSubNode:XMLNode = oNode.childNodes[j];
   this.ExpandNode(oSubNode);
   }
   }
   }   }
//Ferme tout l'arbre incluant les enfants si présents
function CloseAll() {
   var i:Number;
   var j:Number;
   j = this.length;
 for(i = 0; i < j; i++) {
   var oNode:XMLNode = this.getTreeNodeAt(i);
   if(oNode != undefined && this.getIsBranch(oNode)) {
   this.CloseNode(oNode);
   i=0;
   j = this.length;
   }  }   }
//Ferme le noeud courrant incluant les enfants si présents
function CloseNode(oNode:XMLNode, Mode:Number, Racine:Boolean) : Void {
 if(this.getIsBranch(oNode) and this.getIsOpen(oNode)) {

   if(oNode != this.getTreeNodeAt(0)) {  
this.setIsOpen(oNode, false);

   }
   if(oNode.childNodes.length > 0) {
   var j:Number;
   for(j = 0; j < oNode.childNodes.length; j++) {
   var oSubNode:XMLNode = oNode.childNodes[j];
   this.CloseNode(oSubNode,0,false);
   }
   }
   }   }




Martin Schafer wrote:


Daniel,

I am looking for something that would allow every branch to be 
recursively

set to Open. Wouldn't the code below only open the children of root?

Martin :)


On 10/27/05 2:06 PM, "Daniel Cascais" <[EMAIL PROTECTED]> wrote:

 






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


Re: [Flashcoders] > Quiz and MVC+multi language support

2005-10-28 Thread Alex McCabe
Hi Weyert,

You might be interested in Question Writer - you can make virtually any kind
of Flash quiz with it - fast.

http://www.questionwriter.com

Alex McCabe.

On 10/28/05, Weyert de Boer <[EMAIL PROTECTED]> wrote:
>
> Hmm, "mx.lang.Locale" sounds interesting :-)
> ___
> 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] scroll dynamic MC help

2005-10-28 Thread James O'Reilly

Works nice.  Good job!

JOR




___
===  James O'Reilly
===
===  SynergyMedia, Inc.
===  www.synergymedia.net




Buck Ruckman wrote:


i created one for this site:

http://www.frogtoggle.com/twistedhip

It responds to the scroll wheel, has the hold-down-the-arrow-to-scroll 
functionality, a draggable thingy, etc etc.


It's imperfect.  It doesn't resize the dragger based on the amount of 
content on the page, and it's slow ... but all in all i'm pretty happy 
with it.


i don't know much about best practices, but if you have any specific 
questions about this scrollbar in particular i'd be happy to help.  For 
the record, i don't like using components either.


- Ryan Creighton


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


Re: [Flashcoders] scroll dynamic MC help

2005-10-28 Thread Kent Humphrey


On 28 Oct 2005, at 17:15, Buck Ruckman wrote:


i created one for this site:

http://www.frogtoggle.com/twistedhip

It responds to the scroll wheel, has the hold-down-the-arrow-to- 
scroll functionality, a draggable thingy, etc etc.


It's imperfect.  It doesn't resize the dragger based on the amount  
of content on the page, and it's slow ... but all in all i'm pretty  
happy with it.


i don't know much about best practices, but if you have any  
specific questions about this scrollbar in particular i'd be happy  
to help.  For the record, i don't like using components either.


- Ryan Creighton


That's certainly all I need.

Are you just moving the MC inside a mask?

How do you stop it scrolling too far in either direction?

Can  I have a peek at your code? :>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Rendering color models

2005-10-28 Thread Scott Hyndman
Take a screenshot, save to a file and load it in at runtime.

Scott

-Original Message-
From:   [EMAIL PROTECTED] on behalf of Tom Lee
Sent:   Fri 10/28/2005 11:08 AM
To: 'Flashcoders mailing list'
Cc: 
Subject:[Flashcoders] Rendering color models
Hi everyone,

 

I decided to do a little experiment in Flash 8 using the BitmapData class.
What I want to do is render accurate RGB color models and do so in a variety
of useful ways. I'm ultimately creating my own color-picker/color palette
system.  So, I decided to start by using the BitmapData class:

 

myColorModel = new BitmapData(510,255,false,0x);

this.createEmptyMovieClip("holder",1);

 

function ARGBtoHex(a:Number, r:Number, g:Number, b:Number){

return (a<<24 | r<<16 | g<<8 | b);

}

 

for(var i=0; i<256; i++){

for(var j=0; j<256; j++){

for(var k=0; k<256; k++){

var thisX = i+k;

var thisY = j;

 

thisColor = ARGBtoHex(255,i,j,k);



myColorModel.setPixel(thisX,thisY,thisColor);

}

}

}

 

holder.attachBitmap(myColorModel,1);

 

 

 

Naturally, the nested for loops are a huge performance hit: we're talking
16581375 iterations.  This results in a very nice rendering of a color
model: after you hit "no" about 15 times on the "script running slowly:
abort?" dialog.  Does anyone have any ideas on how I could speed up the
rendering process?

 

Thanks,

 

-tom

 

___
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] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread Ian Thomas
Ah, we're getting somewhere...

In Firefox 1.07 (my default browser) running Flash 8 it all seems to work
fine.

In IE 6 running Flash 7, it does, indeed, hang when I press a key. And
restarts when I stop pressing the key. And gives me a memory error when I
quit the browser.

So is the difference that a bug in Flash has been cured from 7->8 - or that
IE is buggier than Firefox? Votes?

I will say that the whole app feels very clunky to me, like it's doing far
too much work - but then I have a slow machine.

Cheers,
Ian

On 10/28/05, Buck Ruckman <[EMAIL PROTECTED]> wrote:
>
> Here's a swf, where you can place yourself in the "Bizarre problem happens
> to me" or "Bizarre problem doesn't happen to me" camp.
>
> http://www.ytv.com/games/hasbro_chatnow/game.swf
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] scroll dynamic MC help

2005-10-28 Thread Buck Ruckman


i created one for this site:

http://www.frogtoggle.com/twistedhip

It responds to the scroll wheel, has the hold-down-the-arrow-to-scroll 
functionality, a draggable thingy, etc etc.


It's imperfect.  It doesn't resize the dragger based on the amount of 
content on the page, and it's slow ... but all in all i'm pretty happy with 
it.


i don't know much about best practices, but if you have any specific 
questions about this scrollbar in particular i'd be happy to help.  For the 
record, i don't like using components either.


- Ryan Creighton

_
Take advantage of powerful junk e-mail filters built on patented Microsoft® 
SmartScreen Technology. 
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.


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


RE: [Flashcoders] Drawing/painting applicatin examples ...

2005-10-28 Thread Merrill, Jason
Uh.  Did for me in Firefox and Flash 8.5 player (thouh it doesn't
require the 8.5 player).  Worked for me previously with IE and the 7
player.  

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of James O'Reilly
>>Sent: Friday, October 28, 2005 11:50 AM
>>To: Flashcoders mailing list
>>Subject: Re: [Flashcoders] Drawing/painting applicatin examples ...
>>
>>FYI, wysidraw didn't load for me with Firefox and Flash 7 plugin.
>>JOR
>>
>>
>>
>>___
>>===  James O'Reilly
>>===
>>===  SynergyMedia, Inc.
>>===  www.synergymedia.net
>>
>>
>>
>>
>>Merrill, Jason wrote:
>>> Check out the product made by the folks who host this list - really
>>> nice:
>>>
>>> http://www.figleaf.com/products/wysidraw.cfm
>>> Actual demo:
>>> http://products.figleaf.com/samples/coldfusion/index.cfm
>>>
>>>
>>> Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>-Original Message-
>From: [EMAIL PROTECTED]
[mailto:flashcoders-
>[EMAIL PROTECTED] On Behalf Of Jorge Rego
>Sent: Friday, October 28, 2005 4:21 AM
>To: Flashcoders mailing list
>Subject: Re: [Flashcoders] Drawing/painting applicatin examples ...
>
>http://www.27bobs.com/preload.html
>
>http://www.f-mod.com/?p=2
>
>- Original Message -
>From: "JesterXL" <[EMAIL PROTECTED]>
>To: "Flashcoders mailing list" 
>Sent: Thursday, October 27, 2005 5:05 PM
>Subject: Re: [Flashcoders] Drawing/painting applicatin examples ...
>
>
>
>>http://www.bit-101.com/sketch3d/
>>
>>http://www.senocular.com/pub/flash/8/index.php?f=eraseandredraw
>>
>>- Original Message -
>>From: "Pete Hotchkiss" <[EMAIL PROTECTED]>
>>To: "'Flashcoders mailing list'"

>>Sent: Thursday, October 27, 2005 11:48 AM
>>Subject: [Flashcoders] Drawing/painting applicatin examples ...
>>
>>
>>I'm looking for some good examples of drawing/painting examples
>>>
>>> executed
>>>
>>in flash. I've seen a number of basic ones that allow me to sketch
a
>>line drawing, but I'm looking for more extensive functionality,
such
>>>
>>> as
>>>
>>fill color, and the ability to select and move elements of a
drawing
>>around the canvas.
>>
>>Anyone know of some good examples ?
>>
>>Thanks in advance
>>
>>Pete
>>
>>
>>___
>>___
>>Flashcoders mailing list
>>Flashcoders@chattyfig.figleaf.com
>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
NOTICE:
This message is for the designated recipient only and may contain privileged or 
confidential information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of this e-mail by you 
is prohibited.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread Ian Thomas
That does sound weird. If you're sure it's not stray code (or a stray
component kicking around offstage somewhere or something), then all I can
really suggest is my standard 'something's weird' debugging approach; to
make a temporary copy of the app, and start peeling away bits of it until it
starts working properly. Cut it down to one animal - does it still fail? Cut
out the animals completely, put a different animation on the stage; does
that halt? Cut out all the user interaction code; does it still fail? I'm
sure you know the drill. Tedious, but tends to give you results.

Other thoughts:
- Is this running in the IDE or a browser? If a browser, which browser? Does
it fail in a different browser?
- Platform?
- Is it a corrupt Flash file in some way? Does 'save and compact' solve the
problem? What happens if you paste all the same assets into a brand new
Flash file?
- Are you using a loader? If so, are you sure that:
i) The loader has no key-handling code in it
ii) The loader doesn't load a class with the same package/Class name as
something in your movie and overwrite it with different behaviour?

Like Jester says, if you can maybe upload a file somewhere so that someone
else can verify..?

Sorry I can't be more definite,

I'm still deeply suspicious of those Flash assets. :-)

HTH,
Ian

On 10/28/05, Buck Ruckman <[EMAIL PROTECTED]> wrote:
>
> Good thought. They were delivered in Flash format with zero code.
>
> The animal clips do have code in them. Here's the extent of it:
>
> Each animal clip has 3 frame labels - "visible", "hidden" and "noisy".
> Playhead burns through the stretch of "hidden" animation, does a random
> dice
> throw, goes to and plays one of the three labels. The variables
> this.isNoisy and this.isVisible are flagged true or false.
>
> By and large, this code existed in the animal clips in the stick and ball
> file.
>
> 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: AS3.0 and Flash Comm Server

2005-10-28 Thread John Giotta
Nevermind, I'll need to either extend the NetConnection class or
rewrite the detection script.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread Buck Ruckman
Here's a swf, where you can place yourself in the "Bizarre problem happens 
to me" or "Bizarre problem doesn't happen to me" camp.


http://www.ytv.com/games/hasbro_chatnow/game.swf

_
Take charge with a pop-up guard built on patented Microsoft® SmartScreen 
Technology. 
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.


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


Re: [Flashcoders] cast string to a boolean value

2005-10-28 Thread Cedric Muller

sorry about my previous example ;)

can't your receive "1" and "0" instead of true/false ?

this works:

var my_boolean_string:String = "1";
var my_boolean:Boolean = Boolean(Number(my_boolean_string));
if(my_boolean == true) {
trace("cool");
} else {
trace("nope");
}

Cedric


Try:
var my_bool:Boolean = flashvar_bool=="false"?false:true;

The basic problem is creating a Boolean with any string makes it true.
So creating it with the string "false" still makes it true.

On 10/28/05, Matt Ganz <[EMAIL PROTECTED]> wrote:

hi.

i'm receiving FlashVars in my object and embed code and the values are
either "true" or "false". i assume they're brought into flash as
strings and i need them as booleans.

it is my understanding that boolean() won't do what i want because all
it does is evaluate the expression inside the parantheses instead of
converting the value to a boolean. i also read a very brief comment on
livedocs that the appropriate way to do it is cast to a number first
and then a boolean. but that doesn't make sense to me.

anyone have any experience with this?

thanks. -- matt.
___
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] cast string to a boolean value

2005-10-28 Thread Cedric Muller
just downcast your variable using 'Boolean()' to a new variable which 
IS a boolean...


var my_boolean_string:String = "true";
var my_boolean:Boolean = Boolean(my_boolean_string);
if(my_boolean == true) {
trace("cool");
} else {
trace("nope");
}

hth,
Cedric


hi.

i'm receiving FlashVars in my object and embed code and the values are
either "true" or "false". i assume they're brought into flash as
strings and i need them as booleans.

it is my understanding that boolean() won't do what i want because all
it does is evaluate the expression inside the parantheses instead of
converting the value to a boolean. i also read a very brief comment on
livedocs that the appropriate way to do it is cast to a number first
and then a boolean. but that doesn't make sense to me.

anyone have any experience with this?

thanks. -- matt.
___
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] scroll dynamic MC help

2005-10-28 Thread Kent Humphrey
I was wondering if any of you knowledgeable and generous souls had  
any pointers on how to approach building my own scroll bars for  
dynamically created movieclips.


I've made a very simple one that just has buttons for scroll-up and  
scroll-down, but I'd like to add a slider too, and I;m having trouble  
figuring out how far to let the MCs scroll.


I also experimented with F8's scrollRect thing, but couldn't get it  
working and couldn't find any tutorials on it.


So any thoughts you can give me on best practices for scrolling an  
MC, with slider, either scrollRect-ed or masked, would be greatly  
appreciated :>


(I'm wanting to avoid the built in components, unless they really are  
the easiest solution, including skinning to fit my site)


BTW, to see my work in progress - fari.kentandangela.com - you will  
see the long content I need to scroll.

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


Re: [Flashcoders] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread Buck Ruckman

Good thought. They were delivered in Flash format with zero code.

The animal clips do have code in them.  Here's the extent of it:

Each animal clip has 3 frame labels - "visible", "hidden" and "noisy".  
Playhead burns through the stretch of "hidden" animation, does a random dice 
throw, goes to and plays one of the three labels.  The variables 
this.isNoisy and this.isVisible are flagged true or false.


By and large, this code existed in the animal clips in the stick and ball 
file.


When the freeze happens, it doesn't seem to depend which animal is doing 
what or whether an animal is on a decision-making frame.  All animal clips 
freeze at the same time - roughly 1 second after *any* key on the keyboard 
is pressed and held.  When the mouse is moved around while the key is held, 
the animal clips haltingly play through normally, hitting those dice throws 
and flagging their variables without a problem.  Stop moving the mouse, and 
they all freeze.  Let go of the key, and they all play.  As i mentioned, 
there's no Key, Mouse, Add/RemoveListener, setInterval or EnterFrame code in 
the file.


- Ryan Creighton



From: Ian Thomas <[EMAIL PROTECTED]>
Reply-To: Flashcoders mailing list 
To: Flashcoders mailing list 
Subject: Re: [Flashcoders] File under BIZARRE: Keyboard Freezes 
Game,Wiggling Mouse Unfreezes

Date: Fri, 28 Oct 2005 16:41:11 +0100

My only immediate thought - did the artist deliver his art files to you in
Flash format? Are you sure he hasn't accidentally buried some code 
somewhere

in the frames of one of those movieclips?

HTH,
Ian

On 10/28/05, Buck Ruckman <[EMAIL PROTECTED]> wrote:
>
> Hi everyone!
>
> i really hope someone here can help out, because i think we have a 
doozie

> of
> a strange problem.
> 


_
Take advantage of powerful junk e-mail filters built on patented Microsoft® 
SmartScreen Technology. 
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.


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


[Flashcoders] [JSFL] beginDraw(true) seems to disobey document.viewMatrix

2005-10-28 Thread David Stiller
I begin to suspect that beginDraw(true), which leaves the drawing
layer's drawing intact, does not obey the document.viewMatrix as it should.
I'm writing a tool that uses the transformPoint() function in the
Peters/Yard Extension book to compensate for changes in the pen's location
in symbol timelines.  It works just fine during onMouseMove, but as soon as
onMouseUp fires, the drawing jumps to its previously un-transformed
location.

Has anyone else seen this?  The issue is present in both MX 2004 and
8.  Workarounds, thoughts?

A big thanks, btw, to JesterXL and Patrick Mineault for helping me
zero in on the likely culprit.


David
[EMAIL PROTECTED]
"Luck is the residue of good design."

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


Re: [Flashcoders] cast string to a boolean value

2005-10-28 Thread Matt Ganz
both methods work nicely.

thank you.

On 10/28/05, Ian Thomas <[EMAIL PROTECTED]> wrote:
> What's wrong with the following?
>
> var my_bool:Boolean=(flashvar_bool=="true");
>
> Ian
>
> On 10/28/05, Steve Mathews <[EMAIL PROTECTED]> wrote:
> >
> > Try:
> > var my_bool:Boolean = flashvar_bool=="false"?false:true;
> >
> > The basic problem is creating a Boolean with any string makes it true.
> > So creating it with the string "false" still makes it true.
> >
> ___
> 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] cast string to a boolean value

2005-10-28 Thread James O'Reilly

How about doing something like:


var myNewBool:Boolean = (yourFlashVar == "true");



JOR



___
===  James O'Reilly
===
===  SynergyMedia, Inc.
===  www.synergymedia.net




Matt Ganz wrote:

hi.

i'm receiving FlashVars in my object and embed code and the values are
either "true" or "false". i assume they're brought into flash as
strings and i need them as booleans.

it is my understanding that boolean() won't do what i want because all
it does is evaluate the expression inside the parantheses instead of
converting the value to a boolean. i also read a very brief comment on
livedocs that the appropriate way to do it is cast to a number first
and then a boolean. but that doesn't make sense to me.

anyone have any experience with this?

thanks. -- matt.
___
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] Macromedia's poor documentation WAS Selecting anitem off a List component withactionscript

2005-10-28 Thread Peter O'Brien
Ok it's always easy to criticize... I agree they have been improved apon
tremendously since F7 (oh dear indeed), and things do seem to be going the
right way...  but if the mothership can hear me... more detailed code examples
please


"Muzak" <[EMAIL PROTECTED]> wrote:

> Well, I actually did the test by doing a search (--> List select item)
> and what I posted earlier is what turned up (granted, among many other
> things).
> 
> I think the docs have improved quite a bit, especially after the initial
> release of F7 (which was a total disaster).
> Flex 2, even in alpha, has decent documentation. Lots of stuff still
missing,
> but that is to be expected.
> So things have certainly improved and MM have learned their lesson ;-)
> 
> regards,
> Muzak
> 
> 
> - Original Message - 
> From: "Peter O'Brien" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Friday, October 28, 2005 4:14 PM
> Subject: Re: [Flashcoders] Macromedia's poor documentation WAS Selecting
anitem
> off a List component withactionscript
> 
> 
> > Sorry I've been having a bad head day today...  but, it's still a case of
> > first having to work out you want to use List.selectedIndex, from the many
> > members of the component; then the documentation is fine granted.  Surely
> it'd
> > be a good idea to include use of selectedIndex in the  "Creating an
> > application with the List component" section!!
> >
> > Generally I feel MM's documentation could be a fair bit better...
especially
> > code examples, some of them are like Ebeneezer Scrooge
> >
> 
> 
> ___
> 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] Drawing/painting applicatin examples ...

2005-10-28 Thread James O'Reilly

FYI, wysidraw didn't load for me with Firefox and Flash 7 plugin.
JOR



___
===  James O'Reilly
===
===  SynergyMedia, Inc.
===  www.synergymedia.net




Merrill, Jason wrote:

Check out the product made by the folks who host this list - really
nice:

http://www.figleaf.com/products/wysidraw.cfm
Actual demo:
http://products.figleaf.com/samples/coldfusion/index.cfm 



Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com












-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Jorge Rego
Sent: Friday, October 28, 2005 4:21 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Drawing/painting applicatin examples ...

http://www.27bobs.com/preload.html

http://www.f-mod.com/?p=2

- Original Message -
From: "JesterXL" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Thursday, October 27, 2005 5:05 PM
Subject: Re: [Flashcoders] Drawing/painting applicatin examples ...




http://www.bit-101.com/sketch3d/

http://www.senocular.com/pub/flash/8/index.php?f=eraseandredraw

- Original Message -
From: "Pete Hotchkiss" <[EMAIL PROTECTED]>
To: "'Flashcoders mailing list'" 
Sent: Thursday, October 27, 2005 11:48 AM
Subject: [Flashcoders] Drawing/painting applicatin examples ...


I'm looking for some good examples of drawing/painting examples


executed


in flash. I've seen a number of basic ones that allow me to sketch a
line drawing, but I'm looking for more extensive functionality, such


as


fill color, and the ability to select and move elements of a drawing
around the canvas.

Anyone know of some good examples ?

Thanks in advance

Pete


___

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


Re: [Flashcoders] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread JesterXL
Naw, just made it up.  If Ian's comment doesn't help, post some code, and 
upload a SWF if you can.

- Original Message - 
From: "Buck Ruckman" <[EMAIL PROTECTED]>
To: 
Sent: Friday, October 28, 2005 11:43 AM
Subject: Re: [Flashcoders] File under BIZARRE: Keyboard Freezes 
Game,Wiggling Mouse Unfreezes


(um ... i think you responded to the wrong person ... ?)


>From: "JesterXL" <[EMAIL PROTECTED]>
>Reply-To: Flashcoders mailing list 
>To: "Flashcoders mailing list" 
>Subject: Re: [Flashcoders] File under BIZARRE: Keyboard Freezes
>Game,Wiggling Mouse Unfreezes
>Date: Fri, 28 Oct 2005 11:37:58 -0400
>
>Line 65 of frame 12; you can't utilize onEnterFrame twice in an
>onClipEvent(initialize).
>
>- Original Message -
>From: "Buck Ruckman" <[EMAIL PROTECTED]>
>To: 
>Sent: Friday, October 28, 2005 11:35 AM
>Subject: [Flashcoders] File under BIZARRE: Keyboard Freezes Game,Wiggling
>Mouse Unfreezes
>
>
>Hi everyone!
>
>i really hope someone here can help out, because i think we have a doozie
>of
>a strange problem.
>
>i partenered with an artist and built a game that takes place in a zoo.  i
>built a stick and ball version while the artist built the graphics.  The
>stick and ball version works fine on all the machines in our department.
>
>Then i incorporated and animated the artist's graphics, and something weird
>happened.
>
>On certain machines ... i *think* slower machines (i've ruled out browser
>type and version, and Flash player version) ... when you hold down the
>arrow
>keys to move the character, after about 1 second all the animation on the
>screen freezes.  The monkey stops moving.  The hippo stops moving.  The
>penguin - yes, even the penguin - stops moving.  It's tragic.
>
>
>Now it's not just the arrow keys.  The problem happens when i hold down ANY
>key on the keyboard.
>
>i went back to my file and stripped out all listeners, all Key code, all
>enterframe scripts.  Then i stripped out nearly every other piece of
>Actionscript except the code that dynamically places the animated zoo
>animals on screen.  Still no good.   Everything animates hunky-dorey on
>these problem machines until i hold down a key - any key - *** and there's
>NO Key code in the file. ***
>
>AND HERE'S THE REALLY WEIRD PART:
>
>i hold down a key and after one second, all screen animation halts.  THE
>ANIMATION RESUMES WHEN I MOVE THE MOUSE AROUND.  Let go of the key, the
>animations keep looping.  Hold down a key and the animations stop.  Move
>the
>mouse around while holding the key, and they keep playing.  Stop moving the
>mouse, and they stop.
>
>And no, there's no Mouse code in the file either.  In fact, there's barely
>any code in there at all.
>
>So!  What in the heck is going on with this crazy thing?  It works on most
>machines in our department, but on a handful of PC machines and our testing
>Mac it exhibits this bizarre behaviour.
>
>BIG BIG HUGE thanks to anyone who can shed some light.  Do it for the
>animals.
>
>- Ryan Creighton
>
>_
>MSN® Calendar keeps you organized and takes the effort out of scheduling
>get-togethers.
>http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
>   Start enjoying all the benefits of MSN® Premium right now and get the
>first two months FREE*.
>
>___
>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

_
Powerful Parental Controls Let your child discover the best the Internet has
to offer.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.

___
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] SWF Decompilers

2005-10-28 Thread James O'Reilly

Thanks Alias,

You were right about how Flash optimizes the names.  I just ran my swf 
through a non-demo version of Sothink's SWF decompiler and was able to 
see all of my classes exactly as you described.  Truthly, with all of 
the local variable names shortened to _1 and _2 it was very difficult to 
follow and I know the code inside and out.  For most cases that's 
probably enough.


I've tried ASO and couldn't get the swf to run right afterwards because 
of all the name changing so I gave up on it.


I'll take a look the ECMAScriptObfuscator.  I've used something like 
that for JavaScript before so that might be promising.


JOR




Alias wrote:

Ooops, sorry, pressed tab+space too quick there - sent too early. (must
drink less coffee)

My previous mail:
Hi James,

A large portion of your classes will be viewable to a decompiler -
basically, the following WILL be viewable:


//Your class before decompilation

class com.yourdomain.yourpackage.YourClass{
 private var someVar:String;
private var someOtherVar:Number;

public function YourClass{
var someLocalVar1:Number = new Number(1)
var someOtherLocalVar2:String = new String("foo");
}
}


//Your class after decompilation

class com.yourdomain.yourpackage.YourClass{
private var someVar:String;
private var someOtherVar:Number;

public function YourClass{
var _local1:Number = new Number(1)
var _local2:String = new String("foo");
}
}


Essentially, everything apart from local variables (which are optimised at
compile time by the MMC) will stay as they are. The order of your vars might
change, but bascially the structure will still be there.

Depending on the complexity of your app, you might be able to use swf
obfuscators, but if there's a lot of intra-class communication, especially
between different swfs, you might end up banging your head against a wall
for a while trying to get your otherwise functional app to work. Often
things like this["myClip"+i].doSomething() will get messed up, because the
dynamic addressing will get messed up - I haven't tried Nicholas' OBFU,
though, that looks like it might be a good bet. I know Macromedia were
supposed to be funding ASO, but things have been quiet from them lately:
http://www.genable.com/aso/

Personally, I think the way to go is pre-compile-time lexical obfuscators,
because that will give you far more control over exactly what gets
obfuscated. If you're really determined,you could look at using the flash
intrinsics to modify something like Semantic designs' ECMAscript obfuscator:
http://www.semdesigns.com/Products/Obfuscators/ECMAScriptObfuscator.html?Home=DropDown

I'd be interested to know how you get on, obfuscation is quite a popular
(and emotionally charge) topic round here.

HTH,
Alias







On 10/27/05, James O'Reilly <[EMAIL PROTECTED]> wrote:


Question about protecting my swfs.

If I use external AS2 classes and compile my swf, will those classes be
exposed if someone were to decompile my swf with a program like
Sothink's SWF Decompiler or other similar decompiler? It creates a bunch
of empty files, one for each class I have and says that ActionScript is
suppressed in the demo version. I can't tell if they are empty because
it's the demo or if that's because they were external classes.

What good programs might people recommend for obfuscating my swfs?

Is this even neccessary to obfuscate if the code I'm really interested
in protecting is in external classes rather than inside the FLA? Does
the same go for compiled clips or custom UI components?

JOR



___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net 




--


___
===  James O'Reilly
===
===  SynergyMedia, Inc.
===  www.synergymedia.net

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


Re: [Flashcoders] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread Buck Ruckman

(um ... i think you responded to the wrong person ... ?)



From: "JesterXL" <[EMAIL PROTECTED]>
Reply-To: Flashcoders mailing list 
To: "Flashcoders mailing list" 
Subject: Re: [Flashcoders] File under BIZARRE: Keyboard Freezes 
Game,Wiggling Mouse Unfreezes

Date: Fri, 28 Oct 2005 11:37:58 -0400

Line 65 of frame 12; you can't utilize onEnterFrame twice in an
onClipEvent(initialize).

- Original Message -
From: "Buck Ruckman" <[EMAIL PROTECTED]>
To: 
Sent: Friday, October 28, 2005 11:35 AM
Subject: [Flashcoders] File under BIZARRE: Keyboard Freezes Game,Wiggling
Mouse Unfreezes


Hi everyone!

i really hope someone here can help out, because i think we have a doozie 
of

a strange problem.

i partenered with an artist and built a game that takes place in a zoo.  i
built a stick and ball version while the artist built the graphics.  The
stick and ball version works fine on all the machines in our department.

Then i incorporated and animated the artist's graphics, and something weird
happened.

On certain machines ... i *think* slower machines (i've ruled out browser
type and version, and Flash player version) ... when you hold down the 
arrow

keys to move the character, after about 1 second all the animation on the
screen freezes.  The monkey stops moving.  The hippo stops moving.  The
penguin - yes, even the penguin - stops moving.  It's tragic.


Now it's not just the arrow keys.  The problem happens when i hold down ANY
key on the keyboard.

i went back to my file and stripped out all listeners, all Key code, all
enterframe scripts.  Then i stripped out nearly every other piece of
Actionscript except the code that dynamically places the animated zoo
animals on screen.  Still no good.   Everything animates hunky-dorey on
these problem machines until i hold down a key - any key - *** and there's
NO Key code in the file. ***

AND HERE'S THE REALLY WEIRD PART:

i hold down a key and after one second, all screen animation halts.  THE
ANIMATION RESUMES WHEN I MOVE THE MOUSE AROUND.  Let go of the key, the
animations keep looping.  Hold down a key and the animations stop.  Move 
the

mouse around while holding the key, and they keep playing.  Stop moving the
mouse, and they stop.

And no, there's no Mouse code in the file either.  In fact, there's barely
any code in there at all.

So!  What in the heck is going on with this crazy thing?  It works on most
machines in our department, but on a handful of PC machines and our testing
Mac it exhibits this bizarre behaviour.

BIG BIG HUGE thanks to anyone who can shed some light.  Do it for the
animals.

- Ryan Creighton

_
MSN® Calendar keeps you organized and takes the effort out of scheduling
get-togethers.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.

___
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


_
Powerful Parental Controls Let your child discover the best the Internet has 
to offer. 
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.


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


Re: [Flashcoders] cast string to a boolean value

2005-10-28 Thread Ian Thomas
What's wrong with the following?

var my_bool:Boolean=(flashvar_bool=="true");

Ian

On 10/28/05, Steve Mathews <[EMAIL PROTECTED]> wrote:
>
> Try:
> var my_bool:Boolean = flashvar_bool=="false"?false:true;
>
> The basic problem is creating a Boolean with any string makes it true.
> So creating it with the string "false" still makes it true.
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread Ian Thomas
My only immediate thought - did the artist deliver his art files to you in
Flash format? Are you sure he hasn't accidentally buried some code somewhere
in the frames of one of those movieclips?

HTH,
Ian

On 10/28/05, Buck Ruckman <[EMAIL PROTECTED]> wrote:
>
> Hi everyone!
>
> i really hope someone here can help out, because i think we have a doozie
> of
> a strange problem.
> 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread JesterXL
Line 65 of frame 12; you can't utilize onEnterFrame twice in an 
onClipEvent(initialize).

- Original Message - 
From: "Buck Ruckman" <[EMAIL PROTECTED]>
To: 
Sent: Friday, October 28, 2005 11:35 AM
Subject: [Flashcoders] File under BIZARRE: Keyboard Freezes Game,Wiggling 
Mouse Unfreezes


Hi everyone!

i really hope someone here can help out, because i think we have a doozie of
a strange problem.

i partenered with an artist and built a game that takes place in a zoo.  i
built a stick and ball version while the artist built the graphics.  The
stick and ball version works fine on all the machines in our department.

Then i incorporated and animated the artist's graphics, and something weird
happened.

On certain machines ... i *think* slower machines (i've ruled out browser
type and version, and Flash player version) ... when you hold down the arrow
keys to move the character, after about 1 second all the animation on the
screen freezes.  The monkey stops moving.  The hippo stops moving.  The
penguin - yes, even the penguin - stops moving.  It's tragic.


Now it's not just the arrow keys.  The problem happens when i hold down ANY
key on the keyboard.

i went back to my file and stripped out all listeners, all Key code, all
enterframe scripts.  Then i stripped out nearly every other piece of
Actionscript except the code that dynamically places the animated zoo
animals on screen.  Still no good.   Everything animates hunky-dorey on
these problem machines until i hold down a key - any key - *** and there's
NO Key code in the file. ***

AND HERE'S THE REALLY WEIRD PART:

i hold down a key and after one second, all screen animation halts.  THE
ANIMATION RESUMES WHEN I MOVE THE MOUSE AROUND.  Let go of the key, the
animations keep looping.  Hold down a key and the animations stop.  Move the
mouse around while holding the key, and they keep playing.  Stop moving the
mouse, and they stop.

And no, there's no Mouse code in the file either.  In fact, there's barely
any code in there at all.

So!  What in the heck is going on with this crazy thing?  It works on most
machines in our department, but on a handful of PC machines and our testing
Mac it exhibits this bizarre behaviour.

BIG BIG HUGE thanks to anyone who can shed some light.  Do it for the
animals.

- Ryan Creighton

_
MSN® Calendar keeps you organized and takes the effort out of scheduling
get-togethers.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.

___
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] cast string to a boolean value

2005-10-28 Thread Steve Mathews
Try:
var my_bool:Boolean = flashvar_bool=="false"?false:true;

The basic problem is creating a Boolean with any string makes it true.
So creating it with the string "false" still makes it true.

On 10/28/05, Matt Ganz <[EMAIL PROTECTED]> wrote:
> hi.
>
> i'm receiving FlashVars in my object and embed code and the values are
> either "true" or "false". i assume they're brought into flash as
> strings and i need them as booleans.
>
> it is my understanding that boolean() won't do what i want because all
> it does is evaluate the expression inside the parantheses instead of
> converting the value to a boolean. i also read a very brief comment on
> livedocs that the appropriate way to do it is cast to a number first
> and then a boolean. but that doesn't make sense to me.
>
> anyone have any experience with this?
>
> thanks. -- matt.
> ___
> 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] File under BIZARRE: Keyboard Freezes Game, Wiggling Mouse Unfreezes

2005-10-28 Thread Buck Ruckman

Hi everyone!

i really hope someone here can help out, because i think we have a doozie of 
a strange problem.


i partenered with an artist and built a game that takes place in a zoo.  i 
built a stick and ball version while the artist built the graphics.  The 
stick and ball version works fine on all the machines in our department.


Then i incorporated and animated the artist's graphics, and something weird 
happened.


On certain machines ... i *think* slower machines (i've ruled out browser 
type and version, and Flash player version) ... when you hold down the arrow 
keys to move the character, after about 1 second all the animation on the 
screen freezes.  The monkey stops moving.  The hippo stops moving.  The 
penguin - yes, even the penguin - stops moving.  It's tragic.



Now it's not just the arrow keys.  The problem happens when i hold down ANY 
key on the keyboard.


i went back to my file and stripped out all listeners, all Key code, all 
enterframe scripts.  Then i stripped out nearly every other piece of 
Actionscript except the code that dynamically places the animated zoo 
animals on screen.  Still no good.   Everything animates hunky-dorey on 
these problem machines until i hold down a key - any key - *** and there's 
NO Key code in the file. ***


AND HERE'S THE REALLY WEIRD PART:

i hold down a key and after one second, all screen animation halts.  THE 
ANIMATION RESUMES WHEN I MOVE THE MOUSE AROUND.  Let go of the key, the 
animations keep looping.  Hold down a key and the animations stop.  Move the 
mouse around while holding the key, and they keep playing.  Stop moving the 
mouse, and they stop.


And no, there's no Mouse code in the file either.  In fact, there's barely 
any code in there at all.


So!  What in the heck is going on with this crazy thing?  It works on most 
machines in our department, but on a handful of PC machines and our testing 
Mac it exhibits this bizarre behaviour.


BIG BIG HUGE thanks to anyone who can shed some light.  Do it for the 
animals.


- Ryan Creighton

_
MSN® Calendar keeps you organized and takes the effort out of scheduling 
get-togethers. 
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.


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


Re: [Flashcoders] Macromedia's poor documentation WAS Selecting anitem off a List component withactionscript

2005-10-28 Thread Weyert de Boer
Hmm, really? I think the documentation are quiet good -- not a lot of 
outdated information and such. Borland could learn from it ;-=)

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


Re: [Flashcoders] Cannot assign text component from array with href / asfunction

2005-10-28 Thread Steven Loe

> >
> > > 
> > > BRUCE CLARKE'S SON > > />COPS A SECURITIES ACT PLEA
> >
> >

 

> When I click, nothing happens, unless it is trying
> to open a browser and 
> I'm testing in the debugger or simply running the
> movie. I've added a 
> trace() to addStory, nothing appears in the output
> window.


 Miles, My suggestion. is to try the simpliest case
that could work, get that working and go from there.
have you tried someting ultra simple like:

In html: 

In ActionScript:

function myFunction() {
   _root.myText.txt = "Called myFunction";
}

You'd have to put a textfield on the stage with an
instance name of myText of course. This way you can
test your code in a browser.

best of luck,
-Steven


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


[Flashcoders] AS3.0 and Flash Comm Server

2005-10-28 Thread John Giotta
I've been running a few experiments and how can I create event
handlers for Flash Comm Server responses?

For example, I'm doing a basic bandwidth check and I need to handle
the onBWCheck event.

Any tips a on creating custom event types?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  1   2   >