Re: [Flashcoders] No-Cache script

2010-04-26 Thread Henrik Andersson

Karl DeSaulniers wrote:


Its from a online php file manager, so I am pretty sure it is a legal
script.



I find that to be a questionable way of ensuring quality. While there is 
nothing wrong with the code, this time, just randomly grabbing from an 
existing application hoping that they did the right thing is not a way 
of ensuring quality.

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


Re: [Flashcoders] No-Cache script

2010-04-26 Thread Karl DeSaulniers

Understandable.
How would I go about insuring quality on a script like this?
By no means am I randomly grabbing codes.


Karl


On Apr 26, 2010, at 1:58 AM, Henrik Andersson wrote:


Karl DeSaulniers wrote:


Its from a online php file manager, so I am pretty sure it is a legal
script.



I find that to be a questionable way of ensuring quality. While  
there is nothing wrong with the code, this time, just randomly  
grabbing from an existing application hoping that they did the  
right thing is not a way of ensuring quality.

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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Re: [Flashcoders] No-Cache script

2010-04-26 Thread Henrik Andersson

Karl DeSaulniers wrote:

How would I go about insuring quality on a script like this?


By understanding what the code does.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] No-Cache script

2010-04-26 Thread Dave Watts
 How would I go about insuring quality on a script like this?
 By no means am I randomly grabbing codes.

The RFCs cover in detail all of the things you can do to control
caching with HTTP response headers:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] No-Cache script

2010-04-26 Thread Karl DeSaulniers

Thanks Dave.

Karl


On Apr 26, 2010, at 4:12 AM, Dave Watts wrote:


How would I go about insuring quality on a script like this?
By no means am I randomly grabbing codes.


The RFCs cover in detail all of the things you can do to control
caching with HTTP response headers:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Re: [Flashcoders] No-Cache script

2010-04-26 Thread Karl DeSaulniers

Ok, this is what I found.



When a client tries to revalidate a cache entry, and the response it  
receives contains a Date header that appears to be older than the one  
for the existing entry, then the client SHOULD repeat the request  
unconditionally, and include


   Cache-Control: max-age=0
to force any intermediate caches to validate their copies directly  
with the origin server, or


   Cache-Control: no-cache
to force any intermediate caches to obtain a new copy from the origin  
server.


and --

If a cache receives a 5xx response while attempting to revalidate an  
entry, it MAY either forward this response to the requesting client,  
or act as if the server failed to respond. In the latter case, it MAY  
return a previously received response unless the cached entry  
includes the must-revalidate cache-control directive (see section  
14.9).




I'm venturing to say that this is a vaild way of setting a no-cache  
script for your pages.




Karl



On Apr 26, 2010, at 4:12 AM, Dave Watts wrote:


How would I go about insuring quality on a script like this?
By no means am I randomly grabbing codes.


The RFCs cover in detail all of the things you can do to control
caching with HTTP response headers:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


[Flashcoders] List component for touchscreen

2010-04-26 Thread Glen Pike

Hi,

I am looking at a project which uses a list of data for a 
touchscreen PC.  Sometimes the data-sets for the lists get quite large.  
Can anyone recommend the best way to handle this - using Flash AS3.  I 
will need to have quite chunky skins for fingers rather than a mouse.


I also want to look at implement some simple gesture type controls 
to scroll the list and pick items.  I keep finding lots of multi-touch 
stuff, but only need single touch for now.  Are there any API's or 
frameworks that might handle this?


Thanks

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


RE: [Flashcoders] Quick question about dynamic groupings

2010-04-26 Thread Merrill, Jason
 Could you extend this with an example on the part of:
I typically do is load in XML data and create VOs from that (in my
Model
class) to use in my app.


Sure.  Here is an example of what the parsing might look like inside
your model class.  If your XML looked like this:


xml
people
person firstName=Hank lastName=Aaron
phoneNumber=7043237564 indicatorColor=0xe39132 /
person firstName=Fred lastName=Astaire
phoneNumber=9082321214 indicatorColor=0xe73721 /
person firstName=Judy lastName=Garland
phoneNumber=3107382234 indicatorColor=0xd4e355 /
person firstName=Marilyn lastName=Monroe
phoneNumber=3107673721 indicatorColor=0xbab5ab /
/people
/xml

Then inside your model class, you may have some code like this (which of
course would run after the XML is loaded):

public var personVOs:Array = []; //array of PersonVOs

