Re: [Flashcoders] Quick greeting

2011-02-16 Thread Henrik Andersson

John R. Sweeney Jr skriver:

TestŠ

TestŠ

Is this mic on?



Nope. Try this one:
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Quick greeting

2011-02-16 Thread John R. Sweeney Jr
TestŠ

TestŠ

Is this mic on?

;)


on 2/16/11 10:02 AM, Eric E. Dolecki at edole...@gmail.com wrote:

> I am welcoming a certain Conor to the list.
> 
> Test message for his inbox :)
> 
> Eric


John R. Sweeney Jr.
Interactive Multimedia Developer


OnDemand Interactive Inc
945 Washington Blvd.
Hoffman Estates, IL 60169
Office/Fax: 847.310.5959
Cellular: 847.651.4469
www.ondemandinteractive.com



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


[Flashcoders] Quick greeting

2011-02-16 Thread Eric E. Dolecki
I am welcoming a certain Conor to the list.

Test message for his inbox :)

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


Re: [Flashcoders] checking for properties AS3

2011-02-16 Thread Geografiek
Thanks so much Jens!
Willem van den Goorbergh

On 16 feb 2011, at 14:33, Jens Struwe wrote:

> To recusively dump your complex object you might use:
> 
> function traceProperties(object : Object, depth : uint = 0) : void {
>for (var prop : String in object) {
>   trace (prefix(depth), prop, object[prop]);
>   if (object[prop] is Object) traceProperties(object[prop], depth + 1);
>}
> 
>   function prefix(depth : uint) : String {
>   var prefix : String = "";
>   for (var i : uint = 0; i < depth; i++) prefix += "";
>   return prefix;
>   }
> }
> 
> Anyway, there is also an error in createProperties. Look at the attached test 
> file to compare with my fixes. Hope the list allows me to pass files.
> 
> map [object Object]
> classes [object Object]
> class2 [object Object]
> value RA02
> areaColor 0xFF
> keyText Noord-Nederland2
> class1 [object Object]
> value RA01
> areaColor 0xEBDBAA
> keyText Noord-Nederland
> subTitle k
> layers [object Object]
> gemeenteNaam [object Object]
> visible false
> title [object Object]
> nl gemeentenamen
> 
> Best,
> 
> Jens
> 
> Am 16.02.2011 13:29, schrieb Geografiek:
>> Hi Jens,
>> What I basically want is to transform the xml structure into an object 
>> structure.
>> xml:
>> 
>> 
>> 
>> 
>> 0xEBDBAA
>> 
>> RA01
>> 
>> 
>> 0xEBDBAA
>> 
>> RA01
>> 
>> 
>> 
>> false
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> flash object:
>> map
>>map.classes
>>map.classes,class1
>>map.classes,class1.areaColor
>>map.classes,class1.value
>>...
>>map.classes,class2
>>map.classes,class2.areaColor
>>map.classes,class2.value
>>...
>>...
>>...
>>map.layers
>>...
>>...
>>...
>> 
>> Things seem to work, but I want to traverse the properties tree of the flash 
>> object and can't get that part working.
>> Thanks,
>> Willem van den Goorbergh
>> 
>> On 16 feb 2011, at 13:10, Jens Struwe wrote:
>> 
>>> Having an example XML could be pretty useful.
>>> 
>>> And, actually, I don't understand the problem. What should be the output? 
>>> Please hand over all necessary info required to be able to help you.
>>> 
>>> Am 16.02.2011 12:43, schrieb Geografiek:
 Hi list,
 I posted this question a week ago on flash tiger, but never got an answer. 
 So I try my luck here.
 
 I create an object and dynamically assign properties to it, values from 
 xml-nodes.
 If an xml-node has child nodes the property assigned is an object and the 
 values of the child nodes are assigned as properties to that object:
 
 private function createProperties(node:XML, container:*):void {
 for each (var childNode:XML in node.*) {
 if(childNode.children().length() == 0) {
 container[childNode.localName()] = null;
 } else if(childNode.children().length() == 1) {
 container[childNode.localName()] = childNode.*;
 } else {
 container[childNode.localName()] = new Object();
 createProperties(childNode, container[childNode.localName()]);
 }
 }
 }
 
 Now I want to trace what properties are created with the following 
 function:
 private function traceProperties(object:Object):void {
 for (var prop:* in object) {
 trace(prop + " is: " + object[prop]);
 traceProperties(prop);
 }
 if(object.hasOwnProperty("layers")) {
 trace("this.layers.gemeenteNaam.title is: " + 
 this.layers.gemeenteNaam.title);
 trace("this.classes.class1.keyText is: " + 
 this.classes.class1.keyText);
 }
 }
 
 This traces:
 source is: null
 note is: null
 subTitle is: null
 copyright is: Geografiek, 2011
 mapType is: chorochromaat
 classes is: [object Object]
 key is: [object Object]
 layers is: [object Object]
 this.layers.gemeenteNaam.title is: gemeentenamen
 this.classes.class1.keyText is: Noord-Nederland
 
> From this I gather that all properties are actually created on their 
> desired level (last 2 traced lines).
 But the function traceProperties() does not automatically catch all 
 properties. At least not the properies inside the objects
 How do I check if an object has properties at all and how do I trace them?
 TIA
 Willem van den Goorbergh
 
 =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
 Geografiek is a Dutch, Utrecht-based map an

Re: [Flashcoders] How to center my Flash in SWFOBJECT?

2011-02-16 Thread Karl DeSaulniers

:) My pleasure..

Best,
Karl


On Feb 16, 2011, at 7:24 AM, Cor wrote:


That did the trick!!!
Thanks Karl.

regards,
Cor


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: woensdag 16 februari 2011 14:19
To: Flash Coders List
Subject: Re: [Flashcoders] How to center my Flash in SWFOBJECT?

Hi Cor,
Try this..


body { text-align:center; width:100%; height:100%; } div#flashContent {
width:auto; height:auto; } 

or this if you want it centered vertically


body { text-align:center; vertical-align:middle;  width:100%; height:
100%; }
div#flashContent { width:auto; height:auto; } 

HTML-


SWFOBJECT




Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com

___
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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Re: [Flashcoders] checking for properties AS3

2011-02-16 Thread Jens Struwe

To recusively dump your complex object you might use:

function traceProperties(object : Object, depth : uint = 0) : void {
for (var prop : String in object) {
trace (prefix(depth), prop, object[prop]);
if (object[prop] is Object) traceProperties(object[prop], depth + 1);
}

function prefix(depth : uint) : String {
var prefix : String = "";
for (var i : uint = 0; i < depth; i++) prefix += "";
return prefix;
}
}

Anyway, there is also an error in createProperties. Look at the attached 
test file to compare with my fixes. Hope the list allows me to pass files.


map [object Object]
classes [object Object]
class2 [object Object]
value RA02
areaColor 0xFF
keyText Noord-Nederland2
class1 [object Object]
value RA01
areaColor 0xEBDBAA
keyText Noord-Nederland
subTitle k
layers [object Object]
gemeenteNaam [object Object]
visible false
title [object Object]
nl gemeentenamen

Best,

Jens

Am 16.02.2011 13:29, schrieb Geografiek:

Hi Jens,
What I basically want is to transform the xml structure into an object 
structure.
xml:

 
 
 
 0xEBDBAA
 
 RA01
 
 
 0xEBDBAA
 
 RA01
 
 
 
 false
 
 
 
 
 


flash object:
map
map.classes
map.classes,class1
map.classes,class1.areaColor
map.classes,class1.value
...
map.classes,class2
map.classes,class2.areaColor
map.classes,class2.value
...
...
...
map.layers
...
...
...

Things seem to work, but I want to traverse the properties tree of the flash 
object and can't get that part working.
Thanks,
Willem van den Goorbergh

On 16 feb 2011, at 13:10, Jens Struwe wrote:


Having an example XML could be pretty useful.

And, actually, I don't understand the problem. What should be the output? 
Please hand over all necessary info required to be able to help you.

Am 16.02.2011 12:43, schrieb Geografiek:

Hi list,
I posted this question a week ago on flash tiger, but never got an answer. So I 
try my luck here.

I create an object and dynamically assign properties to it, values from 
xml-nodes.
If an xml-node has child nodes the property assigned is an object and the 
values of the child nodes are assigned as properties to that object:

private function createProperties(node:XML, container:*):void {
 for each (var childNode:XML in node.*) {
 if(childNode.children().length() == 0) {
 container[childNode.localName()] = null;
 } else if(childNode.children().length() == 1) {
 container[childNode.localName()] = childNode.*;
 } else {
 container[childNode.localName()] = new Object();
 createProperties(childNode, container[childNode.localName()]);
 }
 }
}

