Re: [Flashcoders] Loading string data in a file from a server

2009-04-22 Thread Sidney de Koning
No i cant use XML since eventually it will be a PLS file (Winamp  
Shoutcast), I wrote a library that parses a PLS file (Playlist file  
from Winamp Shoutcast server) (http://code.google.com/p/as3plsreader/)  
this all works fine from with AIR, IF I have the file already saved to  
local disk.


So my final test is to directly load the PLS from the shoutcast server.
That why i need to convert the event.target.data to a File... Cant i do:

var f:File = new File(event.target.data) ?

Do you have any other suggestion on how to do this?

Greets Sid


On Apr 21, 2009, at 11:58 PM, Muzak wrote:


And when you trace out you do get the contents of the file?


Yup, I saw file content in debug window.


If it does work, my question becomes something different;
How do i convert the loaded in data (one big string) to a File  
object ?


Use xml instead of text?


- Can i add data to a File Object?
- Can i create a new temporary File Object and and string data to it?


Nope and nope.
The data property of a File object is read only. Check the docs.
You typically use a File object in combination with a FileStream  
instance to read/write to disk.

http://livedocs.adobe.com/flex/3/langref/flash/filesystem/File.html
http://livedocs.adobe.com/flex/3/langref/flash/filesystem/FileStream.html


I save it in memory and pass it through to the rest.


Depends on what the rest is, but you can pass a File object  
around, just like any other object.


regards,
Muzak

- Original Message - From: Sidney de Koning sid...@funky-monkey.nl 


To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Tuesday, April 21, 2009 4:49 PM
Subject: Re: [Flashcoders] Loading string data in a file from a server



Hi Muzak,
And when you trace out you do get the contents of the file?
Sid


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


Sidney de Koning - be a geek, in rockstar style!
Flash / AIR Developer @ www.funky-monkey.nl
Technical Writer @ www.insideria.com

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


Re: [Flashcoders] Loading string data in a file from a server

2009-04-22 Thread Karl DeSaulniers
Just a thought, but if it works when saved locally, could you maybe  
save it as a cookie on the users computer?

That may be a nice shortcut, since its just a playlist.

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com

On Apr 22, 2009, at 2:44 AM, Sidney de Koning wrote:

No i cant use XML since eventually it will be a PLS file (Winamp  
Shoutcast), I wrote a library that parses a PLS file (Playlist file  
from Winamp Shoutcast server) (http://code.google.com/p/ 
as3plsreader/) this all works fine from with AIR, IF I have the  
file already saved to local disk.


So my final test is to directly load the PLS from the shoutcast  
server.
That why i need to convert the event.target.data to a File... Cant  
i do:


var f:File = new File(event.target.data) ?

Do you have any other suggestion on how to do this?

Greets Sid


On Apr 21, 2009, at 11:58 PM, Muzak wrote:


And when you trace out you do get the contents of the file?


Yup, I saw file content in debug window.


If it does work, my question becomes something different;
How do i convert the loaded in data (one big string) to a File  
object ?


Use xml instead of text?


- Can i add data to a File Object?
- Can i create a new temporary File Object and and string data to  
it?


Nope and nope.
The data property of a File object is read only. Check the docs.
You typically use a File object in combination with a FileStream  
instance to read/write to disk.

http://livedocs.adobe.com/flex/3/langref/flash/filesystem/File.html
http://livedocs.adobe.com/flex/3/langref/flash/filesystem/ 
FileStream.html



I save it in memory and pass it through to the rest.


Depends on what the rest is, but you can pass a File object  
around, just like any other object.


regards,
Muzak

- Original Message - From: Sidney de Koning  
sid...@funky-monkey.nl

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Tuesday, April 21, 2009 4:49 PM
Subject: Re: [Flashcoders] Loading string data in a file from a  
server




Hi Muzak,
And when you trace out you do get the contents of the file?
Sid


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


Sidney de Koning - be a geek, in rockstar style!
Flash / AIR Developer @ www.funky-monkey.nl
Technical Writer @ www.insideria.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] link bar frustrating question

2009-04-22 Thread Glen Pike

Hi,

   I think Sprite / MovieClip may have a mouseChildren property which 
you can set to true / false, which I vaguely remember helped me before.  
Problem is you won't get any further mouse events from it unless you 
re-enable.


   Or, the other option is to remove the event listener for rollover / 
rollout when the button is clicked / becomes the current link.


   Hope this helps?

   Glen

Omar Fouad wrote:

Thanks Dave but No It does not change anything same problem.

On Tue, Apr 21, 2009 at 7:38 PM, Dave Watts dwa...@figleaf.com wrote:

  

this is a silly problem that, because it is silly, makes me nervous and
frustrate at the same time.

I've got a class (extends Sprite) that has embedded some MovieClips.
  

Those


MCs are actually containing textboxes with the name of the sections.

for each MC

MC.addEventListener(MouseEvent.ROLL_OUT, onRollOut);
MC.addEventListener(MouseEvent.ROLL_OVER, onRollOver);

private function onRollOut(e:MouseEvent):void {
 //change colors here of e.currentTarget

}

private function onRollOver(e:MouseEvent):void {
 //change colors here of e.currentTarget

}

In the Main Class I am adding the above class to the displayList and I
  

set


Click Listeners for each of its children

var CurrentLink:Sprite // assume it holds a reference of a link

var linkbar:LinkBar = new LinkBar();
linkBar.link1.addEventListener(MouseEvent.CLICK, onClick);

private function onClick(e:MouseEvent):void {
   e.currentTarget.mouseEnabled = false;
   CurrentLink.mouseEnabled = true;
   CurrentLink = e.currentTarget;

}

The link clicked is now disabled but there is a little problem, the
CurrentLink still listens for RollOut events as its color change when i
  

take


the mouse off it. I think it shouldn't because I am setting its
  

mouseEnabled


to false.
  

I think that, for every rollover, there has to be a corresponding
rollout before you can effectively disable the event listener.

http://www.actionscript.org/forums/showthread.php3?t=157859

I could be wrong about this, and would welcome correction if that's the
case!

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

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

___
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] link bar frustrating question

2009-04-22 Thread Adrian Ionut Beschea
hi, 

if changing the text color on rollover is all you need you can set a hover css 
style for those textfields.
no need to listen for rollover

--- On Wed, 4/22/09, Glen Pike g...@engineeredarts.co.uk wrote:
From: Glen Pike g...@engineeredarts.co.uk
Subject: Re: [Flashcoders] link bar frustrating question
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Date: Wednesday, April 22, 2009, 11:49 AM

Hi,

I think Sprite / MovieClip may have a mouseChildren property
which 
you can set to true / false, which I vaguely remember helped me before.  
Problem is you won't get any further mouse events from it unless you 
re-enable.

Or, the other option is to remove the event listener for rollover / 
rollout when the button is clicked / becomes the current link.

Hope this helps?

Glen

Omar Fouad wrote:
 Thanks Dave but No It does not change anything same problem.

 On Tue, Apr 21, 2009 at 7:38 PM, Dave Watts dwa...@figleaf.com
wrote:

   
 this is a silly problem that, because it is silly, makes me
nervous and
 frustrate at the same time.

 I've got a class (extends Sprite) that has embedded some
MovieClips.
   
 Those
 
 MCs are actually containing textboxes with the name of the
sections.

 for each MC

 MC.addEventListener(MouseEvent.ROLL_OUT, onRollOut);
 MC.addEventListener(MouseEvent.ROLL_OVER, onRollOver);

 private function onRollOut(e:MouseEvent):void {
  //change colors here of e.currentTarget

 }

 private function onRollOver(e:MouseEvent):void {
  //change colors here of e.currentTarget

 }

 In the Main Class I am adding the above class to the displayList
and I
   
 set
 
 Click Listeners for each of its children

 var CurrentLink:Sprite // assume it holds a reference of a link

 var linkbar:LinkBar = new LinkBar();
 linkBar.link1.addEventListener(MouseEvent.CLICK, onClick);

 private function onClick(e:MouseEvent):void {
e.currentTarget.mouseEnabled = false;
CurrentLink.mouseEnabled = true;
CurrentLink = e.currentTarget;

 }

 The link clicked is now disabled but there is a little problem,
the
 CurrentLink still listens for RollOut events as its color change
when i
   
 take
 
 the mouse off it. I think it shouldn't because I am setting
its
   
 mouseEnabled
 
 to false.
   
 I think that, for every rollover, there has to be a corresponding
 rollout before you can effectively disable the event listener.

 http://www.actionscript.org/forums/showthread.php3?t=157859

 I could be wrong about this, and would welcome correction if
that's the
 case!

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

 Fig Leaf Software provides the highest caliber vendor-authorized
 instruction at our training centers in Washington DC, Atlanta,
 Chicago, Baltimore, Northern Virginia, or on-site at your location.
 Visit http://training.figleaf.com/ for more information!

 ___
 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] Loading string data in a file from a server

2009-04-22 Thread Sidney de Koning

Thanks for the tip, i'll try this out.

Thanks, Sid


On Apr 22, 2009, at 10:36 AM, Karl DeSaulniers wrote:

Just a thought, but if it works when saved locally, could you maybe  
save it as a cookie on the users computer?

That may be a nice shortcut, since its just a playlist.

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com

On Apr 22, 2009, at 2:44 AM, Sidney de Koning wrote:

No i cant use XML since eventually it will be a PLS file (Winamp  
Shoutcast), I wrote a library that parses a PLS file (Playlist file  
from Winamp Shoutcast server) (http://code.google.com/p/ 
as3plsreader/) this all works fine from with AIR, IF I have the  
file already saved to local disk.


So my final test is to directly load the PLS from the shoutcast  
server.
That why i need to convert the event.target.data to a File... Cant  
i do:


var f:File = new File(event.target.data) ?

Do you have any other suggestion on how to do this?

Greets Sid


On Apr 21, 2009, at 11:58 PM, Muzak wrote:


And when you trace out you do get the contents of the file?


Yup, I saw file content in debug window.


If it does work, my question becomes something different;
How do i convert the loaded in data (one big string) to a File  
object ?


Use xml instead of text?


- Can i add data to a File Object?
- Can i create a new temporary File Object and and string data to  
it?


Nope and nope.
The data property of a File object is read only. Check the docs.
You typically use a File object in combination with a FileStream  
instance to read/write to disk.

http://livedocs.adobe.com/flex/3/langref/flash/filesystem/File.html
http://livedocs.adobe.com/flex/3/langref/flash/filesystem/FileStream.html


I save it in memory and pass it through to the rest.


Depends on what the rest is, but you can pass a File object  
around, just like any other object.


regards,
Muzak

- Original Message - From: Sidney de Koning sid...@funky-monkey.nl 


To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Tuesday, April 21, 2009 4:49 PM
Subject: Re: [Flashcoders] Loading string data in a file from a  
server




Hi Muzak,
And when you trace out you do get the contents of the file?
Sid


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


Sidney de Koning - be a geek, in rockstar style!
Flash / AIR Developer @ www.funky-monkey.nl
Technical Writer @ www.insideria.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


Sidney de Koning - be a geek, in rockstar style!
Flash / AIR Developer @ www.funky-monkey.nl
Technical Writer @ www.insideria.com

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


[Flashcoders] Feasibility of xml file for high score data storage

2009-04-22 Thread Paul Steven
I was considering using an xml file to store high score data for a game. It
is quite possible that this game will have a significant amount of traffic
(certainly in the first few days after launch) and I am now wondering if an
xml file would be suitable. I am not sure what happens in the scenario where
multiple players want to update the highscore at the same time - they will
all need to write to the file. I assume this is the same scenario with a
database but think perhaps updating a database is more efficient.

Anyone care to offer any insight into whether an xml file would be suitable
or not? 

Thanks

Paul

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


Re: [Flashcoders] Feasibility of xml file for high score data storage

2009-04-22 Thread Ian Thomas
Go for a database. Access by multiple users is what they are designed
for. Don't make life hard for yourself. :-)

Ian

On Wed, Apr 22, 2009 at 11:57 AM, Paul Steven
paul_ste...@btinternet.com wrote:
 I was considering using an xml file to store high score data for a game. It
 is quite possible that this game will have a significant amount of traffic
 (certainly in the first few days after launch) and I am now wondering if an
 xml file would be suitable. I am not sure what happens in the scenario where
 multiple players want to update the highscore at the same time - they will
 all need to write to the file. I assume this is the same scenario with a
 database but think perhaps updating a database is more efficient.

 Anyone care to offer any insight into whether an xml file would be suitable
 or not?

 Thanks

 Paul

 ___
 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] link bar frustrating question

2009-04-22 Thread Matt S.
What if the rollOut function looks like:


private function onRollOut(e:MouseEvent):void {

 if(CurrentLink != e.currentTarget){
  //change colors here of e.currentTarget
 }

}

that way it will only change color back if its not currently the CurrentLink.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Feasibility of xml file for high score data storage

2009-04-22 Thread Glen Pike

Hi,

Forgot to mention - look at Jobe Makar's Flash MX Game Programming 
Demystified book / examples - he did a high score system in ASP that 
is quite nice and simple. If you are fairly fluent, it should be easy to 
port to PHP or other languages.


Glen

Paul Steven wrote:

I was considering using an xml file to store high score data for a game. It
is quite possible that this game will have a significant amount of traffic
(certainly in the first few days after launch) and I am now wondering if an
xml file would be suitable. I am not sure what happens in the scenario where
multiple players want to update the highscore at the same time - they will
all need to write to the file. I assume this is the same scenario with a
database but think perhaps updating a database is more efficient.

Anyone care to offer any insight into whether an xml file would be suitable
or not? 


Thanks

Paul

___
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] Feasibility of xml file for high score data storage

2009-04-22 Thread Glen Pike

Not working for Cornwall County Council by any chance??? :)

Paul Steven wrote:

Thanks Glen and Ian

Yes I am currently using a mysql database while the high scores are hosted
on my site. The game is for a rather large organisation so it is not the
easiest task in the world getting a database set up at their end. The
mention of flash alone was enough to cause major panic so you can imagine
the fear when I mentioned the need to upload php files to their server:)

Cheers

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
Sent: 22 April 2009 12:15
To: Flash Coders List
Subject: Re: [Flashcoders] Feasibility of xml file for high score data
storage

I am guessing that any server side code to update the XML file will rely 
on the server to lock files, etc. 

Databases are often optimised to allow for multiple clients to update, 
but most file based commands will lock the file preventing access by 
other clients so if your code throws a wobbly rather than waiting, 
that could be a problem...


Saying that, you could look at using SQLLite for example - this uses a 
file based database, but your SQLLite engine will handle all of the 
access - a lot of PHP installations come with this nowadays and ASP code 
also uses ADOBC to connect to Access database files so you will have a 
similar system.


The upshot is that using a server side database engine will make life 
easier because they will deal with problems like concurrent connections 
for you :)


Glen

Paul Steven wrote:
  

I was considering using an xml file to store high score data for a game.


It
  

is quite possible that this game will have a significant amount of traffic
(certainly in the first few days after launch) and I am now wondering if


an
  

xml file would be suitable. I am not sure what happens in the scenario


where
  

multiple players want to update the highscore at the same time - they will
all need to write to the file. I assume this is the same scenario with a
database but think perhaps updating a database is more efficient.

Anyone care to offer any insight into whether an xml file would be


suitable
  
or not? 


Thanks

Paul

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


  



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

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


  


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


RE: [Flashcoders] Feasibility of xml file for high score data storage

2009-04-22 Thread Paul Steven
Thanks Glen and Ian

Yes I am currently using a mysql database while the high scores are hosted
on my site. The game is for a rather large organisation so it is not the
easiest task in the world getting a database set up at their end. The
mention of flash alone was enough to cause major panic so you can imagine
the fear when I mentioned the need to upload php files to their server:)

Cheers

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
Sent: 22 April 2009 12:15
To: Flash Coders List
Subject: Re: [Flashcoders] Feasibility of xml file for high score data
storage

I am guessing that any server side code to update the XML file will rely 
on the server to lock files, etc. 

Databases are often optimised to allow for multiple clients to update, 
but most file based commands will lock the file preventing access by 
other clients so if your code throws a wobbly rather than waiting, 
that could be a problem...

Saying that, you could look at using SQLLite for example - this uses a 
file based database, but your SQLLite engine will handle all of the 
access - a lot of PHP installations come with this nowadays and ASP code 
also uses ADOBC to connect to Access database files so you will have a 
similar system.

The upshot is that using a server side database engine will make life 
easier because they will deal with problems like concurrent connections 
for you :)

Glen

Paul Steven wrote:
 I was considering using an xml file to store high score data for a game.
It
 is quite possible that this game will have a significant amount of traffic
 (certainly in the first few days after launch) and I am now wondering if
an
 xml file would be suitable. I am not sure what happens in the scenario
where
 multiple players want to update the highscore at the same time - they will
 all need to write to the file. I assume this is the same scenario with a
 database but think perhaps updating a database is more efficient.

 Anyone care to offer any insight into whether an xml file would be
suitable
 or not? 

 Thanks

 Paul

 ___
 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] Feasibility of xml file for high score data storage

2009-04-22 Thread Glen Pike
I am guessing that any server side code to update the XML file will rely 
on the server to lock files, etc. 

Databases are often optimised to allow for multiple clients to update, 
but most file based commands will lock the file preventing access by 
other clients so if your code throws a wobbly rather than waiting, 
that could be a problem...


Saying that, you could look at using SQLLite for example - this uses a 
file based database, but your SQLLite engine will handle all of the 
access - a lot of PHP installations come with this nowadays and ASP code 
also uses ADOBC to connect to Access database files so you will have a 
similar system.


The upshot is that using a server side database engine will make life 
easier because they will deal with problems like concurrent connections 
for you :)


Glen

Paul Steven wrote:

I was considering using an xml file to store high score data for a game. It
is quite possible that this game will have a significant amount of traffic
(certainly in the first few days after launch) and I am now wondering if an
xml file would be suitable. I am not sure what happens in the scenario where
multiple players want to update the highscore at the same time - they will
all need to write to the file. I assume this is the same scenario with a
database but think perhaps updating a database is more efficient.

Anyone care to offer any insight into whether an xml file would be suitable
or not? 


Thanks

Paul

___
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] Loading string data in a file from a server

2009-04-22 Thread Muzak

Well it depends on what you're trying to do with the loaded data.
If all you want is to load it and write to disk, then the format doesn't really 
matter.

As mentioned earlier, to write the loaded data to disk you use a combination of 
a File instance and a FileStream instance.
Should be examples of that in the docs.

http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e4a.html

The following will load the data, when loaded, ask where to save it, and then 
write that data to the file you selected.

  private var plsData:String;

  private function appInit():void {
   trace(Application ::: appInit);
   var plsURL:String = 
http://www.funky-monkey.nl/air/stringtest/serveFile.php;;
   var plsReq:URLRequest = new URLRequest( plsURL );
   var plsLoader:URLLoader = new URLLoader( plsReq );
   plsLoader.addEventListener( Event.COMPLETE , plsLoaded );
  }
  
  private function plsLoaded(evt:Event):void {

   trace(Application ::: plsLoaded);
   var value:String = plsData = evt.currentTarget.data;
   trace(value);
   var f:File = new File();
   f.addEventListener(Event.SELECT, fileSelectHandler);
   f.browseForSave(Save Data);
  }
  
  private function fileSelectHandler(evt:Event):void {

   trace(Application ::: fileSelectHandler);
   var f:File = evt.currentTarget as File;
   trace(- nativePath: , f.nativePath);
   // create filestream, open it and write data to file
   var fs:FileStream = new FileStream();
   fs.open(f, FileMode.WRITE);
   fs.writeUTFBytes(plsData);
   fs.close();
  }


- Original Message - 
From: Sidney de Koning sid...@funky-monkey.nl

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, April 22, 2009 9:44 AM
Subject: Re: [Flashcoders] Loading string data in a file from a server


No i cant use XML since eventually it will be a PLS file (Winamp  
Shoutcast), I wrote a library that parses a PLS file (Playlist file  
from Winamp Shoutcast server) (http://code.google.com/p/as3plsreader/)  
this all works fine from with AIR, IF I have the file already saved to  
local disk.


So my final test is to directly load the PLS from the shoutcast server.
That why i need to convert the event.target.data to a File... Cant i do:

var f:File = new File(event.target.data) ?

Do you have any other suggestion on how to do this?

Greets Sid




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


Re: [Flashcoders] Feasibility of xml file for high score data storage

2009-04-22 Thread Anthony Pace

Hello Paul,

Making good use of a que would be required for writing to the file 
without errors, so a database is the best and easiest way; as well, for 
high scores, you might want to use a public private key system for 
preventing xss exploits, as anyone that knows how to intercept and edit 
the get or post data will be able to screw with the request to the 
server, and you could end up with a hundred people having the best score 
that the column in the DB will allow.


Take care,
Anthony

Glen Pike wrote:

Not working for Cornwall County Council by any chance??? :)

Paul Steven wrote:

Thanks Glen and Ian

Yes I am currently using a mysql database while the high scores are 
hosted

on my site. The game is for a rather large organisation so it is not the
easiest task in the world getting a database set up at their end. The
mention of flash alone was enough to cause major panic so you can 
imagine

the fear when I mentioned the need to upload php files to their server:)

Cheers

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen 
Pike

Sent: 22 April 2009 12:15
To: Flash Coders List
Subject: Re: [Flashcoders] Feasibility of xml file for high score data
storage

I am guessing that any server side code to update the XML file will 
rely on the server to lock files, etc.
Databases are often optimised to allow for multiple clients to 
update, but most file based commands will lock the file preventing 
access by other clients so if your code throws a wobbly rather than 
waiting, that could be a problem...


Saying that, you could look at using SQLLite for example - this uses 
a file based database, but your SQLLite engine will handle all of 
the access - a lot of PHP installations come with this nowadays and 
ASP code also uses ADOBC to connect to Access database files so you 
will have a similar system.


The upshot is that using a server side database engine will make life 
easier because they will deal with problems like concurrent 
connections for you :)


Glen

Paul Steven wrote:
 
I was considering using an xml file to store high score data for a 
game.


It
 
is quite possible that this game will have a significant amount of 
traffic
(certainly in the first few days after launch) and I am now 
wondering if


an
 

xml file would be suitable. I am not sure what happens in the scenario


where
 
multiple players want to update the highscore at the same time - 
they will
all need to write to the file. I assume this is the same scenario 
with a

database but think perhaps updating a database is more efficient.

Anyone care to offer any insight into whether an xml file would be


suitable
 

or not?
Thanks

Paul

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


  


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

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


  


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


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


RE: [Flashcoders] Feasibility of xml file for high score data storage

2009-04-22 Thread Merrill, Jason
 The game is for a rather large organization so it is not the
easiest task in the world getting a database set up at their end. The

To do any writing to XML or to a database, server side scripts will need
to be used though (i.e. PHP, C#.NET, ColdFusion, ASP).  What kind of
server side technology is available to you?


Jason Merrill 

Bank of  America   Global Learning 
Shared Services Solutions Development 

Monthly meetings on 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] Loading string data in a file from a server

2009-04-22 Thread Sidney de Koning

Hi Muzak,

This is not exactly what i want to do but it comes close (and i cant  
test right now since i'm at work)
The whole 'prompt user for saving a file' i want to avoid, but the  
below code looks like what i wan to do:



  var f:File = evt.currentTarget as File;
  trace(- nativePath: , f.nativePath);
  // create filestream, open it and write data to file
  var fs:FileStream = new FileStream();
  fs.open(f, FileMode.WRITE);
  fs.writeUTFBytes(plsData);
  fs.close();


Thanks for the help, will let you know if it worked.

Sid


On Apr 22, 2009, at 2:32 PM, Muzak wrote:


Well it depends on what you're trying to do with the loaded data.
If all you want is to load it and write to disk, then the format  
doesn't really matter.


As mentioned earlier, to write the loaded data to disk you use a  
combination of a File instance and a FileStream instance.

Should be examples of that in the docs.

http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e4a.html

The following will load the data, when loaded, ask where to save it,  
and then write that data to the file you selected.


 private var plsData:String;

 private function appInit():void {
  trace(Application ::: appInit);
  var plsURL:String = http://www.funky-monkey.nl/air/stringtest/serveFile.php 
;

  var plsReq:URLRequest = new URLRequest( plsURL );
  var plsLoader:URLLoader = new URLLoader( plsReq );
  plsLoader.addEventListener( Event.COMPLETE , plsLoaded );
 }
   private function plsLoaded(evt:Event):void {
  trace(Application ::: plsLoaded);
  var value:String = plsData = evt.currentTarget.data;
  trace(value);
  var f:File = new File();
  f.addEventListener(Event.SELECT, fileSelectHandler);
  f.browseForSave(Save Data);
 }
   private function fileSelectHandler(evt:Event):void {
  trace(Application ::: fileSelectHandler);
  var f:File = evt.currentTarget as File;
  trace(- nativePath: , f.nativePath);
  // create filestream, open it and write data to file
  var fs:FileStream = new FileStream();
  fs.open(f, FileMode.WRITE);
  fs.writeUTFBytes(plsData);
  fs.close();
 }


- Original Message - From: Sidney de Koning sid...@funky-monkey.nl 


To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, April 22, 2009 9:44 AM
Subject: Re: [Flashcoders] Loading string data in a file from a server


No i cant use XML since eventually it will be a PLS file (Winamp   
Shoutcast), I wrote a library that parses a PLS file (Playlist  
file  from Winamp Shoutcast server) (http://code.google.com/p/as3plsreader/ 
)  this all works fine from with AIR, IF I have the file already  
saved to  local disk.
So my final test is to directly load the PLS from the shoutcast  
server.
That why i need to convert the event.target.data to a File... Cant  
i do:

var f:File = new File(event.target.data) ?
Do you have any other suggestion on how to do this?
Greets Sid


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


Sidney de Koning - be a geek, in rockstar style!
Flash / AIR Developer @ www.funky-monkey.nl
Technical Writer @ www.insideria.com

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


[Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Fabio Pinatti
Hello coders,

A question I was wondering here. A client of mine has a website built with
as2. And I explained him I work now with as3, but he asked what the real
benefits for him, to convert his project to as3.

I would like to have some good arguments, but I can find more benefits for
me, as developer, than for the client.

I would like to know your thoughts and advices about that.

Thanks

-- 
Fabio Pinatti
:: web.developer
 www.pinatti.com.br
:: 19. 9184.3745 / 3342.1130
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Feasibility of xml file for high score data storage

2009-04-22 Thread Paul Steven
Jason, as far as I am aware PHP is my only option. I am comfortable to write
the required PHP for both database and xml solutions.

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill,
Jason
Sent: 22 April 2009 14:21
To: Flash Coders List
Subject: RE: [Flashcoders] Feasibility of xml file for high score data
storage

 The game is for a rather large organization so it is not the
easiest task in the world getting a database set up at their end. The

To do any writing to XML or to a database, server side scripts will need
to be used though (i.e. PHP, C#.NET, ColdFusion, ASP).  What kind of
server side technology is available to you?


Jason Merrill 

Bank of  America   Global Learning 
Shared Services Solutions Development 

Monthly meetings on 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] Feasibility of xml file for high score data storage

2009-04-22 Thread Paul Steven
Thanks for the reply Anthony.

Can you elaborate on the public private key system and what this entails? I
have not heard that term before. 

Thanks

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Anthony Pace
Sent: 22 April 2009 14:25
To: Flash Coders List
Subject: Re: [Flashcoders] Feasibility of xml file for high score data
storage

Hello Paul,

Making good use of a que would be required for writing to the file 
without errors, so a database is the best and easiest way; as well, for 
high scores, you might want to use a public private key system for 
preventing xss exploits, as anyone that knows how to intercept and edit 
the get or post data will be able to screw with the request to the 
server, and you could end up with a hundred people having the best score 
that the column in the DB will allow.

Take care,
Anthony

Glen Pike wrote:
 Not working for Cornwall County Council by any chance??? :)

 Paul Steven wrote:
 Thanks Glen and Ian

 Yes I am currently using a mysql database while the high scores are 
 hosted
 on my site. The game is for a rather large organisation so it is not the
 easiest task in the world getting a database set up at their end. The
 mention of flash alone was enough to cause major panic so you can 
 imagine
 the fear when I mentioned the need to upload php files to their server:)

 Cheers

 Paul

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen 
 Pike
 Sent: 22 April 2009 12:15
 To: Flash Coders List
 Subject: Re: [Flashcoders] Feasibility of xml file for high score data
 storage

 I am guessing that any server side code to update the XML file will 
 rely on the server to lock files, etc.
 Databases are often optimised to allow for multiple clients to 
 update, but most file based commands will lock the file preventing 
 access by other clients so if your code throws a wobbly rather than 
 waiting, that could be a problem...

 Saying that, you could look at using SQLLite for example - this uses 
 a file based database, but your SQLLite engine will handle all of 
 the access - a lot of PHP installations come with this nowadays and 
 ASP code also uses ADOBC to connect to Access database files so you 
 will have a similar system.

 The upshot is that using a server side database engine will make life 
 easier because they will deal with problems like concurrent 
 connections for you :)

 Glen

 Paul Steven wrote:
  
 I was considering using an xml file to store high score data for a 
 game.
 
 It
  
 is quite possible that this game will have a significant amount of 
 traffic
 (certainly in the first few days after launch) and I am now 
 wondering if
 
 an
  
 xml file would be suitable. I am not sure what happens in the scenario
 
 where
  
 multiple players want to update the highscore at the same time - 
 they will
 all need to write to the file. I assume this is the same scenario 
 with a
 database but think perhaps updating a database is more efficient.

 Anyone care to offer any insight into whether an xml file would be
 
 suitable
  
 or not?
 Thanks

 Paul

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


   

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

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


   

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

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

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


Re: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Paul Andrews
- Original Message - 
From: Fabio Pinatti fpina...@gmail.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, April 22, 2009 2:38 PM
Subject: [Flashcoders] Benefits of as3 - to the client



Hello coders,

A question I was wondering here. A client of mine has a website built with
as2. And I explained him I work now with as3, but he asked what the real
benefits for him, to convert his project to as3.

I would like to have some good arguments, but I can find more benefits for
me, as developer, than for the client.

I would like to know your thoughts and advices about that.


No benefit at all unless he needs to have his website redesigned. Unless 
he's going for something very different I'd advise him to stick with AS2 for 
the moment.



Thanks

--
Fabio Pinatti
:: web.developer
 www.pinatti.com.br
:: 19. 9184.3745 / 3342.1130
___
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] Feasibility of xml file for high score data storage

2009-04-22 Thread Glen Pike

Hi,

   The public / private key thing is just about encrypting some of 
the score data that you pass to the server to stop people cheating your 
high score tables.


   for example, if your high score system in PHP uses a GET / POST 
something like this:


   scores.php?name=Glenscore=500

   It's easy for me to cheat...
  
   But if you do (pseudo code):


   var key:String = mysecretkey;

   var encrypted:String = MyEncryptClass.encrypt(name=Glenscore=500, 
key);


   var result:Boolean = MyServer.sendScore(encrypted);

   And it does something like this:

   scores.php?command=submitencrypted=asdiou23q890czoued9auc0

   You can then use the server key to decrypt your message.

   (Public  Private keys are about asymmetrical encryption)
  
   Anyway, the idea is to make it harder for people to cheat - as the 
data is not very sensitive, you can go for a simple encryption option  
where you store the key in the SWF, which means that people can still 
decompile your Flash file and find out the key, but only the most 
dedicated of cheaters would do that...


   If you really want to go to town, you are probably going to have to 
create some kind of login for people to play the game / submit high 
scores, but to be honest, you can just go for simple score encryption - 
look at Jobe's stuff again - if your game does not have any kind of prize...



   You can get some AS3 / AS2 code that handles encryption which can be 
decrypted with functions in PHP. I have some links at home I can post 
later if you like..


   Glen

Paul Steven wrote:

Thanks for the reply Anthony.

Can you elaborate on the public private key system and what this entails? I
have not heard that term before. 


Thanks

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Anthony Pace
Sent: 22 April 2009 14:25
To: Flash Coders List
Subject: Re: [Flashcoders] Feasibility of xml file for high score data
storage

Hello Paul,

Making good use of a que would be required for writing to the file 
without errors, so a database is the best and easiest way; as well, for 
high scores, you might want to use a public private key system for 
preventing xss exploits, as anyone that knows how to intercept and edit 
the get or post data will be able to screw with the request to the 
server, and you could end up with a hundred people having the best score 
that the column in the DB will allow.


Take care,
Anthony

Glen Pike wrote:
  

Not working for Cornwall County Council by any chance??? :)

Paul Steven wrote:


Thanks Glen and Ian

Yes I am currently using a mysql database while the high scores are 
hosted

on my site. The game is for a rather large organisation so it is not the
easiest task in the world getting a database set up at their end. The
mention of flash alone was enough to cause major panic so you can 
imagine

the fear when I mentioned the need to upload php files to their server:)

Cheers

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen 
Pike

Sent: 22 April 2009 12:15
To: Flash Coders List
Subject: Re: [Flashcoders] Feasibility of xml file for high score data
storage

I am guessing that any server side code to update the XML file will 
rely on the server to lock files, etc.
Databases are often optimised to allow for multiple clients to 
update, but most file based commands will lock the file preventing 
access by other clients so if your code throws a wobbly rather than 
waiting, that could be a problem...


