????????? ?? DHTML ?????????? - PowerPoint PPT Presentation

About This Presentation
Title:

????????? ?? DHTML ??????????

Description:

dhtml 1. 2. ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 7
Provided by: Adm9975
Category:
Tags: dhtml | spins

less

Transcript and Presenter's Notes

Title: ????????? ?? DHTML ??????????


1
????????? ?? DHTML ??????????
2
1. ????????????? ?????????
3
2. ????????? ?? ?????????? ?? ????????????
4
3. ???????? ?? ??????
  • Private Function Button1_onclick() As Boolean
  • 'Declare local variable x for wins (copied to
  • 'Property Bag between spins)
  • Dim x
  • 'Pick three random numbers
  • Num1.innerText Int(Rnd 10)
  • Num2.innerText Int(Rnd 10)
  • Num3.innerText Int(Rnd 10)
  • 'If any number is 7 display coin stack and beep
  • If Num1.innerText 7 Or Num2.innerText 7 Or
    Num3.innerText 7 Then
  • 'If we have a winner, play .wav file
    (applause.wav)
  • MMControl1.Command "Prev" 'rewind if
    necessary
  • MMControl1.Command "Play" 'play .wav file
  • 'and increment the win count in the Property
    Bag
  • x GetProperty("Wins")
  • Result.innerText "Wins " x 1
  • PutProperty "Wins", x 1
  • End If
  • End Function

5
4. ???????? ??? ????????? ?? ??????????
  • Private Sub DHTMLPage_Load()
  • LuckyHead.Style.textDecorationUnderline True
    'Set underline style for heading
  • Num.Style.Color "blue 'Set color style of
    numbers to blue
  • Randomize 'seed random number generator (for
    truly random spins)
  • Image1.src "c\vb6sbs\less22\coins.wmf'Display
    coin stack
  • 'Configure and open Multimedia MCI control
  • MMControl1.Notify False
  • MMControl1.Wait True
  • MMControl1.Shareable False
  • MMControl1.DeviceType "WaveAudio"
  • MMControl1.FileName "c\vb6sbs\less22\applause.w
    av"
  • MMControl1.Command "Open"
  • 'Use GetProperty function to determine if any
    previous wins exist in the Property Bag (a
    storage
  • 'location that persists during HTML page load and
    unload operations).
  • 'With this code you can save
  • 'the number of wins between jumps to the "About
    Lucky 7" hyperlink or other Web pages.
  • Result.innerText "Wins " GetProperty("Wins")
  • End Sub

6
4. ????????
  • ???????????? ??????????
  • ?????????? ????????
Write a Comment
User Comments (0)
About PowerShow.com