00:00
00:00
Newgrounds Background Image Theme

Coppock just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

As: X-ray 2005-09-14 12:28:57


AS: Main
Here I will explain how you do a game like Cooties X-ray Glasses or something.

This is pretty simple. I made this because a guy needed help with this and maybe more of you wants this.
What we'll use is masking and well, actionscript.

1. Make a layer with the image that should be under the other on it.
2. Make a new layer with a scanning device or what's it called and place this layer above the other one.
3. Mark the scanning device and press F8 and choose movieclip.
4. Press F9 and paste this actionscript there:
onClipEvent (mouseMove) {
startDrag(this, true);
Mouse.hide();
}
5. Make a new layer and place it under the other ones. In this layer you'll make the image that is above the others.
6. Right-click on the layer with the scanning device and choose Mask

Now test the movie. It's simple as that. All you need now is good drawings :)

Response to As: X-ray 2005-09-14 12:47:05


At 9/14/05 12:28 PM, BananaSkull wrote: onClipEvent (mouseMove) {
startDrag(this, true);
Mouse.hide();
}

Firstly there's no reason whatsoever to use mouseMove, use load instead.
Secondly, this is a very narrow "tutorial", and it's not explained very well.
Thirdly, the greater part of it is not really Actionscript, and the rest is explained better in AS: Drag & Drop by Inglor.


BBS Signature

Response to As: X-ray 2005-09-14 12:51:59


It does'nt work for me:(

Response to As: X-ray 2005-09-14 12:55:48


What is this?

Its just a masking tutorial, with copied code from Drag 'n Drop
You didn't even use AS setMask()
It looks about 5 minutes work.

Pointless.

Response to As: X-ray 2005-09-14 12:57:34


Pff.. You guys are mean, don't make him sad. :(
Be positive!

It wasn't the best AS but it's okay :D


BBS Signature

Response to As: X-ray 2005-09-14 12:57:48


It does work actually.

Response to As: X-ray 2005-09-14 13:09:33


At 9/14/05 12:47 PM, Rantzien wrote:
At 9/14/05 12:28 PM, BananaSkull wrote:
Firstly there's no reason whatsoever to use mouseMove, use load instead.

There is actually, but not with startDrag LOL

best drag evaarrr:

onClipEvent(mouseMove){
this._x = _root._xmouse;
this._y = _root._ymouse;
updateAfterEvent();
}

Response to As: X-ray 2005-09-14 13:12:24


Even better.

onClipEvent(mouseMove){
this._x = _root._xmouse;
this._y = _root._ymouse;
}


BBS Signature

Response to As: X-ray 2005-09-14 13:15:36


this is pretty pointless, if you just think about it you can practically figure it out by yourself, but still congrats on spending the time to write it up..


WEBSITE

BLOG ~ Dont fuck around with my dog. All that I can see I steal. ~

NG FFR ~ Automatic for the people.

BBS Signature

Response to As: X-ray 2005-09-14 13:16:26


At 9/14/05 01:12 PM, -Toast- wrote: Even better.

onClipEvent(mouseMove){
this._x = _root._xmouse;
this._y = _root._ymouse;
}

Now there is a mouse follow script!


BBS Signature

Response to As: X-ray 2005-09-14 13:20:49


At 9/14/05 01:12 PM, -Toast- wrote: Even better.

onClipEvent(mouseMove){
this._x = _root._xmouse;
this._y = _root._ymouse;
}

LOL NO

The stage doesnt update after the drag, so IT ISNT SMOOTH!!!!!

NOT BETTER AARARAGGH

Response to As: X-ray 2005-09-14 13:23:21


At 9/14/05 01:20 PM, T-H wrote: LOL NO

The stage doesnt update after the drag, so IT ISNT SMOOTH!!!!!

NOT BETTER AARARAGGH

Umm yeah actually I'm gonna agree with this guy here...


BBS Signature

Response to As: X-ray 2005-09-14 13:24:54


At 9/14/05 01:09 PM, T-H wrote:
At 9/14/05 12:47 PM, Rantzien wrote: Firstly there's no reason whatsoever to use mouseMove, use load instead.
There is actually, but not with startDrag LOL

Well, that was what I meant.


BBS Signature

Response to As: X-ray 2005-09-14 13:29:35


At 9/14/05 01:24 PM, Rantzien wrote:
At 9/14/05 01:09 PM, T-H wrote:
At 9/14/05 12:47 PM, Rantzien wrote: Firstly there's no reason whatsoever to use mouseMove, use load instead.
There is actually, but not with startDrag LOL
Well, that was what I meant.

Won't that create problems with right clicking? Cursors seem to do that...

Whatever, not a big fan of startDrag anyway...


BBS Signature

Response to As: X-ray 2005-12-15 02:19:50


At 9/14/05 01:12 PM, -Toast- wrote: Even better.

silly silly toast

Response to As: X-ray 2005-12-15 10:41:52


At 12/15/05 02:19 AM, -dELta- wrote:
At 9/14/05 01:12 PM, -Toast- wrote: Even better.
silly silly toast

Did you bump this thread? pff.

I remember a thread where Inglor proved TH wrong. He mentioned something with lagginess.


BBS Signature

Response to As: X-ray 2005-12-15 11:40:44


At 12/15/05 10:41 AM, -Toast- wrote: Did you bump this thread? pff.

I remember a thread where Inglor proved TH wrong. He mentioned something with lagginess.

Yeah the smoothdrag(omgcopyright) is more laggy than a crappy startDrag, that goes without saying really.... but it doesnt affect the movie a whole lot. unless you have a whole load of shit going on.