Polling Tool Part 2 Action Script and Flash CIS 254.

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

CC SQL Utilities.
Introduction to Formatting VistaPHw Charts Brought to you by: The Vista Partnership February 2007.
HOW TO IMPORT AND EXPORT DATA. Why do I need to use Export/Import? Here are some examples: If you have a laptop that you take home (or have a home version.
Technical BI Project Lifecycle
BETTER INTERACTION FOR BETTER COMMUNICATION. A little preview of the PowerVote Quizz toolbar.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
U:/msu/course/cse/103 Day 23, Slide 1 Review of Day 22 What query did you use to search for an actor by name? –Return matches.
Introduction To Form Builder
My Workspace Profile. Using the course menu, click on Profile.
Generation of atlas graphs & charts. Objective The major objective this training session is to equip participants with the knowledge and skills of creating.
Using Skype for Building Effective Group Collaboration
Tutorial SQL Server and Matlab CIS 526. Build a New Database in SQL server.
Access Tutorial 10 Automating Tasks with Macros
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Chapter 13 Working with Components. Chapter 13 Lessons 1.Use Components in a Flash Movie 2.Use Components in a Form.
1 Insert, Update and Delete Queries. 2 Return to you Address Book database. Insert a record.
How to create a teacher account. Step 1 Step 1: Go to Step 2 Step 2: Select I’m a student on the edmodo homepage under the.
Washington Campus Compact New Time Log Database Note to users: You should use Internet Explorer to use this database. In other programs (i.e. Firefox)
Creating a Web Site to Gather Data and Conduct Research.
PHP meets MySQL.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Polling System Part 1 Creating PHP & MySQL Files CIS 254.
Introduction to the Visual Studio.NET IDE (LAB 1 )
Copyright 2007, Information Builders. Slide 1 Enhancing Maintain Applications with HTML Mark Derwin and Mark Rawls Information Builders.
The Control Panel is the starting point when you wish to load files into Blackboard. Students cannot see this panel, unless they know your password of.
CIS 338: Using Queries in Access as a RecordSource Dr. Ralph D. Westfall May, 2011.
Distributed Multimedia Programming Week - 1. Document Window  The Document Window is divided in to six main components Timeline – The Timeline is where.
CHAPTER 7 Form & PHP. Introduction All of the following examples in this section will require two web pages. The first page retrieves information posted.
Each user has a unique name and password Permission settings for each user determines what functions the user can perform Click Here.
Website Editing From Gingerweb The Image Gallery.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
SIR and the WEB By Dave Doulton University of Southampton.
1 Building FORMS In When a visitor enters information into a web form displayed in a web browser and clicks the submit button, the information is sent.
11/25/2015Slide 1 Scripts are short programs that repeat sequences of SPSS commands. SPSS includes a computer language called Sax Basic for the creation.
Evaluating & Maintaining a Site Domain 6. Conduct Technical Tests Dreamweaver provides many tools to assist in finalizing and testing your website for.
Darek Sady - Respondus - 3/19/2003 Using Respondus Beginner to Basic By: Darek Sady.
Building the Events Components– Lesson 111 Building the Events Components Lesson 11.
How to Design an Effective PowerPoint Presentation
Using Flash with php Very quick introduction to Flash Homework: work on projects.
Exploring Adobe Presenter Presented By: Immersion Team
Gold – Crystal Reports Introductory Course Cortex User Group Meeting New Orleans – 2011.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
>> PHP: File Uploads. Pre-requisite Go Online – Download file modify-item.php – copy it to your root folder (D:\xampp\htdocs\Buy4mMe) Web-Based Systems.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
Open a new Flash File Action Script 2.0. Create a button like you did last lesson and name it Click to Play.
Basic ActionScript and PHP Cis 126. Getting Started set up a basic folder structure so we can keep our files organized. Mirror this structure on your.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
UFCFY5-30-1Multimedia Studio Scripting for Interactive Media Using Interface Fields to Receive and Display Data to the User.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
Survey Please complete the following survey before we start. I will share my Google folder with you when we are done.
Day 22, Slide 1 CSE 103 Day 22 Non-students: Please logout by 10:12. Students:
WGBH template – Arial 40 Month Day, Year – Arial 24.
Outline of Script Import Modules Setup Workspace Environment and Assign Data Path Variables Summary of Script Title and Author Info.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
Please wait, Our presentation will be starting soon. Use Alt+Tab key to go to other applications while the presentation is running. Use Esc key to stop.
How to make great graphs that make sense!
Microsoft Office 2013 Coming to a PC near you!.
How to Import Audio in Adobe Flash
Managing Your Literature Search Using Zotero
Week 2 Assignment Symbology
>> PHP: Update Query
PHP: Combo box FdSc Module 109 Server side scripting and
Topic 11 Lesson 1 - Analyzing Data in Access
Insert Presentation Title Here Insert Presentation Summary Here
PPT SLIDE TITLE.
Executive Reports, Instructions and Documentation
ADMINISTRATION A guide to setup and manage your innovation platform…
Presentation transcript:

Polling Tool Part 2 Action Script and Flash CIS 254

Review from Last Class SQL Table –INTpoll PHP Files –Connect PHP –Add Polls –Load Poll Data –Vote For

Using the Polling Tool Get pool.zip from Open Flash Poll.fla

Project Layers CoverChart Graphs Cover Booths Outline Text Voting Booth Forms Thinking Functions Notes Actions

Functions Layer Functions - This is what controls the whole movie. Function AddPolls(): Populates Drop Down Menu with Poll Listings and then allows A user to select from that list. function AddPolls() { for (i=0; i<NumPolls; i++) { var pollName = eval("PollName"+i); var pollID = eval("PollID"+i); PollSelect.addItem(pollName, pollID); }

Change Handler Set ChangeHandler PollSelect.setChangeHandler("SelectPoll") ; _root.Status = "Select a Poll: Please take some time to answer our survey - You can only Vote once."; }

Select Poll Function Function SelectPoll(): Tells the movie what to do when a user has selected a Poll. Then loads the corresponding data for that Poll. function SelectPoll(){ PollName = PollSelect.getSelectedItem().label; PollID = PollSelect.getSelectedItem().data; _root.Status = "Loading information for "+PollName+" "; _root.Go = ""; _root.Thinking.gotoAndPlay(2); _root.CoverChart.gotoAndStop(1); loadVariables(PathToPHP+"LoadPollData.php?PollID="+PollID, _root); }

Set Poll Function Function setPollData(): Just dynamically sets the Radio Buttons with the current selection choices from the database. function setPollData() { radioGroup.setChangeHandler("vote"); CheckBox1.setLabel(Selection1); CheckBox1.setData("Votes1"); CheckBox2.setLabel(Selection2); CheckBox2.setData("Votes2"); CheckBox3.setLabel(Selection3); CheckBox3.setData("Votes3"); CheckBox4.setLabel(Selection4); CheckBox4.setData("Votes4"); QuestionNew = Question; _root.CoverBooth.gotoAndStop(2); _root.Status = "You can now Vote for "+PollName+" Category"; voteButton.setClickHandler("voteNow"); }

Vote Now Function Function voteNow(): This is what actually sends the users choice to the database and increments the total votes for that selection by 1. function voteNow() { if (radioGroup.getValue() ne "") { _root.Go = ""; _root.Thinking.gotoAndPlay(2); _root.CoverBooth.gotoAndStop(1); Status = "Thank you for you vote - We are currently checking to see if you have already voted - and updating"; loadVariables(PathToPHP+"VoteFor.php?PollID="+PollID+"&Vote="+r adioGroup.getValue(), _root); } else { _root.Status = "Please Select a Category to vote for"; }

Select Chart Function (1) Function createChart(): This creates the Charts assigns values for the title and x and y values. function createChart() { Set Chart Titles - You can also set other properties here if you feel like it. myBarChart.setChartTitle("Results"); myPieChart.setChartTitle("Results");

Select Chart (2) Set Data Provider The Selection variables are from an earlier database query - the updated values where just returned. var pollData = new DataProviderClass(); var items = new Array({label: Selection1+"("+VotesNew1+")", value: VotesNew1}, {label: Selection2+"("+VotesNew2+")", value: VotesNew2}, {label: Selection3+"("+VotesNew3+")", value: VotesNew3}, {label: Selection4+"("+VotesNew4+")", value: VotesNew4}); for (var i = 0; i < items.length; i++) { pollData.addItem(items[i]); }

Chart Function (3) Assign Data Provider to Bar and Pie Chart. myBarChart.setDataProvider(pollData); myPieChart.setDataProvider(pollData); myBarChart.sortItemsBy("value", "DESC"); myPieChart.sortItemsBy("value", "DESC"); }

Actions Layer This line sets the Top status - aka name of Charting app. TopStatus = "Voting Booth: Please take some time to answer are survey."; Path to PHP files - Leave this as Blank if the Flash movie is in the same directory as the PHP scripts. If your PHP files are in a different folder then your Movie - change this path to that folder PathToPHP = ""; _root.Go = ""; _root.Status = "Loading current Question and Poll Data..."; _root.Thinking.gotoAndPlay(2); loadVariables(PathToPHP+"AddPolls.php", _root); stop();