[Flashcoders] Help jsfl traceBitmap

2009-02-09 Thread Jiri

Hello,

i was wondering if someone can help me out with the following.
I have a the maintimeline with on it a movieclip. Inside this movieclip 
is a png, that I would like to trace as a bitmap.


I can't seem to target the png that is nested in the movieclip. If i 
understand correctly I will first need to get it the timeline of the png 
holder clip from the library and then select the frame. Here is my code 
which throws a selection: Argument number 1 is invalid.


var doc = fl.getDocumentDOM();
var library = doc.library;
var items = library.items.concat();

i = items.length;


while (i--)
{
var item = items[i];
if (item.itemType == 'bitmap')
{
var imageName = item.name.split('.')[0];
var image = doc.getTimeline().layers[0].frames[0].elements[0];
doc.selection = image
doc.traceBitmap(100, 100 , 'normal' , 'normal');
}
}

Hope someone can help!

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


[Flashcoders] UK freelance flash opportunities

2009-02-09 Thread Paul Steven
The economic downturn has finally taken its toll on my work load after many
years of keeping the wolves at bay.

If anyone can point me in the right direction of the best sites, agencies to
offer me assistance looking for new projects it would be much appreciated.

Cheers

Paul

http://www.mediakitchen.co.uk


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


Re: [Flashcoders] UK freelance flash opportunities

2009-02-09 Thread allandt bik-elliott (thefieldcomic.com)
i've had loads of work from neil clements at major players - try there

a

On Mon, Feb 9, 2009 at 9:22 AM, Paul Steven paul_ste...@btinternet.comwrote:

 The economic downturn has finally taken its toll on my work load after many
 years of keeping the wolves at bay.

 If anyone can point me in the right direction of the best sites, agencies
 to
 offer me assistance looking for new projects it would be much appreciated.

 Cheers

 Paul

 http://www.mediakitchen.co.uk


 ___
 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] Help jsfl traceBitmap

2009-02-09 Thread Muzak

This should work, but should probably build in a few more checks in the loop.
Like check if there's a bitmap in the currently editted movieclip in the 
specified frame.

What this does is:
- loop through the items in the library
- check if current item is a movieclip (not a bitmap as you did)
- if movieclip, select it and enter edit mode
- get the movieclip timeline and set the elements  in its first frame/first 
layer as document selection
// here is where you should check if the above selection contains a bitmap
- trace bitmap


var doc = fl.getDocumentDOM();
var library = doc.library;
var items = library.items.concat();

i = items.length;

while (i--) {
var item = items[i];
fl.trace(itemType:  + item.itemType);
if (item.itemType == 'movie clip') {
 library.selectItem(item);
 library.editItem();
 var timeline = item.timeline;
 fl.trace(- frameCount:  + timeline.frameCount);
 doc.selection = timeline.layers[0].frames[0].elements;
 doc.traceBitmap(100, 1, 'pixels', 'normal');
}
}
doc.exitEditMode();


regards,
Muzak

- Original Message - 
From: Jiri jiriheitla...@googlemail.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, February 09, 2009 9:47 AM
Subject: [Flashcoders] Help jsfl traceBitmap



Hello,

i was wondering if someone can help me out with the following.
I have a the maintimeline with on it a movieclip. Inside this movieclip 
is a png, that I would like to trace as a bitmap.


I can't seem to target the png that is nested in the movieclip. If i 
understand correctly I will first need to get it the timeline of the png 
holder clip from the library and then select the frame. Here is my code 
which throws a selection: Argument number 1 is invalid.


var doc = fl.getDocumentDOM();
var library = doc.library;
var items = library.items.concat();

i = items.length;


while (i--)
{
var item = items[i];
if (item.itemType == 'bitmap')
{
var imageName = item.name.split('.')[0];
var image = doc.getTimeline().layers[0].frames[0].elements[0];
doc.selection = image
doc.traceBitmap(100, 100 , 'normal' , 'normal');
}
}

Hope someone can help!

Jiri
___


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


[Flashcoders] Converting hex colour numbers back and forth

2009-02-09 Thread ali drongo
Hi there, I'm saving a bunch of colours as a string then using this string
later to colour objects in the same way.  Something is going wrong though as
the colours I am getting back are not the same as the ones I put in.
If anyone could point out where I'm going wrong I'd be really grateful, I've
googled this and and have checked the help files and as far as I can see
it's correct (though obviously it isn't!).

Here's my code, I've written comments next to the relevant lines:

/// in my coloured button class


//  1) colour is set on mouse click
private function clickHandler(e:MouseEvent):void
{
// passes hexValue from ColorPicker
colorThis(this.parent.parent[colorPick].hexValue);
}
//  2) color is stored in var
public function colorThis(c:String):void
{
//stores colour
currColor = Number(0x+c);
var newColorTransform:ColorTransform = this.transform.colorTransform;
newColorTransform.color = currColor;
this.transform.colorTransform = newColorTransform;
}



// application class
 //  3) stores colors in an array
private function collectColors():Array
{
colors_ar = new Array();
for ( var i:uint=1; i=totSprites; i++ ) {
//stores colour in array
colors_ar[i] = mainImage[s+i].currColor;
};
return colors_ar;
}

//  4) array is written to string and sent to php to be written to txt file

private function sendData(e:MouseEvent):void
{
showSending(true);
var variables:URLVariables = new URLVariables();
//stores all colours as a string
variables.colors = collectColors().toString();
var request:URLRequest = new URLRequest();
request.url = http://www..com/text/test.php;;
request.method = URLRequestMethod.POST;
request.data = variables;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, completeHandler);
try
{
loader.load(request);
}
catch (error:Error)
{
trace(Unable to load URL);
}
}


/   viewer class
//  5)

public function colorIn(o:Object):void
{
var colA:Array = o.Colors.split(,);
colA.splice(0,1);
for ( var i:uint=1; i=totSprites; i++ ) {
//calls the method in the coloured button class
mainImage[s+i].colorThis(colA[i]).toString(16);
};
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Getting attributes out of a node with : in it

2009-02-09 Thread Eric E. Dolecki
For example I have a node like so:

yweather:condition text=Partly Cloudy code=30 temp=34 date=Mon, 09
Feb 2009 12:56 pm EST/


How can I get into that node to pull attributes out? The : in the node
name is screwing my up at the moment.

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


[Flashcoders] Either an incredibly easy or incredibly difficult problem

2009-02-09 Thread Todd Kerpelman
Hey, coders!

I have a Sprite that consists of a polygon that I drew in Flash (using the
line tool) and saved into my Library.

Using ActionScript, is there any way to easily find the points of said
polygon? It seems like I oughta be able to dig up those line coordinates out
of my Sprite.graphics object, but I can't seem to find a way of doing it...

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


RE: [Flashcoders] Either an incredibly easy or incredibly difficult problem

2009-02-09 Thread Merrill, Jason
Might be possible, but I don't know of a way - Sprite.graphics is for
drawing graphics with code - not accessing manually created graphic
properties.


Jason Merrill

 Bank of  America   
Learning Performance Solutions Instructional Technology  Media   

Learn about the Adobe Flash platform for rich media experiences - join
the Bank of America Flash Platform Community 


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


Re: [Flashcoders] Either an incredibly easy or incredibly difficult problem

2009-02-09 Thread Mark Winterhalder
On Mon, Feb 9, 2009 at 7:47 PM, Todd Kerpelman t...@kerp.net wrote:
 Hey, coders!

 I have a Sprite that consists of a polygon that I drew in Flash (using the
 line tool) and saved into my Library.

 Using ActionScript, is there any way to easily find the points of said
 polygon? It seems like I oughta be able to dig up those line coordinates out
 of my Sprite.graphics object, but I can't seem to find a way of doing it...

You'll end up reading the coordinates from inside the Flash IDE or by
using a tool like Swfmill, but just for sports, and with the
limitation that it needs to be convex, this is the easiest way I can
think of:

Rotate it slowly. Use getRect to find out how far it extends towards,
say, the right, at a given rotation. When that distance decreases,
it's a point, and you can calculate its coordinate via the distance
and rotation. Repeat until you've made a full turn.

If it's not convex, I guess you'd need to trace it...

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


Re: [Flashcoders] Converting hex colour numbers back and forth

2009-02-09 Thread Mark Winterhalder
On Mon, Feb 9, 2009 at 6:26 PM, ali drongo alidro...@googlemail.com wrote:
 currColor = Number(0x+c);

I haven't looked into it in detail, but I think you would want to use
parseInt( 0x + c, 16 ) here.
If that doesn't fix it, try tracing the values throughout your
conversion and see where it breaks.

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


Re: [Flashcoders] Either an incredibly easy or incredibly difficult problem

2009-02-09 Thread Taka Kojima
I'd probably just determine the points ahead of time and recreate it using
AS...

Most likely, that would be less time consuming. That's my answer if this is
a practical question, if it's theoretical and you just want to know if it
can be done, I'm sure it can, but I'm not totally sure which method to use
to achieve the desired result.

- Taka

On Mon, Feb 9, 2009 at 11:56 AM, Mark Winterhalder mar...@gmail.com wrote:

 On Mon, Feb 9, 2009 at 7:47 PM, Todd Kerpelman t...@kerp.net wrote:
  Hey, coders!
 
  I have a Sprite that consists of a polygon that I drew in Flash (using
 the
  line tool) and saved into my Library.
 
  Using ActionScript, is there any way to easily find the points of said
  polygon? It seems like I oughta be able to dig up those line coordinates
 out
  of my Sprite.graphics object, but I can't seem to find a way of doing
 it...

 You'll end up reading the coordinates from inside the Flash IDE or by
 using a tool like Swfmill, but just for sports, and with the
 limitation that it needs to be convex, this is the easiest way I can
 think of:

 Rotate it slowly. Use getRect to find out how far it extends towards,
 say, the right, at a given rotation. When that distance decreases,
 it's a point, and you can calculate its coordinate via the distance
 and rotation. Repeat until you've made a full turn.

 If it's not convex, I guess you'd need to trace it...

 Mark
 ___
 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] Getting attributes out of a node with : in it

