FrameSheetCreationType
FrameSheetCreationType ImageType
 
Parameters:

    ImageType = The image type the library should use when creating images (Video, FX, AFX)
Returns: NONE
 

     FrameSheetCreationType sets the Frame Sheets Libraries default image type for when loading/creating frame images within frame sheets. By default the library uses standard Video images for each frame.


ImageType Paremeter Values

1= Video (DEFAULT)
2= FX
4= 3D (PBFX only)
8 =AFX





FACTS:


      * The Frame Sheet Library defaults to Video Images (mode 1)


 
Example Source: Download This Example
; include the frame sheet animation library
  #Include "FrameSheetAnims"
  
; Clear the screen to a blue colour, so we can see
; the frames better.
  Cls 255
  
  
; Set Library to load animations frames as FX images,
; the library defaults to video images..
  FrameSheetCreationType(2)
  
  
; The file name of the example frame sheet we're going
; to load
  Filename$=ProgramDir$()+"Help/Commands/Media/Animations/explosions.png"
  
; Load the Frame sheet
  FrameSheet=LoadFrameSheet(Filename$,64,64,RGB(0,0,0))
  
  
  
; Display the loaded frame sheets INDEX
  Print "Index of FrameSheet:"+Str$(FrameSheet)
  
; display the status of this frame sheet
; (1= exist, 0 it doesn't)
  Print "Frame Sheet Status:"+Str$(GetFrameSheetStatus(FrameSheet))
  
; Display the number of frames in this sheet
  Print "Frames In Sheet:"+Str$(GetFrameSheetCount(FrameSheet))
  
  
; Draw the frames on the screen
  Ypos=100
  CenterText 400,Ypos-20,"Frames in this frame sheet"
  
; run through this frame sheet and draw each frame to the screen
  For lp=0 To GetFrameSheetCount(FrameSheet)-1
     ThisIMage=GetFrameSheetImage(FrameSheet,lp)
     DrawImage ThisImage,Xpos,Ypos,false
     Width=GetImageWidth(thisImage)+2
     Xpos+=Width
     If (Xpos+Width)=>GetScreenWidth()
        Xpos=0
        Ypos+=GetImageHeight(thisImage)+22
     EndIf
  Next
  
; show the screen to the user and wait for a key press
  Sync
  WaitKey
  
  
 
Related Info: Images | LoadFrameSheet :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com