private function createPersonVOs():void
{
for each (var personNodeXML:XML in myXML.people.person)
{
var personVO:PersonVO = new PersonVO();
personVO.firstName = personnodex...@firstname;
personVO.lastName = personnodex...@lastname;
personVO.phoneNumber =
Number(personnodex...@phonenumber);
personVO.indicatorColor =
uint(personnodex...@indicatorcolor);
personVOs.push(personVO);
}
}

So now, you have personVOs as a public property in your model you can
call and get the people information from their VO class.  Does that
help?  


Jason Merrill 

Bank of  America  Global Learning 
Learning  Performance Solutions

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(note: these are for Bank of America employees only)





-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: Saturday, April 24, 2010 6:53 AM
To: 'Flash Coders List'
Subject: RE: [Flashcoders] Quick question about dynamic groupings

Hi Jason,

Nice explaination!
Thanks!

Could you extend this with an example on the part of:
I typically do is load in XML data and create VOs from that (in my
Model
class) to use in my app.


Kind regards
Cor van Dooren
The Netherlands
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Infinitely Looping Image

2010-04-26 Thread John Singleton
Hi;
I would like to have a background image of clouds loop infinitely.Here's my 
code:
 
function BigPic():void 
{
parent_container2 = new MovieClip();
var square:Sprite = new Sprite();
parent_container2.mask = square;
addChild(square);
square.graphics.lineStyle(3,0x065566);
square.graphics.beginFill(0xff);

square.graphics.drawRoundRect(22, 22, 966, 146, 20);

square.graphics.endFill();
addChild(parent_container2)
var path:String = images/clouds.png;
var 
req:URLRequest = new URLRequest(path);
var loader:Loader = new Loader();
loader.load(req);

loader.addEventListener(IOErrorEvent.IO_ERROR, 
function(e:IOErrorEvent):void{ trace(e) });  

loader.contentLoaderInfo.addEventListener(Event.COMPLETE, BigPicLoaded);
}
 
function BigPicLoaded(evt:Event):void
{
var 
loaderInfo:LoaderInfo = evt.target as LoaderInfo;
var 
displayObject:DisplayObject = loaderInfo.content;

displayObject.width = 2000;
displayObject.height = 150;
displayObject.x = 20;
displayObject.y = 20;
parent_container2.addChild(displayObject);
//
TweenLite.to(parent_container2, 50, {x:-1000});

cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation);
}

function restartAnimation(oEvent:Event):void
{
cloudTween.start();
}
 
But it ain't working. Ideas?
TIA,
John



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


Re: [Flashcoders] Infinitely Looping Image

2010-04-26 Thread jonathan howe
Hi, John,

The first reference to cloudTween I see is here:

cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation);

So I'm guessing you need to declare and assign that object before you try
attaching an event listener to it.

In the future, the quality of the feedback you'll get will reflect the
effort you put into describing the problem. It ain't working isn't helpful
for someone analysing: Throws an exception? Doesn't compile? Animation
starts but then doesn't loop?
-joanthan


On Mon, Apr 26, 2010 at 10:02 AM, John Singleton johnsingleton...@yahoo.com
 wrote:

 Hi;
 I would like to have a background image of clouds loop infinitely.Here's my
 code:

function BigPic():void
{
parent_container2 = new MovieClip();
var square:Sprite = new Sprite();
parent_container2.mask = square;
addChild(square);
square.graphics.lineStyle(3,0x065566);
square.graphics.beginFill(0xff);

 square.graphics.drawRoundRect(22, 22, 966, 146, 20);

 square.graphics.endFill();
addChild(parent_container2)
var path:String = images/clouds.png;
var
 req:URLRequest = new URLRequest(path);
var loader:Loader = new Loader();
loader.load(req);

 loader.addEventListener(IOErrorEvent.IO_ERROR,
 function(e:IOErrorEvent):void{ trace(e) });

 loader.contentLoaderInfo.addEventListener(Event.COMPLETE, BigPicLoaded);
}

function BigPicLoaded(evt:Event):void
{
var
 loaderInfo:LoaderInfo = evt.target as LoaderInfo;
var
 displayObject:DisplayObject = loaderInfo.content;

 displayObject.width = 2000;
displayObject.height = 150;
displayObject.x = 20;
displayObject.y = 20;
parent_container2.addChild(displayObject);
 //
 TweenLite.to(parent_container2, 50, {x:-1000});

 cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation);
}

function restartAnimation(oEvent:Event):void
{
cloudTween.start();
}

 But it ain't working. Ideas?
 TIA,
 John




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




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


