Friday, May 8, 2009

Newgrounds Username Variable for use in your games/movies!

If you have already published games/movies to newgrounds then this is something that you must add. It makes your games and movies way cooler and look more professional.

Newgrounds just added a function where your .swf file can recognize what user is playing your file.. Newgrounds automatically loads the username into your movie so the only thing you need to do is call it. The variable that NG loads is: _root.ng_username

Note that this only works if the user is logged in. So you have to make an if statement to see if the user is logged in.
An example is:

if (_root.ng_username == null)
{
textBox.text = "Hello there, how are you?";
{
textBox.text = "Hey, " + _root.ng_username + " how are you!";
}
}

This would make the textbox instanced 'textBox' show Hello there, how are you if the user is not logged in and it would show Hey exampleusername, how are you?

Flash Achievments Test

I was surfing the net trying to find good games and noticed that many games now have their own in-game achievement system. So I tried making my own version of achievments... You can try my attempt to make achievments here

What I simply did is I made a movie clip with two dynamic text boxes. And when a user does a specified action it makes the movie clip play and sends two variables to to the text boxes and it makes a movie-clip saying what achievment they did


If you would like the source code or explanation feel free to email me at:

plankenau@gmail.com

Tuesday, April 7, 2009

DANCE!

Make pictures on websites dance! Just make a new bookmarklet and in the page part just paste this code in!

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0);

Monday, March 16, 2009

ShareThis Bookmarklet

Ever wanted to share a website directly with somebody? Or just email a website to yourself for storing purposes? Well this is what you need!

Just make a new bookmark and in the URL paste this code:

javascript:var%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('src','http://sharethis.com/share/load');document.body.appendChild(e);void(0);

Monday, March 9, 2009

New Bookmarklest!

Check out these 3 new bookmarklets! They are just amazing!

1) Enable right-click
[this bookmarklet will enable right-clicking on websites that block it from you, note that this does not apply to flash files!]

script:

javascript:void(document.oncontextmenu=null)

2) EDIT any website in real-time!
[this will allow you to edit any website right on your browser, only works on your local computer]

script:

javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

3) Stop EDITING any website

script:

javascript:document.body.contentEditable='false'; document.designMode='off'; void 1

Thursday, March 5, 2009

Easier Bookmarklets Installation

Now it's even easier to install all the bookmarklets and more. All you have to do is download the zipped file and run the run.bat file. It will automatically backup your old bookmarks in case anything goes wrong and will copy a new bookmarks file with all the bookmarklets already pre-installed. This is only for Google Chrome though! Once you run the file just restart Google chrome and there you go!

DOWNLOAD ZIP HERE

Sunday, March 1, 2009

My DOT TK

The other day I made a website with google sites and I was really impressed by how easy and fast it was to make a website with google. The only problem was the URL. It was a long and boring URL that nobody would ever even think about typing. But I found this really awesome website where you can make your own short personal domain for free! Why don't you try out it? It's easy and free. It will refer any website into your own personal domain.

JUST CLICK THE SQUARE UNDER TO TRY IT!