Now I want to trace what properties are created with the following function:
private function traceProperties(object:Object):void {
 for (var prop:* in object) {
 trace(prop + " is: " + object[prop]);
 traceProperties(prop);
 }
 if(object.hasOwnProperty("layers")) {
 trace("this.layers.gemeenteNaam.title is: " + 
this.layers.gemeenteNaam.title);
 trace("this.classes.class1.keyText is: " + 
this.classes.class1.keyText);
 }
}

This traces:
source is: null
note is: null
subTitle is: null
copyright is: Geografiek, 2011
mapType is: chorochromaat
classes is: [object Object]
key is: [object Object]
layers is: [object Object]
this.layers.gemeenteNaam.title is: gemeentenamen
this.classes.class1.keyText is: Noord-Nederland


 From this I gather that all properties are actually created on their desired 
level (last 2 traced lines).

But the function traceProperties() does not automatically catch all properties. 
At least not the properies inside the objects
How do I check if an object has properties at all and how do I trace them?
TIA
Willem van den Goorbergh

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or cell 
phone: (+31)6-26372378
or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: www.geografiek.nl
twitter: @wvdgoorbergh
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=





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



___
Flashcoders mailing list
Flashcoders@chattyfig.figl

RE: [Flashcoders] How to center my Flash in SWFOBJECT?

2011-02-16 Thread Cor
That did the trick!!!
Thanks Karl.

regards,
Cor 


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: woensdag 16 februari 2011 14:19
To: Flash Coders List
Subject: Re: [Flashcoders] How to center my Flash in SWFOBJECT?

Hi Cor,
Try this..


body { text-align:center; width:100%; height:100%; } div#flashContent {
width:auto; height:auto; } 

or this if you want it centered vertically


body { text-align:center; vertical-align:middle;  width:100%; height: 
100%; }
div#flashContent { width:auto; height:auto; } 

HTML-


SWFOBJECT




Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com

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

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


Re: [Flashcoders] How to center my Flash in SWFOBJECT?

2011-02-16 Thread Karl DeSaulniers

Hi Cor,
Try this..


body { text-align:center; width:100%; height:100%; }
div#flashContent { width:auto; height:auto; }


or this if you want it centered vertically


body { text-align:center; vertical-align:middle; width:100%; height: 100%; }
div#flashContent { width:auto; height:auto; }


HTML-


SWFOBJECT




Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


RE: [Flashcoders] How to center my Flash in SWFOBJECT?

2011-02-16 Thread Cor
Thank you, but that didn't work.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
Sent: woensdag 16 februari 2011 13:55
To: Flash Coders List
Subject: Re: [Flashcoders] How to center my Flash in SWFOBJECT?

You might need:

html, body { width:100%; height:100%;}
#flashContent { height:100%;width:100%; text-align:center;}

This won't do vertical align - you have to hack with javascript to do that.




On 16/02/2011 12:40, Cor wrote:
> Can anyone tell me how to center my Flash content in html page with 
> use of SWFOBJECT?
>
> I tried these:
>  
>   body { margin: 0px}
>   div#flashContent { text-align: center; }
>   object#flashContent { display:inline; }
>  
>
> AND
>
>  
>   body { margin: 0px}
>   div#flashContent { text-align:left; }
>   object#flashContent { display:block; margin:0 auto; }
>  
>
> But it doesn't center???
>
>
> TIA
> Cor
>
>
> ___
> 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] How to center my Flash in SWFOBJECT?

2011-02-16 Thread Glen Pike

You might need:

html, body { width:100%; height:100%;}
#flashContent { height:100%;width:100%; text-align:center;}

This won't do vertical align - you have to hack with javascript to do that.




On 16/02/2011 12:40, Cor wrote:

Can anyone tell me how to center my Flash content in html page with use of
SWFOBJECT?

I tried these:
 
body { margin: 0px}
div#flashContent { text-align: center; }
object#flashContent { display:inline; }
 

AND

 
body { margin: 0px}
div#flashContent { text-align:left; }
object#flashContent { display:block; margin:0 auto; }
 

But it doesn't center???


TIA
Cor


___
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] How to center my Flash in SWFOBJECT?

2011-02-16 Thread Cor
Can anyone tell me how to center my Flash content in html page with use of
SWFOBJECT?

I tried these:

body { margin: 0px}
div#flashContent { text-align: center; }
object#flashContent { display:inline; }


AND


body { margin: 0px}
div#flashContent { text-align:left; }
object#flashContent { display:block; margin:0 auto; } 


But it doesn't center???