2009-02-09 Thread Eric E. Dolecki
Cheers - thanks ;)

On Mon, Feb 9, 2009 at 3:17 PM, Robert Leisle b...@headsprout.com wrote:

 Check out the Namespace class, as it applies to XML, in the Flash docs.
 There's also a good explanation in this tutorial by Lee Brimelow:
 http://gotoandlearn.com/play?id=65

 hth,
 Bob

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
 Sent: Monday, February 09, 2009 10:37 AM
 To: Flash Coders List
 Subject: [Flashcoders] Getting attributes out of a node with : in it

 For example I have a node like so:

 yweather:condition text=Partly Cloudy code=30 temp=34 date=Mon, 09
 Feb 2009 12:56 pm EST/


 How can I get into that node to pull attributes out? The : in the node
 name is screwing my up at the moment.

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




-- 
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Getting attributes out of a node with : in it

2009-02-09 Thread Robert Leisle
Check out the Namespace class, as it applies to XML, in the Flash docs.
There's also a good explanation in this tutorial by Lee Brimelow:
http://gotoandlearn.com/play?id=65

hth,
Bob

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
Sent: Monday, February 09, 2009 10:37 AM
To: Flash Coders List
Subject: [Flashcoders] Getting attributes out of a node with : in it

For example I have a node like so:

yweather:condition text=Partly Cloudy code=30 temp=34 date=Mon, 09
Feb 2009 12:56 pm EST/


How can I get into that node to pull attributes out? The : in the node
name is screwing my up at the moment.

Eric
___
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] Getting attributes out of a node with : in it

2009-02-09 Thread Taka Kojima
I take it this is from an rss feed?

Look into the Namespace class...

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Namespace.html

Unfortunately, you didn't paste the entire XML doc so I can't guide you
further.

- Taka

