Forum Topic: Actionscript for NG medals!

(293 views • 9 replies)

This topic is 1 page long.

<< < > >>
Elated

xenonmonkey

Reply To Post Reply & Quote

Posted at: 4/28/09 08:48 PM

xenonmonkey EVIL LEVEL 18

Sign-Up: 05/24/07

Posts: 1,371

When I was saving pico's school.swf to my computer, I decided " hey, wouldn't it be funny if I made this a .fla file?" so I opened my flash decompiler and took a look at the flash.

When I opened it and I saw the medal icon, and another box that connects to the medal points.

First, i looked at the actionscript for the other box. It read:
setProperty("", _visible, false);
var checkConnection = function (event)
{
if (!event.success)
{
setProperty("", _visible, true);
gotoAndStop(3);
} // end if
};
if (com.Newgrounds.NewgroundsAPI.isNewgroun ds() || _root.API_Settings.debug_mode)
{
com.Newgrounds.NewgroundsAPI.addEventLis tener(com.Newgrounds.NewgroundsAPI.event s.MOVIE_CONNECTED, checkConnection);
if (!com.Newgrounds.NewgroundsAPI.hasUserSe ssion() && !_root.API_Settings.debug_mode)
{
setProperty("", _visible, true);
gotoAndStop(2);
} // end if
} // end if
com.Newgrounds.NewgroundsAPI.setMovieVer sion(_root.API_Settings.movie_version);
com.Newgrounds.NewgroundsAPI.connectMovi e(_root.API_Settings.movie_id, _root.API_Settings.enc_key, _root.API_Settings.debug_mode);
com.Newgrounds.NewgroundsAPI.loadMedals(
);
stop ();

Then i checked the first frame of the actions layer for the medal box:

function unlockMedal(m_name)
{
clearInterval(pop_delay);
var _loc1 = com.Newgrounds.NewgroundsAPI.getMedals()
;
var _loc2 = null;
for (i in _loc1)
{
if (_loc1[i].medal_name == m_name)
{
_loc2 = _loc1[i];
medal_name = _loc2.medal_name;
medal_value = _loc2.medal_value + "pts";
com.Newgrounds.NewgroundsAPI.unlockMedal (medal_name);
pop_delay = setInterval(endDelay, 3000);
setProperty("", _visible, true);
gotoAndPlay(2);
break;
} // end if
} // end of for...in
} // End of the function
function endDelay(params)
{
gotoAndPlay(10);
clearInterval(pop_delay);
} // End of the function
var pop_delay;
var medal_name = "?????";
var medal_value = "???";
setProperty("", _visible, false);

After that came the animation of the medal appearing followed by a last actionscript for the final frame:

var myBitmapData = flash.display.BitmapData.loadBitmap(meda l_name + ".gif");
medal_icon.attachBitmap(myBitmapData, 111);
stop ();

Do you think we can exploit this for the general use of medals?


Elated

Zuggz

Reply To Post Reply & Quote

Posted at: 4/28/09 08:52 PM

Zuggz FAB LEVEL 16

Sign-Up: 06/23/03

Posts: 1,055

No you can't, you'll need to have the game setup for use of medals on Newground's server side.
However, Tom has made it so normal people can use medals for Pico day movies/games.

Tom's Medal Post

|- I'm on a Boat - Collab -|- List -|- AS3 -|- Game Poll -|

BBS Signature

None

El-Presidente

Reply To Post Reply & Quote

Posted at: 4/28/09 09:02 PM

El-Presidente LIGHT LEVEL 27

Sign-Up: 06/02/05

Posts: 5,162

Don't try and do this again. Tom clearly doesn't want everyone to use NG Medals, otherwise he would make them public. It's even just disrespectful that you tried to decompile his .swf to get around it.

MY E-PENIS IS BIGGER THAN YOURS
8=================================>
...and this is my fag...

BBS Signature

None

xenonmonkey

Reply To Post Reply & Quote

Posted at: 4/28/09 09:06 PM

xenonmonkey EVIL LEVEL 18

Sign-Up: 05/24/07

Posts: 1,371

At 4/28/09 09:02 PM, El-Presidente wrote: Don't try and do this again. Tom clearly doesn't want everyone to use NG Medals, otherwise he would make them public. It's even just disrespectful that you tried to decompile his .swf to get around it.

I didn't open the flash to see how to abuse medals, i opened it to see how the game was put together and I just happened to come across that code


None

Zuggz

Reply To Post Reply & Quote

Posted at: 4/28/09 09:09 PM

Zuggz FAB LEVEL 16

Sign-Up: 06/23/03

Posts: 1,055

At 4/28/09 09:06 PM, xenonmonkey wrote: I didn't open the flash to see how to abuse medals, i opened it to see how the game was put together and I just happened to come across that code

You shouldn't do that without permission.
Check out my first reply. It regards public medals.

|- I'm on a Boat - Collab -|- List -|- AS3 -|- Game Poll -|

BBS Signature

None

xenonmonkey

Reply To Post Reply & Quote

Posted at: 4/28/09 09:12 PM

xenonmonkey EVIL LEVEL 18

Sign-Up: 05/24/07

Posts: 1,371

At 4/28/09 09:09 PM, Zuggz wrote:
At 4/28/09 09:06 PM, xenonmonkey wrote: I didn't open the flash to see how to abuse medals, i opened it to see how the game was put together and I just happened to come across that code
You shouldn't do that without permission.
Check out my first reply. It regards public medals.

well now i know, but i don't think it's wrong to see how certain flashes are put together by looking at the inside of them, and not doing anything but sharing info and asking if it can possibly be reverse engineered


None

Slipstreamer

Reply To Post Reply & Quote

Posted at: 4/28/09 10:04 PM

Slipstreamer NEUTRAL LEVEL 18

Sign-Up: 12/05/06

Posts: 678

So you see the code yet you post it?

lol

Slips - A hardass smartass response to ignorance.
yep yep yep.
mhmm.

BBS Signature

None

henke37

Reply To Post Reply & Quote

Posted at: 4/29/09 01:10 AM

henke37 NEUTRAL LEVEL 22

Sign-Up: 09/10/04

Posts: 3,548

If you had the skills needed to qualify for medals, you would realize that this code doesn't actually do the part where it tells the server that the medal has been gained. All that this does is running the display system. Boring stuff that you hopefully don't need help with doing in the first place.

Each time someone abuses hittest, God kills a kitten. Please, learn real collision testing.


Resigned

zuperxtreme

Reply To Post Reply & Quote

Posted at: 4/29/09 01:39 AM

zuperxtreme NEUTRAL LEVEL 08

Sign-Up: 01/02/05

Posts: 1,569

At 4/28/09 09:02 PM, El-Presidente wrote: Don't try and do this again. Tom clearly doesn't want everyone to use NG Medals, otherwise he would make them public. It's even just disrespectful that you tried to decompile his .swf to get around it.

Bah, it's just harmless reverse engineering. Plus it's not even encrypted.


Happy

Luis

Reply To Post Reply & Quote

Posted at: 4/29/09 02:20 AM

Luis NEUTRAL LEVEL 02

Sign-Up: 04/23/00

Posts: 13,250

At 4/29/09 01:39 AM, zuperxtreme wrote:
At 4/28/09 09:02 PM, El-Presidente wrote: Don't try and do this again. Tom clearly doesn't want everyone to use NG Medals, otherwise he would make them public. It's even just disrespectful that you tried to decompile his .swf to get around it.
Bah, it's just harmless reverse engineering. Plus it's not even encrypted.

I agree. And theres nothin wrong with being nosy and hungry for knowledge. Cant install medals without it having a placeholder for it in the backend (insert gay joke) anyway. Still has to go through tom of goldfish in order to get that in there.

Sig by Life-Stream

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 09:25 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!