Re: [Flashcoders] Infinitely Looping Image

2010-04-26 Thread Hans Wichman
Hi John,

I've just been dabbling in the same sort of thing, but basically just using
bitmapfill, it's very simple, check this out:
http://www.innerdrivestudios.com/blog/articles/actionscript-3/gfx-actionscript-3-articles/wrapping-bitmapdata-in-actionscript-3

And an application of the principle:
http://www.innerdrivestudios.com/blog/articles/actionscript-3/gfx-actionscript-3-articles/flag-effect-in-actionscript-3

Click and the flag and the clouds will start moving using the technique
described in the first post.

HTH
JC

On Mon, Apr 26, 2010 at 4:02 PM, John Singleton
johnsingleton...@yahoo.comwrote:

 Hi;
 I would like to have a background image of clouds loop infinitely.Here's my
 code:

function BigPic():void
{
parent_container2 = new MovieClip();
var square:Sprite = new Sprite();
parent_container2.mask = square;
addChild(square);
square.graphics.lineStyle(3,0x065566);
square.graphics.beginFill(0xff);

 square.graphics.drawRoundRect(22, 22, 966, 146, 20);

 square.graphics.endFill();
addChild(parent_container2)
var path:String = images/clouds.png;
var
 req:URLRequest = new URLRequest(path);
var loader:Loader = new Loader();
loader.load(req);

 loader.addEventListener(IOErrorEvent.IO_ERROR,
 function(e:IOErrorEvent):void{ trace(e) });

 loader.contentLoaderInfo.addEventListener(Event.COMPLETE, BigPicLoaded);
}

function BigPicLoaded(evt:Event):void
{
var
 loaderInfo:LoaderInfo = evt.target as LoaderInfo;
var
 displayObject:DisplayObject = loaderInfo.content;

 displayObject.width = 2000;
displayObject.height = 150;
displayObject.x = 20;
displayObject.y = 20;
parent_container2.addChild(displayObject);
 //
 TweenLite.to(parent_container2, 50, {x:-1000});

 cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation);
}

function restartAnimation(oEvent:Event):void
{
cloudTween.start();
}

 But it ain't working. Ideas?
 TIA,
 John




 ___
 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] Infinitely Looping Image

2010-04-26 Thread John Singleton
From: jonathan howe jonathangh...@gmail.com
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Mon, April 26, 2010 10:17:10 AM
Subject: Re: [Flashcoders] Infinitely Looping Image

snip
Hi, John,

The first reference to cloudTween I see is here:

cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation);

So I'm guessing you need to declare and assign that object before you try
attaching an event listener to it.
/snip

Sorry. The var is declared early on:

var cloudTween:Tween = new 
Tween(parent_container2,x,null,0,300,1,true);

snip
In the future, the quality of the feedback you'll get will reflect the
effort you put into describing the problem. It ain't working isn't helpful
for someone analysing: Throws an exception? Doesn't compile? Animation
starts but then doesn't loop?
/snip

Doesn't play. Everything else pops up fine. No errors.
TIA,
John


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


RE: [Flashcoders] Infinitely Looping Image

2010-04-26 Thread Jack Doyle
You're mixing Tween and TweenLite code. You've got an event listener set up
for a TweenEvent.MOTION_FINISH but TweenLite doesn't dispatch events
(TweenMax does though), and you didn't define your cloudTween variable.

The easiest thing to do would be to use TweenMax and its repeat property,
setting it to -1 for infinite:

TweenMax.to(parent_container2, 50, {x:-1000, repeat:-1});

Or you could use TweenLite's onComplete special property to call restart()
on your TweenLite instance, like:

var cloudTween:TweenLite = new TweenLite(parent_container2, 50, {x:-1000,
onComplete:repeatCloudTween});
function repeatCloudTween():void {
cloudTween.restart();
}

Make sure you're using v11: http://www.greensock.com/v11/ 

Jack



-Original Message-
From: John Singleton [mailto:johnsingleton...@yahoo.com] 
Sent: Monday, April 26, 2010 9:02 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Infinitely Looping Image

Hi;
I would like to have a background image of clouds loop infinitely.Here's my
code:
 
function BigPic():void 
{
parent_container2 = new MovieClip();
var square:Sprite = new Sprite();
parent_container2.mask = square;
addChild(square);
square.graphics.lineStyle(3,0x065566);
square.graphics.beginFill(0xff);

square.graphics.drawRoundRect(22, 22, 966, 146, 20);

square.graphics.endFill();
addChild(parent_container2)
var path:String = images/clouds.png;
var 
req:URLRequest = new URLRequest(path);
var loader:Loader = new Loader();
loader.load(req);

loader.addEventListener(IOErrorEvent.IO_ERROR, 
function(e:IOErrorEvent):void{ trace(e) });  

loader.contentLoaderInfo.addEventListener(Event.COMPLETE, BigPicLoaded);
}
 
function BigPicLoaded(evt:Event):void
{
var 
loaderInfo:LoaderInfo = evt.target as LoaderInfo;
var 
displayObject:DisplayObject = loaderInfo.content;

displayObject.width = 2000;
displayObject.height = 150;
displayObject.x = 20;
displayObject.y = 20;
parent_container2.addChild(displayObject);
//
TweenLite.to(parent_container2, 50, {x:-1000});

cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation);
}

function restartAnimation(oEvent:Event):void
{
cloudTween.start();
}
 
But it ain't working. Ideas?
TIA,
John



  


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


Re: [Flashcoders] Infinitely Looping Image

2010-04-26 Thread John Singleton


- Original Message 

 From: Jack Doyle j...@greensock.com
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Sent: Mon, April 26, 2010 12:36:45 PM
 Subject: RE: [Flashcoders] Infinitely Looping Image
 
 You're mixing Tween and TweenLite code. You've got an event listener set 
 up

I thought I'd commented out the TweenLite code, right?

 for a TweenEvent.MOTION_FINISH but TweenLite doesn't dispatch 
 events
(TweenMax does though), and you didn't define your cloudTween 
 variable.

 The easiest thing to do would be to use TweenMax and its 
 repeat property,
 setting it to -1 for infinite:

Well the problem there and with onComplete is that the clouds image has to move 
completely off the stage, trailing ugly white space the whole way, before the 
repeat kicks in. Can't have that ;) Other ideas?
TIA,
John


PS. Here's that code again:

var cloudTween:Tween = new 
Tween(parent_container2,x,null,0,300,1,true);

function BigPic():void 
{
parent_container2 = new MovieClip();
var square:Sprite = new Sprite();
parent_container2.mask = square;
addChild(square);
square.graphics.lineStyle(3,0x065566);
square.graphics.beginFill(0xff);
square.graphics.drawRoundRect(22, 22, 966, 146, 20);
square.graphics.endFill();
addChild(parent_container2)
var path:String = images/clouds.png;
var req:URLRequest = new URLRequest(path);
var loader:Loader = new Loader();
loader.load(req);
loader.addEventListener(IOErrorEvent.IO_ERROR, 
function(e:IOErrorEvent):void{ trace(e) });  
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, 
BigPicLoaded);
}

function BigPicLoaded(evt:Event):void
{
var loaderInfo:LoaderInfo = evt.target as LoaderInfo;
var displayObject:DisplayObject = loaderInfo.content;
displayObject.width = 2000;
displayObject.height = 150;
displayObject.x = 20;
displayObject.y = 20;
parent_container2.addChild(displayObject);
//TweenLite.to(parent_container2, 50, {x:-1000});
cloudTween.addEventListener(TweenEvent.MOTION_FINISH, 
restartAnimation);
}

function restartAnimation(oEvent:Event):void
{
cloudTween.start();
}


  

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


[Flashcoders] zend_amf classmap

2010-04-26 Thread Javier Trejo
Hello list,

 

I have a problem when I mapping a php class and as3 class (using flex 4).

 

In the server I have this code:

 

GatewayController.php

 

class GatewayController extends Zend_Controller_Action

{

 

public function init()

{

/* Initialize action controller here */

  $this-getHelper('ViewRenderer')-setNoRender();

  

  $this-server = new Zend_Amf_Server();

  

  $this-server-addDirectory( APPLICATION_PATH . '/services/' );

  $this-server-setClassMap('ErrorDTO', 'ErrorDTO');

  $this-server-setProduction(false);

}

 

public function indexAction()

{

// action body

echo ($this-server-handle());

}

 

 

}

 

ErrorDTO.php

 

class ErrorDTO {

  public $_explicitType = 'com.javiertrejo.dtos.ErrorDTO';

  

  public $type;

  public $message;

}

 

User.php

 

(.)

include_once(APPLICATION_PATH . '/dtos/UserDTO.php');



$return = new UserDTO();



$return-fullname = $user-getFullname();

  $return-username = $user-getUsername();

  $return-password = $user-getPassword();

  $return-profile  = $user-getProfile();



