[Flashcoders] Dynamic variables in as3

2005-11-24 Thread Phil Douglas
Does anybody know of a way to create and reference dynamic variables in
as3. Specifically movie clips, but if there's a difference between them
and any other type of variables, that'd be good to know.

 

In as2 this would be

 

for(var i:Number =0; i  acRate; i++){
this.createEmptyMovieClip('p'+i,this.getNextHighestDepth())
this['p'+i]._x = i*10
this['p'+i]._y = i*10
}

 

However in as3 it would need to be something like

 

for(var i:Number =0;i  acRate; i++){
var ['p'+i]:MovieClip = new MovieClip()
this['p'+i].x = i*10
this['p'+i].y = i*10
}

 

Which doesn't work of course. Does anybody have a work around for this,
or is it no longer possible to create undeclared variables at run time.

 

Thanks all

 

Phil

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


RE: [Flashcoders] Xml editor

2005-11-22 Thread Phil Douglas
I tend to use Sepy 

http://www.sepy.it


Phil Douglas
Flash Developer
direct:  +61 2 9024 2655
mobile:  0423 691 722
email:   [EMAIL PROTECTED]  

phone:   +61 2 9211 4344
fax: +61 2 9211 6566
web: massmedia.com.au   Massmedia
Studios

The information transmitted may be confidential, is intended only for
the 
person to which it is addressed, and may not be reviewed, retransmitted,

disseminated or relied upon by any other persons. If you received this 
message in error, please contact the sender and destroy any paper or 
electronic copies of this message. Any views expressed in this  
communication are those of the individual sender, except where the
sender 
specifically states otherwise. MassMedia Studios does not represent, 
warrant or guarantee that the communication is free of errors, virus 
or interference.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Patrick
Matte
Sent: Wednesday, 23 November 2005 7:46 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Xml editor

What software do you people use for editing xml for your flash projects
? 


___
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] Particle class

2005-11-20 Thread Phil Douglas
Hi all

 

I've been working on a particle simulation class, and I've put the
current source and an example on my site

 

http://www.lookmumimontheinternet.com/blog/?p=13

 

It's a bit rough around the edges but if people could have a look and
let me know what they think, that'd be great

 

Cheers

 

Phil Douglas

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


RE: [Flashcoders] Particle class

2005-11-20 Thread Phil Douglas
Curses, fixed :)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simon
Lord
Sent: Monday, 21 November 2005 10:38 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Particle class

.zip link appear to be broken.  :P



On Nov 20, 2005, at 6:29 PM, Phil Douglas wrote:

 Hi all



 I've been working on a particle simulation class, and I've put the
 current source and an example on my site



 http://www.lookmumimontheinternet.com/blog/?p=13



 It's a bit rough around the edges but if people could have a look and
 let me know what they think, that'd be great



 Cheers



 Phil Douglas

 ___
 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] Particle class

2005-11-20 Thread Phil Douglas
Hi Andy

I've seen that, it's very nice but not quite what I'm trying to achieve.
If you've ever used particle playground in after effects you'll see what
I'm getting at.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy
Johnston
Sent: Monday, 21 November 2005 10:41 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Particle class

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

Hi all

 

I've been working on a particle simulation class, and I've put the
current source and an example on my site

 

http://www.lookmumimontheinternet.com/blog/?p=13

 

It's a bit rough around the edges but if people could have a look and
let me know what they think, that'd be great

 

Cheers

 

Phil Douglas

___
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] Array Madness - test yourself

2005-11-20 Thread Phil Douglas
Or if you aren't deleting everything, put i-- next to each pop().

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jobe
Makar
Sent: Monday, 21 November 2005 10:46 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Array Madness - test yourself

Hi Judah,

This is a good candidate for a 'while' loop:

while(errors.length 0) {
errors.pop();
}

Jobe Makar
http://www.electrotank.com
http://www.electro-server.com
phone: 919-609-0408
mobile: 919-610-5754
fax: 919-341-8104
- Original Message - 
From: Judah Frangipane [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, November 20, 2005 6:48 PM
Subject: [Flashcoders] Array Madness - test yourself


I just want to bring to your attention a rare array problem that eluded

 me for years. I just realized what is going on.
 
 Whenever I tried to clear an array I would use a for loop, iterate 
 through all the items and pop each one off. Every once in a while the 
 arrays would still contain values and not be completely erased. Can
you 
 spot the error? Here is the code:
 
 *
 wrong way
 *
 // create an array
 errors = new Array()
 // add two items
 errors.push(item 1)
 errors.push(item 2)
 
 // loop through each item
 for (var i=0;i  errors.length; i++) {
trace(removing item)
errors.pop()
 }
 // errors.length = 1
 trace(errors.length=+errors.length)
 
 
 *
 right way
 *
 // create an array
 errors = new Array()
 // add two items
 errors.push(item 1)
 errors.push(item 2)
 var len = errors.length;
 
 // loop through each item
 for (var i=0;i  len; i++) {
trace(removing item)
errors.pop()
 }
 // errors.length = 0
 trace(errors.length=+errors.length)
 
 
 Look at the condition (i  errors.length).
 
 If we pop an item off the end of the array then the length of the
array 
 is decreased and we do not iterate through all items in the array.
Hope 
 this helps someone.
 
 Best Regards,
 Judah
 
 
 
 ___
 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] Particle class

2005-11-20 Thread Phil Douglas
It's AS2 flash 7 minimum, but the particleFilters parameter only works
with 8 (allows you to apply filter arrays to all particles
individually).

I've been looking at an actionscript 3 conversion but I'm not up to
speed on AS3 yet so that may be a while yet. I'd be great to see the
performance benefits though.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy
Johnston
Sent: Monday, 21 November 2005 11:04 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Particle class

nah just messing with ya, it's real nice, is it 8.5 only?
hows the speed in 7? and the real deal breaker 7 on mac?

Hi Andy

I've seen that, it's very nice but not quite what I'm trying to
achieve.
If you've ever used particle playground in after effects you'll see
what
I'm getting at.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy
Johnston
Sent: Monday, 21 November 2005 10:41 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Particle class

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

  

Hi all



I've been working on a particle simulation class, and I've put the
current source and an example on my site



http://www.lookmumimontheinternet.com/blog/?p=13



It's a bit rough around the edges but if people could have a look and
let me know what they think, that'd be great



Cheers



Phil Douglas

___
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

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


RE: [Flashcoders] XML and CData

2005-11-08 Thread Phil Douglas
Maybe something to do with the ignoreWhite parameter?

Phil Douglas
Flash Developer
direct:  +61 2 9024 2655
mobile:  0423 691 722
email:   [EMAIL PROTECTED]  

phone:   +61 2 9211 4344
fax: +61 2 9211 6566
web: massmedia.com.au   Massmedia
Studios

The information transmitted may be confidential, is intended only for
the 
person to which it is addressed, and may not be reviewed, retransmitted,

disseminated or relied upon by any other persons. If you received this 
message in error, please contact the sender and destroy any paper or 
electronic copies of this message. Any views expressed in this  
communication are those of the individual sender, except where the
sender 
specifically states otherwise. MassMedia Studios does not represent, 
warrant or guarantee that the communication is free of errors, virus 
or interference.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron
Wagner
Sent: Wednesday, 9 November 2005 5:11 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] XML and CData

I should add that with the space betwen the node and ![CDATA it  
works in the schema editor, but still does not work when viewing  
data. Used the same exact data to edit the schema as is being used  
when testing live. Going to try the method that Miles Thompson  
recommended in the morning.

Ron


On Nov 9, 2005, at 12:44 AM, Ron Wagner wrote:

 Hi Muzak,

 Very interesting... I plugged in your sample xml and it worked.  
 After looking for significant differences between yours and mine, I  
 found that

 ?xml version=1.0 ?
 content
 node ![CDATA[Some cdata text.]]/node
 node ![CDATA[Some cdata text.]]/node
 node ![CDATA[Some cdata text.]]/node
 node ![CDATA[Some cdata text.]]/node
 /content

 works, but

 ?xml version=1.0 ?
 content
 node![CDATA[Some cdata text.]]/node
 node![CDATA[Some cdata text.]]/node
 node![CDATA[Some cdata text.]]/node
 node![CDATA[Some cdata text.]]/node
 /content

 does not. Only difference being the space between node and ! 
 [CDATA. I can't find any requirement for there being a space before  
 a CDATA, so unless someone else knows that the space is required it  
 looks like a bug in Flash.

 Thanks,
 Ron


 On Nov 8, 2005, at 11:07 PM, Muzak wrote:

 CDATA should be no problem, even for the schema.
 It should be listed as String. Make sure your xml is valid.

 The following simple xml:

 ?xml version=1.0 ?
 content
  node
   ![CDATA[Some cdata text.]]
  /node
  node
   ![CDATA[Some cdata text.]]
  /node
  node
   ![CDATA[Some cdata text.]]
  /node
  node
   ![CDATA[Some cdata text.]]
  /node
 /content

 Looks like this when loaded as schema:

 - results : XML
 - content : Object
 - node : Array
 - [n] : String

 regards,
 Muzak

 - Original Message -
 From: Ron Wagner [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Wednesday, November 09, 2005 2:03 AM
 Subject: [Flashcoders] XML and CData


 Hi all,

 Using Flash 8 Pro.

 I am a little confused on whether or not Flash can import data in  
 a  CDATA through XML. I am just getting started with XML in
 Flash, so  not sure if it's something I am doing or not, but I  
 can get all my  data in my XML except what is in a CDATA. When
 loading the schema in  the Component Editor for an XMLConnector,  
 the elements with CDATA  data have type empty. The other
 elements have their proper types.

 I've Googled my butt off today and found some people say that  
 CDATA  is supported, some say it is not supported, some say it is
 only  supported on the way in and not the way out. What I'm  
 trying to do is  load data into an XMLConnector, then bind to a user
 interface  component such as a DataGrid, eventually with a  
 DataSet component in  between.

 Can CData be used through an XMLConnector? Do I have to do  
 things  manually via a new XML(), etc., or will even that not work?

 Thanks,
 Ron Wagner


 ___
 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