TIA
Cor


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


Re: [Flashcoders] checking for properties AS3

2011-02-16 Thread Geografiek
Hi Jens,
What I basically want is to transform the xml structure into an object 
structure.
xml:




0xEBDBAA

RA01


0xEBDBAA

RA01



false







flash object:
map
   map.classes
   map.classes,class1
   map.classes,class1.areaColor
   map.classes,class1.value
   ...
   map.classes,class2
   map.classes,class2.areaColor
   map.classes,class2.value
   ...
   ...
   ...
   map.layers
   ...
   ...
   ...

Things seem to work, but I want to traverse the properties tree of the flash 
object and can't get that part working.
Thanks,
Willem van den Goorbergh

On 16 feb 2011, at 13:10, Jens Struwe wrote:

> Having an example XML could be pretty useful.
> 
> And, actually, I don't understand the problem. What should be the output? 
> Please hand over all necessary info required to be able to help you.
> 
> Am 16.02.2011 12:43, schrieb Geografiek:
>> Hi list,
>> I posted this question a week ago on flash tiger, but never got an answer. 
>> So I try my luck here.
>> 
>> I create an object and dynamically assign properties to it, values from 
>> xml-nodes.
>> If an xml-node has child nodes the property assigned is an object and the 
>> values of the child nodes are assigned as properties to that object:
>> 
>> private function createProperties(node:XML, container:*):void {
>> for each (var childNode:XML in node.*) {
>> if(childNode.children().length() == 0) {
>> container[childNode.localName()] = null;
>> } else if(childNode.children().length() == 1) {
>> container[childNode.localName()] = childNode.*;
>> } else {
>> container[childNode.localName()] = new Object();
>> createProperties(childNode, container[childNode.localName()]);
>> }
>> }
>> }
>> 
>> Now I want to trace what properties are created with the following function:
>> private function traceProperties(object:Object):void {
>> for (var prop:* in object) {
>> trace(prop + " is: " + object[prop]);
>> traceProperties(prop);
>> }
>> if(object.hasOwnProperty("layers")) {
>> trace("this.layers.gemeenteNaam.title is: " + 
>> this.layers.gemeenteNaam.title);
>> trace("this.classes.class1.keyText is: " + 
>> this.classes.class1.keyText);
>> }
>> }
>> 
>> This traces:
>> source is: null
>> note is: null
>> subTitle is: null
>> copyright is: Geografiek, 2011
>> mapType is: chorochromaat
>> classes is: [object Object]
>> key is: [object Object]
>> layers is: [object Object]
>> this.layers.gemeenteNaam.title is: gemeentenamen
>> this.classes.class1.keyText is: Noord-Nederland
>> 
>>> From this I gather that all properties are actually created on their 
>>> desired level (last 2 traced lines).
>> But the function traceProperties() does not automatically catch all 
>> properties. At least not the properies inside the objects
>> How do I check if an object has properties at all and how do I trace them?
>> TIA
>> Willem van den Goorbergh
>> 
>> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
>> Geografiek is a Dutch, Utrecht-based map and chart design company.
>> Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or 
>> cell phone: (+31)6-26372378
>> or by fax: (+31)302719687
>> snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
>> Visit our website at: www.geografiek.nl
>> twitter: @wvdgoorbergh
>> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or cell 
phone: (+31)6-26372378
or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: www.geografiek.nl
twitter: @wvdgoorbergh
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=





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


Re: [Flashcoders] checking for properties AS3

2011-02-16 Thread Geografiek
Hi Cor thanks, but that won't do.
If I write a part out in a tree structure you'll see why:
map
map.classes
map.classes,class1
map.classes,class1.areaColor
map.classes,class1.value
...
map.classes,class2
map.classes,class2.areaColor
map.classes,class2.value
...
...
...
map.layers
...
...
...

With the node..* syntax all properties would be assigned to the same level
But within the classes part class1 and class2 both have a property 'value'.
class2.value would overwrite class1.value.
What I basically want is to transform the xml structure into an object 
structure.
Any other takers?
Tanks
Willem van den Goorbergh

On 16 feb 2011, at 12:50, Cor wrote:

