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
Print Current Marker
Indeo 5 Codec
Set PlayBackMode Property of a Animated Gif Cast Member
Progressive Blend on Rollover
Interactivity by Design
simFTPServer Xtra 1.0 Beta
ROLLOVER FADES
CatCube
Director To Go
cXtraTreeView
 

 

 

Behavior 27 Sum Game-Score Field

Added on 5/1/2000

 

Compatibilities:
behavior D7 D8 Mac PC

Rating:

Author: DejanCicic

Three behaviors from game "27 Sum" library. 27 Sum Game is the game where you need to put odd numbers from 1 to 17 in 3x3 game fields and get sum of 27 in each row, column and diagonal. See a working example and source code in the learning arcade. The full game requires all 3 behaviors.Numbers, Fields, and Score Field.

Property mySprite,myMember
Property firstMember
Property secondMember
Property ThirdMember
property WhichPannel
global CheckEnd
on beginSprite me
      CheckEnd=[0,0,0,0,0,0,0,0]
    mySprite=the spriteNum of me
  myMember=the member of sprite mySprite
  mymember.text="0"
end

on  ExitFrame  me
  mymember.text=string(value(firstmember.text)+value(secondmember.text)+value(Thirdmember.text))
  CheckValue=the text of member myMember
  if  CheckValue="27" then
    setat(checkEnd,WhichPannel,1)
    put checkend
    if checkEnd=[1,1,1,1,1,1,1,1] then go to "kraj"
  end if
  
  
  
end  ExitFrame




on getPropertyDescriptionList
  Properties = [:]
  AddProp Properties,#firstMember,[#Default:"",#Format:#Member,#Comment:"Select First member:"]
  AddProp Properties,#secondMember,[#Default:"",#Format:#Member,#Comment:"Select second member"]
  AddProp Properties,#ThirdMember,[#Default:"",#Format:#Member,#Comment:"Select third member"]
  AddProp Properties,#WhichPannel,[#Default:1,#Format:#integer,#Comment:"Panel Number:",#Range:[#min:1,#max:8]]
  Return Properties
end getPropertyDescriptionList

on getBehaviorDescription
  BehDescription = "Kaci se na sve rezultate"
  Return BehDescription
end getBehaviorDescription

on getBehaviorTooltip
  ToolTip = "Kaci se na sve rezultate"
  Return ToolTip
end getBehaviorTooltip

 


Contact

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

Send e-mail