Re: [Flashcoders] Recommendation for AS3 decompiler?

2009-05-07 Thread jimmi
Hey, you should check out HP swfscan, it decompiles everything just
fine(as2 and 3) and it's free.

On Wed, May 6, 2009 at 12:11 PM, Glen Pike g...@engineeredarts.co.uk wrote:
 Hi,

   If you can run windows software, check out Burak's ASV - it's definitely
 worth the money and paying users can get access to the latest beta's of the
 AS3 decompiler...

   I find ASV really good for getting the AS code out and SoThink was good
 for rescuing movieclips from SWF's without FLA's...

   Glen

 Gerry Beauregard wrote:

 Thanks Anthony, very useful to know.   BTW, I just noticed that the Mac
 version of SoThink's SWF Decompiler is at version 4.5, whereas the Windows
 version is now at 5.0.   I need v5 to decompile AS3 code for FlashPlayer 10,
 so I'll run the Windows version under VMWare Fusion for now.

 On 2009-05-05  , at 23:40 , Anthony Pace wrote:

 When I have deleted the fla, I only have my swf, and I need to reuse a
 bit of code, sothink has come to the rescue quite a few times; however, I am
 on windows.

 If it has to be a mac, even though it crashes, I think sothink is your
 best bet.


 Gerry Beauregard wrote:

 Does anyone have a recommendation for a good tool for decompiling SWFs
 (and if possible SWCs) written in ActionScript 3?  Must run on MacOS 10.5.
  I was considering buying the SoThink SWF Decompiler for Mac, but
 unfortunately it often crashes when I select an SWF I just built with Flex
 Builder 3, and even when it doesn't crash, the trial version doesn't 
 display
 ActionScript code.

 Incidentally, I have no intention of ripping off anyone else's
 ActionScript code.  Quite the contrary, I'm developing new code, and want 
 to
 see what people using a decompiler would be able to figure out if I don't
 use obfuscation. If I conclude that obfuscation is necessary at all, I'll
 need a decompiler to evaluate obfuscation options...

 -Gerry
 ___
 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] isseu with a custom function in AS2

2009-04-03 Thread jimmi
Good morning,

I have made a function that adds interpunction marks to a value, for
example the value 1 gets changed to 10.000, 10 to 100.000 and
so forth.

The function work fine, but I'm trying to make it reusable so that i
can use it in a large scale project. That's where the problem comes
up.

This is what the working code looks like:


var outputNumber:Number = 1 // input value
var outputString:String = new String();

function init ()
{
outputString = String(Number(outputNumber));
interpunk (outputString);

trace(outputNumber); // output is 1
trace(outputString); // output is 10.000
}

function interpunk (par1):Void
{
trace(par1)
switch (par1.length)
{
case 4 :
outputString = String(par1.charAt (0) + . + 
par1.slice (1))
break;

case 5 :
outputString = String(par1.charAt (0) + par1.charAt (1) 
+ . +
par1.slice (2))
break;

case 6 :
outputString = String(par1.charAt (0) + par1.charAt (1) 
+
par1.charAt (2) + . + par1.slice (3))
break;

default :
outputString = String(par1)
break;
}
}

init ();



So i tried to make it reusable, so i tried this(changed outputString to par1).
But now the value comes out unchanged so 1 stays 1, while i
expected it to become 10.000.


I hope someone can help i the right direction.

This is what the non working code looks like :


function interpunk (par1):Void
{
trace(par1)
switch (par1.length)
{
case 4 :
par1 = String(par1.charAt (0) + . + par1.slice (1))
break;

case 5 :
par1 = String(par1.charAt (0) + par1.charAt (1) + . + 
par1.slice (2))
break;

case 6 :
par1 = String(par1.charAt (0) + par1.charAt (1) + 
par1.charAt (2) +
. + par1.slice (3))
break;

default :
par1 = String(par1)
break;
}
}


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


Re: [Flashcoders] isseu with a custom function in AS2

2009-04-03 Thread jimmi
Hey guys thanks for the feedback. Willem i would love to have that
class of yours.

On Fri, Apr 3, 2009 at 12:58 PM, Geografiek geograf...@geografiek.nl wrote:
 Hi Jimmi,
 I made a class that does just that (and a little bit more).
 I can send it to you off list if you wish.
 HTH,
 Willem van den Goorbergh
 Op 3-apr-2009, om 10:19 heeft jimmi het volgende geschreven:

 Good morning,

 I have made a function that adds interpunction marks to a value, for
 example the value 1 gets changed to 10.000, 10 to 100.000 and
 so forth.

 The function work fine, but I'm trying to make it reusable so that i
 can use it in a large scale project. That's where the problem comes
 up.

 This is what the working code looks like:


 
 var outputNumber:Number = 1 // input value
 var outputString:String = new String();

 function init ()
 {
        outputString = String(Number(outputNumber));
        interpunk (outputString);

        trace(outputNumber); // output is 1
        trace(outputString); // output is 10.000
 }

 function interpunk (par1):Void
 {
        trace(par1)
        switch (par1.length)
        {
                case 4 :
                        outputString = String(par1.charAt (0) + . +
 par1.slice (1))
                        break;

                case 5 :
                        outputString = String(par1.charAt (0) + par1.charAt
 (1) + . +
 par1.slice (2))
                        break;

                case 6 :
                        outputString = String(par1.charAt (0) + par1.charAt
 (1) +
 par1.charAt (2) + . + par1.slice (3))
                        break;

                default :
                        outputString = String(par1)
                        break;
        }
 }

 init ();


 

 So i tried to make it reusable, so i tried this(changed outputString to
 par1).
 But now the value comes out unchanged so 1 stays 1, while i
 expected it to become 10.000.


 I hope someone can help i the right direction.

 This is what the non working code looks like :


 
 function interpunk (par1):Void
 {
        trace(par1)
        switch (par1.length)
        {
                case 4 :
                        par1 = String(par1.charAt (0) + . + par1.slice
 (1))
                        break;

                case 5 :
                        par1 = String(par1.charAt (0) + par1.charAt (1) +
 . + par1.slice (2))
                        break;

                case 6 :
                        par1 = String(par1.charAt (0) + par1.charAt (1) +
 par1.charAt (2) +
 . + par1.slice (3))
                        break;

                default :
                        par1 = String(par1)
                        break;
        }
 }


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

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




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

2009-01-27 Thread jimmi
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


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

2009-01-27 Thread jimmi
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


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

2009-01-27 Thread jimmi
Thanks guys, i now have some more insight into this matter.

Best regards,
Jim

On Tue, Jan 27, 2009 at 12:01 PM, allandt bik-elliott
(thefieldcomic.com) alla...@gmail.com wrote:
 cheers fella

 a

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

 Hi allandt,

 2:20 is not a number :) its a string. i think what flash tries to do is
 convert it to a number but fails and convert it to a string
 what you could do is strip out any : or , and replace it with a . (dot) and
 then pass it to the round function.

 You can use this class for it, its AS2:
 http://www.funky-monkey.nl/blog/2006/10/29/replace-string-class/

 Have fun with it!

 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

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


[Flashcoders] [AS2] problem with conditional statement else if

2009-01-22 Thread jimmi
Hi, for a project it is required that I make a module with AS2.
I already got most of the module working, except for one part: the slider. 
The slider button is supposed to stop at six points. 
I thought that the if..else..if statement would do just fine for this purpose. 

The problem is that only the first two statements work, the rest doesn't. 
So the slider slides just fine, but it only snaps to point one and point two.
I also tried chekking the position of the btn with a onEnterFrame event, it 
only traces one and two. 
When I specifically check the ._x position(without a conditional statement) of 
the slider button it does trace that value.

As far as I know there isn't a difference in how AS2 and AS3 handle conditional 
statements, right?

If anyone can help me in to the right direction with this it would be mucht 
appreciated.

// click
btn1.onMouseDown = function() 
 {
  btn1.startDrag(true,189,176,365.9,176) 
 }
 
// release
btn1.onMouseUp = btn.onReleaseOutside=function () 
 {
  if (btn1._x  206 )
  {
   btn1._x = 189;
   this.stopDrag();
   trace(one);
  }
  else if (btn1._x  208 || btn1._x  241)
  {
   btn1._x = 224.3;
   btn1.stopDrag();
   trace(two);
  }
  else if (btn1._x  243 || btn1._x  273)
  {
   btn1._x = 259.7;
   btn1.stopDrag();
   trace(three);
  }
  else if (btn1._x  279 || btn1._x  309)
  {
   btn1._x = 295.1;
   btn1.stopDrag();
   trace(four);
  }
  else if (btn1._x  313 || btn1._x  345)
  {
   btn1._x = 330.4;
   btn1.stopDrag();
   trace(five);
  }
  else if (btn1._x  351 || btn1._x  377)
  {
   btn1._x = 365.9;
   btn1.stopDrag();
   trace(six);
  }
  else
  {
  trace(nuttin);
  }
  
  
 }
 
// check
onEnterFrame = function()
 {
  if (btn1._x  206 )
  {
   trace(one);
  }
  else if ((btn1._x  208) || (btn1._x  241))
  {
   trace(two);
  }
  else if ((btn1._x  243) || (btn1._x  273))
  {
   trace(three);
  }
  else if ((btn1._x  279) || (btn1._x  309))
  {
   trace(four);
  }
  else if ((btn1._x  313) || (btn1._x  345))
  {
   trace(five);
  }
  else if ((btn1._x  351) || (btn1._x  377))
  {
   trace(six);
  }
  else
  {
   trace(nuttin);
  }
  
// x value of btn1
  trace(btn1._x)
 }
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] [AS2] problem with conditional statement else if

2009-01-22 Thread jimmi

How stupid of me. Thank you very much.

--
From: Ian Thomas i...@eirias.net
Sent: Thursday, January 22, 2009 10:27 AM
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] [AS2] problem with conditional statement else 
if



You need to use  instead of ||

(btn1._x  208 || btn1._x  241)

should be

(btn1._x  208  btn1._x  241)

HTH,
 Ian

On Thu, Jan 22, 2009 at 9:17 AM, jimmi cho...@gmail.com wrote:

Hi, for a project it is required that I make a module with AS2.
I already got most of the module working, except for one part: the 
slider.

The slider button is supposed to stop at six points.
I thought that the if..else..if statement would do just fine for this 
purpose.


The problem is that only the first two statements work, the rest doesn't.
So the slider slides just fine, but it only snaps to point one and 
point two.
I also tried chekking the position of the btn with a onEnterFrame event, 
it only traces one and two.
When I specifically check the ._x position(without a conditional 
statement) of the slider button it does trace that value.


As far as I know there isn't a difference in how AS2 and AS3 handle 
conditional statements, right?


If anyone can help me in to the right direction with this it would be 
mucht appreciated.


// click
btn1.onMouseDown = function()
 {
 btn1.startDrag(true,189,176,365.9,176)
 }

// release
btn1.onMouseUp = btn.onReleaseOutside=function ()
 {
 if (btn1._x  206 )
 {
  btn1._x = 189;
  this.stopDrag();
  trace(one);
 }
 else if (btn1._x  208 || btn1._x  241)
 {
  btn1._x = 224.3;
  btn1.stopDrag();
  trace(two);
 }
 else if (btn1._x  243 || btn1._x  273)
 {
  btn1._x = 259.7;
  btn1.stopDrag();
  trace(three);
 }
 else if (btn1._x  279 || btn1._x  309)
 {
  btn1._x = 295.1;
  btn1.stopDrag();
  trace(four);
 }
 else if (btn1._x  313 || btn1._x  345)
 {
  btn1._x = 330.4;
  btn1.stopDrag();
  trace(five);
 }
 else if (btn1._x  351 || btn1._x  377)
 {
  btn1._x = 365.9;
  btn1.stopDrag();
  trace(six);
 }
 else
 {
 trace(nuttin);
 }


 }

// check
onEnterFrame = function()
 {
 if (btn1._x  206 )
 {
  trace(one);
 }
 else if ((btn1._x  208) || (btn1._x  241))
 {
  trace(two);
 }
 else if ((btn1._x  243) || (btn1._x  273))
 {
  trace(three);
 }
 else if ((btn1._x  279) || (btn1._x  309))
 {
  trace(four);
 }
 else if ((btn1._x  313) || (btn1._x  345))
 {
  trace(five);
 }
 else if ((btn1._x  351) || (btn1._x  377))
 {
  trace(six);
 }
 else
 {
  trace(nuttin);
 }

   // x value of btn1
 trace(btn1._x)
 }
___
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