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.

Newcomers DBPro Corner / Help I'm New and I dont know what to do.

Author
Message
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 11th Feb 2003 02:44
Ok I wanted to try something with my music. I got the music working by its self but when I went to try to add the music to an image that I have it doesnt work.

Let me start from square one.
When I go to make the .exe it works but it doesn't stay open. It shows the picture real fast and then closes. I want it to stay open and play the music.
Here let me try to put a snippet of what I did.
Err I dont know how to do snippets so I do it like this....

load bitmap "picture.bmp"
load music "song",1
play music 1

What am I doing wrong?????????????
I can get these files to work alone but not together. Please post back if you have the answer to my question.

Thanks
SmokieMcPot
Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 11th Feb 2003 02:53
OK, no db on this comp so bear with me, try

load bitmap "picture.bmp"
load music "song",1

WHILE keystate(16)=0

play music 1
loop music 1

do
paste bitmap 1,10,10
loop

endwhile

try that
RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 11th Feb 2003 02:55
Easy! You need to do one of two things.

Instead of doing PLAY MUSIC 1, do LOOP MUSIC 1.

Or you can add a sync to refresh the screen and then a loop right after that at the VERY END of your code.. One other those options, or both of them together should work. Try the first one, then the second, then both and see which works. Oh and to test your game, instead of making a .exe, you can just hit F5 on your keyboard to play the game... Unless you really want your little music playing game to be completed now, a .exe is not needed.

Current Project: Dark Wars
166 lines of code so far
http://hometown.aol.com/Hockeycow07/rebel.html - The official ReBel Games website!
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 11th Feb 2003 03:03
RPG Gamer, that one part about the

PLAY MUSIC 1
LOOP MUSIC 1

is a little incorrect. By what you said, the program is going to play the music once and then loop it. Why not just save some time and just do loop music 1? It works the same but in less code.

BTW, SmokieMcPot, to make a snippet just type [.code] and then type the code you want here and then [/.code] But please remember to keep everything there but do not type the "." which you see there. Watch, this is it in action with the word CODE in the brackets:

K?

Current Project: Dark Wars
166 lines of code so far
http://hometown.aol.com/Hockeycow07/rebel.html - The official ReBel Games website!
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 11th Feb 2003 03:16
Rpg Gamer,
I like how you help me and other people. Why are you only a user and not a moderater.

The stuff you gave me did not work. Maybe I will try it again though.
I did happen to get it to work a different way but I dont know if it is the proper way.


That worked. I will work with it later. I also have another question for you but I will ask you later. I think its about something you made.

Thanks for the help
SmokieMcPot

Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 11th Feb 2003 03:44
Hey, I helped you! Why you only talk about RPGamer?

Current Project: Dark Wars
166 lines of code so far
http://hometown.aol.com/Hockeycow07/rebel.html - The official ReBel Games website!
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 11th Feb 2003 06:21
I dont know Thanks Dark Jedi. Honestly both of you didn't make any sense to me but thanks anyway.

Got some more questions for you guys maybe you can help with it.

Ok I got the music now how do I get it to repeat after it finishes. Do Make it like this.

load music "song.mp3",1
play music 1
loop music 1
do
load bitmap "Blazing Fire Logo 5.bmp"
loop

Is that what I do. I can get the music to play with the picture once but i want it to repeat.

Also I want to know how to change my curser. How would I do that. I dont like the arrow.

And another thing while Im here. I have this menu with text on it. How can I get it highlighted when I move the arrow keys up and down. Say if I have the DB defualt text. I want it to be highlighted red or yellow. What would I do.

Help would be appreciated from RPG Gamer or Dark Jedi or from anyone else who would like to help me.

Thank
SmokieMcPot

Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy
Arrow
21
Years of Service
User Offline
Joined: 1st Jan 2003
Location: United States
Posted: 11th Feb 2003 07:23
Ok, you have to make another cursor yourself, or get one off the net, before you can change it.

Try out what you typed for the music, but why loop the load bitmap?

Am I a butterfly dreaming I'm a man?
Or a bowling ball dreaming I'm a plate of samishi?
Never assume that what you see or feel is real.
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 11th Feb 2003 13:17
The reason your program stops and quits back to windows is because it's hit the end of your code.

Just try adding this after the "play music" command:

sync
wait key

That's it - nothing more complex needed

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 11th Feb 2003 14:12
Eh, well, I like playing then looping, ensures no stops and stuff Me and my efficiency

Also I want to know how to change my curser. How would I do that. I dont like the arrow

OK, very, very easy.

First of all, make yourself a cursor (ms paint or whatever you use)

Make the background black, and make your cursor in the middle. Now, put it in the same directory as your code and run this.....

Load image "mycursor.bmp",1

do
cls
sprite 1,mousex(),mousey(),1
loop

this will continually make a sprite at the current mouse location.

And for...

And another thing while Im here. I have this menu with text on it. How can I get it highlighted when I move the arrow keys up and down. Say if I have the DB defualt text. I want it to be highlighted red or yellow. What would I do.

Simply just check for the upkey() and if its pressed, then make a box move. Like this....

Default have the box and certain coords, then...

if upkey()=1 then
box (however you may need to adjust it)

Then for selecting, when the coords are a certain number than pos1=1 or pos2=1 etc, that would be used for selecting

If you have MSN, Yahoo, or AIM, I can help you on there, since I will have more time (and I might get my danged computer back today )

I like helping people

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 11th Feb 2003 14:35
I've done LOOP MUSIC so many times, and you dont want to know how many times its works perfectly when I use it.. All the time it works. I mean, if it's looping, its not stopping!

But what rich said should work.. Only I think the music wont loop.. I dunno

Current Project: Dark Wars
166 lines of code so far
http://hometown.aol.com/Hockeycow07/rebel.html - The official ReBel Games website!
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 11th Feb 2003 16:46
I appreciate all your guys help. I will try to do this stuff before I move along.

RPG Gamer I added you in my msn. I will be on later when I get out from school.

Thanks again for all the help guys.
SmokieMcPot

Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 11th Feb 2003 22:47
Nope the music will loop cuz its playing the music until a key is pressed

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 12th Feb 2003 01:09
Ok Im still pretty confused. Im confused about the upkey stuff about highlighting certain text.

Can someone give me maybe a better thing to look off of or maybe even a sample code snippet.

If anyone has MSN messanger and could help me in that can you tell me.

Thanks
SmokieMcPot

Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 12th Feb 2003 02:00
Answered at your other post Dont have time right now, when I get MSN ill help ya

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!

Login to post a reply

Server time is: 2024-11-24 03:06:59
Your offset time is: 2024-11-24 03:06:59