Adobe Flash AS 2 snowflakes snowing effect script December 20th, 2009
Well, i was bored again, and here is the outcome: A snow effect for Flash AS 2, which uses very less CPU power.
It is extremely simple to use:
1. Create a new empty movieclip on the top layer of your (root) movie.
2. Move the new movieclip at the x and y position 0 Pixel.
3. Copy the following code to the first frame in your new movieclip: Flash Snow Script
Don’t forget to set your movie’s framerate to 30 FPS!
That’s it, compile and be happy.
There are some parameters you can change on top of the Script, mainly to tweak the number of snowflakes and the CPU usage.
Have fun and Happy Christmas!
Posted in Programming, Tools | No Comments »
The smallest AJAX framework ever July 21st, 2009
The most AJAX frameworks are bloated with many functions you’ll never use or need. Who wants 60 KB of JavaScript if your only need is to send and load data? I Don’t.
I have found somewhere a short howto for AJAX, and derived (rewritten) the smallest AJAX framework ever out of it:
var ajax = false;
if(window.XMLHttpRequest) ajax = new XMLHttpRequest();
else if(window.ActiveXObject) {
try { ajax = new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e) {
try { ajax = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) {}
}
}
function ajaxGetContent(type, url, parameter, output_function) {
if(!ajax) eval(output_function + '(false);');
ajax.onreadystatechange = function() {
if(output_function != 'void' && ajax.readyState == 4) {
if(ajax.status == 200) eval(output_function + '(ajax.responseText);');
else eval(output_function + '(false);');
}
}
if(type == "post") {
ajax.open('POST', url, true);
ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
ajax.send(parameter);
} else {
ajax.open('GET', url + ((parameter.length > 0)?"?":"") + parameter, true);
ajax.send(null);
}
}
That’s short, isn’t it?
To get the data you want you have to simply call the function and define a function which will be called after the data arrives:
ajaxGetContent('post', '/myURL/index.php', 'a=b', 'myDataCallBack');
function myDataCallBack(myContent) {
if(myContent == false) {
// something went wrong
} else {
// have fun with your data
}
}
And if you want to send data only and don’t care of the answer, use this syntax:
ajaxGetContent('post', '/myURL/index.php', 'a=b', 'void');
Some explanation:
- type = How to send the data (Parameters). “post” or “get”.
- url = Where to send it to.
- parameter = URL-style parameters. Never use a question mark!
- output_function = The function which will be called after the data is received.
This Tool is tested in Opera 9+10, Firefox 2+3 and MSIE 7+8.
Have fun!
Posted in Programming, Tools | No Comments »
TimeWasters CS:S Configurator September 27th, 2008
TimeWaster’s CS:S Configurator is a online Counter Strike:Source config generator.
It’s main goal is not to provide you with buy scripts or stuff like this, it’s goal is to give you the ability to crunch your WHOLE CS:S config including the following settings:
- Nickname
- Mouse sensitivity
- Sound Volume
- Crosshair color and size
- Auto weapon switch
- Common bindings
- Your personal Counter Strike MENU
- And many more
in one ZIP file.
This means if you have a freshly installed CS:S and you want to apply your settings, you only have to unzip ONE FILE, set your screen resolution, and all your config work is done!!! no need to define a spraylogo, no need to add “-console” to your start options… all is done by unzipping that one file.
So don’t hesitate and create your config now!
Posted in Programming, Tools | No Comments »
ClickForYou September 27th, 2008
ClickForYou is a nifty little tool i wrote to be able to cheat in the game Insaniquarium, a game made by the PopCap guys.
How does it work?
That’s Easy: After you ran the executable and pressed the “Pause” button on your keyboard, it emulates a left click on your mouse every 20 milliseconds. This means you are clicking the left button on your mouse 50 times a second without moving your finger. To stop clicking, simply press your “Pause” key again.
How is it done?
ClickForYou is written with AutoIt, originally a platform to write test scripts or to automate recurring sequences. AutoIt uses a basic dialect which makes it very easy to write your own tools with it. AutoIt is available for free.
How can i use it?
There are two ways:
- If you trust me then download the already compiled (executable) version of ClickForYou.
- If you don’t trust me then download AutoIt itself, and the .au3 source code (look in the source code and be surprised that there’s no malicious code in it), and compile ClickForYou by yourself.
After downloading and/or compiling the tool, simply start the .exe and you are ready to go. Make sure your mouse cursor is’nt hovering over a application (this is important, because when the tool starts to click, you could do unwanted things with your application) and press the “Pause” key on your keyboard.
Now ClickForYou is Clicking For You. ;o)
Download:
The Executable ClickForYou.exe
Or if you want to compile it for yourself: ClickForYou Source Code and AutoIt
A Demonstration of ClickForYou: