Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Media Previewer (With no media)

Author
Message
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 10th Jun 2006 00:52 Edited at: 10th Jun 2006 00:54
This 20-liner allows you to preview sounds, music, images, and 3D worlds in Dark Basic Pro. I haven't tested all file types to make sure they work, but atleast one of each type.

I guess I should give TDK some credit since I looked at his file browser, but I didn't use his code.

Controls:
Mouse wheel to scroll
Click to select
Escape then F5 to go back if you don't have the option

And yes, I was bored.



Insanity is just a state of mind
Hippie Dude
19
Years of Service
User Offline
Joined: 6th Feb 2005
Location: California, United States
Posted: 10th Jun 2006 02:29
cool! you should make it so that it opens a file when you double click.

Mysteries Surround You
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 6th Jul 2006 03:29
Nicely done!
Things to add:
==Highlighting with 1 click(spelling?)
==Double Click (as Hippie dude said)
===Heh... may be hard to do in 20 lines... Of course you can always move it to the Code Snippet Board
==I have a question to ask of you.(See below)

=====How did you make the mouse scroll like that? So the middle mouse will scroll up and down? I'd like to know

I doubt you can draw me/60 by hand, so you REALLY can't draw ME/1, can you? Okay, you do that. Just tell me when you're done, I'll be someplace else having a life.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 6th Jul 2006 03:54 Edited at: 6th Jul 2006 04:43
I don't know if I will update this code. I just need to wait until I am really bored again.

To answer your question, the mouse scroller can be detected by mousemovez(). Something to be careful of is that you should have the mousemove stored as a variable and then test the variable. I have had problems with mousemovez returning a zero every time you call it more than once in a loop.

P.S. Does anyone know why there is a "" in my location? It's not there when I view my profile.


Edit------

Well, I got bored again. I am about to make it 20 lines (I am sure it will fit), but here is the code uncompressed.



Edit------

Done. It's the same number of lines as before.



EddieB
19
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 6th Jul 2006 20:40
I don't have db or dbpro on my computer anymore, any chance of getting an exe of this? Cheers..
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 6th Jul 2006 21:02
The following form field(s) were incomplete or incorrect:

Please enter some text!

Please complete or correct the form and submit again.

Attachments

Login to view attachments
Uncle Sam
18
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 6th Jul 2006 23:44 Edited at: 6th Jul 2006 23:45
Here ya go Eddie, I hope you don't mind Daemon.

Media Viewer

It's also attatched.

EDIT: awwwwww! I didn't see thate Daemon had attatched it!

Uncle Sam
Nvidia Geforce 7600 GS 256MB PCIEx, 2.66 GHZ Pentium 4 proccessor, 768MB RAM
Need particles? Click here!

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-20 06:52:07
Your offset time is: 2024-04-20 06:52:07