Saying that, you could look at using SQLLite for example - this uses 
a file based database, but your SQLLite engine will handle all of 
the access - a lot of PHP installations come with this nowadays and 
ASP code also uses ADOBC to connect to Access database files so you 
will have a similar system.


The upshot is that using a server side database engine will make life 
easier because they will deal with problems like concurrent 
connections for you :)


Glen

Paul Steven wrote:
 
  
I was considering using an xml file to store high score data for a 
game.



It
 
  
is quite possible that this game will have a significant amount of 
traffic
(certainly in the first few days after launch) and I am now 
wondering if



an
 
  

xml file would be suitable. I am not sure what happens in the scenario



where
 
  
multiple players want to update the highscore at the same time - 
they will
all need to write to the file. I assume this is the same scenario 
with a

database but think perhaps updating a database is more efficient.

Anyone care to offer any insight into whether an xml file would be



suitable
 
  

or not?
Thanks

Paul

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] link bar frustrating question

2009-04-22 Thread Omar Fouad
Well, mouseChildren did not help. The only thing it helped was checking
whether the e.target is enabled or not in the rollOut handler. According
that, I change the color or not.

Thanks folks for the replies.

On Wed, Apr 22, 2009 at 1:13 PM, Matt S. mattsp...@gmail.com wrote:

 What if the rollOut function looks like:


 private function onRollOut(e:MouseEvent):void {

  if(CurrentLink != e.currentTarget){
   //change colors here of e.currentTarget
 }

 }

 that way it will only change color back if its not currently the
 CurrentLink.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Omar M. Fouad - Adobe Flash™ Platform Developer
www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: m...@omar-fouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Feasibility of xml file for high score data storage

2009-04-22 Thread Muzak

An xml file for use by multiple clients simultaneously is just not an option.
Go with a database + server side language (php, asp, coldfusion) and add 
remoting if you can.

regards,
Muzak

- Original Message - 
From: Paul Steven paul_ste...@btinternet.com

To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Sent: Wednesday, April 22, 2009 12:57 PM
Subject: [Flashcoders] Feasibility of xml file for high score data storage



I was considering using an xml file to store high score data for a game. It
is quite possible that this game will have a significant amount of traffic
(certainly in the first few days after launch) and I am now wondering if an
xml file would be suitable. I am not sure what happens in the scenario where
multiple players want to update the highscore at the same time - they will
all need to write to the file. I assume this is the same scenario with a
database but think perhaps updating a database is more efficient.

Anyone care to offer any insight into whether an xml file would be suitable
or not? 


Thanks

Paul



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


RE: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Kerry Thompson
Fabio Pinatti wrote:

 A question I was wondering here. A client of mine has a website built with
 as2. And I explained him I work now with as3, but he asked what the real
 benefits for him, to convert his project to as3.
 
 I would like to have some good arguments, but I can find more benefits for
 me, as developer, than for the client.

I tend to agree with Ian. If his Web site is already in AS2, my inclination
would be to leave it in AS2.

That depends on how extensive his AS2 code is, though. If the conversion
process can be relatively quick, safe, and inexpensive, your client will
gain some benefits from moving to AS3. Here's my take:

- Maintenance. AS2 is an obsolescent language, and soon will be the COBOL of
the Web. It will become harder to find AS2 coders--most of the newcomers in
the past year, at least, have learned AS3, not AS2. Also, a lot of
long-timers have moved to AS3 and are becoming more reluctant to work with
AS2.

- Speed. AS3 is Formula 1, while AS2 is Stock Car. AS1 is a stock car on a
muddy dirt track.

- Structure. AS3, properly done, is more structured and less prone to
hard-to-find bugs than AS2. As he builds his Web site out, he will find that
AS3 provides long-term cost benefits.

Cordially,

Kerry Thompson

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


Re: [Flashcoders] Loading string data in a file from a server

2009-04-22 Thread Muzak

Well that was just an example :)

Here's how to do it without the save file dialog:

  private function plsLoaded(evt:Event):void {
   trace(Application ::: plsLoaded);
   var value:String = evt.currentTarget.data;
   trace(value);
   var f:File = File.desktopDirectory;
   f.url += /playlist.pls;
   trace(- url: , f.url);
   trace(- nativePath: , f.nativePath);
   var fs:FileStream = new FileStream();
   fs.open(f, FileMode.WRITE);
   fs.writeUTFBytes(plsData);
   fs.close();
  }

The above will create a file called playlist.pls on your desktop.

Some stuff on security:
http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e5b.html
http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e59.html


From the above:

quote
AIR applications cannot modify content using the app: URL scheme.
Also, the application directory may be read only because of administrator 
settings.

Unless there are administrator restrictions to the user's computer, AIR applications are privileged to write to any location on the 
user's hard drive.

Developers are advised to use the app-storage:/ path for local storage related 
to their application.
/quote

To get to the application storage directory rather than the desktop, in the 
above example, use:
   var f:File = File.applicationStorageDirectory;

regards,
Muzak

- Original Message - 
From: Sidney de Koning sid...@funky-monkey.nl

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, April 22, 2009 3:37 PM
Subject: Re: [Flashcoders] Loading string data in a file from a server



Hi Muzak,

This is not exactly what i want to do but it comes close (and i cant  test 
right now since i'm at work)
The whole 'prompt user for saving a file' i want to avoid, but the  below code 
looks like what i wan to do:


  var f:File = evt.currentTarget as File;
  trace(- nativePath: , f.nativePath);
  // create filestream, open it and write data to file
  var fs:FileStream = new FileStream();
  fs.open(f, FileMode.WRITE);
  fs.writeUTFBytes(plsData);
  fs.close();


Thanks for the help, will let you know if it worked.

Sid




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


Re: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Ian Thomas
On Wed, Apr 22, 2009 at 4:17 PM, Kerry Thompson al...@cyberiantiger.biz wrote:
 Fabio Pinatti wrote:

 A question I was wondering here. A client of mine has a website built with
 as2. And I explained him I work now with as3, but he asked what the real
 benefits for him, to convert his project to as3.

 I would like to have some good arguments, but I can find more benefits for
 me, as developer, than for the client.

 I tend to agree with Ian. If his Web site is already in AS2, my inclination
 would be to leave it in AS2.

I think that was Paul, not me. (Or any other Ian, for that matter!) :-)

But as it happens, I agree with Paul, too. :-D If it ain't broke,
don't fix it. If it needs minor fixes, stick to AS2. If it needs a
complete rework, then consider AS3, but only if it's faster/easier to
do so than to rework the AS2.

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


RE: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Kerry Thompson
Ian Thomas wrote:

 I think that was Paul, not me. 

Right you are. Sorry, Paul.

 But as it happens, I agree with Paul, too. :-D 

Actually, we all three seem to pretty much agree. I'm just wordier than you
:-P

Cordially,

Kerry Thompson

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


Re: [Flashcoders] Loading string data in a file from a server

2009-04-22 Thread Sidney de Koning
Then 'f' is the reference to the playlist.pls right? That one i can  
than pass through to my PLS reader?


This really helped me alot!
May I refer you to this image: 
http://www.aperturaphoto.com/blog/wp-content/uploads/2008/03/you-rock-you-rule.bmp

Thanks!
Sid

On Apr 22, 2009, at 5:25 PM, Muzak wrote:


Well that was just an example :)

Here's how to do it without the save file dialog:

 private function plsLoaded(evt:Event):void {
  trace(Application ::: plsLoaded);
  var value:String = evt.currentTarget.data;
  trace(value);
   var f:File = File.applicationStorageDirectory;
  f.url += /playlist.pls;
  trace(- url: , f.url);
  trace(- nativePath: , f.nativePath);
  var fs:FileStream = new FileStream();
  fs.open(f, FileMode.WRITE);
  fs.writeUTFBytes(plsData);
  fs.close();
 }

The above will create a file called playlist.pls on your desktop.

Some stuff on security:
http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e5b.html
http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e59.html


From the above:

quote
AIR applications cannot modify content using the app: URL scheme.
Also, the application directory may be read only because of  
administrator settings.


Unless there are administrator restrictions to the user's computer,  
AIR applications are privileged to write to any location on the  
user's hard drive.
Developers are advised to use the app-storage:/ path for local  
storage related to their application.

/quote

To get to the application storage directory rather than the desktop,  
in the above example, use:

  var f:File = File.applicationStorageDirectory;

regards,
Muzak

- Original Message - From: Sidney de Koning sid...@funky-monkey.nl 


To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, April 22, 2009 3:37 PM
Subject: Re: [Flashcoders] Loading string data in a file from a server



Hi Muzak,

This is not exactly what i want to do but it comes close (and i  
cant  test right now since i'm at work)
The whole 'prompt user for saving a file' i want to avoid, but the   
below code looks like what i wan to do:



 var f:File = evt.currentTarget as File;
 trace(- nativePath: , f.nativePath);
 // create filestream, open it and write data to file
 var fs:FileStream = new FileStream();
 fs.open(f, FileMode.WRITE);
 fs.writeUTFBytes(plsData);
 fs.close();


Thanks for the help, will let you know if it worked.

Sid




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


Sidney de Koning - be a geek, in rockstar style!
Flash / AIR Developer @ www.funky-monkey.nl
Technical Writer @ www.insideria.com

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


Re: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Weyert de Boer
Yes, last week I have converted a Flash project to AS3 because it was  
all framescripts so I have reworked it to use classes. Much easier to  
fix bugs and other issues now. :)

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


Re: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Fabio Pinatti
Hello,

yeah, that's why I was fighting with myself to find a good reason to convert
it. There's no logical reasons, the only one I really find is maintenance or
redesign.

Your help was precious, thanks!

Fabio

On Wed, Apr 22, 2009 at 12:35 PM, Kerry Thompson al...@cyberiantiger.bizwrote:

 Ian Thomas wrote:

  I think that was Paul, not me.

 Right you are. Sorry, Paul.

  But as it happens, I agree with Paul, too. :-D

 Actually, we all three seem to pretty much agree. I'm just wordier than you
 :-P

 Cordially,

 Kerry Thompson

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




-- 
Fabio Pinatti
:: web.developer
 www.pinatti.com.br
:: 19. 9184.3745 / 3342.1130
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Feasibility of xml file for high score data storage

2009-04-22 Thread Paul Steven
Hmm nope but it is not a million miles away from me here in Somerset.

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
Sent: 22 April 2009 12:41
To: Flash Coders List
Subject: Re: [Flashcoders] Feasibility of xml file for high score data
storage

Not working for Cornwall County Council by any chance??? :)

Paul Steven wrote:
 Thanks Glen and Ian

 Yes I am currently using a mysql database while the high scores are hosted
 on my site. The game is for a rather large organisation so it is not the
 easiest task in the world getting a database set up at their end. The
 mention of flash alone was enough to cause major panic so you can imagine
 the fear when I mentioned the need to upload php files to their server:)

 Cheers

 Paul

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
 Sent: 22 April 2009 12:15
 To: Flash Coders List
 Subject: Re: [Flashcoders] Feasibility of xml file for high score data
 storage

 I am guessing that any server side code to update the XML file will rely 
 on the server to lock files, etc. 

 Databases are often optimised to allow for multiple clients to update, 
 but most file based commands will lock the file preventing access by 
 other clients so if your code throws a wobbly rather than waiting, 
 that could be a problem...

 Saying that, you could look at using SQLLite for example - this uses a 
 file based database, but your SQLLite engine will handle all of the 
 access - a lot of PHP installations come with this nowadays and ASP code 
 also uses ADOBC to connect to Access database files so you will have a 
 similar system.

 The upshot is that using a server side database engine will make life 
 easier because they will deal with problems like concurrent connections 
 for you :)

 Glen

 Paul Steven wrote:
   
 I was considering using an xml file to store high score data for a game.
 
 It
   
 is quite possible that this game will have a significant amount of
traffic
 (certainly in the first few days after launch) and I am now wondering if
 
 an
   
 xml file would be suitable. I am not sure what happens in the scenario
 
 where
   
 multiple players want to update the highscore at the same time - they
will
 all need to write to the file. I assume this is the same scenario with a
 database but think perhaps updating a database is more efficient.

 Anyone care to offer any insight into whether an xml file would be
 
 suitable
   
 or not? 

 Thanks

 Paul

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


   
 

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

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


   

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

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


RE: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Merrill, Jason
 No benefit at all unless he needs to have his website redesigned

That isn't quite true.  Benefits to migrating it to AS3 would be
increased performance with the AVM2, as well as future maintenance ease
given you'll be taking advantage of many of the features AS3 has to
offer over AS2.  You'd likely redesign some architecture too, making
improvements.  But as others have said, it may not be worth it - it
depends on how much work is involved (sometimes its better to scrap the
old version and start over with AS3), and what the long term maintenance
update plan is like.  


Jason Merrill 

Bank of  America   Global Learning 
Shared Services Solutions Development 

Monthly meetings on 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] cross dissove in slideshow

2009-04-22 Thread Pedro Kostelec
OK, i did it anyway and it works fine.

On Wed, Apr 22, 2009 at 1:35 AM, Paul Andrews p...@ipauland.com wrote:

 I don't think it gets much more straightforward than that.

 - Original Message - From: Pedro Kostelec pedrok...@gmail.com
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Sent: Tuesday, April 21, 2009 9:42 PM
 Subject: [Flashcoders] cross dissove in slideshow


  Hi
 How to cross-dissolve two images for a slideshow?
 Do i have to create two Loaders (i load the images with xml) and switch
 alphas or is there a more straight forward way?

 Cheers,
 Pedro
 ___
 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] Benefits of as3 - to the client

2009-04-22 Thread yrussom
Please, remove me from the list.
Thank you.

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill,
Jason
Sent: 2009-04-22 11:15
To: Flash Coders List
Subject: RE: [Flashcoders] Benefits of as3 - to the client

 No benefit at all unless he needs to have his website redesigned

That isn't quite true.  Benefits to migrating it to AS3 would be
increased performance with the AVM2, as well as future maintenance ease
given you'll be taking advantage of many of the features AS3 has to
offer over AS2.  You'd likely redesign some architecture too, making
improvements.  But as others have said, it may not be worth it - it
depends on how much work is involved (sometimes its better to scrap the
old version and start over with AS3), and what the long term maintenance
update plan is like.  


Jason Merrill 

Bank of  America   Global Learning 
Shared Services Solutions Development 

Monthly meetings on 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

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4027 (20090422) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4027 (20090422) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

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


[Flashcoders] Flash game testing companies? QA

2009-04-22 Thread Paul Steven
My clients QA department have become involved with a game I am developing
and would like the game to be tested by an external testing company. Can
anyone recommend a company (UK ideally) that offers such a service? I guess
I have been lucky in the past as no other client has ever requested this
kind of testing for an online game. My QA is basically to test the game
rigorously until I can find no more bugs - probably not the best QA in the
world!

Any advice appreciated!

Paul

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


RE: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Kerry Thompson
 Please, remove me from the list.

I'm replying to the list, as well as to the OP, as an FYI for new or
inexperienced members. If you understand how mailing lists work, you need
read no further.

We have no power to remove you from the list--we're just subscribers like
you. Unless the list admin happens to see your post, you have accomplished
nothing.

There is, however, a right way to unsubscribe. Go to the URL at the bottoms
of all posts, http://chattyfig.figleaf.com/mailman/listinfo/flashcoders.
Towards the bottom of the page you will see a Flashcoders Subscribers
section. Enter your e-mail address and click the Unsubscribe or edit
options button. Then you can unsubscribe yourself.

Cordially,

Kerry Thompson

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


[Flashcoders] loading images in a circle format..

2009-04-22 Thread Rodrigo Augusto Guerra
hi all...

I got a request to load some images in a circle format and once you click one 
image, it goes to the front.

the final layout will be like this:
www.alumni.org.br/tmp/rodrigo/modelo.gif

my doubt is, how to divide the circle in X equally pieces

the logic I'm thinking:

divide the circle degree (360º) in X (X = number of images), then I'll get the 
postions to load the images

then load each image in the X position, and as the reg. point is left/top by 
default I would have to horizontal center the loaded image in the X/Y position.

when the user clocks on a image that is not the front one it will swap with the 
image clicked, bringing the new image to the front.

but this works only if I use degrees like:

if I have 360º / 6 images, I'll get each image at 60º.

how discover each 60º to load the image at that point and convert it to a x/y 
coordinate?? 

but this is my logic, of course if you guys have a better suggestion to do the 
same thing, I 'would like to know.


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


RE: [Flashcoders] loading images in a circle format..

2009-04-22 Thread Merrill, Jason
Go to www.gotoandlearn.com and find the tutorial, Creating 3D
Carousels.



Jason Merrill 

Bank of  America   Global Learning 
Shared Services Solutions Development 

Monthly meetings on 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] loading images in a circle format..

2009-04-22 Thread whispers
Seems like a carousel project to me?

Have you checked out www.gotoandlearn.com 

There are many parameters 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Rodrigo
Augusto Guerra
Sent: Wednesday, April 22, 2009 12:11 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] loading images in a circle format..

hi all...

I got a request to load some images in a circle format and once you click
one image, it goes to the front.

the final layout will be like this:
www.alumni.org.br/tmp/rodrigo/modelo.gif

my doubt is, how to divide the circle in X equally pieces

the logic I'm thinking:

divide the circle degree (360º) in X (X = number of images), then I'll get
the postions to load the images

then load each image in the X position, and as the reg. point is left/top by
default I would have to horizontal center the loaded image in the X/Y
position.

when the user clocks on a image that is not the front one it will swap with
the image clicked, bringing the new image to the front.

but this works only if I use degrees like:

if I have 360º / 6 images, I'll get each image at 60º.

how discover each 60º to load the image at that point and convert it to a
x/y coordinate?? 

but this is my logic, of course if you guys have a better suggestion to do
the same thing, I 'would like to know.


thanks,
rodrigo.
___
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] Benefits of as3 - to the client

2009-04-22 Thread Weyert de Boer
Maybe the admin should include a little line in the footer about how  
to subscribe (Want to subscribe? Find mor einfo at...)

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


Re: [Flashcoders] loading images in a circle format..

2009-04-22 Thread Matt Gitchell
Point.polar() will give you an X/Y value based on the degree (in rads) and
the distance from the center of the circle.

On Wed, Apr 22, 2009 at 10:36 AM, whispers whispers...@hotmail.com wrote:

 Seems like a carousel project to me?

 Have you checked out www.gotoandlearn.com

 There are many parameters

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Rodrigo
 Augusto Guerra
 Sent: Wednesday, April 22, 2009 12:11 PM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] loading images in a circle format..

 hi all...

 I got a request to load some images in a circle format and once you click
 one image, it goes to the front.

 the final layout will be like this:
 www.alumni.org.br/tmp/rodrigo/modelo.gif

 my doubt is, how to divide the circle in X equally pieces

 the logic I'm thinking:

 divide the circle degree (360º) in X (X = number of images), then I'll get
 the postions to load the images

 then load each image in the X position, and as the reg. point is left/top
 by
 default I would have to horizontal center the loaded image in the X/Y
 position.

 when the user clocks on a image that is not the front one it will swap with
 the image clicked, bringing the new image to the front.

 but this works only if I use degrees like:

 if I have 360º / 6 images, I'll get each image at 60º.

 how discover each 60º to load the image at that point and convert it to a
 x/y coordinate??

 but this is my logic, of course if you guys have a better suggestion to do
 the same thing, I 'would like to know.


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


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

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


[Flashcoders] UK time clock

2009-04-22 Thread Pedro Kostelec
Hello
Is there a way to create a clock that would show UK time, regardless in
which time zone you are?


Thanks,

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


Re: [Flashcoders] UK time clock

2009-04-22 Thread Weyert de Boer
Ain't that the same as the UTC time? As far as I know UTC time is GMT  
which is the UK time. Of course, you need to take the daylight saving  
into account.


Winter: UTC+0 (UTC=GMT)
Summer: UTC+1 (GMT+1)


On Apr 22, 2009, at 8:16 PM, Pedro Kostelec wrote:


Hello
Is there a way to create a clock that would show UK time, regardless  
in

which time zone you are?


Thanks,

Pedro Kostelec
___
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] Benefits of as3 - to the client

2009-04-22 Thread Matt S.
Given the frequency of please unsubcribe me emails, it should
probably be in 20pt Bold, and blinking too. ;)

.m

On Wed, Apr 22, 2009 at 2:33 PM, Merrill, Jason
jason.merr...@bankofamerica.com wrote:

 What would be the purpose of adding how to subscribe information if 1)
 the point is that some people don't understand how to UNsubscribe, and
 2) they would have already been subscribed if they are receiving e-mails
 from the list.  Perhaps you mean adding a note about unsubscribing in
 addition to the link already provided.


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


RE: [Flashcoders] Benefits of as3 - to the client

2009-04-22 Thread Merrill, Jason
 Maybe the admin should include a little line in the footer about how

to subscribe (Want to subscribe? 

What would be the purpose of adding how to subscribe information if 1)
the point is that some people don't understand how to UNsubscribe, and
2) they would have already been subscribed if they are receiving e-mails
from the list.  Perhaps you mean adding a note about unsubscribing in
addition to the link already provided.


Jason Merrill 

Bank of  America   Global Learning 
Shared Services Solutions Development 

Monthly meetings on 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] Benefits of as3 - to the client

2009-04-22 Thread Weyert de Boer

Hi Merill,

Yes, just some more information in the footer so that they know you  
can find the information at that link how to unsubscribe from the  
mailing list.


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


Re: [Flashcoders] UK time clock

2009-04-22 Thread Pedro Kostelec
OH, there is a way to bring out zone related time in Flash? I only knew the
way, that takes the time from the local computer. How'd you do it?
Any tutorial or script?

On Wed, Apr 22, 2009 at 8:31 PM, Weyert de Boer w...@innerfuse.biz wrote:

 Ain't that the same as the UTC time? As far as I know UTC time is GMT which
 is the UK time. Of course, you need to take the daylight saving into
 account.

 Winter: UTC+0 (UTC=GMT)
 Summer: UTC+1 (GMT+1)



 On Apr 22, 2009, at 8:16 PM, Pedro Kostelec wrote:

  Hello
 Is there a way to create a clock that would show UK time, regardless in
 which time zone you are?


 Thanks,

 Pedro Kostelec
 ___
 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] Benefits of as3 - to the client

2009-04-22 Thread Merrill, Jason
 Hi Merill,

It's Jason, and Merrill has two r's. :) 


Jason Merrill 

Bank of  America   Global Learning 
Shared Services Solutions Development 

Monthly meetings on 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] loading images in a circle format..

2009-04-22 Thread Rodrigo Augusto Guerra
hi, 

yes it's a carousel, but I avoided naming because I wasn't very sure if this is 
the name for this kind of thing.

anyway, thanks for the tips... will check the point.polar and gotoandlearn. 


thanks!

rodrigo


  - Original Message - 
  From: Matt Gitchell 
  To: Flash Coders List 
  Cc: Rodrigo Augusto Guerra 
  Sent: Wednesday, April 22, 2009 3:09 PM
  Subject: Re: [Flashcoders] loading images in a circle format..


  Point.polar() will give you an X/Y value based on the degree (in rads) and 
the distance from the center of the circle.


  On Wed, Apr 22, 2009 at 10:36 AM, whispers whispers...@hotmail.com wrote:

Seems like a carousel project to me?

Have you checked out www.gotoandlearn.com

There are many parameters


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Rodrigo
Augusto Guerra
Sent: Wednesday, April 22, 2009 12:11 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] loading images in a circle format..

hi all...

I got a request to load some images in a circle format and once you click
one image, it goes to the front.

the final layout will be like this:
www.alumni.org.br/tmp/rodrigo/modelo.gif

my doubt is, how to divide the circle in X equally pieces

the logic I'm thinking:

divide the circle degree (360º) in X (X = number of images), then I'll get
the postions to load the images

then load each image in the X position, and as the reg. point is left/top by
default I would have to horizontal center the loaded image in the X/Y
position.

when the user clocks on a image that is not the front one it will swap with
the image clicked, bringing the new image to the front.

but this works only if I use degrees like:

if I have 360º / 6 images, I'll get each image at 60º.

how discover each 60º to load the image at that point and convert it to a
x/y coordinate??

but this is my logic, of course if you guys have a better suggestion to do
the same thing, I 'would like to know.


thanks,
rodrigo.
___
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] UK time clock

2009-04-22 Thread Nate Beck
Timezones aren't supported in the Flash Player... you only have UTC time...
and then it derives your local time based on your computers timezone
offset.
I've talked about this quite a bit on FlexCoders (second half of the
conversation):

http://www.nabble.com/flex-date-and-timezone-td21695609.html


On Wed, Apr 22, 2009 at 11:40 AM, Pedro Kostelec pedrok...@gmail.comwrote:

 OH, there is a way to bring out zone related time in Flash? I only knew the
 way, that takes the time from the local computer. How'd you do it?
 Any tutorial or script?

 On Wed, Apr 22, 2009 at 8:31 PM, Weyert de Boer w...@innerfuse.biz wrote:

  Ain't that the same as the UTC time? As far as I know UTC time is GMT
 which
  is the UK time. Of course, you need to take the daylight saving into
  account.
 
  Winter: UTC+0 (UTC=GMT)
  Summer: UTC+1 (GMT+1)
 
 
 
  On Apr 22, 2009, at 8:16 PM, Pedro Kostelec wrote:
 
   Hello
  Is there a way to create a clock that would show UK time, regardless in
  which time zone you are?
 
 
  Thanks,
 
  Pedro Kostelec
  ___
  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




-- 

Cheers,
Nate

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


Re: [Flashcoders] UK time clock

2009-04-22 Thread Weyert de Boer
Well, you can use get getTimezonOffset()-method which is the minutes  
different from the UTC/GMT time
For example, here in The Netherlands the offset should be 120mins.  
This means that the Date-object will
always return your so called zone-related time in Flash. After that  
you can remove the offset from the current time and then you get the  
UK or GMT/UTC time.


OH, there is a way to bring out zone related time in Flash? I only  
knew the

way, that takes the time from the local computer. How'd you do it?
Any tutorial or script?

On Wed, Apr 22, 2009 at 8:31 PM, Weyert de Boer w...@innerfuse.biz  
wrote:


Ain't that the same as the UTC time? As far as I know UTC time is  
GMT which

is the UK time. Of course, you need to take the daylight saving into
account.

Winter: UTC+0 (UTC=GMT)
Summer: UTC+1 (GMT+1)



On Apr 22, 2009, at 8:16 PM, Pedro Kostelec wrote:

Hello
Is there a way to create a clock that would show UK time,  
regardless in

which time zone you are?


Thanks,

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



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


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


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


Re: [Flashcoders] UK time clock

2009-04-22 Thread Nate Beck
Oh... also... to answer the original post.  You'll want to do something like
this:
1) Figure out what Timezone the current user's computer is set to.
 myDate.getTimezoneOffset();
2) The timezoneOffset is... The minutes you need to add to the computer's
local time value to equal UTC. If your computer's time is set later than
UTC, the return value will be negative.
3) Calculate the offset (in minutes) between the clients timezone and your
target timezone.
4) Calculate your clock's values from there.

HTH,
Nate

On Wed, Apr 22, 2009 at 12:17 PM, Nate Beck n...@tldstudio.com wrote:

 Timezones aren't supported in the Flash Player... you only have UTC time...
 and then it derives your local time based on your computers timezone
 offset.
 I've talked about this quite a bit on FlexCoders (second half of the
 conversation):

 http://www.nabble.com/flex-date-and-timezone-td21695609.html


 On Wed, Apr 22, 2009 at 11:40 AM, Pedro Kostelec pedrok...@gmail.comwrote:

 OH, there is a way to bring out zone related time in Flash? I only knew
 the
 way, that takes the time from the local computer. How'd you do it?
 Any tutorial or script?

 On Wed, Apr 22, 2009 at 8:31 PM, Weyert de Boer w...@innerfuse.biz
 wrote:

  Ain't that the same as the UTC time? As far as I know UTC time is GMT
 which
  is the UK time. Of course, you need to take the daylight saving into
  account.
 
  Winter: UTC+0 (UTC=GMT)
  Summer: UTC+1 (GMT+1)
 
 
 
  On Apr 22, 2009, at 8:16 PM, Pedro Kostelec wrote:
 
   Hello
  Is there a way to create a clock that would show UK time, regardless in
  which time zone you are?
 
 
  Thanks,
 
  Pedro Kostelec
  ___
  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




 --

 Cheers,
 Nate
 
 http://blog.natebeck.net





-- 

Cheers,
Nate

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


Re: [Flashcoders] UK time clock

2009-04-22 Thread Pedro Kostelec

 THanks. I'll check getTimezonOffset().

I thought it was going to be harder than that.

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


RE: [Flashcoders] UK time clock

2009-04-22 Thread Keith Reinfeld
Pedro, 


To calculate the time elsewhere you have to factor-in the local machine's
timezone offset value. 
I worked out the following for my World Clock last year:  

snip 
// Local Time 
var lDate:Date = new Date(); 
// Elsewhere Time: London Standard Time: 0, DST: 1
var utcH:Number = 1; 
var utcM:Number = 0; 
var wDate:Date = new Date(lDate.getTime() + (lDate.getTimezoneOffset() *
1000 * 60) + (utcH * 1000 * 60 * 60) + (utcM * 1000 * 60)); 
trace(wDate = +wDate); 
/snip 
 
Note: 
The GMT value in the trace will still reflect the local machine's timezone.
Just ignore it. The important data are the time and date. 

Going forward you will want to consider the issues presented by Daylight
Saving Time: 
Does the locale of the local machine observe DST? 
Is the locale of the local machine currently in DST? 
Do they observe DST in the designated Elsewhere? 
Is the designated Elsewhere currently in DST?

Regards, 

-Keith 
http://keithreinfeld.home.comcast.net
 


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


Re: [Flashcoders] UK time clock

2009-04-22 Thread Weyert de Boer
You can check if the locale takes DST into account by compare the  
offsets of a winter day with a summer day. If they are the same the  
locale doesn't care about DST.

If not, I would need to fix my alarm clock ;)

On 22/04/2009, at 10:12 PM, Keith Reinfeld wrote:


Pedro,


To calculate the time elsewhere you have to factor-in the local  
machine's

timezone offset value.
I worked out the following for my World Clock last year:

snip
// Local Time
var lDate:Date = new Date();
// Elsewhere Time: London Standard Time: 0, DST: 1
var utcH:Number = 1;
var utcM:Number = 0;
var wDate:Date = new Date(lDate.getTime() +  
(lDate.getTimezoneOffset() *

1000 * 60) + (utcH * 1000 * 60 * 60) + (utcM * 1000 * 60));
trace(wDate = +wDate);
/snip

Note:
The GMT value in the trace will still reflect the local machine's  
timezone.

Just ignore it. The important data are the time and date.

Going forward you will want to consider the issues presented by  
Daylight

Saving Time:
Does the locale of the local machine observe DST?
Is the locale of the local machine currently in DST?
Do they observe DST in the designated Elsewhere?
Is the designated Elsewhere currently in DST?

Regards,

-Keith
http://keithreinfeld.home.comcast.net



___
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] UK time clock

2009-04-22 Thread Hans Wichman
or use something like this:

*http://www.earthtools.org/timezone-1.1/39.96/5.6250*http://www.earthtools.org/timezone-1.1/39.96/5.6250


On Wed, Apr 22, 2009 at 10:29 PM, Weyert de Boer w...@innerfuse.biz wrote:

 You can check if the locale takes DST into account by compare the offsets
 of a winter day with a summer day. If they are the same the locale doesn't
 care about DST.
 If not, I would need to fix my alarm clock ;)


 On 22/04/2009, at 10:12 PM, Keith Reinfeld wrote:

 Pedro,


 To calculate the time elsewhere you have to factor-in the local machine's
 timezone offset value.
 I worked out the following for my World Clock last year:

 snip
 // Local Time
 var lDate:Date = new Date();
 // Elsewhere Time: London Standard Time: 0, DST: 1
 var utcH:Number = 1;
 var utcM:Number = 0;
 var wDate:Date = new Date(lDate.getTime() + (lDate.getTimezoneOffset() *
 1000 * 60) + (utcH * 1000 * 60 * 60) + (utcM * 1000 * 60));
 trace(wDate = +wDate);
 /snip

 Note:
 The GMT value in the trace will still reflect the local machine's
 timezone.
 Just ignore it. The important data are the time and date.

 Going forward you will want to consider the issues presented by Daylight
 Saving Time:
 Does the locale of the local machine observe DST?
 Is the locale of the local machine currently in DST?
 Do they observe DST in the designated Elsewhere?
 Is the designated Elsewhere currently in DST?

 Regards,

 -Keith
 http://keithreinfeld.home.comcast.net



 ___
 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] UK time clock

2009-04-22 Thread Keith Reinfeld
 
 You can check if the locale takes DST into account by compare the
 offsets of a winter day with a summer day. If they are the same the
 locale doesn't care about DST.
 
That is true. More precisely you can compare the timezone offset of January
1st to July 1st. 
 
If they are equal DST is not observed. 
 
If the January timezone offset is greater than July's the local machine is
in the northern hemisphere. 
 
If the July timezone offset is greater than January's the local machine is
in the southern hemisphere. 
 
Which helps a lot when you are ready to determine whether DST is in effect. 
 
Regards, 

-Keith 
http://keithreinfeld.home.comcast.net
 


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