> Hi Willem,
> 
> Not sure, but what if you change this:
>for each (var childNode:XML in node.*) {
> 
> into:
>for each (var childNode:XML in node..*) {
> 
> Groeten,
> Cor van Dooren
> www.codobyte.com
> --
> "There are only 10 types of people in the world:
>   Those who understand binary and those who don't."
> 
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Geografiek
> Sent: woensdag 16 februari 2011 12:44
> To: Flash Coders List
> Subject: [Flashcoders] checking for properties AS3
> 
> Hi list,
> I posted this question a week ago on flash tiger, but never got an answer.
> So I try my luck here.
> 
> I create an object and dynamically assign properties to it, values from
> xml-nodes.
> If an xml-node has child nodes the property assigned is an object and the
> values of the child nodes are assigned as properties to that object:
> 
> private function createProperties(node:XML, container:*):void {
>for each (var childNode:XML in node.*) {
>if(childNode.children().length() == 0) {
>container[childNode.localName()] = null;
>} else if(childNode.children().length() == 1) {
>container[childNode.localName()] = childNode.*;
>} else {
>container[childNode.localName()] = new Object();
>createProperties(childNode, container[childNode.localName()]);
>}
>}
> }
> 
> Now I want to trace what properties are created with the following function:
> private function traceProperties(object:Object):void {
>for (var prop:* in object) {
>trace(prop + " is: " + object[prop]);
>traceProperties(prop);
>}
>if(object.hasOwnProperty("layers")) {
>trace("this.layers.gemeenteNaam.title is: " +
> this.layers.gemeenteNaam.title);
>trace("this.classes.class1.keyText is: " +
> this.classes.class1.keyText);
>}
> }
> 
> This traces:
> source is: null
> note is: null
> subTitle is: null
> copyright is: Geografiek, 2011
> mapType is: chorochromaat
> classes is: [object Object]
> key is: [object Object]
> layers is: [object Object]
> this.layers.gemeenteNaam.title is: gemeentenamen this.classes.class1.keyText
> is: Noord-Nederland
> 
>> From this I gather that all properties are actually created on their
> desired level (last 2 traced lines).
> But the function traceProperties() does not automatically catch all
> properties. At least not the properies inside the objects How do I check if
> an object has properties at all and how do I trace them?
> TIA
> Willem van den Goorbergh
> 
> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
> Geografiek is a Dutch, Utrecht-based map and chart design company.
> Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or
> cell phone: (+31)6-26372378 or by fax: (+31)302719687 snail mail:
> Hooghiemstraplein 89 3514 AX UTRECHT Visit our website at: www.geografiek.nl
> twitter: @wvdgoorbergh
> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
> 
> 
> 
> 
> 
> ___
> 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

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or cell 
phone: (+31)6-26372378
or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: www.geografiek.nl
twitter: @wvdgoorbergh
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=





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


Re: [Flashcoders] checking for properties AS3

2011-02-16 Thread Jens Struwe

Having an example XML could be pretty useful.

And, actually, I don't understand the problem. What should be the 
output? Please hand over all necessary info required to be able to help you.


Am 16.02.2011 12:43, schrieb Geografiek:

Hi list,
I posted this question a week ago on flash tiger, but never got an answer. So I 
try my luck here.

I create an object and dynamically assign properties to it, values from 
xml-nodes.
If an xml-node has child nodes the property assigned is an object and the 
values of the child nodes are assigned as properties to that object:

private function createProperties(node:XML, container:*):void {
 for each (var childNode:XML in node.*) {
 if(childNode.children().length() == 0) {
 container[childNode.localName()] = null;
 } else if(childNode.children().length() == 1) {
 container[childNode.localName()] = childNode.*;
 } else {
 container[childNode.localName()] = new Object();
 createProperties(childNode, container[childNode.localName()]);
 }
 }
}

Now I want to trace what properties are created with the following function:
private function traceProperties(object:Object):void {
 for (var prop:* in object) {
 trace(prop + " is: " + object[prop]);
 traceProperties(prop);
 }
 if(object.hasOwnProperty("layers")) {
 trace("this.layers.gemeenteNaam.title is: " + 
this.layers.gemeenteNaam.title);
 trace("this.classes.class1.keyText is: " + 
this.classes.class1.keyText);
 }
}

This traces:
source is: null
note is: null
subTitle is: null
copyright is: Geografiek, 2011
mapType is: chorochromaat
classes is: [object Object]
key is: [object Object]
layers is: [object Object]
this.layers.gemeenteNaam.title is: gemeentenamen
this.classes.class1.keyText is: Noord-Nederland


From this I gather that all properties are actually created on their desired 
level (last 2 traced lines).

But the function traceProperties() does not automatically catch all properties. 
At least not the properies inside the objects
How do I check if an object has properties at all and how do I trace them?
TIA
Willem van den Goorbergh

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or cell 
phone: (+31)6-26372378
or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: www.geografiek.nl
twitter: @wvdgoorbergh
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=





___
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] checking for properties AS3

2011-02-16 Thread Cor
Hi Willem,

Not sure, but what if you change this:
for each (var childNode:XML in node.*) {

into:
for each (var childNode:XML in node..*) {

Groeten,
Cor van Dooren
www.codobyte.com
--
 "There are only 10 types of people in the world:
   Those who understand binary and those who don't."

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Geografiek
Sent: woensdag 16 februari 2011 12:44
To: Flash Coders List
Subject: [Flashcoders] checking for properties AS3

Hi list,
I posted this question a week ago on flash tiger, but never got an answer.
So I try my luck here.

I create an object and dynamically assign properties to it, values from
xml-nodes.
If an xml-node has child nodes the property assigned is an object and the
values of the child nodes are assigned as properties to that object:

private function createProperties(node:XML, container:*):void {
for each (var childNode:XML in node.*) {
if(childNode.children().length() == 0) {
container[childNode.localName()] = null;
} else if(childNode.children().length() == 1) {
container[childNode.localName()] = childNode.*;
} else {
container[childNode.localName()] = new Object();
createProperties(childNode, container[childNode.localName()]);
}
}
}

Now I want to trace what properties are created with the following function:
private function traceProperties(object:Object):void {
for (var prop:* in object) {
trace(prop + " is: " + object[prop]);
traceProperties(prop);
}
if(object.hasOwnProperty("layers")) {
trace("this.layers.gemeenteNaam.title is: " +
this.layers.gemeenteNaam.title);
trace("this.classes.class1.keyText is: " +
this.classes.class1.keyText);
}
}

This traces:
source is: null
note is: null
subTitle is: null
copyright is: Geografiek, 2011
mapType is: chorochromaat
classes is: [object Object]
key is: [object Object]
layers is: [object Object]
this.layers.gemeenteNaam.title is: gemeentenamen this.classes.class1.keyText
is: Noord-Nederland

>From this I gather that all properties are actually created on their
desired level (last 2 traced lines).
But the function traceProperties() does not automatically catch all
properties. At least not the properies inside the objects How do I check if
an object has properties at all and how do I trace them?
TIA
Willem van den Goorbergh

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or
cell phone: (+31)6-26372378 or by fax: (+31)302719687 snail mail:
Hooghiemstraplein 89 3514 AX UTRECHT Visit our website at: www.geografiek.nl
twitter: @wvdgoorbergh
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=





___
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] checking for properties AS3

2011-02-16 Thread Geografiek
Hi list,
I posted this question a week ago on flash tiger, but never got an answer. So I 
try my luck here.

I create an object and dynamically assign properties to it, values from 
xml-nodes.
If an xml-node has child nodes the property assigned is an object and the 
values of the child nodes are assigned as properties to that object:

private function createProperties(node:XML, container:*):void {
for each (var childNode:XML in node.*) {
if(childNode.children().length() == 0) {
container[childNode.localName()] = null;
} else if(childNode.children().length() == 1) {
container[childNode.localName()] = childNode.*;
} else {
container[childNode.localName()] = new Object();
createProperties(childNode, container[childNode.localName()]);
}
}
}

Now I want to trace what properties are created with the following function:
private function traceProperties(object:Object):void {
for (var prop:* in object) {
trace(prop + " is: " + object[prop]);
traceProperties(prop);
}
if(object.hasOwnProperty("layers")) {
trace("this.layers.gemeenteNaam.title is: " + 
this.layers.gemeenteNaam.title);
trace("this.classes.class1.keyText is: " + this.classes.class1.keyText);
}
}

This traces:
source is: null
note is: null
subTitle is: null
copyright is: Geografiek, 2011
mapType is: chorochromaat
classes is: [object Object]
key is: [object Object]
layers is: [object Object]
this.layers.gemeenteNaam.title is: gemeentenamen
this.classes.class1.keyText is: Noord-Nederland

>From this I gather that all properties are actually created on their desired 
>level (last 2 traced lines).
But the function traceProperties() does not automatically catch all properties. 
At least not the properies inside the objects
How do I check if an object has properties at all and how do I trace them?
TIA
Willem van den Goorbergh

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or cell 
phone: (+31)6-26372378
or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: www.geografiek.nl
twitter: @wvdgoorbergh
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=





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