On Mon, Feb 9, 2009 at 10:36 AM, Eric E. Dolecki edole...@gmail.com wrote:

 For example I have a node like so:

 yweather:condition text=Partly Cloudy code=30 temp=34 date=Mon, 09
 Feb 2009 12:56 pm EST/


 How can I get into that node to pull attributes out? The : in the node
 name is screwing my up at the moment.

 Eric
 ___
 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] Getting attributes out of a node with : in it

2009-02-09 Thread Christoffer Enedahl
when you refer to the node write it like this: yweather::condition with 
double colons

HTH/Christoffer


Robert Leisle skrev:

Check out the Namespace class, as it applies to XML, in the Flash docs.
There's also a good explanation in this tutorial by Lee Brimelow:
http://gotoandlearn.com/play?id=65

hth,
Bob

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
Sent: Monday, February 09, 2009 10:37 AM
To: Flash Coders List
Subject: [Flashcoders] Getting attributes out of a node with : in it

For example I have a node like so:

yweather:condition text=Partly Cloudy code=30 temp=34 date=Mon, 09
Feb 2009 12:56 pm EST/


How can I get into that node to pull attributes out? The : in the node
name is screwing my up at the moment.

Eric
___
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] Either an incredibly easy or incredibly difficult problem

2009-02-09 Thread Anthony Pace
That is exactly what I was going to say, and I have been trying to find 
something online; yet, I have found nothing, so I just assume its not 
possible to do it programatically, outside of the flash ide using jsfl.


Now that I think of it, this could be somewhat useful.


Merrill, Jason wrote:

Might be possible, but I don't know of a way - Sprite.graphics is for
drawing graphics with code - not accessing manually created graphic
properties.


Jason Merrill

 Bank of  America   
Learning Performance Solutions Instructional Technology  Media   


Learn about the Adobe Flash platform for rich media experiences - join
the Bank of America Flash Platform Community 



___
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] Getting attributes out of a node with : in it

2009-02-09 Thread Taka Kojima
I just realized that the link I sent doesn't mention the namespace
operator, which is the main thing you need...

The following example uses the :: operator to identify XML properties
with specified namespaces:

var soap:Namespace = new Namespace(http://schemas.xmlsoap.org/wsdl/soap/;);
var w:Namespace = new Namespace(http://weather.example.org/forecast;);
var myXML:XML =
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 soap:Body
  w:forecast xmlns:w=http://weather.example.org/forecast;
   w:cityQuito/w:city
   w:countryEcuador/w:country
   date2006-01-14/date
  /w:forecast
  /soap:Body
/soap:Envelope;

trace(myXML.soap::Body.w::forecast.w::city); // Quito


so in your case, try doing...

trace(myXML.yweather::conditi...@text);

should work.

- Taka

On Mon, Feb 9, 2009 at 12:20 PM, Taka Kojima t...@gigafied.com wrote:
 I take it this is from an rss feed?

 Look into the Namespace class...

 http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Namespace.html

 Unfortunately, you didn't paste the entire XML doc so I can't guide you
 further.

 - Taka

 On Mon, Feb 9, 2009 at 10:36 AM, Eric E. Dolecki edole...@gmail.com wrote:

 For example I have a node like so:

 yweather:condition text=Partly Cloudy code=30 temp=34 date=Mon, 09
 Feb 2009 12:56 pm EST/


 How can I get into that node to pull attributes out? The : in the node
 name is screwing my up at the moment.

 Eric
 ___
 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] Getting attributes out of a node with : in it

2009-02-09 Thread Merrill, Jason
Use the namespace feature.  Something (if not exactly) like this:

var ywNS:Namespace = xml.namespace(yweather);

trace(myXml.ywNS::conditi...@text);
trace(myXml.ywNS::conditi...@code);
trace(myXml.ywNS::conditi...@temp);


Jason Merrill

 Bank of  America   
Learning Performance Solutions Instructional Technology  Media   

Learn about the Adobe Flash platform for rich media experiences - join the Bank 
of America Flash Platform Community 






-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Robert Leisle
Sent: Monday, February 09, 2009 3:17 PM
To: 'Flash Coders List'
Subject: RE: [Flashcoders] Getting attributes out of a node with : in it

Check out the Namespace class, as it applies to XML, in the Flash docs.
There's also a good explanation in this tutorial by Lee Brimelow:
http://gotoandlearn.com/play?id=65

hth,
Bob

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
Sent: Monday, February 09, 2009 10:37 AM
To: Flash Coders List
Subject: [Flashcoders] Getting attributes out of a node with : in it

For example I have a node like so:

yweather:condition text=Partly Cloudy code=30 temp=34 date=Mon, 09
Feb 2009 12:56 pm EST/


How can I get into that node to pull attributes out? The : in the node
name is screwing my up at the moment.

Eric
___
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] Converting hex colour numbers back and forth

2009-02-09 Thread Merrill, Jason
Courtesy Evan Mullins of Circlecube Studio:

//bitwise conversion of rgb color to a hex value
function rgb2hex(r, g, b):Number 
{
return(r16 | g8 | b);
}

//bitwise conversion of a hex color into rgb values
function hex2rgb (hex):Object
{
var red = hex16;
var greenBlue = hex-(red16)
var green = greenBlue8;
var blue = greenBlue - (green  8);
  //trace(r:  + red +  g:  + green +  b:  + blue);
return({r:red, g:green, b:blue});
}



Jason Merrill

 Bank of  America   
Learning Performance Solutions Instructional Technology  Media   

Learn about the Adobe Flash platform for rich media experiences - join
the Bank of America Flash Platform Community 






-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ali
drongo
Sent: Monday, February 09, 2009 12:26 PM
To: Flash Coders List
Subject: [Flashcoders] Converting hex colour numbers back and forth

Hi there, I'm saving a bunch of colours as a string then using this
string
later to colour objects in the same way.  Something is going wrong
though as
the colours I am getting back are not the same as the ones I put in.
If anyone could point out where I'm going wrong I'd be really grateful,
I've
googled this and and have checked the help files and as far as I can see
it's correct (though obviously it isn't!).

Here's my code, I've written comments next to the relevant lines:

/// in my coloured button class


//  1) colour is set on mouse click
private function clickHandler(e:MouseEvent):void
{
// passes hexValue from ColorPicker
colorThis(this.parent.parent[colorPick].hexValue);
}
//  2) color is stored in var
public function colorThis(c:String):void
{
//stores colour
currColor = Number(0x+c);
var newColorTransform:ColorTransform = this.transform.colorTransform;
newColorTransform.color = currColor;
this.transform.colorTransform = newColorTransform;
}



// application class
 //  3) stores colors in an array
private function collectColors():Array
{
colors_ar = new Array();
for ( var i:uint=1; i=totSprites; i++ ) {
//stores colour in array
colors_ar[i] = mainImage[s+i].currColor;
};
return colors_ar;
}

//  4) array is written to string and sent to php to be written to txt
file

private function sendData(e:MouseEvent):void
{
showSending(true);
var variables:URLVariables = new URLVariables();
//stores all colours as a string
variables.colors = collectColors().toString();
var request:URLRequest = new URLRequest();
request.url = http://www..com/text/test.php;;
request.method = URLRequestMethod.POST;
request.data = variables;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, completeHandler);
try
{
loader.load(request);
}
catch (error:Error)
{
trace(Unable to load URL);
}
}


/   viewer class
//  5)

public function colorIn(o:Object):void
{
var colA:Array = o.Colors.split(,);
colA.splice(0,1);
for ( var i:uint=1; i=totSprites; i++ ) {
//calls the method in the coloured button class
mainImage[s+i].colorThis(colA[i]).toString(16);
};
}
___
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] Getting attributes out of a node with : in it

