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
Saving Data in Shockwave
Anatomy of an Alpha Channel
Marks button, 4 picts with rollover, rolloff
RearWindow Professional
Reverse Sort
SaveScripts Xtra
Check QuickTime Version
Ripple Button-Alphamania
Button - De-Xploding behaviour
sequenceXtra
 

 

 

Behavior Quiz engine

Added on 10/2/2000

 

Compatibilities:
behavior D7 D8 Mac PC

Rating:

Author: SunilBalan

I have created a engine for quiz, just change the declared global variable "qnt" to the number of questions a developer wants to. And just set the given parameters by typing some questions and their respective answer.

Download PC Source    Download Mac Source
property textmember, quest, textopt1, opt1, textopt2, opt2, textopt3, opt3, textopt4, opt4

on getPropertyDescriptionList me
  description = [:]
  if the currentspritenum >0 then exit
  FIELDSpriterlist = searchfieldMember(me)
  addprop description, #textmember, [#comment: "Select the text member", #format:#text, #default: ""]
  addprop description, #quest, [#comment: "Type your question", #format:#string, #default: ""]
  addprop description, #textopt1, [#comment: "Select the radio button", #format:#string, #range:FIELDSpriterlist,#default: FIELDSpriterlist[1]]
  addprop description, #opt1, [#comment: "Your first option", #format:#string, #default: ""]
  addprop description, #textopt2, [#comment: "Select the radio button", #format:#string, #range:FIELDSpriterlist, #default: FIELDSpriterlist[2]]
  addprop description, #opt2, [#comment: "Your second option", #format:#string, #default: ""]
  addprop description, #textopt3, [#comment: "Select the radio button", #format:#string, #range:FIELDSpriterlist,#default: FIELDSpriterlist[3]]
  addprop description, #opt3, [#comment: "Your third option", #format:#string, #default: ""]
  addprop description, #textopt4, [#comment: "Select the radio button", #format:#string, #range:FIELDSpriterlist, #default: FIELDSpriterlist[4]]
  addprop description, #opt4, [#comment: "Your fourth option", #format:#string, #default: ""]
  return description
end getPropertyDescriptionList

on enterframe
  put quest into member textmember
  put opt1 into field member textopt1
  put opt2 into field member textopt2
  put opt3 into field member textopt3
  put opt4 into field member textopt4
end

on exitframe
  go the frame
end

on searchfieldMember me
  FIELDSpriterlist = []
  maxCastLib = the number of castLibs
  repeat with theCastLib = 1 to maxCastLib
    maxMember = the number of members of castLib theCastLib
    repeat with memberNumber = 1 to maxMember
      theMember = member(memberNumber, theCastLib)
      if theMember.type = #button then
        if theMember.name = EMPTY then
          FIELDSpriterlist.append(theMember)
        else
          FIELDSpriterlist.append(theMember.name)
        end if
      end if
    end repeat
  end repeat
  return FIELDSpriterlist
end

 


Contact

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

Send e-mail