Re: [Flashcoders] iOS picker component for AIR

2012-06-19 Thread Sidney de Koning
Hi Ivan, 

Thanks for your reply, but i actually meant an different kind of picker. 
More along the lines of iOS native date picker component: 
http://www.techotopia.com/images/8/88/Ios_4_date_picker.jpg

Thoughts anyone?

Best, 
Sid


--
Sidney de Koning - Be a geek, rockstar style!
Read my blog: http://www.funky-monkey.nl (http://www.funky-monkey.nl/blog/)


On Tuesday 19 June 2012 Week 25 at 20:11, Ivan Dembicki wrote:

 Hi,
 
 http://code.google.com/p/as3colorpicker/
 
 
 -- 
 Ivan Dembicki
 http://realaxy.com
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com (mailto: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] iOS picker component for AIR

2012-06-19 Thread Sidney de Koning
Hi James, 

Native Extensions are a good option. Thing is i don't write obj-c or Java yet, 
so i either need to find a download somewhere or hire someone that can make me 
one for android and ios. 

Anyone willing to this? I've got some budget for this to spare.

Best, 
Sidney




--
Sidney de Koning - Be a geek, rockstar style!
Read my blog: http://www.funky-monkey.nl (http://www.funky-monkey.nl/blog/)


On Tuesday 19 June 2012 Week 25 at 21:38, James Merrill wrote:

 Sid, you might be able to use Native Extensions to pull up the iOS picker.
 I also tried to replicate the native picker with little success. I would
 find it very hard to believe that a AS3 based alternative will work
 smoothly, given the performance issues apparent in much simpler things in
 Flash iOS.
 
 
 
 On Tue, Jun 19, 2012 at 2:25 PM, Sidney de Koning sid...@funky-monkey.nl 
 (mailto:sid...@funky-monkey.nl)wrote:
 
  Hi Ivan,
  
  Thanks for your reply, but i actually meant an different kind of picker.
  More along the lines of iOS native date picker component:
  http://www.techotopia.com/images/8/88/Ios_4_date_picker.jpg
  
  Thoughts anyone?
  
  Best,
  Sid
  
  
  --
  Sidney de Koning - Be a geek, rockstar style!
  Read my blog: http://www.funky-monkey.nl (http://www.funky-monkey.nl/blog/
  )
  
  
  On Tuesday 19 June 2012 Week 25 at 20:11, Ivan Dembicki wrote:
  
   Hi,
   
   http://code.google.com/p/as3colorpicker/
   
   
   --
   Ivan Dembicki
   http://realaxy.com
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com 
   (mailto:Flashcoders@chattyfig.figleaf.com) (mailto:
   
  
  Flashcoders@chattyfig.figleaf.com 
  (mailto:Flashcoders@chattyfig.figleaf.com))
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  
  
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com (mailto:Flashcoders@chattyfig.figleaf.com)
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
 
 
 
 
 -- 
 James Merrill
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com (mailto: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] iOS picker component for AIR

2012-06-15 Thread Sidney de Koning
Hi,  

I've looked around the net for a picker component to use in an Air 3.2 project 
for iOS.
I've found custard belly's set and the one hosted on google code. Both have 
really slow performance when working with large data sets (250 records) or 
don't work at all.

What are you using when you need need a picker component? And what are your 
thoughts on this?

Best,
Sidney

--
Sidney de Koning - Be a geek, rockstar style!
Read my blog: http://www.funky-monkey.nl (http://www.funky-monkey.nl/blog/)

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


Re: [Flashcoders] Converting a flash game to facebook app

2012-05-30 Thread Sidney de Koning
Hi Paul, 

The process is't that complex, the api's are pretty strait forward.
You can check out: http://code.google.com/p/facebook-actionscript-api/
From here you also have some links to the dev center from adobe, they 
dedicated an whole section to Facebook. The docs and tuts will get you up to 
speed in no time.

Last week i implemented Facebook oAuth in a mobile AIR app with this API and it 
cost me about 3 hours to go from start to finish. (Up until last week i was 
also a dinosaur in the Facebook arena ;-) )

Hope this helps you :)

Sidney 

--
Sidney de Koning - Be a geek, rockstar style!
Read my blog: http://www.funky-monkey.nl (http://www.funky-monkey.nl/blog/)


On Wednesday 30 May 2012 Week 22 at 18:17, Paul Steven wrote:

 I am a bit of a dinosaur when it comes to facebook and have been asked to
 turn a flash game into a facebook app.
 
 Before I make a decision on whether I can take on this job I wanted a quick
 heads up on how complex a process is to do this?
 
 Thanks in advance.
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com (mailto: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] AIR Screensaver?

2012-03-12 Thread Sidney de Koning
Hi David, 

What you can do is create and run an AIR app on startup of the users machine, 
respond to the idleTime property and show some media or text accordingly. The 
only thing is that it won't show up in the screeensavers list on the 
appropriate OS.

I think the SPF app has something similar: 
http://www.adobe.com/devnet/air/samples_actionscript.html

Also look at: 
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/NativeApplication.html#idleThreshold

As for OS agnostic software to create screensavers, take a look at 
http://www.multidmedia.com/software/zinc/ i used that in the past an has a lot 
of extra API's you can use and well documented. It is also a bit pricy... but 
if you are creating this for a client maybe you can try to put this on their 
invoice as expenses (of make a deal with the client so they pay for it).

Hope this steers you in a good direction, 

Best, 
Sidney





--
Sidney de Koning - Be a geek, rockstar style!
Read my blog: http://www.funky-monkey.nl (http://www.funky-monkey.nl/blog/)


On Monday 12 March 2012 Week 11 at 23:58, David Hunter wrote:

 Hi All,
 
 Anyone have any advice on making screensavers from Flash? I have seen some
 decent looking software
 http://www.screentime.com/software/flash-screensaverto convert an swf
 into a screensaver but it is quite pricey, I didn't have
 any luck with a mac open source alternatives, so I was wondering if it was
 possible with AIR? I would need it to function fully as a screensaver eg.
 be activated by user idle timeouts / hot corners etc...
 
 Thanks,
 
 David
 
 -- 
 David Hunter
 
 www.davidhunterdesign.com (http://www.davidhunterdesign.com)
 +44 (0) 7869 104 906
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com (mailto: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] Flash Platform roadmap released - time to start learning HTML 5 unless you make games.

2012-02-23 Thread Sidney de Koning | Funky Monkey Studio
Why don't you write a ANE for it? :) That's what they are for :)

-- 
Sidney de Koning | Funky Monkey Studio
Who am I and what do I do? http://about.me/sidneydekoning
Read my blog: http://www.funky-monkey.nl (http://www.funky-monkey.nl/blog/)


On Thursday, February 23, 2012 at 5:37 PM, Kevin Newman wrote:

 Oh! That's right, I would totally love game controller support!
 
 I wonder if it has something to do with a lack of system APIs on certain 
 systems, to put an abstraction around (OSX, iOS, Android, etc.).
 
 Kevin N.
 
 
 On 2/22/12 3:50 PM, Henrik Andersson wrote:
  Oh and, there is a curious lack of support for game controllers. I don't
  get it, why would they even make that an AIR exclusive feature? And for
  TVs only? WTF?
  
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com (mailto: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] Spotify AS3 lib?

2011-08-11 Thread Sidney de Koning | Funky Monkey Studio
 Hi Eric,

I've had contact with spotify about this; the wont release anything because
it exposes their databases and it all comes down to copyright issues.
I have also created a Spotify AS3 Wrapper API for the search and lookup, its
not done, but usable for (commercial) projects.

If you like i can put it up at Github?
Let me know,

Sidney de Koning


-- 
*Sidney de Koning* - *If you're not prepared to be wrong, you'll never come
up with something original*
*Who am I? http://about.me/sidneydekoning*
*Just Funky Mobile Apps: http://www.justfunky.com/***

Beyond just the search but playback as well. The search is only mildly
 interesting.


   Google Voice: (508) 656-0622
   Twitter: eric_dolecki  XBoxLive: edolecki  PSN: eric_dolecki
   http://blog.ericd.net



 On Thu, Aug 11, 2011 at 10:34 AM, Nathan Mynarcik nat...@mynarcik.com 
 nat...@mynarcik.comwrote:


  Are you looking to read the Metadata? Or develop a full 3rd party 
  program? I can across this 
  http://developer.spotify.com/en/metadata-api/overview/ Perhaps it could 
  help? Unfortunately it only allows search and lookup... 
  ___ Flashcoders mailing list 
  Flashcoders@chattyfig.figleaf.com 
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing 
 listFlashcoders@chattyfig.figleaf.comhttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


Re: [Flashcoders] Spotify AS3 lib?

2011-08-11 Thread Sidney de Koning | Funky Monkey Studio
 Will be somewhere tomorrow, long day and i'm off to bed :)
I'm here in C.E.T. :)

Will let you know when its online,

Sid

 Sure that would be cool :) Thanks.


   Google Voice: (508) 656-0622
   Twitter: eric_dolecki  XBoxLive: edolecki  PSN: eric_dolecki
   http://blog.ericd.net



 On Thu, Aug 11, 2011 at 3:48 PM, Sidney de Koning | Funky Monkey Studio 
 sid...@funky-monkey.nl wrote:


   Hi Eric, I've had contact with spotify about this; the wont release 
  anything because it exposes their databases and it all comes down to 
  copyright issues. I have also created a Spotify AS3 Wrapper API for the 
  search and lookup, its not done, but usable for (commercial) projects. 
  If you like i can put it up at Github? Let me know, Sidney de Koning 
  -- **Sidney de Koning** - *If you're not prepared to be wrong, you'll 
  never come up with something original* **Who am I? 
  http://about.me/sidneydekoning** *Just Funky Mobile Apps: 
  http://www.justfunky.com/*** Beyond just the search but playback as well. 
  The search is only mildly

   interesting.  Google Voice: (508) 656-0622Twitter: 
   eric_dolecki  XBoxLive: edolecki  PSN: eric_dolecki
   http://blog.ericd.net On Thu, Aug 11, 2011 at 10:34 AM, 
   Nathan Mynarcik nat...@mynarcik.com nat...@mynarcik.com

  nat...@mynarcik.com nat...@mynarcik.comwrote:

   

Are you looking to read the Metadata? Or develop a full 3rd party

  program? I can across this 
  http://developer.spotify.com/en/metadata-api/overview/ Perhaps it could 
  help? Unfortunately it only allows search and lookup... 
  ___ Flashcoders mailing list 
  Flashcoders@chattyfig.figleaf.com 
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___  Flashcoders mailing 
listFlashcoders@chattyfig.figleaf.comhttp://

  chattyfig.figleaf.com/mailman/listinfo/flashcoders



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

 ___
 Flashcoders mailing 
 listFlashcoders@chattyfig.figleaf.comhttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders



-- 
*Sidney de Koning* - *If you're not prepared to be wrong, you'll never come
up with something original*
*Who am I? http://about.me/sidneydekoning*
*Just Funky Mobile Apps: http://www.justfunky.com/*
*My OpenSource projects: http://helloworld.im/funky-monkey*

*3GB free storage you can sync with your mobile device or Mac or PC.
Check out* 
https://www.getdropbox.com/referrals/NTI1MjcxMzkhttps://www.getdropbox.com/referrals/NTI1MjcxMzk
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Calling an element in an Array as an Class

2011-02-11 Thread Sidney de Koning - Funky Monkey Studios
Hi List,

I want to load some bitmap images, so i have created a class with embed
meta data in it, and i wrote a function to get them out and use them. But
it does not seem to work.

Can you use the 'new' keyword for an element in an Array?
Code below:

public class CarAssets {

[Embed(source=img/pro_car.png)]
private static const PRO_CAR : Class;

public static const ALL_CARS:Array = [PRO_CAR];

public static function getAsset( index:uint ):Bitmap {

return Bitmap( new ALL_CARS[index]() as Class );
}
}
}

I need some help (the code rather than me) because when i do: var
carImage:Bitmap = CarAssets.getAsset( _index );

it fails.

Or does anybody know a better method?

Cheers,

Sidney
-- 
Sidney de Koning - If you're not prepared to be wrong, you'll never come
up with something original
Flash / AIR Developer @ www.funky-monkey.nl
Actionscript 3 Teacher @  www.sae.nl
Technical Writer @ www.insideria.com
Blogger @ www.funky-monkey.nl/blog/

3GB free storage you can sync with your mobile device or Mac or PC.
Check out https://www.getdropbox.com/referrals/NTI1MjcxMzk



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


RE: [Flashcoders] Calling an element in an Array as an Class

2011-02-11 Thread Sidney de Koning - Funky Monkey Studios
Hi Michael,

Thanks for the tip, normaly i would to, its just that this particular
project has already set its course on using the EMBED method.

Stubborn as i am, i still want to crack this nut :)
So does anybody know how to accomplish this?

Greets,
Sid

 Or does anybody know a better method?

 I recently started using LoaderMax for loading assets.  I will never ever
 look back to manually loading my assets.  :-)
 http://blog.greensock.com/loadermax/

 - Michael M.

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



-- 
Sidney de Koning - If you're not prepared to be wrong, you'll never come
up with something original
Flash / AIR Developer @ www.funky-monkey.nl
Actionscript 3 Teacher @  www.sae.nl
Technical Writer @ www.insideria.com
Blogger @ www.funky-monkey.nl/blog/

3GB free storage you can sync with your mobile device or Mac or PC.
Check out https://www.getdropbox.com/referrals/NTI1MjcxMzk



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


Re: [Flashcoders] Calling an element in an Array as an Class

2011-02-11 Thread Sidney de Koning - Funky Monkey Studios
Thanks!

The double cast was causing the problems. By removing the 'as Class' you
can actually make a new instance of what ever in in the array at element
n.

It works super smooth now :)

function getAsset( index:uint ):Bitmap {
return Bitmap( new ALL_CARS[index]() as Class );
}

Good weekend all!
Sidney

 Version 1:

 public class EmbedTest extends Sprite {
   [Embed(source=clear.png)]
   private static const PRO_CAR : Class;
   public static const ALL_CARS:Array = [PRO_CAR];

   public static function getAsset( index:uint ) : Bitmap {
   return new ALL_CARS[index]();
   }

   public function EmbedTest() {
   addChild(getAsset(0));
   }
 }

 Version 2:

 public class EmbedTest2 extends Sprite {
   [Embed(source=clear.png)]
   private static const PRO_CAR : Class;

   public static function getAsset(name : String) : Bitmap {
   try {
   return new EmbedTest2[name]();
   } catch (e:Error) {
   trace (ERROR asset is not accessible  + name);
   }
   return new Bitmap();
   }

   public function EmbedTest2() {
   addChild(getAsset(PRO_CAR));
   addChild(getAsset(PRO_CAR2));
   }
 }

 Am 11.02.2011 15:30, schrieb Sidney de Koning - Funky Monkey Studios:
 public static function getAsset( index:uint ):Bitmap {

  return Bitmap( new ALL_CARS[index]() as Class );
  }

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



-- 
Sidney de Koning - If you're not prepared to be wrong, you'll never come
up with something original
Flash / AIR Developer @ www.funky-monkey.nl
Actionscript 3 Teacher @  www.sae.nl
Technical Writer @ www.insideria.com
Blogger @ www.funky-monkey.nl/blog/

3GB free storage you can sync with your mobile device or Mac or PC.
Check out https://www.getdropbox.com/referrals/NTI1MjcxMzk



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


Re: [Flashcoders] getPixel32 - get alpha value

2010-11-03 Thread Sidney de Koning - Funky Monkey Studios
Hi Karim,

Something along the lines of this:

var bmd:BitmapData = new BitmapData(80, 40, true, 0xFF44AACC);

var pixelValue:uint = bmd.getPixel32(0, 0);
var alphaValue:uint = pixelValue  24  0xFF;
var red:uint = pixelValue  16  0xFF;
var green:uint = pixelValue  8  0xFF;
var blue:uint = pixelValue  0xFF;

trace(alphaValue.toString(16)); // ff
trace(red.toString(16)); // 44
trace(green.toString(16)); // aa
trace(blue.toString(16)); // cc

Also check
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#getPixel32%28%29

Cheers,

Sidney



 Hello All -

 anyone can point me in the right direction to get the alpha component of
 getPixel32 ?

 Thanks


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



-- 
Sidney de Koning - If you're not prepared to be wrong, you'll never come
up with something original
Flash / AIR Developer @ www.funky-monkey.nl
Actionscript 3 Teacher @  www.sae.nl
Technical Writer @ www.insideria.com
Blogger @ www.funky-monkey.nl/blog/

3GB free storage you can sync with your mobile device or Mac or PC.
Check out https://www.getdropbox.com/referrals/NTI1MjcxMzk



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


Re: [Flashcoders] Detect iPhone version

2010-10-07 Thread Sidney de Koning - Funky Monkey Studios
Hi Kevin,

I think its Capabilities.os
(http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/system/Capabilities.html#os)

And the properties you were taling about; Capabilities.touchscreenType are
only available in AIR 2.5 for Android prerelease but this is going live
tomorrow ;)

Have fun!

Sidney

   No way to tell?

 Kevin N.


 On 10/2/10 3:06 AM, Kevin Newman wrote:
  Hi,
 Anyone know how to detect the iPhone version a Flash CS5 iPhone app is
running on? I have a game that runs at 59.1 FPS on a 3GS or ~45FPS on
an older iPod touch.
 I'd like to be able to detect which device the app is running on, so I
can throttle back the FPS, to 30 or 40 on slower hardware (30 for
iPhone 3G which is slightly less powerful on paper, than iPod touch
2g).
 BTW, the frameskip feature isn't very smooth (I'm using the
 ENTER_FRAME/stage.invalidate()/RENDER method).
 Thanks,
 Kevin N.

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



-- 
Sidney de Koning - If you're not prepared to be wrong, you'll never come
up with something original
Flash / AIR Developer @ www.funky-monkey.nl
Actionscript 3 Teacher @  www.sae.nl
Technical Writer @ www.insideria.com
Blogger @ www.funky-monkey.nl/blog/

3GB free storage you can sync with your mobile device or Mac or PC. Check
out https://www.getdropbox.com/referrals/NTI1MjcxMzk






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


Re: [Flashcoders] spacing horizontal dynamic xml menu textfields

2009-08-26 Thread Sidney de Koning

Hi Thomas,

In the nav item objects you are creating you can override the width  
and height functions, like so;


override public function get width( ):Number {
// The plus 4 makes it look better, change this if you like
return _myTextfield.textWidth + 4;
}

Then it will all have a different width.

Oh i just see that you have to use width since navItem is not a  
textfield, but uses a textfield so it does not have the textWidth  
funtion. Try that :)


runningX += navItem.width + 20;

Oh and just a (real important) note, it is very good practice to  
always create classes with a capital letter, so it then becomes  
NavItem instead of navItem.


Cheers,

Sid




On Aug 26, 2009, at 10:28 AM, thomas horner wrote:


Hi Sid many thanks for the demo, have managed to incorporate this
successfully into what I was doing,  and evenly space the items, but  
am

struggling to space the items,

as per line;

runningX += textheader.textwidth + 20;  //20 is the offset or padding
between the items, however for some reason there is no gap and all  
the items

are butted up to one another?

many thanks, in advance , Thomas

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

Koning - Funky Monkey Studios
Sent: 25 August 2009 16:44
To: Flash Coders List
Subject: RE: [Flashcoders] spacing horizontal dynamic xml menu  
textfields


He Thomas,

This stuff can be a bit difficult when making the transition.
Textfield has a really cool property called textWidth and  
textHeight, that

retruns only the width and height of the actual height :)

I have put comment in the code that explain it. Here is an example  
to demo:


var runningX:Number = 0;

// This is basically your data comming from XML
var itemsArr:Array = new Array(one, different length, piece of  
text,

last bit, evently spaced);

// It does not really matter what kind of loop you do, it is the way  
of

spacing them thst matters, so you can do your loop like you normally
would,
// here i'm just using an array to demonstrate
for (var index:int = 0; index  itemsArr.length ; index++) {

// You create items of any kind you like...
var _textheader:TextField = new TextField( );
_textheader.text = itemsArr[index];
_textheader.autoSize = TextFieldAutoSize.LEFT;

// You say that runningX is some value. since it was zero in the
beginning we are adding the value ontop of its current value (see line
below)
_textheader.x = runningX;
// ... And then you space them. You can use textWidth if using text
width
or plain width for object that extend from DisplayObjects or Sprites
etc...
runningX += _textheader.textWidth + 20; // +10 is the offset between
the
items you want ot use. Can be any number.
// And then you add the child to the display list so it becomes
visible.
addChild(_textheader);
}

Any questions, just ask :)

Cheers, Sid
im using it with in the gaia framework do you know it? below is my  
loop

and
'navbut.x' is what im trying to find, i need to add all the widths  
of all

the dynamic textfields sequentially and then space them out evenly
horizontally ,

im just totally stuck!


for each (var section:XML in siteNav.section) {

navbut = new navItem();


navbut.label.autoSize=TextFieldAutoSize.LEFT;


//Insert the menu text (li...@name reads the
link's name attribute)
navbut.label.text=secti...@name;
//Assign an url to a menu item
navbut.linkto=secti...@src;
navbut.keepopen=secti...@keep;
navbut.isclicked=secti...@highlight;

//Insert the menu button to stage

navbut.y=0;

trace(total);

navbut.x= ?;

nav1.addChild(navbut);


//Make the button look like a button (hand
cursor)
navbut.buttonMode=true;
navbut.mouseChildren=false;
navbut.alpha=0;
navbut.name=secti...@url;
TweenMax.to(navbut, 0.5, {alpha:1});
//Add event handlers (used for animating the
buttons)

navbut.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);

navbut.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
navbut.addEventListener(MouseEvent.CLICK,
mouseClickHandler);


//trace(navbut.x);

//Increment the menu button counter, so we
know how many buttons there are
i

Re: [Flashcoders] spacing horizontal dynamic xml menu textfields

2009-08-25 Thread Sidney de Koning

Hi Thomas,

Try to do something like this and adjust it to your own needs;

// When you are in a for loop, create new items and and try to measure  
the height of an item.
// And position items vertically.You need to remember the previous  
item, the fastest way to do this is to have a runningY var declared  
outside the for loop with an initial value of zero.

//See comments in code for further explanation.

var runningY:Number = 0;
var OFFSET_X:Number = 20;

for (var index:int = 0; index  4 ; index++) {

var _textheader:TextField = new TextField( );
_textheader.text = Text;
_textheader.autoSize = TextFieldAutoSize.LEFT;
_textheader.x = _background.x - _background.width / 2 + OFFSET_X;
// First iteration  runningY = 0;
	// Second iteration runningY = 0 + textHeader.height +2;  
textHeader.height = 20
	// Third iteration  runningY = 22 + textHeader.height +2;  
textHeader.height = 40 -- mutiple lines of text
	// Fourth iteration runningY = 64 + textHeader.height +2;  
textHeader.height = 20

// Fifth iteration  runningY = 86
_textheader.y = runningY;
runningY += _textheader.height + 2; // textheader = 20
}



On Aug 25, 2009, at 3:06 PM, thomas horner wrote:




Hi all am struggling to position, my textFields generated within my  
loop

from my external xml,



i want to evenly space them and as they are dynamic they are all of
different sizes.



i have run a trace on the loop as follows;



trace(navbut.label.width);



which gives me the widths of each field how do it add the total of the
widths from the loop? to then space them.

___
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] spacing horizontal dynamic xml menu textfields

2009-08-25 Thread Sidney de Koning

Yup that is correct. X and width, Y and height.

Good luck!

Sid

On Aug 25, 2009, at 3:36 PM, thomas horner wrote:


Hi thanks, so this is for a vertical menu or positioning vertical
textFields,

i will try and adjust this for horizontal purposes and measure the  
width as

opposed to the height then?

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

Koning
Sent: 25 August 2009 14:22
To: Flash Coders List
Subject: Re: [Flashcoders] spacing horizontal dynamic xml menu  
textfields


Hi Thomas,

Try to do something like this and adjust it to your own needs;

// When you are in a for loop, create new items and and try to measure
the height of an item.
// And position items vertically.You need to remember the previous
item, the fastest way to do this is to have a runningY var declared
outside the for loop with an initial value of zero.
//See comments in code for further explanation.

var runningY:Number = 0;
var OFFSET_X:Number = 20;

for (var index:int = 0; index  4 ; index++) {

var _textheader:TextField = new TextField( );
_textheader.text = Text;
_textheader.autoSize = TextFieldAutoSize.LEFT;
_textheader.x = _background.x - _background.width / 2 + OFFSET_X;
// First iteration  runningY = 0;
// Second iteration runningY = 0 + textHeader.height +2;
textHeader.height = 20
// Third iteration  runningY = 22 + textHeader.height +2;
textHeader.height = 40 -- mutiple lines of text
// Fourth iteration runningY = 64 + textHeader.height +2;
textHeader.height = 20
// Fifth iteration  runningY = 86
_textheader.y = runningY;
runningY += _textheader.height + 2; // textheader = 20
}



On Aug 25, 2009, at 3:06 PM, thomas horner wrote:




Hi all am struggling to position, my textFields generated within my
loop
from my external xml,



i want to evenly space them and as they are dynamic they are all of
different sizes.



i have run a trace on the loop as follows;



trace(navbut.label.width);



which gives me the widths of each field how do it add the total of  
the

widths from the loop? to then space them.

___
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] spacing horizontal dynamic xml menu textfields

2009-08-25 Thread Sidney de Koning - Funky Monkey Studios
No problem :)
This is using AS3. Where do you have problem with?

Sid


 is this using as2 as im trying to do it in as3 so am a bit confused

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sidney de
 Koning
 Sent: 25 August 2009 15:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] spacing horizontal dynamic xml menu textfields

 Yup that is correct. X and width, Y and height.

 Good luck!

 Sid

 On Aug 25, 2009, at 3:36 PM, thomas horner wrote:

 Hi thanks, so this is for a vertical menu or positioning vertical
 textFields,

 i will try and adjust this for horizontal purposes and measure the
 width as
 opposed to the height then?

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of
 Sidney de
 Koning
 Sent: 25 August 2009 14:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] spacing horizontal dynamic xml menu
 textfields

 Hi Thomas,

 Try to do something like this and adjust it to your own needs;

 // When you are in a for loop, create new items and and try to measure
 the height of an item.
 // And position items vertically.You need to remember the previous
 item, the fastest way to do this is to have a runningY var declared
 outside the for loop with an initial value of zero.
 //See comments in code for further explanation.

 var runningY:Number = 0;
 var OFFSET_X:Number = 20;

 for (var index:int = 0; index  4 ; index++) {

  var _textheader:TextField = new TextField( );
  _textheader.text = Text;
  _textheader.autoSize = TextFieldAutoSize.LEFT;
  _textheader.x = _background.x - _background.width / 2 + OFFSET_X;
  // First iteration  runningY = 0;
  // Second iteration runningY = 0 + textHeader.height +2;
 textHeader.height = 20
  // Third iteration  runningY = 22 + textHeader.height +2;
 textHeader.height = 40 -- mutiple lines of text
  // Fourth iteration runningY = 64 + textHeader.height +2;
 textHeader.height = 20
  // Fifth iteration  runningY = 86
  _textheader.y = runningY;
  runningY += _textheader.height + 2; // textheader = 20
 }



 On Aug 25, 2009, at 3:06 PM, thomas horner wrote:



 Hi all am struggling to position, my textFields generated within my
 loop
 from my external xml,



 i want to evenly space them and as they are dynamic they are all of
 different sizes.



 i have run a trace on the loop as follows;



 trace(navbut.label.width);



 which gives me the widths of each field how do it add the total of
 the
 widths from the loop? to then space them.

 ___
 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



--
Hire me to do your website, businesscards, presentations or flyers.
--
Only those who dare to fail greatly can ever achieve greatly. - Robert F.
Kennedy
--
Sidney de Koning | Flash Developer/Creative Soul/Multimedialist
Funky Monkey Studios | Van Ostadestraat 286 HS | 1073 TW | Amsterdam |
e:sid...@funky-monkey.nl | tel: +31(06)24 548336 | fax: +31 (0)84 747 7288



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


RE: [Flashcoders] spacing horizontal dynamic xml menu textfields

2009-08-25 Thread Sidney de Koning - Funky Monkey Studios
He Thomas,

This stuff can be a bit difficult when making the transition.
Textfield has a really cool property called textWidth and textHeight, that
retruns only the width and height of the actual height :)

I have put comment in the code that explain it. Here is an example to demo:

var runningX:Number = 0;

// This is basically your data comming from XML
var itemsArr:Array = new Array(one, different length, piece of text,
last bit, evently spaced);

// It does not really matter what kind of loop you do, it is the way of
spacing them thst matters, so you can do your loop like you normally
would,
// here i'm just using an array to demonstrate
for (var index:int = 0; index  itemsArr.length ; index++) {

// You create items of any kind you like...
var _textheader:TextField = new TextField( );
_textheader.text = itemsArr[index];
_textheader.autoSize = TextFieldAutoSize.LEFT;

// You say that runningX is some value. since it was zero in the
beginning we are adding the value ontop of its current value (see line
below)
_textheader.x = runningX;
// ... And then you space them. You can use textWidth if using text 
width
or plain width for object that extend from DisplayObjects or Sprites
etc...
runningX += _textheader.textWidth + 20; // +10 is the offset between the
items you want ot use. Can be any number.
// And then you add the child to the display list so it becomes visible.
addChild(_textheader);
}

Any questions, just ask :)

Cheers, Sid
 im using it with in the gaia framework do you know it? below is my loop
 and
 'navbut.x' is what im trying to find, i need to add all the widths of all
 the dynamic textfields sequentially and then space them out evenly
 horizontally ,

 im just totally stuck!


 for each (var section:XML in siteNav.section) {

   navbut = new navItem();


 navbut.label.autoSize=TextFieldAutoSize.LEFT;


   //Insert the menu text (li...@name reads the
 link's name attribute)
   navbut.label.text=secti...@name;
   //Assign an url to a menu item
   navbut.linkto=secti...@src;
   navbut.keepopen=secti...@keep;
   navbut.isclicked=secti...@highlight;

   //Insert the menu button to stage

   navbut.y=0;

   trace(total);

   navbut.x= ?;

   nav1.addChild(navbut);


   //Make the button look like a button (hand
 cursor)
   navbut.buttonMode=true;
   navbut.mouseChildren=false;
   navbut.alpha=0;
   navbut.name=secti...@url;
   TweenMax.to(navbut, 0.5, {alpha:1});
   //Add event handlers (used for animating the
 buttons)

 navbut.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);

 navbut.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
   navbut.addEventListener(MouseEvent.CLICK,
 mouseClickHandler);


   //trace(navbut.x);

   //Increment the menu button counter, so we
 know how many buttons there are
   i++;
   }
   }

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sidney de
 Koning - Funky Monkey Studios
 Sent: 25 August 2009 15:52
 To: Flash Coders List
 Subject: RE: [Flashcoders] spacing horizontal dynamic xml menu textfields

 No problem :)
 This is using AS3. Where do you have problem with?

 Sid


 is this using as2 as im trying to do it in as3 so am a bit confused

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sidney
 de
 Koning
 Sent: 25 August 2009 15:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] spacing horizontal dynamic xml menu
 textfields

 Yup that is correct. X and width, Y and height.

 Good luck!

 Sid

 On Aug 25, 2009, at 3:36 PM, thomas horner wrote:

 Hi thanks, so this is for a vertical menu or positioning vertical
 textFields,

 i will try and adjust this for horizontal purposes and measure the
 width as
 opposed to the height then?

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of
 Sidney de
 Koning
 Sent: 25 August 2009 14:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] spacing horizontal dynamic xml menu
 textfields

 Hi Thomas,

 Try to do something like this and adjust it to your own needs;

 // When you

Re: [Flashcoders] Duplicate multiple lines in FlashDevelop?

2009-08-18 Thread Sidney de Koning
Yeah it is, they call it copy-pasting ;-) The key command is CTRL-C to  
copy and CTRL-V to paste... Think it even works on a mac too...


One extra key command, but still incredibly usefull! ;-)



Sorry couldn't help it ... :-)

On Aug 18, 2009, at 4:46 PM, Joel Stransky wrote:


Seems like it'd be an incredibly useful feature.

On Tue, Aug 18, 2009 at 9:40 AM, Pedro Taranto ptara...@gmail.com  
wrote:


don't know about multiple lines, but to duplicate a simple line  
just use

CTRL+D

--
Pedro Taranto


Joel Stransky wrote:


Anyone know how? Like if I want to dupe an entire function sig.




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





--
--Joel Stransky
stranskydesign.com
___
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

3GB free storage you can sync with your mobile device or Mac or PC.
Check out https://www.getdropbox.com/referrals/NTI1MjcxMzk

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


Re: [Flashcoders] Duplicate multiple lines in FlashDevelop?

2009-08-18 Thread Sidney de Koning

Oh shiite ... on a mac its CMD :-)

On Aug 18, 2009, at 5:49 PM, Kenneth Kawamoto wrote:


No, it won't work on Macs ;)

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Sidney de Koning wrote:
Yeah it is, they call it copy-pasting ;-) The key command is CTRL-C  
to copy and CTRL-V to paste... Think it even works on a mac too...

One extra key command, but still incredibly usefull! ;-)
Sorry couldn't help it ... :-)
On Aug 18, 2009, at 4:46 PM, Joel Stransky wrote:

Seems like it'd be an incredibly useful feature.

On Tue, Aug 18, 2009 at 9:40 AM, Pedro Taranto  
ptara...@gmail.com wrote:


don't know about multiple lines, but to duplicate a simple line  
just use

CTRL+D

--
Pedro Taranto


Joel Stransky wrote:


Anyone know how? Like if I want to dupe an entire function sig.




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





--
--Joel Stransky
stranskydesign.com

___
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

3GB free storage you can sync with your mobile device or Mac or PC.
Check out https://www.getdropbox.com/referrals/NTI1MjcxMzk

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


Re: [Flashcoders] bookmarking a dynamic flash page

2009-08-06 Thread Sidney de Koning

Hi Andrew,

You might want to check out SWFAdress ( http://www.asual.com/ 
swfaddress/ )
It work rather well and handles also opening other external pages and  
sending mail. We actually base all of our projects on it.


HTH,

Sid


On Aug 6, 2009, at 1:49 PM, Andrew Sinning wrote:

How could I let the user bookmark the current state of a dynamic  
flash page?  I know how to save the current state of the movie and  
then just load that as the default, but what if the user should be  
able to bookmark multiple states, each with its own address?  Can  
javascript tell the browser to change the address in the address bar  
without actually loading a new page, so that if the user creates a  
bookmark there is a reliable address?


Thanks!
___
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

3GB free storage you can sync with your mobile device or Mac or PC.
Check out https://www.getdropbox.com/referrals/NTI1MjcxMzk

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


Re: [Flashcoders] Playing an encrypted f4v

2009-07-14 Thread Sidney de Koning

Hi Carl,

What i think i hear is that your client want their video only to be  
shown to certain people.

If that is the case, you can check out this article by ted patrick: 
http://onflash.org/ted/2006/03/licensing-drm-and-flash-player.php

Some other good info comes from here: 
http://www.flashcomguru.com/index.cfm/2006/9/7/vcsacp

I think, but i'm not 100% sure you can also find this feature in Red5  
an OS alternative to Flash Media Server (http://code.google.com/p/red5/)


Good luck!

Sid


On Jul 14, 2009, at 7:26 AM, Carl Welch wrote:


Hi guys,

My client asked if I could load an encrypted f4v, decrypt it and then
play it. I found the as3Crypto libraries, so I have that part covered.
Now I'm wondering if its even possible to load the f4v as a binary
file or something, decrypt and then play it. I've tried a couple of
tests with an unencrypted file but I can't figure out how to get
around not using the netstream function.

So basically my question is if this is even possible or am I headed
down a dead end street?

Thoughts, comments, suggestions?

Thanks.

--
Carl Welch
http://www.carlwelch.com
___
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] understanding a simpe statement 2

2009-07-13 Thread Sidney de Koning

Hi Isaac,

This will help you: 
http://snipplr.com/view/15019/shorthand-code-for-assigning-a-value/

Cheers,

Sidney de Koning

On Jul 13, 2009, at 4:06 PM, Isaac Alves wrote:


I would like to understand that one too:

maxH = maxH == 0 ? maxW : maxH;

Thanks!
___
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] Error #1009 shows randomly

2009-06-30 Thread Sidney de Koning

Hi Isaac,

As far as i can see it that you took off the P when going through the  
code, since it gives an error that it canot find  
local.display:rimaryButton on frame 7.
Try looking there, maybee you changed the linkage identifier or the  
classname.


HTH,

Sidney de Koning

On Jun 30, 2009, at 4:49 PM, Isaac Alves wrote:


