Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best De-Swfing tools? 1

Status
Not open for further replies.

WildWest

Programmer
Apr 2, 2002
111
US
What are the best de-swfing tools that allow you to decompile the shockwave files? I need to see if I can extract certian objects, ActionScripting, etc....

Thanks
 
sothink <- if you're intentions are good.
AS2FLA <-- looks most promising, but not quite there, if your are intentions are not.

give me a star if this helped you. MMFL-
Mavericks Fan For Life
 
MFFL, Thanks for the response. Where do I get sothink and AS2FLA?
 
these days most developers do not put actionscript in swf files but save it external in .as files. i always do this as pirates attempting to steal my work cannot then get at the actionscript....well all they will get are the include statements.
its also much better coding practise to do this things way and once written code can then be used simultaneously by many swf and you no longer have to go digging around a swf trying to find a line of code as its all in the one place.
id urge everyone to adopt this best practise ...it makes life easier and prevents theft of your actionscript.
 
If I can have access to your include's names, I guess I could possibly find my way to your .as's. And if I can't, I'm sure some wiz kid will!

All of that for what? Not generously sharing your knowledge? Not all AS searching users have bad intentions!

I vote against it! Regards,

oldman3.gif
 
no way...the .as files are kept well away from public domain in a secure area....same sort of place you would keep passwords etc.....anyone trying to hack in would doubtless get nowhere or set off alarms.
 
Then fine! Keep your precious scripts for yourself!
Can't change Bush's mind either but I still would vote against his (are they really his?) keeping scripts secret! Regards,

oldman3.gif
 
billwatson. why don't you post an example swf with your include statements in it? I bet you I can get to your AS files. I've done it before with a fortune 500 company.
 
Very interesting challenge! Will bill take the risk! Stay tuned! Regards,

oldman3.gif
 
havn't heard anything... I guess the challenge wasn't accepted. :\
 
very well if you insist in this pointless game

the only code you will be able to extract from this file is the include statement

1 pt if you can get that far and tell me the name of the .as file

you win if you find the .as file manage to open it and read the message i left for you on line 3


clue: the only code governs an old flash 5 custom built scrollbar.
 
What a precious AS that would be! Do you really think it deserves being protected? Regards,

oldman3.gif
 
thx for the challenge billwatson. this is the code I got. tell me what I'm missing.

=================================

// Action script...

// [onClipEvent of sprite 4 in frame 1]
onClipEvent (load)
{
function refreshscrollbar2()
{
TextBox.scroll = resetOnNewFile ? 1 : Math.min(TextBox.maxscroll, TextBox.scroll);
scrollbar2._y = 0;
} // End of the function
function updatescrollbar2Pos()
{
scrollbar2._y = 161 / (TextBox.maxScroll - 1) * (TextBox.scroll - 1);
} // End of the function
this.loadVariables(&quot;scroller1.txt&quot;);
scrolling = 0;
frameCounter = 1;
speedFactor = 2;
numLines = 14;
resetOnNewFile = true;
origHeight = 194;
origX = scrollbar2._x;
refreshRate = 12;
refreshCounter = 0;
refreshlastMaxscroll = 0;
loaded = false;
refreshscrollbar2();
}

onClipEvent (enterFrame)
{
if (loaded)
{
if (refreshCounter % refreshRate == 0 && TextBox.maxscroll != refreshLastMaxScroll)
{
refreshscrollbar2();
refreshLastMaxScroll = TextBox.maxscroll;
refreshCounter = 0;
} // end if
refreshCounter++;
} // end if
if (frameCounter % speedFactor == 0)
{
if (scrolling == &quot;up2&quot; && TextBox.scroll < 1)
{
TextBox.scroll = TextBox.scroll--;
updatescrollbar2Pos();
}
else if (scrolling == &quot;down2&quot; && TextBox.scroll < TextBox.maxscroll)
{
TextBox.scroll = TextBox.scroll++;
updatescrollbar2Pos();
} // end if
frameCounter = 0;
} // end if
frameCounter++;
}

onClipEvent (mouseDown)
{
if (up2.hitTest(_root._xmouse, _root._ymouse))
{
scrolling = &quot;up2&quot;;
frameCounter = speedFactor;
up2.gotoAndStop(2);
} // end if
if (down2.hitTest(_root._xmouse, _root._ymouse))
{
scrolling = &quot;down2&quot;;
frameCounter = speedFactor;
down2.gotoAndStop(2);
} // end if
if (scrollbar2.hitTest(_root._xmouse, _root._ymouse))
{
scrollbar2.startDrag(0, origX, 161, origX);
scrolling = &quot;scrollbar2&quot;;
scrollbar2.gotoAndStop(2);
} // end if
up2dateAfterEvent();
}

onClipEvent (mouseUp)
{
scrolling = 0;
up2.gotoAndStop(1);
down2.gotoAndStop(1);
scrollbar2.gotoAndStop(1);
stopDrag();
updateAfterEvent();
}

onClipEvent (mouseMove)
{
if (scrolling == &quot;scrollbar2&quot;)
{
lineheight = 161 / (TextBox.maxScroll - 1);
TextBox.scroll = Math.round(scrollbar2._y / lineHeight + 1);
} // end if
updateAfterEvent();
}

onClipEvent (data)
{
loaded = true;
}

=============================


Looks like you're loading variables too... here the txt file...
=============================
textbox=matrix {matrixType:&quot;box&quot;, x:dt._x, y:dt._y, w:dt._width, h:dt._height, r:Math.PI/2};

lineto(dt._x+dt._width, dt._y+dt._height);
lineto(dt._x, dt._y+dt._height);
lineto(dt._x, dt._y);
endFill();
here come
the real rubbish
now
will it scroll
hum de hum

and more rubbish

and more rubbishtextbox=matrix {matrixType:&quot;box&quot;, x:dt._x, y:dt._y, w:dt._width, h:dt._height, r:Math.PI/2};

lineto(dt._x+dt._width, dt._y+dt._height);
lineto(dt._x, dt._y+dt._height);
lineto(dt._x, dt._y);
endFill();
here come
the real rubbish
now
will it scroll
hum de hum

and more rubbish

and more rubbish

===========================


thx
 
Wow! I now understand why you'd want to hide that!

Care to comment Bill? [pipe] Regards,

oldman3.gif


Don't worry, if my reply is wrong, BillWatson will clean it up for me!
 
#include happens at compile time: in other words the actionscript is taken in by the authoring tool and built into the .swf as it's being published. It doesn't work like javascript or php where the include brings the code in at runtime. It's still a cool thing to use in order to build up a reusable code library so it's good practice to use it (saves a ton of time too).

There are a couple of utilities out there which 'obfuscate' your code and make it incredibly hard to read, and therefore rip off, even with a .swf decompiler.

Here's one:
As for sharing code, if I've just put together a site and worked non-stop for a month, twelve hour plus days to build something cool that the client loves and I can charge ten grand for then I don't want exactly the same code appearing elsewhere a week later for a fraction of the price supplied by someone who doesn't understand it but simply lifted it wholesale because they couldn't be bothered or weren't capable of writing it themselves. The client feels that I ripped them off and won't want to pay a sensible price if they ever come back to me. Fair's fair - I like to contribute to forums and help out when I have time, and Flash is a fun hobby etc. but for some people this is a job too and it's one that gets heavily devalued by piracy.

</rant> ;-)
 
wangbar. Thanks for the feedback. Regarding your statement about the #includes occurring at compile time, if code in the &quot;.as&quot; files (via #include) are updated after the .swf is compiled then the FLA will have to be recomiled to a SWF for the new &quot;.as&quot; script to be available to the app/movie? right?

I thought the #include was useful in multi-user development environments so the developers could update their AS files and not have to re-swf their apps/movies. Please provide your wisdom here.

Thanks.
 
Exactly - the code is fixed into the swf at compile time so any updates to the .as file after that point will not appear.

It's still useful, though not as convenient as in other languages, in multi-developer environments - you just have to remember to republish the movie every time the code is updated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top