The Daily Click ::. Forums ::. Klik Coding Help ::. Click & Drag Scrolling?
 

Post Reply  Post Oekaki 
 

Posted By Message

Buster

BLING COMMANDER

Registered
  03/06/2002
Points
  1545

VIP Member
26th August, 2012 at 26/08/2012 10:23:22 -

Hello!

Does anyone have any idea how I could make the playfield scroll by clicking and dragging? I'd prefer to do it without using any extensions.

 

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
26th August, 2012 at 26/08/2012 10:35:38 -

+ User clicks mouse button
-> Set XClick to XMouse
-> Set YClick to YMouse

+ Repeat while mouse button is down
-> Center display at X: ((X Left Frame+X Right Frame)/2)+(XClick-XMouse)
-> Center display at Y: ((Y Top Frame+Y Bottom Frame)/2)+(YClick-YMouse)

 
n/a

Buster

BLING COMMANDER

Registered
  03/06/2002
Points
  1545

VIP Member
26th August, 2012 at 26/08/2012 11:39:15 -

Thanks Sketchy!

Hmm I just tried this, it works (kind of). I can't quite explain what is actually happening because I'm not sure, it just doesn't respond to the clicking at dragging sometimes.

Do you know what I've done wrong?

Image

 

hapsi



Registered
  13/11/2003
Points
  775
26th August, 2012 at 26/08/2012 15:03:47 -

I would have done it with an active (since i'm "oldschool" and in knp'/tgf those events don't exist), but this a better way.

 
[Signature][/Signature]

hapsi



Registered
  13/11/2003
Points
  775
26th August, 2012 at 26/08/2012 15:05:13 -

Originally Posted by Buster
Thanks Sketchy!

Hmm I just tried this, it works (kind of). I can't quite explain what is actually happening because I'm not sure, it just doesn't respond to the clicking at dragging sometimes.

Do you know what I've done wrong?

Image
Wait.. so does it work or not?

 
[Signature][/Signature]

nivram



Registered
  20/07/2006
Points
  171
26th August, 2012 at 26/08/2012 16:23:19 -

There are a couple of examples on my website.

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

hapsi



Registered
  13/11/2003
Points
  775
26th August, 2012 at 26/08/2012 17:00:43 -


Originally Posted by nivram
There are a couple of examples on my website.

Marv



What the fuck dude? I checked your site and i'm impressed. Seriously, where did you found the time and effort? Maybe you have done them for your whole life if you are as old as the man in your avatar ..

 
[Signature][/Signature]

nivram



Registered
  20/07/2006
Points
  171
27th August, 2012 at 27/08/2012 14:37:07 -


Originally Posted by hapsi

Originally Posted by nivram
There are a couple of examples on my website.

Marv



What the fuck dude? I checked your site and i'm impressed. Seriously, where did you found the time and effort? Maybe you have done them for your whole life if you are as old as the man in your avatar ..



Thanks, and the avatar is me. My hair is now twice as long now.

I started in 2008 with the website, but collecting examples since 1999. Hope you find the site useful.

Marv



 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
27th August, 2012 at 27/08/2012 14:48:43 -

Just used an example you had archived on your site this past weekend, Marv.

Thanks for providing such an excellent resource.

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
27th August, 2012 at 27/08/2012 17:11:47 -

Marv! You need to upload a new photo right now! Exactly the same as your old one but with your new hair! That would be amazing. You still got that grey top?

 
n/a

Buster

BLING COMMANDER

Registered
  03/06/2002
Points
  1545

VIP Member
27th August, 2012 at 27/08/2012 17:27:04 -

I already had your website in my favourites, Marv! I completely forgot to look there.

Hmm, the same thing is happening when I use the method from the example on your website. I think it might have something to do with how I've set up the frame properties, maybe. This is probably a bit of a newb question, but can someone explain what 'Virtual' Height/Width is?

 

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
28th August, 2012 at 28/08/2012 02:50:44 -

Virtual Width and Virtual Height are the size of the area that the camera can show at runtime. This can be both bigger or smaller than the frame's actual width and height, and mainly exists so that you can take advantage of "Upon Entering/Exiting the Frame" without scrolling having to stop there (at least that's all I can think of). If you make that value higher than the actual dimensions of the frame, then the camera will be able to show things in that outside area that is usually gray in the frame editor, and if it is smaller, then you will not be able to show all the frame at runtime.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
28th August, 2012 at 28/08/2012 09:09:45 -

Also, setting either one to -1 will allows scrolling into infinity in that direction. Only right and downwards though. All left and upward scrolling always stops at 0.

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
28th August, 2012 at 28/08/2012 11:19:08 -

Also, setting either one to -1 will allows scrolling into infinity in that direction. Only right and downwards though. All left and upward scrolling always stops at 0.

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
28th August, 2012 at 28/08/2012 11:45:04 -

Also, setting either one to -1 will allows scrolling into infinity in that direction. Only right and downwards though. All left and upward scrolling always stops at 0.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click