Combined with Flash ASP Production Counter Blackflash Although there are now many websites offer free counters, can you do it better? So today I will teach everyone to combine ASP through Flash to make counters. 1. Create a new file, name the current layer "background", you can choose the color yourself, you can also join the Movie Clip in this layer so that your count layer is more dynamic, this is not possible. Create a layer, named "Numbers", used to store the display numbers of the counter. 2. Press "Ctrl F8" to create a new "Movie Clip", named "Number". Insert 10 frames in the timeline, each frame fill in a number (from 0 to 9), and adjust the position with "CTRL K". Go back to the background layer, open the library with "Ctrl L". Drag 6 "Number" symbols, adjust the position with "Ctrl K", allowing the distance between them to keep equal. Open the Menu MODIFY → Instance panel, name it "100000", "10000", "1000", "100", "10", "1" from left to right. 3. The counter is stored by the database, and 1 digit should be added each time it is open, so we need to create a database file. First start Microsoft Access (I use Access97), create a new database, build a field "count" in the new table, and the type is integer. Name this table "count". Open the settings window of the PWS icon in the taskbar, define the directory where the counter is located as "counter" virtual directory, and allows the script. Double-click the "ODBC Data Source (32-bit) icon in Windows Control Panel, add a system DSN for the database, named" Counter ". 4. Now let's go back to Flash, new construction "Action" is used to store script programs.
Select the first frame, write aciton in the script panel (we can turn to the small triangle on the right side of the panel to the Expert Mode mode) Count = "12345" TELLTARGET ("/ 1") {STOP j = /: count. Length ;i = /: count. Charat (J-1); GotoAndStop ( i); Length ;i = /: count. TELLTARGET ("/ 100") Length ;i = /: count. CHARAT (J-3); GotoistStop ( i); TELLTARGET ("/ 1000") { STOP (); J = /: count. Length ;i = /: count. TELTARGET ("/ 10000") { Length ;i = /: count. CHARAT (J-5); GotoAndStop ( i); Length ;i = /: count. Charat (j-6); GotoAndStop ( i); You can now use Ctrl Enter to test whether you can correctly convert a string of content as a digital to represent graphics numbers with MOVIE CLIP. Next we start writing ASP programs We can use Ultredit32 or Ultradev4 and other software to write: 5. Establish a new file and name "counter.asp". The workflow should be to establish a connection with the database "counter.mdb" through the system DSN, remove the digital value in the count table, and save this value to the database back to the database, and finally return the value that does not add to the script. , Deposit in a count variable.
According to such a thinking, "counter.asp" code should be written: "COUNT = 0 set Objconn = Server. CreateObject ("AdoDb.Connection") Open ("DSN = Counter") Execute (strquery) acount = objrs ("count") = ObJRS. Site Objrs = Nothing Site . Write ("count =" & count) 66. Finally, what we have to do is to combine the ASP program and Flash script. Back to FLASH The first frame of the "Action" layer and "Digital" layer on the timeline is selected to the third frame. Then insert a keyframe into the "Action" layer first, 2 frames. Insert a keyframe in the "Digital" layer, the second frame is used in F5. In the "Background" layer, the third frame is followed by F5 along the first frame. Select "Aciton" layer 1 frame in write: count = 0 tellTarget ( "1") { gotoAndstop (1); } tellTarget ( "10") { GotoistStop (1); TELLTARGET ("10000") { GotoAndStop (1); loyalty ""); The program makes each number as "0", in the final high speed "counter.asp".