(.)

 

In the client (Flex project):

 

ErrorDTO.as

package com.javiertrejo.dtos

{

  [Bindable]

  [RemoteClass(alias=ErrorDTO)]

  public class ErrorDTO

  {

public var type:String;

public var message:String;

  }

}

 

The problem is when I debug the app the resultEvent always return a
ObjectProxy. Can help me??

 

Thanks

 

 

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


RE: [Flashcoders] Quick question about dynamic groupings

2010-04-26 Thread Cor
Hi Jason,

Thank you.

So the personVO.as should look like this:
package
{
class PersonVO
{
public var firstName:String;
public var lastName:String;
public var phoneNumber:Number;
public var indicatorColor:uint;
}
}

Now I think I understand what you are doing, but I lost to see the benefit
of the VO over doing it with a generic Object.
Because it is now in a public array I can address everything.
Like this:


var personVO:PersonVO = new Object();
personVO.firstName = personnodex...@firstname;
etc..

Or maybe I don't understand the VO concept???

Regards
Cor


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill,
Jason
Sent: maandag 26 april 2010 15:52
To: Flash Coders List
Subject: RE: [Flashcoders] Quick question about dynamic groupings

 Could you extend this with an example on the part of:
I typically do is load in XML data and create VOs from that (in my
Model
class) to use in my app.


Sure.  Here is an example of what the parsing might look like inside
your model class.  If your XML looked like this:


xml
people
person firstName=Hank lastName=Aaron
phoneNumber=7043237564 indicatorColor=0xe39132 /
person firstName=Fred lastName=Astaire
phoneNumber=9082321214 indicatorColor=0xe73721 /
person firstName=Judy lastName=Garland
phoneNumber=3107382234 indicatorColor=0xd4e355 /
person firstName=Marilyn lastName=Monroe
phoneNumber=3107673721 indicatorColor=0xbab5ab /
/people
/xml

Then inside your model class, you may have some code like this (which of
course would run after the XML is loaded):

public var personVOs:Array = []; //array of PersonVOs

private function createPersonVOs():void
{
for each (var personNodeXML:XML in myXML.people.person)
{
var personVO:PersonVO = new PersonVO();
personVO.firstName = personnodex...@firstname;
personVO.lastName = personnodex...@lastname;
personVO.phoneNumber =
Number(personnodex...@phonenumber);
personVO.indicatorColor =
uint(personnodex...@indicatorcolor);
personVOs.push(personVO);
}
}

So now, you have personVOs as a public property in your model you can
call and get the people information from their VO class.  Does that
help?  


Jason Merrill 

Bank of  America  Global Learning 
Learning  Performance Solutions

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(note: these are for Bank of America employees only)





-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: Saturday, April 24, 2010 6:53 AM
To: 'Flash Coders List'
Subject: RE: [Flashcoders] Quick question about dynamic groupings

Hi Jason,

Nice explaination!
Thanks!

Could you extend this with an example on the part of:
I typically do is load in XML data and create VOs from that (in my
Model
class) to use in my app.


Kind regards
Cor van Dooren
The Netherlands
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com 
Versie: 9.0.814 / Virusdatabase: 271.1.1/2833 - datum van uitgifte: 04/24/10
20:31:00

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


Re: [Flashcoders] Quick question about dynamic groupings

2010-04-26 Thread Dave Watts
 So the personVO.as should look like this:
 package
 {
        class PersonVO
        {
                public var firstName:String;
                public var lastName:String;
                public var phoneNumber:Number;
                public var indicatorColor:uint;
        }
 }

 Now I think I understand what you are doing, but I lost to see the benefit
 of the VO over doing it with a generic Object.

Well, from the Flex side, the reason you'd use a custom value object
instead of a generic object is for strongly typed values, compile-time
checking, and code-completion in Flash Builder. I imagine some of
those carry over to regular Flash development.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

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


Re: [Flashcoders] No-Cache script

2010-04-26 Thread Karl DeSaulniers

I see, but I understood what the code did and was why I posted.
Thanks for you input though Henrik. I will keep it in mind.
I also dont want to generate or use insecure, bad quality or bloated  
code.

Alas, I am learning though and so the margin for error may be greater.
Please, if I share anything that is not viable, please let me know or  
slap me across the back of the head.

:)


Karl

On Apr 26, 2010, at 3:42 AM, Henrik Andersson wrote:


Karl DeSaulniers wrote:

How would I go about insuring quality on a script like this?


By understanding what the code does.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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