2009-02-09 Thread Eric E. Dolecki
Ok, so in my XML loaded function I have this:
private function loadedXML( e:Event ):void
{

var myXML:XML = new XML( e.target.data );
var yweather:Namespace = new Namespace( 
http://weather.yahooapis.com/ns/rss/1.0; );
trace( myXML.channel.item.yweather::conditi...@temp );

}

I get nothing. I'm pretty sure my scope is correct. As long as the namespace
var name matches the tag I'm after, I should be able to get to it, correct?


On Mon, Feb 9, 2009 at 3:27 PM, Taka Kojima t...@gigafied.com wrote:

 I just realized that the link I sent doesn't mention the namespace
 operator, which is the main thing you need...

 The following example uses the :: operator to identify XML properties
 with specified namespaces:

 var soap:Namespace = new Namespace(http://schemas.xmlsoap.org/wsdl/soap/
 );
 var w:Namespace = new Namespace(http://weather.example.org/forecast;);
 var myXML:XML =
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 soap:Body
  w:forecast xmlns:w=http://weather.example.org/forecast;
   w:cityQuito/w:city
   w:countryEcuador/w:country
   date2006-01-14/date
  /w:forecast
  /soap:Body
/soap:Envelope;

 trace(myXML.soap::Body.w::forecast.w::city); // Quito


 so in your case, try doing...

 trace(myXML.yweather::conditi...@text);

 should work.

 - Taka

 On Mon, Feb 9, 2009 at 12:20 PM, Taka Kojima t...@gigafied.com wrote:
  I take it this is from an rss feed?
 
  Look into the Namespace class...
 
  http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Namespace.html
 
  Unfortunately, you didn't paste the entire XML doc so I can't guide you
  further.
 
  - Taka
 
  On Mon, Feb 9, 2009 at 10:36 AM, Eric E. Dolecki edole...@gmail.com
 wrote:
 
  For example I have a node like so:
 
  yweather:condition text=Partly Cloudy code=30 temp=34 date=Mon,
 09
  Feb 2009 12:56 pm EST/
 
 
  How can I get into that node to pull attributes out? The : in the node
  name is screwing my up at the moment.
 
  Eric
  ___
  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




-- 
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Getting attributes out of a node with : in it

2009-02-09 Thread Merrill, Jason
This should work:

private function loadedXML( e:Event ):void {
var myXML:XML = new XML( e.target.data ); 
var ywNS:Namespace = myXml.namespace(yweather);
trace( myXML.channel.item.ywNS::conditi...@temp );
}


Jason Merrill

 Bank of  America   
Learning Performance Solutions Instructional Technology  Media   

Learn about the Adobe Flash platform for rich media experiences - join the Bank 
of America Flash Platform Community 






-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
Sent: Monday, February 09, 2009 4:10 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Getting attributes out of a node with : in it

Ok, so in my XML loaded function I have this:
private function loadedXML( e:Event ):void
{

var myXML:XML = new XML( e.target.data );
var yweather:Namespace = new Namespace( 
http://weather.yahooapis.com/ns/rss/1.0; );
trace( myXML.channel.item.yweather::conditi...@temp );

}

I get nothing. I'm pretty sure my scope is correct. As long as the namespace
var name matches the tag I'm after, I should be able to get to it, correct?


On Mon, Feb 9, 2009 at 3:27 PM, Taka Kojima t...@gigafied.com wrote:

 I just realized that the link I sent doesn't mention the namespace
 operator, which is the main thing you need...

 The following example uses the :: operator to identify XML properties
 with specified namespaces:

 var soap:Namespace = new Namespace(http://schemas.xmlsoap.org/wsdl/soap/
 );
 var w:Namespace = new Namespace(http://weather.example.org/forecast;);
 var myXML:XML =
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 soap:Body
  w:forecast xmlns:w=http://weather.example.org/forecast;
   w:cityQuito/w:city
   w:countryEcuador/w:country
   date2006-01-14/date
  /w:forecast
  /soap:Body
/soap:Envelope;

 trace(myXML.soap::Body.w::forecast.w::city); // Quito


 so in your case, try doing...

 trace(myXML.yweather::conditi...@text);

 should work.

 - Taka

 On Mon, Feb 9, 2009 at 12:20 PM, Taka Kojima t...@gigafied.com wrote:
  I take it this is from an rss feed?
 
  Look into the Namespace class...
 
  http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Namespace.html
 
  Unfortunately, you didn't paste the entire XML doc so I can't guide you
  further.
 
  - Taka
 
  On Mon, Feb 9, 2009 at 10:36 AM, Eric E. Dolecki edole...@gmail.com
 wrote:
 
  For example I have a node like so:
 
  yweather:condition text=Partly Cloudy code=30 temp=34 date=Mon,
 09
  Feb 2009 12:56 pm EST/
 
 
  How can I get into that node to pull attributes out? The : in the node
  name is screwing my up at the moment.
 
  Eric
  ___
  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




-- 
http://ericd.net
Interactive design and development
___
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] Getting attributes out of a node with : in it

2009-02-09 Thread Eric E. Dolecki
Thanks all - I had it correct, but the Yahoo! specs in regards to sample XML
fed back was wrong... and thus my namespace URI was wrong - so I never got
anything. Thanks for your help - working great now.

On Mon, Feb 9, 2009 at 4:19 PM, Merrill, Jason 
jason.merr...@bankofamerica.com wrote:

 This should work:

 private function loadedXML( e:Event ):void {
var myXML:XML = new XML( e.target.data );
 var ywNS:Namespace = myXml.namespace(yweather);
trace( myXML.channel.item.ywNS::conditi...@temp );
 }


 Jason Merrill

  Bank of  America
 Learning Performance Solutions Instructional Technology  Media

 Learn about the Adobe Flash platform for rich media experiences - join the
 Bank of America Flash Platform Community






 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
 Sent: Monday, February 09, 2009 4:10 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Getting attributes out of a node with : in it

 Ok, so in my XML loaded function I have this:
 private function loadedXML( e:Event ):void
 {

 var myXML:XML = new XML( e.target.data );
 var yweather:Namespace = new Namespace( 
 http://weather.yahooapis.com/ns/rss/1.0; );
 trace( myXML.channel.item.yweather::conditi...@temp );

 }

 I get nothing. I'm pretty sure my scope is correct. As long as the
 namespace
 var name matches the tag I'm after, I should be able to get to it, correct?


 On Mon, Feb 9, 2009 at 3:27 PM, Taka Kojima t...@gigafied.com wrote:

  I just realized that the link I sent doesn't mention the namespace
  operator, which is the main thing you need...
 
  The following example uses the :: operator to identify XML properties
  with specified namespaces:
 
  var soap:Namespace = new Namespace(
 http://schemas.xmlsoap.org/wsdl/soap/
  );
  var w:Namespace = new Namespace(http://weather.example.org/forecast;);
  var myXML:XML =
 soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
  soap:Body
   w:forecast xmlns:w=http://weather.example.org/forecast;
w:cityQuito/w:city
w:countryEcuador/w:country
date2006-01-14/date
   /w:forecast
   /soap:Body
 /soap:Envelope;
 
  trace(myXML.soap::Body.w::forecast.w::city); // Quito
 
 
  so in your case, try doing...
 
  trace(myXML.yweather::conditi...@text);
 
  should work.
 
  - Taka
 
  On Mon, Feb 9, 2009 at 12:20 PM, Taka Kojima t...@gigafied.com wrote:
   I take it this is from an rss feed?
  
   Look into the Namespace class...
  
  
 http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Namespace.html
  
   Unfortunately, you didn't paste the entire XML doc so I can't guide you
   further.
  
   - Taka
  
   On Mon, Feb 9, 2009 at 10:36 AM, Eric E. Dolecki edole...@gmail.com
  wrote:
  
   For example I have a node like so:
  
   yweather:condition text=Partly Cloudy code=30 temp=34
 date=Mon,
  09
   Feb 2009 12:56 pm EST/
  
  
   How can I get into that node to pull attributes out? The : in the
 node
   name is screwing my up at the moment.
  
   Eric
   ___
   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
 



 --
 http://ericd.net
 Interactive design and development
 ___
 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




-- 
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Flash Lite

2009-02-09 Thread ACE Flash
Hey There,
Does anybody use the Flash Lite? I'd like to know what's difference for
Flash Lite 1 , 2, 3 ? or run data-driven application with Flash Lite 3?

Is there any articles I can find about Flash Lite?

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