Hello fellows,
I've bought at Flash Den a code of an Infinite Level Menu (from  
MBMedia) and

I'm pulling my hair out.

It throws that well known error as the text of the button doesn't  
show when

it should:

“TypeError: Error #1009: cannot access a  property or method of a null
object reference. at local.display:rimaryButton/frame7()”
That without touching the code or elements on the stage. Actually,  
if inside

the main.fla file, I go inside the Expanding Menu and then inside the
Primary Button MovieClip and select the text field and at that point  
I test

the movie, it works correctly. As long as I leave the Primary Button
movieclip and test the movie, it throws that error again!

Obs: It is not actually  randomly that it  throws that error. I've  
tried a
thousand times to test the movie within a certain state  , that  
means,foe
example, when I'm iinside a certain movieclip  with the textfield  
selected.

and in that specific situation it always throws (or not) the error.

You know, I select a movieclip , test Movie and it works. I deselect  
it,
test movie  and it doesn't . Its seems like a bug... that's very  
bizarre.


Please help !!!
Thanks a lot,
Isaac
___
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] Audio Player play/pause state: PLEASE HELP

2009-06-05 Thread Sidney de Koning

Hi Rajiv,

Take a close look at the SharedObject, this is basicaaly a Flash  
cookie written on the users side and you can read it out when ever you  
need.


Hope this helps,

Sid

On Jun 5, 2009, at 1:59 PM, Rajiv Seth (Pixeldust) wrote:


Hi,

I need to create a simple flash audio player with play, pause (and/ 
or volume

control). It will be added to a web page.

Now the problem is if a user pauses the player, I need to retain its  
paused
state between web pages untill he decides to play it again. And if  
he plays
it and navigates to some other page using simple anchor (non flash),  
then

audio should automatically play untill he pauses it.

My idea is to store play/pause state in some variable (or XML), so  
that

state can be maintained. BUT I do not know how to do it.
CAN ANYONE HELP?

Rajiv
___
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] Need beta testers!

2009-06-02 Thread Sidney de Koning

No one is interested? That really breaks my heart ;)
You dont have to check it out in SVN, just browse the source and give  
me feedback, code wise, structure wise, best way/different way to  
parse files, comments, suggestions etc

I want to learn dammit ;)

Greets Sid


On May 27, 2009, at 9:55 AM, Sidney de Koning wrote:


Hi List,

I have created a very simple PLS parser (playlist file, used in  
Winamp and other programs) for AIR.
And would like to invite people to use it and give me feedback, code  
wise, structure wise, best way/different way to parse files,  
comments, suggestions etc


What can you do with this? You can listen to radio streams in AIR.

So if there is somebody who would like to test this, check out the  
source at http://code.google.com/p/as3plsreader


Hoping for some reactions, both bad and good,

Sid


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


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] Need beta testers!

2009-05-27 Thread Sidney de Koning

Hi List,

I have created a very simple PLS parser (playlist file, used in Winamp  
and other programs) for AIR.
And would like to invite people to use it and give me feedback, code  
wise, structure wise, best way/different way to parse files, comments,  
suggestions etc


What can you do with this? You can listen to radio streams in AIR.

So if there is somebody who would like to test this, check out the  
source at http://code.google.com/p/as3plsreader


Hoping for some reactions, both bad and good,

Sid


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] regex in switch statement

2009-05-15 Thread Sidney de Koning

Hi MM,

I think its better practice to define that regex in a variable and  
switch on that variable.


HTH,

Sidney de Koning

On May 15, 2009, at 2:12 PM, Mendelsohn, Michael wrote:


Hi list...

Is it possible to use a regular expression as a case in a switch  
statement?  I've been searching around and haven't found anything  
specifically for actionscript.


Thanks,
- MM

___
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] PSD Parser thumbs and metadata; who asked?

2009-05-11 Thread Sidney de Koning

Hi List,

Cant remember who asked but last week orso somebody about a PSD Parser  
and metadata getting thumbs out.

Been looking around the libspark project: 
http://www.libspark.org/svn/as3/PSDParser/

They have a plethora of fantastic projects, worth taking a look.

Have fun!

Sid


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] File access

2009-05-07 Thread Sidney de Koning

Hi Karl,

I think Adobe has their own project of getting meta data out of file,  
especially for their 'own' file formats, i'm guessing PSD aswell

I have not looked in to this but maybe it can help you;  its called XMP.

http://labs.adobe.com/technologies/xmplibrary/

http://www.adobe.com/devnet/xmp/
http://www.adobe.com/products/xmp/


Hope this helps you,

Sid

On May 7, 2009, at 11:01 AM, Glen Pike wrote:


Hi,

  The open-file dialog is an OS thing - the thumbs come from the OS  
rather than the image.  PSD's are an exception - the thumbnail  
appears in the Adobe style dialogue for these...


  I am guessing AS3 + AIR may allow a bit more flexibility with  
opening and accessing file data in the way you would like, but as  
you are using AS2, you are probably restricted to uploading a file,  
making a thumbnail then displaying it...  Be aware that if you are  
thinking of doing something like this, image uploading, even with  
phpThumb, is often exploited by hackers - read the doc's / fix list  
if you are thinking of using ready made scripts and weigh up pros/ 
cons.


  Glen

Karl DeSaulniers wrote:

Thanks Glen,
I will look that up.
I kind of figured I would need some kind of script help in the  
process, but was just wondering if Flash had the capabilities.
Like when your in the open file dialog window. The thumbnail you  
see. Retrieving that somehow in flash.

No SystemCapabilities function for something like that?

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com

On May 7, 2009, at 3:26 AM, Glen Pike wrote:


Hi,

  Don't think you could do this in Flash without loading the whole  
image file, even if it did have a thumbnail - not sure if this is  
a feature of the JPEG / PNG spec or not?
If you are loading images from the server, you could run a  
script that generates thumbnails on the fly, (hopefully caching  
them for further browser requests).  There are loads of free  
scripts - phpThumb is one I have seen that may do the caching too.


  HTH

  Glen

Karl DeSaulniers wrote:
Is there a way to display the thumbnail of a file? Like a .PSD  
(Photoshop file).

They sometimes come with an embedded thumbnail.
I wanted to know if you can access this and use it to display.
I am working in AS2. Would it take a code to do that, or no way  
to do that in flash?

Any thoughts would help.
Thanks,


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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




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


___
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


Re: [Flashcoders] What's the dollar symbol for?

2009-05-05 Thread Sidney de Koning

Hi Steve,

It is just a way of naming variables. The Adobe docs say this about it:

Variable names can only contain letters, numbers, and dollar signs  
($). Do not begin variable names with numbers. Variables must be  
unique and they are case-sensitive in Flash Player 7 and later. 


If you look further in his code you see he also uses it for the  
comments:

_data.gd$comments
_data.gd$comments.gd$feedLink
_data.gd$comments.gd$feedLink.countHint

Hope this helps you,

Sid

On May 5, 2009, at 10:42 AM, Stephen Matthews wrote:

Hi, I am working with Martin Legris's great Youtube API class and  
wondered what this was

( _data.gd$rating )
What does the dollar symbol do?
Here is a link to the particular class-
http://as3-youtube-data-api.googlecode.com/svn/trunk/ca/newcommerce/youtube/data/VideoData.as
This is the getter-
public function get rating():RatingData
{
return new RatingData(_data.gd$rating);
}

PS I looked at Adobe's online help but could not find a reference to  
it.

Thanks Steve
___
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] Conditional statement in [Embed(source=... tag

2009-04-28 Thread Sidney de Koning

Hi Jiri,

Why do you want to do that conditional there? Cant you call a var?
Then in your main entry class you set that var depending on the lang  
you get in.

Idea?

Or if you work with some sort of MVC ( Model View Controller )  
architecture you could do that conditional in your Model and in your  
Emdbed tag just query MainModel.getUnicodeRange() which returns a  
string of all appropriate unicode chars.


Let me know if this works,

Sid


On Apr 28, 2009, at 5:47 PM, Jiri wrote:


Hello list,

i was wondering if it is possible to set a conditional statement in  
the EMBED tag. I would like to set the unicode range based on an id.



Here is the class i have now:

package {
import flash.display.Sprite;

public class ArialRoundedBoldFont extends Sprite {
		[Embed(source=Arial-Rounded-MT-Bold.ttf,  
fontFamily=ArialRoundedBold, fontWeight=bold,  
mimeType=application/x-font-truetype, unicodeRange=U+0020-U+017E,U 
+20A0-U+20CF)]

public static var font:Class;
}
}


I would like to achive that the var unicodeRange=U+0020-U+017E,U 
+20A0-U+20CF


is something like
unicodeRange=((lang==id)? U+0020-U+017E,U+20A0-U+20CF :  U+0020-U 
+017E)


Is this possible, or do I need to write a pre parser,  generating  
the .as file with the correct unicodeRange for a specific language.  
Then compile all the .as files for each individual country?


Many thanks,

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


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


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

2009-04-21 Thread Sidney de Koning

Anybody?

I just want to know how to load an file from a server that holds  
string data (xml or txt file) without getting the 2032 error.


Please help,

Sid


On Apr 20, 2009, at 4:14 PM, Sidney de Koning wrote:


Hi List,

I want to load textfile from my own server from an AIR app but i  
keep getting a 2032 Error, a Stream Error. Event though when i load  
this from the browser it works.
The docs about this on the net are very limited. This is what i  
thought of so far:


- It could be a crossdomain error?
- I do handle all events?
- I tried a loading in a PHP file that uses fopen to serve me the file

Do anyone have any ideas? I just want to read in this text file ( or  
any other file with string data from my server ) or should i use  
FileStream to read in the file? Eventually the contents of the file  
i load in will will need to be a File Object ().


Thanks in advance,

Sidney

Below is my code:


var xmlURL:String = http://www.funky-monkey.nl/air/stringtest/serveFile.php 
;


var xmlReq:URLRequest = new URLRequest( xmlURL );
var xmlLoader:URLLoader = new URLLoader( xmlReq );

//listen for error events
xmlLoader.addEventListener( IOErrorEvent.IO_ERROR , onIOError );
xmlLoader.addEventListener( SecurityErrorEvent.SECURITY_ERROR ,  
onSecurityError );

xmlLoader.addEventListener( Event.COMPLETE , xmlLoaded );

function xmlLoaded(evt:Event):void {
trace( evt.target.data)
}

function onIOError(evt:IOErrorEvent):void {
trace( evt.text)
}

function onSecurityError(evt:SecurityErrorEvent):void {
trace( evt.text )
}


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


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-21 Thread Sidney de Koning

Hi Muzak,

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

Sid

On Apr 21, 2009, at 4:38 PM, Muzak wrote:


Works fine here (Flex+Air).

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


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



Anybody?
I just want to know how to load an file from a server that holds   
string data (xml or txt file) without getting the 2032 error.

Please help,
Sid
On Apr 20, 2009, at 4:14 PM, Sidney de Koning wrote:

Hi List,

I want to load textfile from my own server from an AIR app but i   
keep getting a 2032 Error, a Stream Error. Event though when i  
load  this from the browser it works.
The docs about this on the net are very limited. This is what i   
thought of so far:


- It could be a crossdomain error?
- I do handle all events?
- I tried a loading in a PHP file that uses fopen to serve me the  
file


Do anyone have any ideas? I just want to read in this text file  
( or  any other file with string data from my server ) or should i  
use  FileStream to read in the file? Eventually the contents of  
the file  i load in will will need to be a File Object ().


Thanks in advance,

Sidney

Below is my code:


var xmlURL:String = http://www.funky-monkey.nl/air/stringtest/serveFile.php 
 ;


var xmlReq:URLRequest = new URLRequest( xmlURL );
var xmlLoader:URLLoader = new URLLoader( xmlReq );

//listen for error events
xmlLoader.addEventListener( IOErrorEvent.IO_ERROR , onIOError );
xmlLoader.addEventListener( SecurityErrorEvent.SECURITY_ERROR ,   
onSecurityError );

xmlLoader.addEventListener( Event.COMPLETE , xmlLoaded );

function xmlLoaded(evt:Event):void {
trace( evt.target.data)
}

function onIOError(evt:IOErrorEvent):void {
trace( evt.text)
}

function onSecurityError(evt:SecurityErrorEvent):void {
trace( evt.text )
}




___
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-21 Thread Sidney de Koning

If it does work, my question becomes something different;

How do i convert the loaded in data (one big string) to a File object ?

Greet Sidney

On Apr 21, 2009, at 4:38 PM, Muzak wrote:


Works fine here (Flex+Air).

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


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



Anybody?
I just want to know how to load an file from a server that holds   
string data (xml or txt file) without getting the 2032 error.

Please help,
Sid
On Apr 20, 2009, at 4:14 PM, Sidney de Koning wrote:

Hi List,

I want to load textfile from my own server from an AIR app but i   
keep getting a 2032 Error, a Stream Error. Event though when i  
load  this from the browser it works.
The docs about this on the net are very limited. This is what i   
thought of so far:


- It could be a crossdomain error?
- I do handle all events?
- I tried a loading in a PHP file that uses fopen to serve me the  
file


Do anyone have any ideas? I just want to read in this text file  
( or  any other file with string data from my server ) or should i  
use  FileStream to read in the file? Eventually the contents of  
the file  i load in will will need to be a File Object ().


Thanks in advance,

Sidney

Below is my code:


var xmlURL:String = http://www.funky-monkey.nl/air/stringtest/serveFile.php 
 ;


var xmlReq:URLRequest = new URLRequest( xmlURL );
var xmlLoader:URLLoader = new URLLoader( xmlReq );

//listen for error events
xmlLoader.addEventListener( IOErrorEvent.IO_ERROR , onIOError );
xmlLoader.addEventListener( SecurityErrorEvent.SECURITY_ERROR ,   
onSecurityError );

xmlLoader.addEventListener( Event.COMPLETE , xmlLoaded );

function xmlLoaded(evt:Event):void {
trace( evt.target.data)
}

function onIOError(evt:IOErrorEvent):void {
trace( evt.text)
}

function onSecurityError(evt:SecurityErrorEvent):void {
trace( evt.text )
}




___
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-21 Thread Sidney de Koning

Some things that pop to mind;

- Can i add data to a File Object?
- Can i create a new temporary File Object and and string data to it?  
I save it in memory and pass it through to the rest.


Hope you can hel me with this,

Greets,

Sid

On Apr 21, 2009, at 4:38 PM, Muzak wrote:


Works fine here (Flex+Air).

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


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



Anybody?
I just want to know how to load an file from a server that holds   
string data (xml or txt file) without getting the 2032 error.

Please help,
Sid
On Apr 20, 2009, at 4:14 PM, Sidney de Koning wrote:

Hi List,

I want to load textfile from my own server from an AIR app but i   
keep getting a 2032 Error, a Stream Error. Event though when i  
load  this from the browser it works.
The docs about this on the net are very limited. This is what i   
thought of so far:


- It could be a crossdomain error?
- I do handle all events?
- I tried a loading in a PHP file that uses fopen to serve me the  
file


Do anyone have any ideas? I just want to read in this text file  
( or  any other file with string data from my server ) or should i  
use  FileStream to read in the file? Eventually the contents of  
the file  i load in will will need to be a File Object ().


Thanks in advance,

Sidney

Below is my code:


var xmlURL:String = http://www.funky-monkey.nl/air/stringtest/serveFile.php 
 ;


var xmlReq:URLRequest = new URLRequest( xmlURL );
var xmlLoader:URLLoader = new URLLoader( xmlReq );

//listen for error events
xmlLoader.addEventListener( IOErrorEvent.IO_ERROR , onIOError );
xmlLoader.addEventListener( SecurityErrorEvent.SECURITY_ERROR ,   
onSecurityError );

xmlLoader.addEventListener( Event.COMPLETE , xmlLoaded );

function xmlLoaded(evt:Event):void {
trace( evt.target.data)
}

function onIOError(evt:IOErrorEvent):void {
trace( evt.text)
}

function onSecurityError(evt:SecurityErrorEvent):void {
trace( evt.text )
}




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

2009-04-20 Thread Sidney de Koning

Hi List,

I want to load textfile from my own server from an AIR app but i keep  
getting a 2032 Error, a Stream Error. Event though when i load this  
from the browser it works.
The docs about this on the net are very limited. This is what i  
thought of so far:


- It could be a crossdomain error?
- I do handle all events?
- I tried a loading in a PHP file that uses fopen to serve me the file

Do anyone have any ideas? I just want to read in this text file ( or  
any other file with string data from my server ) or should i use  
FileStream to read in the file? Eventually the contents of the file i  
load in will will need to be a File Object ().


Thanks in advance,

Sidney

Below is my code:


var xmlURL:String = http://www.funky-monkey.nl/air/stringtest/serveFile.php 
;


var xmlReq:URLRequest = new URLRequest( xmlURL );
var xmlLoader:URLLoader = new URLLoader( xmlReq );

//listen for error events
xmlLoader.addEventListener( IOErrorEvent.IO_ERROR , onIOError );
xmlLoader.addEventListener( SecurityErrorEvent.SECURITY_ERROR ,  
onSecurityError );

xmlLoader.addEventListener( Event.COMPLETE , xmlLoaded );

function xmlLoaded(evt:Event):void {
trace( evt.target.data)
}

function onIOError(evt:IOErrorEvent):void {
trace( evt.text)
}

function onSecurityError(evt:SecurityErrorEvent):void {
trace( evt.text )
}


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] Best data type for Zend AMF

2009-03-30 Thread Sidney de Koning

Hi List,

I'm using  Zend AMF, and i'd like to know what is the best way and  
fastest to transfer data.
For instance; do i create an array from database data in PHP and send  
it to flash? Or do i formatted array data from a database to xml and  
send that to flash?
Which is the fastest? And more specifically; what datatype is the  
fastest.


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] Best data type for Zend AMF

2009-03-30 Thread Sidney de Koning

Nice one guys, thanks for the response.
Since i'm not at all into Flex, in the video he talks about binding  
(and mapping them to ValueObjects).

My question is can i do this with pure AS3?

Cheers,

Sid

On Mar 30, 2009, at 4:23 PM, Glen Pike wrote:

AMFPHP did this really well with result sets too - straight out of  
the box like CF.


Muzak wrote:

For database type data, Array of Objects.
Forget about XML.

With Coldfusion (and remoting) you can grab a database query result  
and just send that straight to Flash/Flex and it will be  
transformed into an Array of Objects automatically.


In CF it's as simple as:

cfset var rsResult= /
cfquery name=rsResult other stuff..
  SELECT * FROM table_name
/cfquery
cfreturn rsResult /

Seems they're still working on mapping PHP to AS objects:
http://wadearnold.com/blog/?p=54
Allthough, the article is from sept 2008, so it may have been  
implemented by now.


So if class mappings are implemented (still have to take Zend AMF  
for a spin) then that's the *best* option, but probably not the  
*fastest*.
At least in Coldfusion transforming plain vanilla objects into  
typed objects slows things down (especially with lots of data).


regards,
Muzak

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


To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, March 30, 2009 12:05 PM
Subject: [Flashcoders] Best data type for Zend AMF



Hi List,

I'm using  Zend AMF, and i'd like to know what is the best way  
and  fastest to transfer data.
For instance; do i create an array from database data in PHP and  
send  it to flash? Or do i formatted array data from a database to  
xml and  send that to flash?
Which is the fastest? And more specifically; what datatype is the   
fastest.


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


Re: [Flashcoders] Best data type for Zend AMF

2009-03-30 Thread Sidney de Koning

Hi Jason,

Yes i know :) maybe my question was a bit unclear;  is there a way I  
can accomplish the same thing in pure AS3 without using the data  
binding?


Sid


On Mar 30, 2009, at 5:14 PM, Merrill, Jason wrote:


Since i'm not at all into Flex, in the video he talks about binding
(and mapping them to ValueObjects).
My question is can i do this with pure AS3?


You can certainly do Value Objects (which are simply just simple  
classes
with properties you set and get - anyone can write one), but  
databinding

is a Flex framework only feature.


Jason Merrill
Bank of  America   |  Learning Performance Solutions Instructional
Technology  Media
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


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

2009-02-10 Thread Sidney de Koning
 = URLRequestMethod.POST;
request.data = variables;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, completeHandler);
try
{
  loader.load(request);
}
catch (error:Error)
{
  trace(Unable to load URL);
}
}


/   viewer class
//  5)

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


___
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


[RESOLVED] : [Flashcoders] Re: Flash CS3 DataGrid wordWraping in a cell

2009-02-06 Thread Sidney de Koning

Hi Craig,

That fixed it, thanks!

Sid

On Feb 5, 2009, at 8:03 PM, Craig Bowman wrote:


Sid:



Make a class that extends the CellRenderer class and.





..ack its quicker to show you the code. See below. This will do it  
for you.






package {

   import fl.controls.listClasses.CellRenderer;



  // make a cell renderer class that allow wrapping of text



   public class MultiLineCell extends CellRenderer

   {



   public function MultiLineCell()

   {

   // constructor

   textField.wordWrap = true;

   textField.multiline = true;

   textField.autoSize = left;

   }



   override protected function drawLayout():void

   {

   // allow text to flow according to column width

   textField.width = this.width;

   super.drawLayout();

   }

   }  // end of class

}  // end of package





Now just assign it to the required column. Ie:





myDataGrid.getColumnAt(5).cellRenderer=MultiLineCell;





Cheers,

Craig Bowman

___
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] Flash CS3 DataGrid wordWraping in a cell

2009-02-05 Thread Sidney de Koning

Hi List,

Is it possible to have a the DataGrid component in Flash CS3 wrap its  
text in a cell? So i have one block of text in stead of one long  
sentence that falls out of screen?
I saw some references online that with Flex it is possible, by using  
the wordWrap property (but im not using Flex).


If it is possible, can sombody please tell me how...

Thanks in advance,

Sid

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] This is kind of Wonderfl

2009-02-02 Thread Sidney de Koning

He wrote the link wrong, it is: http://wonderfl.kayac.com/

Its pretty f* awesome! And most def the coolest i've seen in   
along time!


Sid

On Feb 2, 2009, at 5:02 PM, Merrill, Jason wrote:

Is this spam?  Or did that site not pay their ISP dues?  This (http://wonderfl.kayack.com/ 
) seems to be a web site circa 1998 - what does this have to do with  
Flash?



Jason Merrill
Bank of America Instructional Technology  Media   ·   Learning  
Performance Solutions LLD


Interested in Flash Platform technologies?  Join the Bank of America  
Flash Platform Community
Interested in innovative ideas in Learning?  Check out the  
Innovative Learning Blog and subscribe.






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

Sent: Monday, February 02, 2009 10:58 AM
To: azf...@googlegroups.com; flexcod...@yahoogroups.com; Flash  
Coders List

Subject: [Flashcoders] This is kind of Wonderfl

Spotted a post over at Techcrunch about wonderfl.kayack.com . Looks  
like a
pretty cool project. And if the creator(s) happen to see this, a big  
thumbs

up!
Steve
___
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


Re: [Flashcoders] Components for Touchscreen

2009-01-30 Thread Sidney de Koning

Hi Glen,

You can check out eyePoke, a multitouch api:
http://touchevent.riaforge.org/

This is from their docs:
-EyePoke provides access to the display list and calls up the  
callibrator when touched.
-TouchEvent extends MouseEvent and is designed to simultaneously  
support mice, pens, and multitouch displays.
-TouchListener attaches to the camera and is added to the display  
list. When it detects user input, it dispatches a TouchEvent.
-TouchFunctions contains static functions to implement things like  
startDrag in a multitouch-aware environment.


Some other stuff about multitouch and Flash:
http://wiki.nuigroup.com/Applications_and_libraries -- Libs in AS3
http://www.multitouching.nl/page.asp?page=148 -- Downloads and general  
info


Hope this helps you,

Sid


On Jan 30, 2009, at 10:58 AM, Glen Pike wrote:


Hi,

 Whilst I am Googling, does anyone know of any Flash components that  
are specifically for touchscreen type applications?


 Features I am looking for.

 rollover / rollout are not very useful as you tend to be  
pressing a control when you rollover...


A bigger hit area for controls as my fingertips are bigger than  
my cursor.


Different component types - drag / throw type components, etc.

 Thanks

 Glen

___
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] [AS in general] Question corcerning a math formula

2009-01-27 Thread Sidney de Koning

Hi Jim,

In the Number class there is are a couple of functions to help you.  
You want a function called toFixed().


so if you do Number(total).toFixed(2); You get the result you want :)

This is pure AS3 though,

Hope this helps,

Sid

On Jan 27, 2009, at 9:45 AM, jimmi wrote:

Goodmorning, i am trying to make a formula that makes for example  
30.60 of 30.6. So I need it to add a 0.


This is the formula I am using now.
total = Number(Number(600) / 100 * Number(5.1))

I have tried all sorts of additions to the formula to try to get it  
to make 30.60 of 30.6. But no luck


Anyone here who knows how to make the formula add a 0?

Best regards,
Jim
___
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] [AS in general] Question corcerning a math formula

2009-01-27 Thread Sidney de Koning

Hi Jimmi,

Look at this then,

To truncate Numbers in Actionscript:
Three decimals:
var yourNumber:Number = 23.263636453737383838383838;
yourNumber =  Math.round(yourNumber *1000)/1000;
// Outputs 23.263

Two decimals:
var yourNumber:Number = 23.263636453737383838383838;
yourNumber = Math.round(yourNumber *100)/100;
// Outputs 23.26

One decimal:
var yourNumber:Number = 23.263636453737383838383838;

yourNumber = Math.round(yourNumber *10)/10;
// Outputs 23.2

and if you want to do it even nicer you do it like this:


function round(number:Number, precision:Number):Number
{
var decimalPlaces:Number = Math.pow(10, precision);
trace(Math.round(decimalPlaces * number) / decimalPlaces)
return Math.round(decimalPlaces * number) / decimalPlaces;
}

round(2.5678, 2);

Hope this helps,

Sid


On Jan 27, 2009, at 10:05 AM, jimmi wrote:


Ah snap, i need it for AS2, is there any alternative for that?

Best regards,
Jim

On Tue, Jan 27, 2009 at 9:53 AM, Sidney de Koning
sid...@funky-monkey.nl wrote:

Hi Jim,

In the Number class there is are a couple of functions to help you.  
You want

a function called toFixed().

so if you do Number(total).toFixed(2); You get the result you want :)

This is pure AS3 though,

Hope this helps,

Sid

On Jan 27, 2009, at 9:45 AM, jimmi wrote:

Goodmorning, i am trying to make a formula that makes for example  
30.60 of

30.6. So I need it to add a 0.

This is the formula I am using now.
total = Number(Number(600) / 100 * Number(5.1))

I have tried all sorts of additions to the formula to try to get  
it to

make 30.60 of 30.6. But no luck

Anyone here who knows how to make the formula add a 0?

Best regards,
Jim
___
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


Re: [Flashcoders] [AS in general] Question corcerning a math formula

2009-01-27 Thread Sidney de Koning

Oh Allandt i misread, sorry.

Yes flash does remove the zero at the end of decimal values.
But then you only want to use this function to display (in a textfield  
or something) and not to calcualte with it,
because calculating with double zeroes is the same calucalting with a  
zero :) ie 4 * 2.0 == 4 *2.


To fix it do this (AS3 code):

function round(pValue:Number, precision:int):String {
var intVal:Number = Math.floor(pValue);
var finalLength : int = intVal.toString().length + 1 + precision;
var baseString : String = pValue.toString().substr(0, finalLength);
if(baseString.length == intVal.toString().length) {
baseString += .;
}
while(baseString.length  finalLength) {
baseString += 0;
}
return baseString;
}

If there is someone on this list who would like to convert this  
function to AS2 to help Jimmi that would be awesome :)


Cheers,

Sid


On Jan 27, 2009, at 11:26 AM, allandt bik-elliott (thefieldcomic.com)  
wrote:



would that work for the number 2:20 tho?

doesn't flash remove zeros at the end of decimal values?

a

On Tue, Jan 27, 2009 at 10:20 AM, Sidney de Koning
sid...@funky-monkey.nlwrote:


Hi Jimmi,

Look at this then,

To truncate Numbers in Actionscript:
Three decimals:
var yourNumber:Number = 23.263636453737383838383838;
yourNumber =  Math.round(yourNumber *1000)/1000;
// Outputs 23.263

Two decimals:
var yourNumber:Number = 23.263636453737383838383838;
yourNumber = Math.round(yourNumber *100)/100;
// Outputs 23.26

One decimal:
var yourNumber:Number = 23.263636453737383838383838;

yourNumber = Math.round(yourNumber *10)/10;
// Outputs 23.2

and if you want to do it even nicer you do it like this:


function round(number:Number, precision:Number):Number
{
  var decimalPlaces:Number = Math.pow(10, precision);
  trace(Math.round(decimalPlaces * number) / decimalPlaces)
  return Math.round(decimalPlaces * number) / decimalPlaces;
}

round(2.5678, 2);

Hope this helps,

Sid



On Jan 27, 2009, at 10:05 AM, jimmi wrote:

Ah snap, i need it for AS2, is there any alternative for that?


Best regards,
Jim

On Tue, Jan 27, 2009 at 9:53 AM, Sidney de Koning
sid...@funky-monkey.nl wrote:


Hi Jim,

In the Number class there is are a couple of functions to help  
you. You

want
a function called toFixed().

so if you do Number(total).toFixed(2); You get the result you  
want :)


This is pure AS3 though,

Hope this helps,

Sid

On Jan 27, 2009, at 9:45 AM, jimmi wrote:

Goodmorning, i am trying to make a formula that makes for example  
30.60

of
30.6. So I need it to add a 0.

This is the formula I am using now.
total = Number(Number(600) / 100 * Number(5.1))

I have tried all sorts of additions to the formula to try to get  
it to

make 30.60 of 30.6. But no luck

Anyone here who knows how to make the formula add a 0?

Best regards,
Jim
___
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 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] [AS in general] Question corcerning a math formula

2009-01-27 Thread Sidney de Koning

If it works, it works :)
Try converting it to a function so you can reuse it later.

Happy coding :)

Sid

On Jan 27, 2009, at 12:29 PM, jimmi wrote:


I now have this :

total= String(Number(600) / 100 * Number(5.1)); 
cash = newArray;
cash = total.split(.);
if (cash.length == 1)
{
 total+= .00;
}
else if (cash[cash.length - 1].length == 1)
{
 total+= 0;
}

It's doing the job.

On Tue, Jan 27, 2009 at 12:14 PM, Sidney de Koning
sid...@funky-monkey.nl wrote:

Oh Allandt i misread, sorry.

Yes flash does remove the zero at the end of decimal values.
But then you only want to use this function to display (in a  
textfield or

something) and not to calcualte with it,
because calculating with double zeroes is the same calucalting with  
a zero

:) ie 4 * 2.0 == 4 *2.

To fix it do this (AS3 code):

function round(pValue:Number, precision:int):String {
  var intVal:Number = Math.floor(pValue);
  var finalLength : int = intVal.toString().length + 1 +  
precision;
  var baseString : String = pValue.toString().substr(0,  
finalLength);

  if(baseString.length == intVal.toString().length) {
  baseString += .;
  }
  while(baseString.length  finalLength) {
  baseString += 0;
  }
  return baseString;
}

If there is someone on this list who would like to convert this  
function to

AS2 to help Jimmi that would be awesome :)

Cheers,

Sid


On Jan 27, 2009, at 11:26 AM, allandt bik-elliott  
(thefieldcomic.com) wrote:



would that work for the number 2:20 tho?

doesn't flash remove zeros at the end of decimal values?

a

On Tue, Jan 27, 2009 at 10:20 AM, Sidney de Koning
sid...@funky-monkey.nlwrote:


Hi Jimmi,

Look at this then,

To truncate Numbers in Actionscript:
Three decimals:
var yourNumber:Number = 23.263636453737383838383838;
yourNumber =  Math.round(yourNumber *1000)/1000;
// Outputs 23.263

Two decimals:
var yourNumber:Number = 23.263636453737383838383838;
yourNumber = Math.round(yourNumber *100)/100;
// Outputs 23.26

One decimal:
var yourNumber:Number = 23.263636453737383838383838;

yourNumber = Math.round(yourNumber *10)/10;
// Outputs 23.2

and if you want to do it even nicer you do it like this:


function round(number:Number, precision:Number):Number
{
var decimalPlaces:Number = Math.pow(10, precision);
trace(Math.round(decimalPlaces * number) / decimalPlaces)
return Math.round(decimalPlaces * number) / decimalPlaces;
}

round(2.5678, 2);

Hope this helps,

Sid



On Jan 27, 2009, at 10:05 AM, jimmi wrote:

Ah snap, i need it for AS2, is there any alternative for that?


Best regards,
Jim

On Tue, Jan 27, 2009 at 9:53 AM, Sidney de Koning
sid...@funky-monkey.nl wrote:


Hi Jim,

In the Number class there is are a couple of functions to help  
you. You

want
a function called toFixed().

so if you do Number(total).toFixed(2); You get the result you  
want :)


This is pure AS3 though,

Hope this helps,

Sid

On Jan 27, 2009, at 9:45 AM, jimmi wrote:

Goodmorning, i am trying to make a formula that makes for  
example 30.60


of
30.6. So I need it to add a 0.

This is the formula I am using now.
total = Number(Number(600) / 100 * Number(5.1))

I have tried all sorts of additions to the formula to try to  
get it to

make 30.60 of 30.6. But no luck

Anyone here who knows how to make the formula add a 0?

Best regards,
Jim
___
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 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

Re: [Flashcoders] NativeMenuItem keyModifier with function key (AIR)

2009-01-08 Thread Sidney de Koning

Hi Zeh,

Maybe these resources can help you?

http://livedocs.adobe.com/air/1/devappsflex/dev_guide_flex.pdf
“Using multi-platform key equivalent menu commands” in the PDF on page  
57 (64 in PDF)



http://extjs.com/forum/showthread.php?t=41615
This one is for JS but it can help you

Hope this helps you,

Sid

On Jan 8, 2009, at 1:46 AM, Zeh Fernando wrote:


Hey list,

Do people here work with AIR? Or is there any better-aligned mailing  
list?


Anyway. I'm using AIR 1.5's NativeMenuItem's .keyEquivalent and
.keyEquivalentModifier. That feature is pretty cool and works like
this:

   var item:NativeMenuItem = new NativeMenuItem(Do Whatever);
   item.keyEquivalent = d;
   item.keyEquivalentModifiers = [Keyboard.CONTROL];

Then when the user presses CTRL+D, the menu item is executed.

(More information at
http://livedocs.adobe.com/flex/3/html/help.html?content=Menus_2.html)

I'm having a problem setting the .keyEquivalent, though. It accepts
strings, so you can't set them to things like Enter, Tab, Del, F1,
etc.

You can try doing this:

   var item:NativeMenuItem = new NativeMenuItem(Do Whatever);
   item.keyEquivalent = F1;
   item.keyEquivalentModifiers = [Keyboard.CONTROL];

And then, funny enough, the menu item will display CTRL+F1 as the
shortcut; but it won't work. The actual shortcut will be CTRL+F - that
is, it only takes the first character of the string as the activation
key (!). The documentation seems to completely ignore the problem,
very briefly mentioning that .keyEquivalent accepts a string. In fact,
you can write *anything* as the .keyEquivalent and it'll be shown
there on the menu, but only the first char matters.

I tried a lot of different things, like adding Keyboard.F1 to the
keyEquivalentModifiers array, using Keyboard.F1's key code as a
keyEquivalent char, using AIR's new .STRING_F1 or KEYNAME_F1
constants, and things like that. Nothing seems to work though.

Has somebody ran into that and found a solution that works? Or am I
imagining things? It seems odd to me that I'm able to create a menu in
Flash which responds to F1 while I can't do that in AIR using its
(great) native menus. Of course I can always add the shortcuts as some
keyboard event listener hidden somewhere, but it'd be less than
optimal (and wouldn't display the shortcut on the menu).


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


Sidney de Koning
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] NativeMenuItem keyModifier with function key (AIR)

2009-01-08 Thread Sidney de Koning

Oh one more link for you:

Function key can't be used as keyEquivalents
http://bugs.adobe.com/jira/browse/SDK-17901

Good luck,

Sid


On Jan 8, 2009, at 1:46 AM, Zeh Fernando wrote:


Hey list,

Do people here work with AIR? Or is there any better-aligned mailing  
list?


Anyway. I'm using AIR 1.5's NativeMenuItem's .keyEquivalent and
.keyEquivalentModifier. That feature is pretty cool and works like
this:

   var item:NativeMenuItem = new NativeMenuItem(Do Whatever);
   item.keyEquivalent = d;
   item.keyEquivalentModifiers = [Keyboard.CONTROL];

Then when the user presses CTRL+D, the menu item is executed.

(More information at
http://livedocs.adobe.com/flex/3/html/help.html?content=Menus_2.html)

I'm having a problem setting the .keyEquivalent, though. It accepts
strings, so you can't set them to things like Enter, Tab, Del, F1,
etc.

You can try doing this:

   var item:NativeMenuItem = new NativeMenuItem(Do Whatever);
   item.keyEquivalent = F1;
   item.keyEquivalentModifiers = [Keyboard.CONTROL];

And then, funny enough, the menu item will display CTRL+F1 as the
shortcut; but it won't work. The actual shortcut will be CTRL+F - that
is, it only takes the first character of the string as the activation
key (!). The documentation seems to completely ignore the problem,
very briefly mentioning that .keyEquivalent accepts a string. In fact,
you can write *anything* as the .keyEquivalent and it'll be shown
there on the menu, but only the first char matters.

I tried a lot of different things, like adding Keyboard.F1 to the
keyEquivalentModifiers array, using Keyboard.F1's key code as a
keyEquivalent char, using AIR's new .STRING_F1 or KEYNAME_F1
constants, and things like that. Nothing seems to work though.

Has somebody ran into that and found a solution that works? Or am I
imagining things? It seems odd to me that I'm able to create a menu in
Flash which responds to F1 while I can't do that in AIR using its
(great) native menus. Of course I can always add the shortcuts as some
keyboard event listener hidden somewhere, but it'd be less than
optimal (and wouldn't display the shortcut on the menu).


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


Sidney de Koning
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] NativeMenuItem keyModifier with function key (AIR)

2009-01-08 Thread Sidney de Koning

No problem :)

Sid

On Jan 8, 2009, at 2:04 PM, Zeh Fernando wrote:


Hey Sydney,

Thanks for the links. The first two didn't do anything for me - they
basically repeat what's in the documentation and provide no
information about the advanced keys - but the last one stating it is a
bug is at least a relief as it means it's known and should (hopefully)
be fixed soon.

Thanks again,
Zeh

On Thu, Jan 8, 2009 at 6:25 AM, Sidney de Koning sid...@funky-monkey.nl 
 wrote:

Oh one more link for you:

Function key can't be used as keyEquivalents
http://bugs.adobe.com/jira/browse/SDK-17901

Good luck,

Sid


On Jan 8, 2009, at 1:46 AM, Zeh Fernando wrote:


Hey list,

Do people here work with AIR? Or is there any better-aligned  
mailing list?


Anyway. I'm using AIR 1.5's NativeMenuItem's .keyEquivalent and
.keyEquivalentModifier. That feature is pretty cool and works like
this:

 var item:NativeMenuItem = new NativeMenuItem(Do Whatever);
 item.keyEquivalent = d;
 item.keyEquivalentModifiers = [Keyboard.CONTROL];

Then when the user presses CTRL+D, the menu item is executed.

(More information at
http://livedocs.adobe.com/flex/3/html/help.html? 
content=Menus_2.html)


I'm having a problem setting the .keyEquivalent, though. It accepts
strings, so you can't set them to things like Enter, Tab, Del, F1,
etc.

You can try doing this:

 var item:NativeMenuItem = new NativeMenuItem(Do Whatever);
 item.keyEquivalent = F1;
 item.keyEquivalentModifiers = [Keyboard.CONTROL];

And then, funny enough, the menu item will display CTRL+F1 as the
shortcut; but it won't work. The actual shortcut will be CTRL+F -  
that
is, it only takes the first character of the string as the  
activation

key (!). The documentation seems to completely ignore the problem,
very briefly mentioning that .keyEquivalent accepts a string. In  
fact,

you can write *anything* as the .keyEquivalent and it'll be shown
there on the menu, but only the first char matters.

I tried a lot of different things, like adding Keyboard.F1 to the
keyEquivalentModifiers array, using Keyboard.F1's key code as a
keyEquivalent char, using AIR's new .STRING_F1 or KEYNAME_F1
constants, and things like that. Nothing seems to work though.

Has somebody ran into that and found a solution that works? Or am I
imagining things? It seems odd to me that I'm able to create a  
menu in

Flash which responds to F1 while I can't do that in AIR using its
(great) native menus. Of course I can always add the shortcuts as  
some

keyboard event listener hidden somewhere, but it'd be less than
optimal (and wouldn't display the shortcut on the menu).


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


Sidney de Koning
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
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] Probably a simple answer...

2008-12-11 Thread Sidney de Koning

Hi Ross,

when you create your variables, you forgot to set the identifier,  
public , private etc.

Because else it scopes it default to , if i'm not mistaken.
So now change that to (and its good practice to use an underscore for  
member variables);


private var _mainBrowser: BasicBrowserWindow; (not htmlLoader)

Also change the mainBrowser everywhere to _mainBrowser, now also do  
the same trick for the htmlLoader.

(set it to private and rename to_htmLoader).

That should fix it.

Hope this helps you on your way,

Sid


On Dec 11, 2008, at 2:03 PM, Lehr, Ross (N-SGIS) wrote:

This is probably too simple of a question to ask here, but I'm  
trying to

get my head around this AS3 OOP thing.  I'm playing with a simple AIR
(built in Flash) web browser and I've hit a snag right off the bat.  I
have a document class that calls a class to build the HTMLLoader  
window.
If I comment out the code in the onGoEvent function it works fine.   
When

I uncomment the code and compile, I get a  1061: Call to a possibly
undefined method urlToLoad through a reference with static type  I  
know

urlToLoad is there, I use it to load the default page, but for some
reason it gets lost along the way...  With my limited knowledge of AS3
and OOP I just can't find the problem.  Thanks for any advice and  
help.


urlInput = the text entry field a user would typ the URL address to a
web page.

PS. I've removed some of the code like the import statements to keep
the email as small as possible.

DOCUMENT CLASS

package  {

public class MyBrowser extends MovieClip {

var mainBrowserWindow:HTMLLoader;

public function MyBrowser()

{

mainBrowserWindow = new
BasicBrowserWindow(this,10,45,stage.stageHeight -
100,900,http://www.yahoo.com;);

//goButton

goButton.addEventListener(MouseEvent.CLICK, onGoEvent);

   }

public function onGoEvent(e:MouseEvent):void

{

mainBrowserWindow.urlToLoad( urlInput.text );

}

}

}

BasicBrowserWindow CLASS

package  {

public class BasicBrowserWindow extends HTMLLoader {

var htmlLoader:HTMLLoader = new HTMLLoader();

public function BasicBrowserWindow(mC:MovieClip,
xPos:int,
yPos:int,
browserH:int,
browserW:int,
defaultURL:String)

   {

htmlLoader.x = xPos;

htmlLoader.y = yPos;

htmlLoader.width = browserW;

htmlLoader.height = browserH;

mC.addChild(htmlLoader);

urlToLoad(defaultURL);

  }



   public function urlToLoad(uTL:String):void

   {

htmlLoader.load(new URLRequest( uTL ));
}

}

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


Sidney de Koning
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] Probably a simple answer...

2008-12-11 Thread Sidney de Koning

No problem, thats why we are here :)

Happy coding,
Sid


On Dec 11, 2008, at 3:12 PM, Lehr, Ross (N-SGIS) wrote:


Thanks Sid, it does help... Thanks for the additional advice as well.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sidney
de Koning
Sent: Thursday, December 11, 2008 8:22 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Probably a simple answer...

Hi Ross,

when you create your variables, you forgot to set the identifier,
public , private etc.
Because else it scopes it default to , if i'm not mistaken.
So now change that to (and its good practice to use an underscore for
member variables);

private var _mainBrowser: BasicBrowserWindow; (not htmlLoader)

Also change the mainBrowser everywhere to _mainBrowser, now also do
the same trick for the htmlLoader.
(set it to private and rename to_htmLoader).

That should fix it.

Hope this helps you on your way,

Sid


On Dec 11, 2008, at 2:03 PM, Lehr, Ross (N-SGIS) wrote:


This is probably too simple of a question to ask here, but I'm
trying to
get my head around this AS3 OOP thing.  I'm playing with a simple AIR
(built in Flash) web browser and I've hit a snag right off the  
bat.  I

have a document class that calls a class to build the HTMLLoader
window.
If I comment out the code in the onGoEvent function it works fine.
When
I uncomment the code and compile, I get a  1061: Call to a possibly
undefined method urlToLoad through a reference with static type  I
know
urlToLoad is there, I use it to load the default page, but for some
reason it gets lost along the way...  With my limited knowledge of  
AS3

and OOP I just can't find the problem.  Thanks for any advice and
help.

urlInput = the text entry field a user would typ the URL address to a
web page.

PS. I've removed some of the code like the import statements to  
keep

the email as small as possible.

DOCUMENT CLASS

package  {

public class MyBrowser extends MovieClip {

var mainBrowserWindow:HTMLLoader;

public function MyBrowser()

{

mainBrowserWindow = new
BasicBrowserWindow(this,10,45,stage.stageHeight -
100,900,http://www.yahoo.com;);

//goButton

goButton.addEventListener(MouseEvent.CLICK, onGoEvent);

  }

public function onGoEvent(e:MouseEvent):void

{

mainBrowserWindow.urlToLoad( urlInput.text );

}

}

}

BasicBrowserWindow CLASS

package  {

public class BasicBrowserWindow extends HTMLLoader {

var htmlLoader:HTMLLoader = new HTMLLoader();

public function BasicBrowserWindow(mC:MovieClip,
xPos:int,
yPos:int,
browserH:int,
browserW:int,
defaultURL:String)

  {

htmlLoader.x = xPos;

htmlLoader.y = yPos;

htmlLoader.width = browserW;

htmlLoader.height = browserH;

mC.addChild(htmlLoader);

urlToLoad(defaultURL);

 }



  public function urlToLoad(uTL:String):void

  {

htmlLoader.load(new URLRequest( uTL ));
}

}

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


Sidney de Koning
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
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] flash player detection

2008-12-10 Thread Sidney de Koning

Is this a question or an announcement?

Sid

On Dec 10, 2008, at 3:31 PM, Paul Andrews wrote:

I have a client with a flash site  - targets FP 8, and works fine. I  
have FP10 installed.
If I make a copy of the html wrapper and then try and access the  
site using the copy, the detection of the player fails.


The html uses swfobject for player detection.

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


Sidney de Koning
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] flash player detection

2008-12-10 Thread Sidney de Koning

Oke :)
If you need documentation make FP 10 work with detection by swfobject,  
then this is good read:

http://onflash.org/ted/2008/10/flash-player-10-update-your-detection.php

Good luck paul,

Greets,  Sid

On Dec 10, 2008, at 3:59 PM, Paul Andrews wrote:

- Original Message - From: Sidney de Koning [EMAIL PROTECTED] 


To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, December 10, 2008 2:47 PM
Subject: Re: [Flashcoders] flash player detection



Is this a question or an announcement?


LOL, both. I'm wondering why the flash player detection is baulking  
if I just copy the html wrapper (content untouched), but working  
fine in the original html file.


Paul


Sid

On Dec 10, 2008, at 3:31 PM, Paul Andrews wrote:

I have a client with a flash site  - targets FP 8, and works fine.  
I have FP10 installed.
If I make a copy of the html wrapper and then try and access the   
site using the copy, the detection of the player fails.


The html uses swfobject for player detection.

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


Sidney de Koning
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
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] My rights - site not paid for.

2008-12-08 Thread Sidney de Koning

Hi Stephen,

Here in Holland we have something called 'terms and conditions' for  
freelancers, which you have to make legal with an notary.
This is a document which basically protects you from this kind of  
stuff, and this document can be taken to court if it ever comes to this.


If you don't have this, it is a good thing to have, you probably have  
the same thing in the UK, and its well worth the money. (converted it  
costs about 300 pounds)


If you made a contract with this person, and you both singed it, by  
law he is bound by it. (And legal steps can be under taken when broken).
If you don't have a contract, your basically fucked. Plain and simple.  
Even though a verbal agreement is also legal binding it is very hard  
to prove.


first thing you can do is send another invoice after about 4 weeks, if  
he doesn't respond to it, call him and say you will place and 'under  
construction' banner on the site, and that you will change the ftp  
password ( but dont do this just jet), if he still doesn't respond use  
an agency to collect the outstanding invoice (don't know what they are  
called in engish) if he still doesn't respond, place that  
'underconstruction  banner' online.


Hope this helps,

Good luck with it!

Sid


On Dec 8, 2008, at 12:02 PM, Stephen Matthews wrote:

What are my rights ( in the UK ) for taking down a site which has  
not been paid for?


The owner of the company is happy with his site, but is not coughing  
up.


I still have FTP access.

He says the site took too long, and makes lots of excuses for not  
paying - which do not tally.
He changed the site drastically at least three times - I think it  
took too long too, due to this.
He is updating the news section and other sections whenever he has  
new material.


I would be interested in your thoughts.

This person won an award for being a top business man this year - is  
this what you have to do to be a top business man - screw people?


I am not the kind of person to take this action really, but I may  
consider it.


Thanks

S



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


Sidney de Koning
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] Audio lag on KeyboardEvent.KEY_DOWN

2008-12-08 Thread Sidney de Koning

Hi Jonathan,

You say: The sounds are MP3s which are load()ed into Sound objects on  
init().
Does this mean you preload the sounds? If so;  If you press a key  
before the whole sound is loaded in it takes some time to play it,  
because it is still loading. You can make sure of this by showing the  
application AFTER all the sounds are loaded in, this can be done by  
creating a loader que (place items in an array after they are loaded  
and check if the total amount of items loaded in is equal to the array  
length).
This way you always know that nothing shows up before all the sounds  
are loaded.


Hope this helps you,

Sid

On Dec 8, 2008, at 4:31 PM, jonathan howe wrote:

I'm very interested in the solution to this. I notice it on certain  
machines
and not others... it does not seem to have anything to do with the  
input
part, and in some cases can stutter the display updating. For  
example, if

you were to have a timer trigger the sound and print something at the
screen, they would both 'appear' at the same time but if you also  
measured
the time difference between the trigger's execution and after the  
sound

call, there would be latency.

The superstitious/uneducated part of me supposes that Flash is  
establishing
a modal call to the sound card, and some perform cards respond  
faster than

others.
-jonathan


On Mon, Dec 8, 2008 at 2:37 PM, allandt bik-elliott  
(thefieldcomic.com) 

[EMAIL PROTECTED] wrote:

did you use updateAfterEvent() to force it to play immediately? if  
not, it

might be waiting for the next frame to process the event

On Mon, Dec 8, 2008 at 12:14 PM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:


Hi List,

I'm dipping my toe into AS3 and thought I'd play around with sound  
by

making
a little piano keyboard which is played by pressing keys on the

computer

keyboard.

It works - the appropriate sounds play on KeyboardEvent.KEY_DOWN -

however,
I've noticed that there is often a lag between the keyboard event  
and the

actual sound playing. The occurrence of the lag seems pretty random.

The sounds are MP3s which are load()ed into Sound objects on  
init(). On

KeyboardEvent.KEY_DOWN, the appropriate Sound is play()ed.

I've checked all the MP3s, and they don't have extra silence at the
beginning. I don't think it has to do with the number of MP3s  
involved

(14),
because I noticed the lag even when I was testing it out with 2  
sounds.


Has anyone dealt with this before, and know what the problem might  
be?

You

can see (or rather, hear) the lag for yourself here:
http://snipurl.com/7ndr2-meep

Thanks!

In hope,
CB.
___
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





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


Sidney de Koning
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] display trace() in text field

2008-12-04 Thread Sidney de Koning

Hi Mike,

I'm working on a similair project, check it out here: 
http://www.funky-monkey.nl/blog/2008/05/13/air-logger-v100/

Right now i'm working on a version that from any swf traces to my air  
app, traces to the debug panel in Flex and traces out to FireBug  
plugin in Firefox, (will be online after the weekend)


Is this what you are looking for?

Sidney


On Dec 4, 2008, at 3:44 PM, Michael Stocke wrote:


Good morning everyone.



Is it possible to display trace actions in a text field? I realize  
there

are numerous other troubleshooting tools similar to trace, but I
specifically want to display trace actions without any additional  
coding

required in the target file. I want to create a debugging tool in AIR
that will allow me to display trace actions from currently running
swfs.



I suspect this isn't feasible, but any tips or ideas would be
appreciated, Thanks.



Mike Stocke
Interface Engineer

Organic, Inc. | Detroit
2600 S. Telegraph Road -- Suite 100, Bloomfield Hills, MI 48302
t: 248.454.4015  |  f: 248.454.3370



Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Blog: http://Threeminds.Organic.com http://threeminds.organic.com/
Website: www.Organic.com http://www.organic.com/





This email is intended only for the person or entity to which it is  
addressed and may contain information that is privileged,  
confidential or otherwise protected from disclosure. Dissemination,  
distribution or copying of this email or the information herein by  
anyone other than the intended recipient, or an employee or agent  
responsible for delivering the message to the intended recipient, is  
prohibited.  If you have received this email in error, please  
immediately notify us by calling our Help Desk at (415) 581-5552 or  
by e-mailing us at [EMAIL PROTECTED]



___
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] display trace() in text field

2008-12-04 Thread Sidney de Koning

or you can override trace like so:

override public function trace(...args) : void {
super();
textFieldYouWantToTraceIn.appendText(args.toString());
}

This is from the top of my head, so the code could have errors in it.
Test it to see.

Cheers,

Sid

PS. You can ony do this from a class file. I don't think the Flash IDE  
lets you override functions directly.




On Dec 4, 2008, at 5:03 PM, allandt bik-elliott (thefieldcomic.com)  
wrote:



function debug(s:String):Void
{
   _root.pathToTextField.myText.text += /n+s;
}

then instead of trace(someString);
you use
debug(someString);

a

On Thu, Dec 4, 2008 at 3:42 PM, Merrill, Jason 
[EMAIL PROTECTED] wrote:

Trace only sends strings to the Flash or Flexbuilder output window,  
so no.
However, all you have to do is set the variable you want to see to  
the text

property of the textfield:

myTextField.text  = myVariableIdLikeToSee


Jason Merrill
Bank of America Instructional Technology  Media   ·   GCIB   
Staff

Support LLD

Interested in Flash Platform technologies?  Join the Bank of  
America Flash

Platform Developer Community
Interested in innovative ideas in Learning?  Check out the Innovative
Learning Blog and subscribe.






-Original Message-
From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] On Behalf Of Michael  
Stocke

Sent: Thursday, December 04, 2008 9:44 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] display trace() in text field

Good morning everyone.



Is it possible to display trace actions in a text field? I realize  
there

are numerous other troubleshooting tools similar to trace, but I
specifically want to display trace actions without any additional  
coding

required in the target file. I want to create a debugging tool in AIR
that will allow me to display trace actions from currently running
swfs.



I suspect this isn't feasible, but any tips or ideas would be
appreciated, Thanks.



Mike Stocke
Interface Engineer

Organic, Inc. | Detroit
2600 S. Telegraph Road -- Suite 100, Bloomfield Hills, MI 48302
t: 248.454.4015  |  f: 248.454.3370



Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Blog: http://Threeminds.Organic.com http://threeminds.organic.com/
Website: www.Organic.com http://www.organic.com/





This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged,  
confidential or
otherwise protected from disclosure. Dissemination, distribution or  
copying
of this email or the information herein by anyone other than the  
intended
recipient, or an employee or agent responsible for delivering the  
message to
the intended recipient, is prohibited.  If you have received this  
email in

error, please immediately notify us by calling our Help Desk at (415)
581-5552 or by e-mailing us at [EMAIL PROTECTED]


___
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] Arabic flipping

2008-12-04 Thread Sidney de Koning
Here we usually dont embed the text in the textfield, and grab the  
text from XML or you when you embed the font with code, include all  
the unicode codes of the arabic chars you need. And do use fonts that  
support Arabic like Arial, Verdana and i think Times New Roman


http://www.google.nl/search?q=embed+unicode+font+as3

On Dec 4, 2008, at 5:22 PM, Mike Grunwald wrote:

OK... I think I've reached the end of the internet as well as the  
end of my patients.


I've been trying to figure out a way to take translations that I've  
received in an Excel spreadsheet and paste them into an XML  
document. The XML is UTF-8 and it's plain text (of course). No  
matter what editor (Flex Builder 3, Dreamweaver, Text Edit, WordPad,  
NotePad, Word, etc.) or OS (OSX 10.4, Windows XP) or combination of  
the two, it seems that when I try to combine the eastern translation  
with western markup (XML tags, or even western characters for that  
matter), as soon as I drop in a single character, if flips the  
orientation of the translated Arabic text?!?


Everything that I find on the internet leads me hopeful down a path  
of ultimate disappointment. I know that I'm not the only one with  
this problem and I'm sure one of you has experienced this. Please  
let me in on you secrets. I beg you...


Let me just clarify—My problem is not font related (I've got that  
all sorted out), and for the most part it's not really Flash related  
(except for the fact that I'm using this XML content for dynamic  
text fields). this list is probably not the proper place for this  
question, but I'm out of options and I thinking that I'm going to  
have to scrap some of the digging I've done in relation to getting  
text to display properly and make alterations to my application to  
load images instead of live type.


Somebody... Anybody Help a brotha out!



___
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] display trace() in text field

2008-12-04 Thread Sidney de Koning

Michael,

When you override the exsisting trace function, you can do this. Just  
include your own functionality in the overwritten trace function.


Its all because you want to have the same function call to trace() i  
presume?


Sid

On Dec 4, 2008, at 5:10 PM, Sidney de Koning wrote:


or you can override trace like so:

override public function trace(...args) : void {
super();
textFieldYouWantToTraceIn.appendText(args.toString());
}

This is from the top of my head, so the code could have errors in it.
Test it to see.

Cheers,

Sid

PS. You can ony do this from a class file. I don't think the Flash  
IDE lets you override functions directly.




On Dec 4, 2008, at 5:03 PM, allandt bik-elliott (thefieldcomic.com)  
wrote:



function debug(s:String):Void
{
  _root.pathToTextField.myText.text += /n+s;
}

then instead of trace(someString);
you use
debug(someString);

a

On Thu, Dec 4, 2008 at 3:42 PM, Merrill, Jason 
[EMAIL PROTECTED] wrote:

Trace only sends strings to the Flash or Flexbuilder output  
window, so no.
However, all you have to do is set the variable you want to see to  
the text

property of the textfield:

myTextField.text  = myVariableIdLikeToSee


Jason Merrill
Bank of America Instructional Technology  Media   ·   GCIB   
Staff

Support LLD

Interested in Flash Platform technologies?  Join the Bank of  
America Flash

Platform Developer Community
Interested in innovative ideas in Learning?  Check out the  
Innovative

Learning Blog and subscribe.






-Original Message-
From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] On Behalf Of Michael  
Stocke

Sent: Thursday, December 04, 2008 9:44 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] display trace() in text field

Good morning everyone.



Is it possible to display trace actions in a text field? I realize  
there

are numerous other troubleshooting tools similar to trace, but I
specifically want to display trace actions without any additional  
coding
required in the target file. I want to create a debugging tool in  
AIR

that will allow me to display trace actions from currently running
swfs.



I suspect this isn't feasible, but any tips or ideas would be
appreciated, Thanks.



Mike Stocke
Interface Engineer

Organic, Inc. | Detroit
2600 S. Telegraph Road -- Suite 100, Bloomfield Hills, MI 48302
t: 248.454.4015  |  f: 248.454.3370



Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Blog: http://Threeminds.Organic.com http://threeminds.organic.com/
Website: www.Organic.com http://www.organic.com/





This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged,  
confidential or
otherwise protected from disclosure. Dissemination, distribution  
or copying
of this email or the information herein by anyone other than the  
intended
recipient, or an employee or agent responsible for delivering the  
message to
the intended recipient, is prohibited.  If you have received this  
email in
error, please immediately notify us by calling our Help Desk at  
(415)

581-5552 or by e-mailing us at [EMAIL PROTECTED]


___
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] Re: How to add meta data in image through AIR/ AS3.0?

2008-11-18 Thread Sidney de Koning

Hi Deepak,

There is a really good AS3 Metadata project on Google called metaphile  
you can check out,

http://code.google.com/p/metaphile/

and for image files i recommend this post as a good starting point:
http://blog.modp.com/2007/08/adding-metadata-to-actionscript-3-png.html

Happy coding :)

Sid

On Nov 18, 2008, at 10:14 AM, Juan Delgado wrote:


Hi there,

Don't think it supports what you need yet, but might be a good  
starting point:


http://www.bytearray.org/?p=90



On Tue, Nov 18, 2008 at 12:54 AM,  [EMAIL PROTECTED] wrote:

Hi All,

Just to rephrase my question again.

Basically when we resize any image its lost its meta data, so in my  
case i

want to preserver those data even after resizing, and this require
extraction of the meta data from original image and writing back  
these data

after resize.

But How?

Any Help is greatly appreciated. There are way out in JAVA and C# n  
all for

this, But how about Action Script.

Thanks,
Deepak


On Nov 17, 2008 4:24pm, Deepak Sahu [EMAIL PROTECTED]  
wrote:


Hi All,



I have to add a meta data tag in image after resizing it( Aspect  
ratio


in my case) while uploading. Any idea how to do that ? any  
workaround?




I have some classes by while helps me reading the EXIF tags through

the images, but not getting any clue how to add something new.



Thanks,

Deepak Sahu


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





--
Juan Delgado - Zárate
http://zarate.tv
http://dandolachapa.com
http://loqueyosede.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] Hiring

2008-08-05 Thread Sidney de Koning

You can also try www.riajobs.org, been quite succesfull there,

Sid

On Aug 5, 2008, at 2:48 PM, Merrill, Jason wrote:


By the way, wouldn't be nice if there was a
[EMAIL PROTECTED] mailing list?


You said Flex too.  Check out:
http://tech.groups.yahoo.com/group/flexjobs/


Jason Merrill
Bank of America
Enterprise Technology  Global Risk LLD
Instructional Technology  Media

Join the Bank of America Flash Platform Developer Community

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GTO Innovative Learning Blog  subscribe.


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



Sidney de Koning
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] OT: Questions to ask an interviewee

2008-07-30 Thread Sidney de Koning
The list of questions i always ask interviewees are the following, and  
this gives me a pretty good example of what they are like and what  
their skillset is.


Test is always accompanied with a practical test we make up on the spot.
The XML in Q16 is made up, you can create your own for this.

Feel free to use this,

Cheers,

Sid

1  - write an event listener (normal and weak referenced) and handling  
function for a Sprite

 named 'beginQuestions' and listen for a  mouse click.
2  - what does weak referenced mean in regards to event listeners?
3  - what is the difference between an object an an array?
4  - how doe you get cue point from vidio in AS3? And in AS2?
5  - briefly explain the various datatypes for numbers.
6  - how do you load an external file?
7  - draw a 20px by 20px Rectangle using the graphics API.
8  - which of the following cannot contain other display objects?
 Sprite, Shape, MovieClip, DisplayObjectContainer.
9  - which properties can you use to change the size of DisplayObjects?
10 - ENTER_FRAME is independant of an SWF's frame rate? True or false?
11 - XP is a type of which programming methology?
12 - why would you use a Singleton?
13 - what is the Document Class?
14 - create a new TextField instance, then add text it, then add some  
more text.

15 - what is the difference between public, private and protected.
16 - look at the piece of XML (see other sheet). How do i:
 - Get all of the page nodes as an XMLList.
 - Get node in showcase where the attribute id=1.   
17 - listen for when the 'enter key' is pressed and
 trace out all questions are now done when the event happens.


Sidney de Koning
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] OT: Questions to ask an interviewee

2008-07-30 Thread Sidney de Koning

Very true :)
A little test i always do is ask people what they think of themself on  
a scale of 1 to 10.
Most good coders with +5 jears experience will give them selfs a 6 or  
a 7 and are very modest.
Coders that think they are good (-3 years experience) will rate  
themself higher than they really are. This is practice proven.


Those people leave during or after their trial period :)

Sid

On Jul 30, 2008, at 1:27 PM, Romuald Quantin wrote:


Why not asking him sources and asks questions about his own sources?

Why did you do it that way?
Why did you do use that?
Etc...

You'll see both what is capable of by looking closely at his sources  
and see
his skills by asking right questions about it. I can't think you  
won't find
out that someone is faking sources when you'll ask precise questions  
about
it. Anyway, if the guy does, he's going to lose the job after 2 days  
right?

:)

Romu
www.soundstep.com




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of  
Sidney de

Koning
Sent: 30 July 2008 12:04
To: Flash Coders List
Subject: Re: [Flashcoders] OT: Questions to ask an interviewee

The list of questions i always ask interviewees are the following, and
this gives me a pretty good example of what they are like and what
their skillset is.

Test is always accompanied with a practical test we make up on the  
spot.

The XML in Q16 is made up, you can create your own for this.

Feel free to use this,

Cheers,

Sid

1  - write an event listener (normal and weak referenced) and handling
function for a Sprite
 named 'beginQuestions' and listen for a  mouse click.
2  - what does weak referenced mean in regards to event listeners?
3  - what is the difference between an object an an array?
4  - how doe you get cue point from vidio in AS3? And in AS2?
5  - briefly explain the various datatypes for numbers.
6  - how do you load an external file?
7  - draw a 20px by 20px Rectangle using the graphics API.
8  - which of the following cannot contain other display objects?
 Sprite, Shape, MovieClip, DisplayObjectContainer.
9  - which properties can you use to change the size of  
DisplayObjects?

10 - ENTER_FRAME is independant of an SWF's frame rate? True or false?
11 - XP is a type of which programming methology?
12 - why would you use a Singleton?
13 - what is the Document Class?
14 - create a new TextField instance, then add text it, then add some
more text.
15 - what is the difference between public, private and protected.
16 - look at the piece of XML (see other sheet). How do i:
 - Get all of the page nodes as an XMLList.
 - Get node in showcase where the attribute id=1.   
17 - listen for when the 'enter key' is pressed and
 trace out all questions are now done when the event happens.


Sidney de Koning
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
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] OT: Questions to ask an interviewee

2008-07-30 Thread Sidney de Koning

Hi allandt,

As agencies we also have a advising role to play towards the customer,  
so we only do AS3 projects, hardly any AS2 (maybee some banners in  
FP8). So we try to advice/push the client towards AS3 projects, which,  
most of the times, is better for all parties invloved.


Sid


On Jul 30, 2008, at 1:24 PM, allandt bik-elliott (thefieldcomic.com)  
wrote:


hmmm - i didn't do bad (without looking stuff up) but i must say  
that i've
not been asked to do a single as3 project since i started doing  
agency work
- the only time i've done an as3 project was for an interactive cd  
so i
could set my own target for the projector file. Most of the work i  
do in
digital agencies has been targeted at flash player 8 or (even worse)  
6 so

AS2 has been more important than AS3.

Under what sort of circumstances do you find that AS3 is used?

a

On Wed, Jul 30, 2008 at 12:03 PM, Sidney de Koning
[EMAIL PROTECTED]wrote:

The list of questions i always ask interviewees are the following,  
and this
gives me a pretty good example of what they are like and what their  
skillset

is.

Test is always accompanied with a practical test we make up on the  
spot.

The XML in Q16 is made up, you can create your own for this.

Feel free to use this,

Cheers,

Sid

1  - write an event listener (normal and weak referenced) and  
handling

function for a Sprite
   named 'beginQuestions' and listen for a  mouse click.
2  - what does weak referenced mean in regards to event listeners?
3  - what is the difference between an object an an array?
4  - how doe you get cue point from vidio in AS3? And in AS2?
5  - briefly explain the various datatypes for numbers.
6  - how do you load an external file?
7  - draw a 20px by 20px Rectangle using the graphics API.
8  - which of the following cannot contain other display objects?
   Sprite, Shape, MovieClip, DisplayObjectContainer.
9  - which properties can you use to change the size of  
DisplayObjects?
10 - ENTER_FRAME is independant of an SWF's frame rate? True or  
false?

11 - XP is a type of which programming methology?
12 - why would you use a Singleton?
13 - what is the Document Class?
14 - create a new TextField instance, then add text it, then add  
some more

text.
15 - what is the difference between public, private and protected.
16 - look at the piece of XML (see other sheet). How do i:
   - Get all of the page nodes as an XMLList.
   - Get node in showcase where the attribute id=1.
17 - listen for when the 'enter key' is pressed and
   trace out all questions are now done when the event happens.


Sidney de Koning
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
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] When to use AS3?

2008-07-30 Thread Sidney de Koning

Nice one :)

As i said earlier; we also have advising roles to play. If a specific  
project needs specific technology, dont bend or sway for less. Try to  
convince/explain the client why. Especially if the concept comes from  
the developing party, they thought about it, they'll also make it.


I know sometimes clients can be difficult, what i have noticed, as  
long as you explain why and show them figures, they'll go for it.


Or tell them the competitors ARE using AS3, two seconds ... they'll  
reconsider ;)


Sid

On Jul 30, 2008, at 1:48 PM, allandt bik-elliott (thefieldcomic.com)  
wrote:


@Sidney: That's really interesting because at all the places I've  
worked
(which isn't many - I've always done coding as a sideline and have  
only
recently gone full-time), they seem to be utterly entrenched in FP8  
(i guess
using the old 'work to the last player' thinking). I personally  
would love

to move the (non-banner) work to AS3 as it's a far more elegant way of
working. I find that the clients tend to dictate it based on  
whatever plugin

their IT department have set them up with.

a


NOTE: This is taken from the interview thread and I thought it might  
be

worth having it's own one




On Wed, Jul 30, 2008 at 12:35 PM, Sidney de Koning
[EMAIL PROTECTED]wrote:


Hi allandt,

As agencies we also have a advising role to play towards the  
customer, so
we only do AS3 projects, hardly any AS2 (maybee some banners in  
FP8). So we
try to advice/push the client towards AS3 projects, which, most of  
the

times, is better for all parties invloved.

Sid


On Jul 30, 2008, at 1:24 PM, allandt bik-elliott (thefieldcomic.com)
wrote:

hmmm - i didn't do bad (without looking stuff up) but i must say  
that i've
not been asked to do a single as3 project since i started doing  
agency

work
- the only time i've done an as3 project was for an interactive cd  
so i
could set my own target for the projector file. Most of the work i  
do in
digital agencies has been targeted at flash player 8 or (even  
worse) 6 so

AS2 has been more important than AS3.

Under what sort of circumstances do you find that AS3 is used?

a

On Wed, Jul 30, 2008 at 12:03 PM, Sidney de Koning
[EMAIL PROTECTED]wrote:

The list of questions i always ask interviewees are the following,  
and

this
gives me a pretty good example of what they are like and what their
skillset
is.

Test is always accompanied with a practical test we make up on  
the spot.

The XML in Q16 is made up, you can create your own for this.

Feel free to use this,

Cheers,

Sid

1  - write an event listener (normal and weak referenced) and  
handling

function for a Sprite
 named 'beginQuestions' and listen for a  mouse click.
2  - what does weak referenced mean in regards to event listeners?
3  - what is the difference between an object an an array?
4  - how doe you get cue point from vidio in AS3? And in AS2?
5  - briefly explain the various datatypes for numbers.
6  - how do you load an external file?
7  - draw a 20px by 20px Rectangle using the graphics API.
8  - which of the following cannot contain other display objects?
 Sprite, Shape, MovieClip, DisplayObjectContainer.
9  - which properties can you use to change the size of  
DisplayObjects?
10 - ENTER_FRAME is independant of an SWF's frame rate? True or  
false?

11 - XP is a type of which programming methology?
12 - why would you use a Singleton?
13 - what is the Document Class?
14 - create a new TextField instance, then add text it, then add  
some

more
text.
15 - what is the difference between public, private and protected.
16 - look at the piece of XML (see other sheet). How do i:
 - Get all of the page nodes as an XMLList.
 - Get node in showcase where the attribute id=1.
17 - listen for when the 'enter key' is pressed and
 trace out all questions are now done when the event happens.


Sidney de Koning
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
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
Flash / AIR Developer @ www.funky-monkey.nl
Technical Writer @ www.insideria.com






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

Re: [Flashcoders] OT: Questions to ask an interviewee

2008-07-30 Thread Sidney de Koning
So where it all comes down to is that everybody has its own personal  
preferences of doing.
A personal set of things to do and how to spot a good coder or an  
opinion on what makes a good flash developer, whether this is by  
showing code, letting them do some questions, shoing some work or all  
of the above.


If somebody steps into our office and understands the concept of  
programming, knows its syntax but is not that good in AS coding, i'll  
give him / her a shot, treat that person as a junior and see what they  
do in their trial period(mostly it is 1 or 2 months, depending what  
country you are in). Depending on the questions they ask you kindof  
know what they are like.
If they've proven them selfs usefull and are willing to learn, i'll  
invest in that person with a contract.


Does that still sound sad to you Zeh?

Sid


On Jul 30, 2008, at 3:47 PM, Zeh Fernando wrote:

I don't know about you guys, but that checklist of skills and the  
possibility of getting that on an interview make me depressed.


Of that list, I'm pretty sure I can do it all, but most of that are  
not something I do all the time every day so I may have the gist of  
it, but not know the syntax down to its every comma. I personally  
use the reference *and* the internet every tie when writing code -  
for example, I never use cue points, and while I know perfectly well  
how it works, I'd have to see how the event works and do a few tests  
before applying it to my code. Nothing huge that takes day of  
research, but still. That's I think just shooting a lot of questions  
to the interviewee may help filter out the crap but also won't help  
you find the best candidates; I honestly think good developers,  
specially in the Flash world, are the ones who can quickly find the  
answer to a new question before having to ask around, be it by using  
the reference, be using by using the internet, or by testing.  
Remember this technology changes at a fast pace. Having a catalog of  
techniques in your mind may show experience, but there'll be gaping  
holes if the guy's work was focused somewhere else or if he's not  
very formally trained.


Personally, on an interview, I'd ask to see the candidate's previous  
work that's online (doing so next to him). Ask him what kind of  
techniques were in place on that particular website, question him  
about interface elements. Give hints on how you'd do something he  
has done and see his reaction, whether he gets into it and start  
discussing code with a peer or whether he shows he's full of shit.  
Ask how long that particular work took, and whether someone helped  
him, and what external classes or frameworks he used. Ask him what  
kind of work he liked the most, and why. Which was the most  
difficult one he did recently, and why. Ask what kind of work he  
doesn't like doing. Try to get a hang of how he works, and try to  
understand what motivates and unmotivates him. If possible, ask to  
see some real-life code he's produced, and then see what kind of  
techniques he does apply on real code more than just knowing the  
number of a dozen design patterns.


I don't know if you guys get too many interviewees or something that  
warrants a list like that to make things faster. But for website  
development in Flash, I think there's so much more that's necessary  
than just schoolbook knowledge that focusing too much on the  
checklist really seems counterproductive and sad to me.


Zeh

Sidney de Koning wrote:
The list of questions i always ask interviewees are the following,  
and this gives me a pretty good example of what they are like and  
what their skillset is.
Test is always accompanied with a practical test we make up on the  
spot.

The XML in Q16 is made up, you can create your own for this.
Feel free to use this,
Cheers,
Sid
1  - write an event listener (normal and weak referenced) and  
handling function for a Sprite

named 'beginQuestions' and listen for a  mouse click.
2  - what does weak referenced mean in regards to event listeners?
3  - what is the difference between an object an an array?
4  - how doe you get cue point from vidio in AS3? And in AS2?
5  - briefly explain the various datatypes for numbers.
6  - how do you load an external file?
7  - draw a 20px by 20px Rectangle using the graphics API.
8  - which of the following cannot contain other display objects?
Sprite, Shape, MovieClip, DisplayObjectContainer.
9  - which properties can you use to change the size of  
DisplayObjects?
10 - ENTER_FRAME is independant of an SWF's frame rate? True or  
false?

11 - XP is a type of which programming methology?
12 - why would you use a Singleton?
13 - what is the Document Class?
14 - create a new TextField instance, then add text it, then add  
some more text.

15 - what is the difference between public, private and protected.
16 - look at the piece of XML (see other sheet). How do i:
- Get all of the page nodes as an XMLList.
- Get node

Re: [Flashcoders] OT: Questions to ask an interviewee

2008-07-30 Thread Sidney de Koning

Hi Zeh,

There's just so much you had to know about an employee on Flash  
development, that just an interview doesn't cut it; seeing how the  
person works once he/she settles down is a must. You can't have a  
guy dragging the office around just because he knew the right  
answers at one specific time.


I  totally agree, good point.

So no, it does not sound sad to me, sorry if I sounded harsh or  
anything (that wasn't my intention).


No problem :) Discussions can get heated sometimes. Thats normal on  
lists like this ;)


Sid



Zeh

Sidney de Koning wrote:
So where it all comes down to is that everybody has its own  
personal preferences of doing.
A personal set of things to do and how to spot a good coder or an  
opinion on what makes a good flash developer, whether this is by  
showing code, letting them do some questions, shoing some work or  
all of the above.
If somebody steps into our office and understands the concept of  
programming, knows its syntax but is not that good in AS coding,  
i'll give him / her a shot, treat that person as a junior and see  
what they do in their trial period(mostly it is 1 or 2 months,  
depending what country you are in). Depending on the questions they  
ask you kindof know what they are like.
If they've proven them selfs usefull and are willing to learn, i'll  
invest in that person with a contract.

Does that still sound sad to you Zeh?
Sid








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


Re: [Flashcoders] OT: Questions to ask an interviewee

2008-07-30 Thread Sidney de Koning
And ofcourse we all try to find a answer that is suitable for this  
specific problem and its good that loads of people have different  
takes on it.


Sid.

On Jul 30, 2008, at 5:42 PM, Sidney de Koning wrote:


Hi Zeh,

There's just so much you had to know about an employee on Flash  
development, that just an interview doesn't cut it; seeing how the  
person works once he/she settles down is a must. You can't have a  
guy dragging the office around just because he knew the right  
answers at one specific time.


I  totally agree, good point.

So no, it does not sound sad to me, sorry if I sounded harsh or  
anything (that wasn't my intention).


No problem :) Discussions can get heated sometimes. Thats normal on  
lists like this ;)


Sid



Zeh

Sidney de Koning wrote:
So where it all comes down to is that everybody has its own  
personal preferences of doing.
A personal set of things to do and how to spot a good coder or an  
opinion on what makes a good flash developer, whether this is by  
showing code, letting them do some questions, shoing some work or  
all of the above.
If somebody steps into our office and understands the concept of  
programming, knows its syntax but is not that good in AS coding,  
i'll give him / her a shot, treat that person as a junior and see  
what they do in their trial period(mostly it is 1 or 2 months,  
depending what country you are in). Depending on the questions  
they ask you kindof know what they are like.
If they've proven them selfs usefull and are willing to learn,  
i'll invest in that person with a contract.

Does that still sound sad to you Zeh?
Sid








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



Sidney de Koning
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] hiring

2008-07-16 Thread Sidney de Koning

try http://www.riajobs.org/

Sid

On Jul 16, 2008, at 2:29 PM, Romuald Quantin wrote:


Hi,



I'm not sure it is the right place to do that but people have been  
friendly

on this list, I hope you can help.



I'll have to hire a flash/flex developer in London UK for a  
permanent job.




Can anyone tell me some good place to post an ad?



I'm not looking for a general IT job site but some sites like the  
job
section in www.thefwa.com http://www.thefwa.com/  where I can find  
good

developers.

Maybe another mailing list?



Any info?



Thanks



Romuald



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



Sidney de Koning
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] hiring

2008-07-16 Thread Sidney de Koning
Tell me about it, we are based in Amsterdam and having much difficulty  
getting freelancers.
However we already placed some ads on riajobs.org, and gotten more  
reactions than using headhunters companies (Monster, ComputerFutures  
etc).
Company blogs and direct mailings are also more effective i think.  
(This is specific for the dutch users: Have you tried freelance.nl ? )


Good luck!

Sid


On Jul 16, 2008, at 4:58 PM, Gert-Jan van der Wel wrote:


Thanks Sid!

We're also looking for an ActionScript/Flash developer to join the  
Floorplanner team in Rotterdam, The Netherlands. It quite difficult  
to find good people...


Gert-Jan


Op 16 jul 2008, om 14:39 heeft Sidney de Koning het volgende  
geschreven:



try http://www.riajobs.org/

Sid

On Jul 16, 2008, at 2:29 PM, Romuald Quantin wrote:


Hi,



I'm not sure it is the right place to do that but people have been  
friendly

on this list, I hope you can help.



I'll have to hire a flash/flex developer in London UK for a  
permanent job.




Can anyone tell me some good place to post an ad?



I'm not looking for a general IT job site but some sites like  
the job
section in www.thefwa.com http://www.thefwa.com/  where I can  
find good

developers.

Maybe another mailing list?



Any info?



Thanks



Romuald



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



Sidney de Koning
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
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] Game source code / classes? I need to make a game quick!

2008-07-15 Thread Sidney de Koning
There is a realy good book called Actionscript 3 Game University by  
Gary Rosenzweig. (http://flashgameu.com/)
It features loads of games, while reading it, you learn from it, so  
you dont have to grab it off the net ;)

I'd say that's a double whammy!

Sid

On Jul 15, 2008, at 12:04 PM, Ali Drongo wrote:

Hiya, I need to make a game quick and wondered if anyone could  
direct me to some engines, classes or source that I could use. The  
game can be pretty straight forward, a shoot em up, tetris style  
game, I've come across loads out there I just wondered if anyone had  
any recommendations.

Cheers!
Ali
___
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] regexp question

2008-07-04 Thread Sidney de Koning

Hi Allandt,

Have you found this tool already? 
http://www.gskinner.com/blog/archives/2008/03/regexr_free_onl.html
It allows you to test your regex pattern expecially for AS

And you can find a cheatsheat on RegEx on www.ilovejackdaniels.com and  
there is ofcourse alot on whttp://www.regular-expressions.info/quickstart.html

and http://www.regular-expressions.info/tutorial.html

Hope this will get you started,

Sid

On Jul 4, 2008, at 11:32 AM, Allandt Bik-Elliott (Receptacle) wrote:


hi again

i've been trying different things and it seems that the [^0] or [^ 
\d] is stopping it working. (I needed to use $1 rather than \1 to  
reference the first group in the String.replace statement)


here is what i've got so far

var sYear:String = 1234567;
var pattern:RegExp = /(\d\d\d)(?=(?:\d\d\d)*[^\d])/g;
sYear = sYear.replace(pattern, ,$1);
//traces 1234567

if i drop the NOT part
var sYear:String = 1234567;
var pattern:RegExp = /(\d\d\d)(?=(?:\d\d\d)*)/g;
sYear = sYear.replace(pattern, ,$1);
//traces ,123,4567

This stuff is really new to me so i really appreciate the help

thanks
a

On 4 Jul 2008, at 01:09, Claudius Ceteras wrote:


Hi,


is there a way of counting back from the end of the number and
inserting the comma (even without a regular expression)? if i
use the
g modifier in the regexp (so var pattern:RegExp = /000/g;), it will
only pick up the first 000 (and every multiple thereafter)
instead of
leaving the first 0 (which is expected behaviour but something i'd
like to get around)


How about positive lookaheads?

/(000)(?=(?:000)*[^0])/g

If you want this also to work for 1234567 = 1,234,567, you can  
replace
every 0 in the pattern with \d and call the replace function with , 
\1

instead of ,000

This is untested, but should work... Let me know.

regards,

Claudius

___
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] Saffron Modeler - what happened to it

2008-06-30 Thread Sidney de Koning

there is loads of activity on sam's twitter account 
http://twitter.com/SamuelAgesilas

S.

On Jun 30, 2008, at 6:05 PM, Jiri Heitlager wrote:

Does somebody know what happend to the saffron UML modelling tool.  
The site http://www.levelofindustry.com/

is not showing any update anymore.

Jiri
___
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] Calling super.apply

2008-06-27 Thread Sidney de Koning

THANK YOU!
This was EXACTLY what i was looking for.

Sid

On Jun 26, 2008, at 6:12 PM, Juan Pablo Califano wrote:


Hi, check this out:

http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_7.html

Cheers
Juan Pablo Califano


2008/6/26, ekameleon [EMAIL PROTECTED]:


Hello :)

In AS3 the apply method don't exist over the constructor.. the  
constructor

in AS3 isn't a Function but a Class object and the Class object don't
implément the apply or call methods !

It's a big problem for me

For the moment the solutions are :

1 - In your case... use composition over your Array, like :


http://svn1.cvsdude.com/osflash/vegas/AS3/trunk/src/vegas/data/iterator/ArrayIterator.as(for
me the best solution !)

2 - use a constructor with an Array or Object in arguments

3 - in your class you can use the ...args:Array and use it with a  
for or

while loop :)

PS : When i wan't create a full object with a custom class  
reference and a

dynamic array of arguments i use my method buildNewInstance :

http://svn1.cvsdude.com/osflash/vegas/AS3/trunk/src/vegas/util/ClassUtil.as

EKA+ :)


2008/6/26 Morten Barklund [EMAIL PROTECTED]:


Hi Sidney,

You have of course tried the obvious:

super.apply(this, args)

How did it fail, compiler error or?

Regards,
Morten Barklund

-Original Message-
From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] On Behalf Of Sidney de  
Koning

Sent: Thursday, June 26, 2008 4:30 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Calling super.apply

He Jer,

In the docs it says: public dynamic class Array
So you can extend it. My problem is that now i have to use push() to
get items in and i want to use the constructor to pass through  
items,

like so var blah:ArrayInterator = new ArrayIterator(1, 2,3);

My constructor uses ..rest so with apply i pass though all the
arguments one, by one instead of as one big array because ...rest is
an array itself

Does this all makes sense?

The problem is that i cant seem to figure out how to call apply on  
the

super.

Does any body know? let me know!!!

Cheers, Sid


On Jun 26, 2008, at 3:31 PM, Jer Brand wrote:


I'm probably wrong (and mostly want to know as well), but I didn't
think you could extend the Array class. Not that AS won't let you  
do

it, but it doesn't actually work. I know this is the case with AS2,
but am only guessing that it's the case with AS3 from the  
behavior you

describe.

My suggestion would be to use composition rather than inheritance.
___
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


[Flashcoders] Calling super.apply

2008-06-26 Thread Sidney de Koning

Hi List,

I've created a dynamic class that extends Array.
What i want to do is pass through items in the constructor just like i  
do with array ( var blah:Array = new Array(one, two, three); )
What happens now; is that every item i have to push in my self, like  
so: blah.push(one).
If i push my values; my class returns that current item, if i pass it  
through the constructor i get back an array.
I want to be able to do both; push items seperately and pass through  
an whole array in its constructor.


Is there something i can like super.apply(this, args) ?

public dynamic class ArrayIterator extends Array
{
//
protected var _index:int;

public function ArrayIterator(...args)
{
super(args);
_index = 0;
}

What am i doing wrong here and what can i do to solve this?

Thanks in advance,

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


Re: [Flashcoders] Calling super.apply

2008-06-26 Thread Sidney de Koning

He Jer,

In the docs it says: public dynamic class Array
So you can extend it. My problem is that now i have to use push() to  
get items in and i want to use the constructor to pass through items,

like so var blah:ArrayInterator = new ArrayIterator(1, 2,3);

My constructor uses ..rest so with apply i pass though all the  
arguments one, by one instead of as one big array because ...rest is  
an array itself


Does this all makes sense?

The problem is that i cant seem to figure out how to call apply on the  
super.


Does any body know? let me know!!!

Cheers, Sid


On Jun 26, 2008, at 3:31 PM, Jer Brand wrote:


I'm probably wrong (and mostly want to know as well), but I didn't
think you could extend the Array class. Not that AS won't let you do
it, but it doesn't actually work. I know this is the case with AS2,
but am only guessing that it's the case with AS3 from the behavior you
describe.

My suggestion would be to use composition rather than inheritance.
___
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] Calling super.apply [SOLVED]

2008-06-26 Thread Sidney de Koning

He eKameleon,

I used your advise to pass it an array and a extra argument to, when  
it hits the end of the array it starts at the beginning or just stops  
at the end.
I also used some of your functions which i hadn't thought of, like  
hasNext and hasPrevious. (and also a rewind and forward function if  
the loop described above is true/false)


Thanks for the information!

Sid

On Jun 26, 2008, at 5:32 PM, ekameleon wrote:


Hello :)

In AS3 the apply method don't exist over the constructor.. the  
constructor

in AS3 isn't a Function but a Class object and the Class object don't
implément the apply or call methods !

It's a big problem for me

For the moment the solutions are :

1 - In your case... use composition over your Array, like :

http://svn1.cvsdude.com/osflash/vegas/AS3/trunk/src/vegas/data/iterator/ArrayIterator.as(for
me the best solution !)

2 - use a constructor with an Array or Object in arguments

3 - in your class you can use the ...args:Array and use it with a  
for or

while loop :)

PS : When i wan't create a full object with a custom class reference  
and a

dynamic array of arguments i use my method buildNewInstance :

http://svn1.cvsdude.com/osflash/vegas/AS3/trunk/src/vegas/util/ClassUtil.as

EKA+ :)


2008/6/26 Morten Barklund [EMAIL PROTECTED]:


Hi Sidney,

You have of course tried the obvious:

super.apply(this, args)

How did it fail, compiler error or?

Regards,
Morten Barklund

-Original Message-
From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] On Behalf Of Sidney de  
Koning

Sent: Thursday, June 26, 2008 4:30 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Calling super.apply

He Jer,

In the docs it says: public dynamic class Array
So you can extend it. My problem is that now i have to use push() to
get items in and i want to use the constructor to pass through items,
like so var blah:ArrayInterator = new ArrayIterator(1, 2,3);

My constructor uses ..rest so with apply i pass though all the
arguments one, by one instead of as one big array because ...rest is
an array itself

Does this all makes sense?

The problem is that i cant seem to figure out how to call apply on  
the

super.

Does any body know? let me know!!!

Cheers, Sid


On Jun 26, 2008, at 3:31 PM, Jer Brand wrote:


I'm probably wrong (and mostly want to know as well), but I didn't
think you could extend the Array class. Not that AS won't let you do
it, but it doesn't actually work. I know this is the case with AS2,
but am only guessing that it's the case with AS3 from the behavior  
you

describe.

My suggestion would be to use composition rather than inheritance.
___
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] Exclude classes

2008-06-17 Thread Sidney de Koning

Is this what your after?

http://www.bit-101.com/blog/?p=941
http://www.martijndevisser.com/blog/2004/enable-disable-_excludexml-files/

Also try this: 
http://www.google.com/search?source=ighl=enrlz==q=excluding+classes+as3btnG=Google+Search

Sid

On Jun 17, 2008, at 1:01 PM, Viktor Hesselbom wrote:


Hi,

Does anyone know if there's a way to exclude certain built-in  
classes?


E.g. if I'm not going to be using the BlurFilter class is there  
anyway for it not to be compiled with the .swf-file?


I'm using Flash CS3+AS3 and the reason for this is that I want to  
keep the filesize as low as possible for a contest. Every byte is  
important.


Thanks,
/ Viktor H
___
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] CLOSING EVENT in Flash

2008-06-16 Thread Sidney de Koning

Hi Harris,

Welcome :)

What do you need to know? How it works? Or how you use it? Or both?

Sid

On Jun 16, 2008, at 2:19 PM, Haris KRAJINA wrote:


Hey to all ,



I'm new to this so I will try keep it short and informative, I am  
looking
for  a way to get CLOSING event in Flash CS3, I know it works with  
AIR and

FLEX it should in Flash too :-). I need it for stand alone player .



Thanx

___
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] Re: Is it possible to display in the xml file

2008-06-12 Thread Sidney de Koning
But you have to say your textfield is HtmlText else it wont render and  
just shows you amp; instead of 


On Jun 12, 2008, at 3:21 PM, ACE Flash wrote:


i got it,
uses... = amp;

On Thu, Jun 12, 2008 at 9:14 AM, ACE Flash [EMAIL PROTECTED] wrote:


hey there,
Is it possible to display  in the xml file? I tried to convert  
it to

%26, but it won't display  in the flash

for example:

depFin  IT /dep


thanks


___
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] Re: Is it possible to display in the xml file

2008-06-12 Thread Sidney de Koning

Try doing that with an external file and an exotic font :)

To prevent errors from my side i always place my text in a CDATA  
(where appropriate) and make sure I have the htmlText option on.
When working with exotic fonts (not your standard verdana, times or  
arial) you might get in trouble.



Sid


On Jun 12, 2008, at 4:30 PM, Kenneth Kawamoto wrote:


Are you sure about that?

var xml:XML = new XML(depFin amp; IT/dep);
var tf:TextField = new TextField();
tf.text = xml;
addChild(tf);

I get Fin  IT in the TextField.

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Sidney de Koning wrote:
But you have to say your textfield is HtmlText else it wont render  
and just shows you amp; instead of 

On Jun 12, 2008, at 3:21 PM, ACE Flash wrote:

i got it,
uses... = amp;

On Thu, Jun 12, 2008 at 9:14 AM, ACE Flash [EMAIL PROTECTED]  
wrote:



hey there,
Is it possible to display  in the xml file? I tried to convert  
it to

%26, but it won't display  in the flash

for example:

depFin  IT /dep


thanks

___
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] flex 3 Event.RESIZE

2008-06-05 Thread Sidney de Koning

Hi Patrick,

How is your Flash set in your HTML? in pixels or in percent?

GReets,

Sid

On Jun 5, 2008, at 4:04 PM, Patrick J. Jankun wrote:


Hello Everyone,

This is something probably very stupid, but i have an basic problem  
with my AS code:
i got an event Listener added to stage instance in the main class  
function/constructor


stage.addEventListener(Event.RESIZE, initialise);


problem is, this event never gets fired, and i simply can't find out  
why :(, i scale the stage
in the browser env, the event is being ignored. I tried Event.INIT  
and others, they seems
to work, but not this one, can someone tell me what the heck do i  
wrong?


P.
--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

___
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] Letter spacing in input fields, is it possible?

2008-05-29 Thread Sidney de Koning

Hi List,

Does anyone know if it is possible to have letter spacing in an input  
field (a field where you type in text) in AS3.

I know you can do it on a dynamic or a normal textfield.
I also tried in the IDE, but that does not work. (with embedded font)
The code i have is this, it all works except the letterSpacing:

searchFieldCountry_txt = new TextField( );
searchFieldCountry_txt.type = TextFieldType.INPUT;
searchFieldCountry_txt.antiAliasType = AntiAliasType.ADVANCED;
searchFieldCountry_txt.embedFonts = true;
searchFieldCountry_txt.border = false;
searchFieldCountry_txt.x = 340;
searchFieldCountry_txt.y = 38;
searchFieldCountry_txt.width = 175;
searchFieldCountry_txt.height = 25;

var formatInput:TextFormat = new TextFormat( );
formatInput.font = AvantGardeLight;
formatInput.color = 0x00;
format.letterSpacing = 1;
formatInput.size = 14;

searchFieldCountry_txt.defaultTextFormat = formatInput;

I hope somebody has experience with this,
Thanks in advance,

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


[Flashcoders] SOLVED: Letter spacing in input fields, is it possible?

2008-05-29 Thread Sidney de Koning

Been working to much and too long!
Thanks for the tip, it worked :)

Cheers,

Sid
On May 29, 2008, at 7:23 PM, Matheus Gorino wrote:


Maybe a typo error?

Check your code:
var formatInput:TextFormat = new TextFormat( );
formatInput.font = AvantGardeLight;
formatInput.color = 0x00;
format.letterSpacing = 1;
formatInput.size = 14;
searchFieldCountry_txt.defaultTextFormat = formatInput;

See that you used format instead of formatInput for letterSpacing.


On Thu, May 29, 2008 at 9:36 AM, Glen Pike  
[EMAIL PROTECTED] wrote:
I am not 100% on whether letter-spacing works as I have not tried  
it, but
you may have to reapply the format each time the text in the input  
field is

changed.

Add a change listener

Sidney de Koning wrote:


Hi List,

Does anyone know if it is possible to have letter spacing in an  
input

field (a field where you type in text) in AS3.
I know you can do it on a dynamic or a normal textfield.
I also tried in the IDE, but that does not work. (with embedded  
font)

The code i have is this, it all works except the letterSpacing:

searchFieldCountry_txt = new TextField( );
searchFieldCountry_txt.type = TextFieldType.INPUT;
searchFieldCountry_txt.antiAliasType = AntiAliasType.ADVANCED;
searchFieldCountry_txt.embedFonts = true;
searchFieldCountry_txt.border = false;
searchFieldCountry_txt.x = 340;
searchFieldCountry_txt.y = 38;
searchFieldCountry_txt.width = 175;
searchFieldCountry_txt.height = 25;
 var formatInput:TextFormat = new TextFormat( );
formatInput.font = AvantGardeLight;
formatInput.color = 0x00;
format.letterSpacing = 1;
formatInput.size = 14;

searchFieldCountry_txt.defaultTextFormat = formatInput;

I hope somebody has experience with this,
Thanks in advance,

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




--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

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


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



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


Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Sidney de Koning

Hi Matt,

Try casting it to the XML data to a Number. Because XML data is a  
String.

Like so:
 var rectangle:Rectangle = new  
Rectangle 
(0,0,Number([EMAIL PROTECTED]),Number([EMAIL PROTECTED]));


Hope This helps.

Sid

On May 28, 2008, at 4:43 PM, Matt S. wrote:


So I tried to the do the following:

var rectangle:Rectangle = new
Rectangle(0,0,[EMAIL PROTECTED],[EMAIL PROTECTED]);
if(cS.height  rectangle.height){
rectangle.height = cS.height;
rectangle.scaleX = rectangle.scaleY;
}

But it gives me the following error:
1119: Access of possibly undefined property scaleY through a reference
with static type flash.geom:Rectangle.
___
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] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Sidney de Koning

Hi Matt,

For what do you want to use the Rectangle? Normally you would use it  
for instance to measure objects on the stage (at least i do )

For what you are doing cant you use a Shape? or a Sprite?

Sid

On May 28, 2008, at 5:10 PM, Matt S. wrote:


Hmm, that didnt help. It seems to be recognizing it as a number, and I
can set the Width and Height of Rectangle, but when I try to set the
scaleX and scaleY is when I get the error message.

.m

On Wed, May 28, 2008 at 10:56 AM, Sidney de Koning
[EMAIL PROTECTED] wrote:

Hi Matt,

Try casting it to the XML data to a Number. Because XML data is a  
String.

Like so:
var rectangle:Rectangle = new
Rectangle 
(0,0,Number([EMAIL PROTECTED]),Number([EMAIL PROTECTED]));


Hope This helps.

Sid

On May 28, 2008, at 4:43 PM, Matt S. wrote:


So I tried to the do the following:

var rectangle:Rectangle = new
Rectangle(0,0,[EMAIL PROTECTED],[EMAIL PROTECTED]);
if(cS.height  rectangle.height){
  rectangle.height = cS.height;
  rectangle.scaleX = rectangle.scaleY;
}

But it gives me the following error:
1119: Access of possibly undefined property scaleY through a  
reference

with static type flash.geom:Rectangle.
___
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] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Sidney de Koning

Ofcourse :)

Right now I'm working on a project that does involve a scrollbar.
What i do with the Rectangle class is i measure the handle of the  
scrollbar and use it for the bounds to drag it to.

Like so:

_maxScroll = _track.height - _handler.height;
_bounds = new Rectangle( _handler.x, _handler.y, 0, _maxScroll );

And then in my function where i do the actual dragging, i do this:

_handler.startDrag( false, _bounds );

If you look at the documentation for the Rectangle Class it also says  
this:


The following methods and properties use Rectangle objects:
* The bounds parameter for the startDrag() method of the Sprite class

Hope this makes sense, to me it does :)

Sid

On May 28, 2008, at 5:33 PM, Helmut Granda wrote:


to add to Sid's comments

From the docs:
*Note:* The Rectangle class does not define a rectangular Shape  
display
object. To draw a rectangular Shape object onscreen, use  
thedrawRect() method

of the Graphics class.

...Sid... could you elaborate on using the Rectangle class to measure
objects on the stage?

On Wed, May 28, 2008 at 10:15 AM, Sidney de Koning [EMAIL PROTECTED] 


wrote:


Hi Matt,

For what do you want to use the Rectangle? Normally you would use  
it for

instance to measure objects on the stage (at least i do )
For what you are doing cant you use a Shape? or a Sprite?

Sid


On May 28, 2008, at 5:10 PM, Matt S. wrote:

Hmm, that didnt help. It seems to be recognizing it as a number,  
and I

can set the Width and Height of Rectangle, but when I try to set the
scaleX and scaleY is when I get the error message.

.m

On Wed, May 28, 2008 at 10:56 AM, Sidney de Koning
[EMAIL PROTECTED] wrote:


Hi Matt,

Try casting it to the XML data to a Number. Because XML data is a  
String.

Like so:
var rectangle:Rectangle = new

Rectangle 
(0,0 
,Number([EMAIL PROTECTED]),Number([EMAIL PROTECTED]));


Hope This helps.

Sid

On May 28, 2008, at 4:43 PM, Matt S. wrote:

So I tried to the do the following:


var rectangle:Rectangle = new
Rectangle(0,0,[EMAIL PROTECTED],[EMAIL PROTECTED]);
if(cS.height  rectangle.height){
rectangle.height = cS.height;
rectangle.scaleX = rectangle.scaleY;
}

But it gives me the following error:
1119: Access of possibly undefined property scaleY through a  
reference

with static type flash.geom:Rectangle.
___
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





--
...helmut
___
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] Question about Google Maps Flash APIs

2008-05-15 Thread Sidney de Koning

YUP :)

An swc file is notthing more than a zip file. So when you rename it to  
zip you can extract it, probably there is a library.swf in there.

This is what you do is this you load it in in Flash like this:

import flash.display.Loader;
//
var ClassFileForHoldingGooglesAPIClass:Class;
// Create these for everyclass you want to extract.
//
function loadAssets():void
{
var assetLoader:Loader = new Loader();
assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,  
assetLoaderComplete);

assetLoader.load(new URLRequest(library.swf));
}

When the library.swf is done loading it calls the assetLoaderComplete  
handler that handles the
request and utilizes the getDefinition() method to get the class  
definition by a string.


function assetLoaderComplete(evt:Event):void
{
// remove your listener
evt.target.removeEventListener(Event.COMPLETE, assetLoaderComplete);
var appDomain:ApplicationDomain = evt.target.applicationDomain;

ClassFileForHoldingGooglesAPIClass =  
appDomain.getDefinition(com.google.maps.api.Whatever) as Class;

}

Now can create and instance of the MyOwnButton, simply by calling:

var myNewObject:Class = new ClassFileForHoldingGooglesAPIClass();

Or call functions on the  ClassFileForHoldingGooglesAPIClass.

Hope this is what you mean.

Cheers,

Sidney


On May 15, 2008, at 3:41 PM, eric e. dolecki wrote:

They offer up a SWC, any way of using that in the Flash IDE without  
using

FlexBuilder?
___
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] Question about Google Maps Flash APIs

2008-05-15 Thread Sidney de Koning

I know it is a pain, i did the same for the new Yahoo maps API.
It takes a while, but at least you can use it in Flash

And check out this http://www.afcomponents.com/components/g_map/
But i didnt see what AS version it utilizes.

Good luck,

Sid

On May 15, 2008, at 5:20 PM, eric e. dolecki wrote:

Its a monumental pain in the ass to load it and extract the classes  
out... I
hope Google just releases the classes for non-Flex stuff... but  
maybe they

have all kinds of hidden crap in there they don't want people to see?
On Thu, May 15, 2008 at 11:05 AM, Romuald Quantin 
[EMAIL PROTECTED] wrote:

Or if you have the SWC downloadable you can just copy the file near  
the FLA

file, flash will load it automatically.

Romu
www.soundstep.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of  
Sidney de

Koning
Sent: 15 May 2008 15:51
To: Flash Coders List
Subject: Re: [Flashcoders] Question about Google Maps Flash APIs

YUP :)

An swc file is notthing more than a zip file. So when you rename it  
to

zip you can extract it, probably there is a library.swf in there.
This is what you do is this you load it in in Flash like this:

import flash.display.Loader;
//
var ClassFileForHoldingGooglesAPIClass:Class;
// Create these for everyclass you want to extract.
//
function loadAssets():void
{
var assetLoader:Loader = new Loader();
assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
assetLoaderComplete);
assetLoader.load(new URLRequest(library.swf));
}

When the library.swf is done loading it calls the assetLoaderComplete
handler that handles the
request and utilizes the getDefinition() method to get the class
definition by a string.

function assetLoaderComplete(evt:Event):void
{
// remove your listener
evt.target.removeEventListener(Event.COMPLETE, assetLoaderComplete);
var appDomain:ApplicationDomain = evt.target.applicationDomain;

ClassFileForHoldingGooglesAPIClass =
appDomain.getDefinition(com.google.maps.api.Whatever) as Class;
}

Now can create and instance of the MyOwnButton, simply by calling:

var myNewObject:Class = new ClassFileForHoldingGooglesAPIClass();

Or call functions on the  ClassFileForHoldingGooglesAPIClass.

Hope this is what you mean.

Cheers,

Sidney


On May 15, 2008, at 3:41 PM, eric e. dolecki wrote:


They offer up a SWC, any way of using that in the Flash IDE without
using
FlexBuilder?
___
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] Best way...

2008-05-13 Thread Sidney de Koning
I just started using LuminicBox (do a search on google for the AS3  
version). And i have to say i'm quite impressed.
It's a logger nd you can set the importance of messages  (log, warn,  
error etc);


You can also use the alpha version of XRAY (but icant get the  
connector to work in AS3)


And today i came across SOS for FDT/ Eclipse, maybe you can also use  
it with Flash, since it makes use of a socket connection/ 
localconnection.


Are you also using this for AIR or only for AS3?

Sid

On May 13, 2008, at 7:49 PM, Patrick J. Jankun wrote:


.. to debug AS3 [NOT AS2!]

Is there any other Debugger then one build in Flash IDE? How do you  
guys Debug your Proejcts?
What are the best practices in debugging? What tools should i  
consider?


Greetings,
Patrick
--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

___
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] Best way...

2008-05-13 Thread Sidney de Koning

Not thay i know of.
I have written a AIR logger, class file an simple front end, so i dont  
have to call the debugger from flash everytime. It writes to a file on  
the file system, that you drag and drop in the front end.
Give me a couple of hours and i'll put it online for the world to use.  
(at work now).


Sid.


On May 13, 2008, at 8:20 PM, Patrick J. Jankun wrote:

pure as3 as for now :) is there a special air debugger available in  
the air package?


Patrick
On May 13, 2008, at 8:02 PM, Sidney de Koning wrote:

I just started using LuminicBox (do a search on google for the AS3  
version). And i have to say i'm quite impressed.
It's a logger nd you can set the importance of messages  (log,  
warn, error etc);


You can also use the alpha version of XRAY (but icant get the  
connector to work in AS3)


And today i came across SOS for FDT/ Eclipse, maybe you can also  
use it with Flash, since it makes use of a socket connection/ 
localconnection.


Are you also using this for AIR or only for AS3?

Sid

On May 13, 2008, at 7:49 PM, Patrick J. Jankun wrote:


.. to debug AS3 [NOT AS2!]

Is there any other Debugger then one build in Flash IDE? How do  
you guys Debug your Proejcts?
What are the best practices in debugging? What tools should i  
consider?


Greetings,
Patrick
--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

___
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


--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

___
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] Best way...

2008-05-13 Thread Sidney de Koning

Hi Patrick,

I have put my logger online at http://www.funky-monkey.nl/blog/
It is a very simple logger so i dont have to start the debugger in flash 
to trace out messages.


It writes a file to the desktop, which you drag and drop in the AIR 
front end.


Any comments are more than welcome!

Sidney

Patrick J. Jankun wrote:
pure as3 as for now :) is there a special air debugger available in 
the air package?


Patrick
On May 13, 2008, at 8:02 PM, Sidney de Koning wrote:

I just started using LuminicBox (do a search on google for the AS3 
version). And i have to say i'm quite impressed.
It's a logger nd you can set the importance of messages  (log, warn, 
error etc);


You can also use the alpha version of XRAY (but icant get the 
connector to work in AS3)


And today i came across SOS for FDT/ Eclipse, maybe you can also use 
it with Flash, since it makes use of a socket 
connection/localconnection.


Are you also using this for AIR or only for AS3?

Sid

On May 13, 2008, at 7:49 PM, Patrick J. Jankun wrote:


.. to debug AS3 [NOT AS2!]

Is there any other Debugger then one build in Flash IDE? How do you 
guys Debug your Proejcts?

What are the best practices in debugging? What tools should i consider?

Greetings,
Patrick
--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

___
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


--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

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

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.16/1430 - Release Date: 13/05/2008 
07:31
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Setting an AIR applications file types to default

2008-05-08 Thread Sidney de Koning

Hi List,

I'd like to set my AIR application to handle specific files, and the 
when i double click these file on my file system i want them to open 
with my AIR app.
What i've done sofar is ajusted the descriptor xml to fit my needs for 
my files, mp3's in this case and want to use the 
setAsDefaultApplication() function. I'm using Flash CS3 for this.


How ever when i use this function, my app does not behave accordingly.

How do i use this function i've tried this: 
NativeApplication.setAsDefaultApplication(), 
stage.setAsDefaultApplication(), setAsDefaultApplication().

But notthing works.

Please advise,

Thanks,

Sidney

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.10/1421 - Release Date: 07/05/2008 
17:23
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  1   2   >