Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Director Online
Any Saver
Advance counter v20040306
Set PlayBackMode of a Flash Sprite
Pad Number with Zeros
BitChecker
SerialXtra
Giving a shadow for a sprite
mPrint Designer
All purpose status bar
MediaMacros Xtras Mall
 

 

 

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

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail