phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


Flash Database: Trying Submiting Vote

Tag: flash, database   Category: PHP Application
post: 24 Mar 2008 read: 496


Flash Database Step By Step Tutorial - Part 8: so far, we have completed our practice. Ok, try test it.

In flash, test movie. You can use CTR + Enter. You will get like this:

You can see, button for submitting still not active. Because we write this code:


_root.btn_submit.enabled = false;

Try to vote. When you click one of radio button, submit button is active. Because we said:


radioGroup.addEventListener("click", foo);

function foo(eventObj:Object){
  if(eventObj.type=="click"){
	voteValue = radioGroup.selection.data;
	btn_submit.enabled = true;
  }	
}

Ok, now, click submit. You will get trace like this:

It arise because:


	sendVars.onLoad = function() {
	  trace('success');	
	}

After success send data, you can see polling.txt. You will get number of vote has changed.


title=What database kind do you like?
choice1=Plain Text
choice2=XML
choice3=MySQL
choice4=MsSQL
choice5=Oracle
choice6=SQLite
choice7=PostgreSQL
choice8=Ms Access
choice9=DB4O
choice10=Db2
votes1=1
votes2=0
votes3=0
votes4=0
votes5=0
votes6=0
votes7=0
votes8=0
votes9=0
votes10=0


Series this article:
Flash Database: Text File
Flash Database: PHP for Reading Data
Flash Database: Saving Data at Server Side
Flash Database: Switching Task at Server Side
Flash Database: Starting Flash
Flash Database: Making Flash Polling Interface
Flash Database: Giving Action to Submit Polling
Flash Database: Trying Submiting Vote
Flash Database: Preparing Polling Result Interface

| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting