phpeveryday.com

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


Flash Database: Preparing Polling Result Interface

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


Flash Database Step By Step Tutorial - Part 8: We have completed polling interface for voting. Next, we talk how to create result of polling.

Before create result page. We finish our second button at vote page.

  1. Click right on second frame. Choose actions.
  2. Add code to activate second button. This button for jumping to result page.
    
    btn_view.addEventListener("click", myViewHandler);
    
    function myViewHandler(eventObj:Object){
      if(eventObj.type == "click"){
    	nextFrame();  
      }
    }
    
  3. Open stage for second frame. Click on second button. At its property, named "btn_view".
  4. Click Parameter.
  5. At Label, write "Result".

    Thus, if we click this button, We will jump to next frame or third frame.

  6. Last, remove trace at mySaveHandler(). Change with nextFrame().
    
    function mySaveHandler(eventObj:Object){
      if(eventObj.type=="click"){
    	totalVotes++;
    	myVar.allow = 'false';
    	myVar['votes' + voteValue]++;
    	
    	radioGroup.enable = false;
    	btn_submit.enable = false;
    	
    	var sendVars = new LoadVars();
    	sendVars.action = 'saveData';
    	sendVars.num = voteValue;
    	trace(voteValue)
    	sendVars.load(file + '?' + sendVars.toString())
    	sendVars.onLoad = function() {
    	  nextFrame();	
    	}
      }	
    }
    

This series still continue. I will write next day. Don't miss it!



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