Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Generic Timer
Blinker
File open/save dialog
Font Size DropDown
Determine if a Year is a Leap Year
De-Xplode that text random
Importer
Set WarpMode of a QTVR Sprite
new Rollover JB
Break Out Clone
 

 

 

Behavior Prompt for Disk

Added on 10/2/2000

 

Compatibilities:
behavior D7 D8 PC

Required Xtras:
Buddy API
FileXtra

This item has not yet been rated

Author: MediaMacros (website)

This behavior goes on a single frame's script. It will stop on that frame and check for a disk to be in the drive. If the disk is not present it will prompt to try again or cancel. You can choose to have it quit, continue, or go to a specific marker if the user cancels. Other wise it goes to the next frame and sets a global variable named theDriveLetter = the drive"s letter of the drive it found with the correct name. Note that this behavior needs the freeware fileXtra to function

property cdLab, whatDo, alertMessage, whatMarker

global theDriveLetter

on getPropertyDescriptionList me
  return [#cdLab : [#format : #string, #default : "MyDisk", #comment : "The CD"s Name (volume label):"], #whatDo : [#format : #symbol, #default : #quit, #range : [#continue, #quit, #goMarker], #comment : "What to do if the CD is not yet in the drive:"], #alertMessage : [#format : #string, #comment : "What to say in the alert box:", #default : "There disk labeled MyDisk does not appear to be properly inserted in your drive.  Please insert the disc and click OK to continue or CANCEL to quit."], #whatMarker : [#format : #marker, #default : #next, #comment : "If what marker is used, what marker should the movie jump to?"]]
end

on enterFrame me
  passed = false
  set drives = drivesToList()
  repeat while passed = false
    repeat with x = 1 to drives.count
      theLabel = baDiskInfo( drives[x].char[1] , "name" )
      if theLabel = cdLab then
        theDriveLetter = drives[x]
        go the frame + 1
        passed = true
        exit
      end if
    end repeat
    Answer = baMsgBox( alertMessage, "Where is..." , "RetryCancel", "Exclamation" , 1 )
    if answer <> "Retry" then
      case whatDo of
        #continue :
          go the frame + 1
          exit
        #quit :
          if the environment.runmode = "Author" then
            halt
          else
            quit
          end if
        #goMarker :
          go whatMarker
      end case
    else
      next repeat
    end if
  end repeat
end

on getBehaviorDescription me
  describe = "This behavior goes on a single frame"s script.  It will stop on that frame and check for a disk to be in the drive.  If the disk is not present it will prompt to try again or cancel.  You can choose to have it quit, continue, or go to a specific marker if the user cancels.  Other wise it goes to the next frame and sets a global variable named theDriveLetter = the drive"s letter of the drive it found with the correct name." & return & "Note that this behavior needs the freeware fileXtra to function"
  return describe
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail