News:

Function Finder  Find all the functions within source code files

Main Menu

Graphics and Sound files

Started by zlog08, August 13, 2007, 02:17:24 AM

Previous topic - Next topic

zlog08

I'm a bit confused as to how PB handles graphic and/or sound files. I'm hoping someone will enlighten me - I know this is something that is really at the beginner level - and that's me!
When you are writing code for a project and want to include say a sound file ( .wav) or graphic (.bmp) - how do you get it into your project. Do you make a special folder to contain these types of files?

zlog08

Let's say that I have the following code in a project:

; Load an image into image slot #1
  MyImage=LoadNewImage("ThePictureYouWishToLoad.bmp")
 
; Draw the Loaded image to the screen
  DrawImage MyImage,100,100,0
 
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey


Does PB search the file path each and everytime that the code is run?
I was wondering if PB made copies of the image for further use ? Is this the way it is done?

kevin


QuoteDo you make a special folder to contain these types of files?

Normally you'd make a folder inside your project folder (to keep everything together) to hold any media you're using.

Lets you have a picture called "Sunset.jpg".   What i do is create folder within my project project (generally called GFX) then copy my artwork/sounds/whatever into my project's media folder.

To load the image in my code would be

SunsetImage = LoadImage("GFX\Sunset.jpg")

DrawImage SunsetImage,Xpos,Ypos,TransparentFlag


etc



zlog08

Do you add a folder with   'manage project '   ?

kevin


Nah, the one under that  Manage Media Files