Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Flash poll voting systems

This is a discussion on Flash poll voting systems within the FlepStudio users utilities forums, part of the Tutorials category; If we use a shareObect like this : (to verify if somebody didn't check or did it) var so:SharedObject = ...


Go Back   Forum Flash CS3 Flash CS4 > English Forums > Tutorials > FlepStudio users utilities

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 05-12-07, 11:07
Member
 
Join Date: Sep 2007
Posts: 37
Rep Power: 0
manheman is on a distinguished road
Re: Flash poll voting systems

If we use a shareObect like this : (to verify if somebody didn't check or did it)
Quote:
var so:SharedObject = SharedObject.getLocal("vote");
if (so.data.my_vote != null) {
this.gotoAndPlay("results");
} else {
this.gotoAndPlay("vote");
}
Thank you for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #12 (permalink)  
Old 05-12-07, 11:13
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,489
Rep Power: 6
Flep is on a distinguished road
Re: Flash poll voting systems

Yeah ! you are right. We will use the SharedObject class

I will start to code this afternoon ( Rome time ).

your welcome
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #13 (permalink)  
Old 05-12-07, 14:19
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,489
Rep Power: 6
Flep is on a distinguished road
Re: Flash poll voting systems

What do i pass to PHP ?

Label of the selected vote and value ( Blue,12 )
or
Number of the selected vote and value ( 0,12 )
?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #14 (permalink)  
Old 05-12-07, 14:41
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,489
Rep Power: 6
Flep is on a distinguished road
Re: Flash poll voting systems

Sorry, now i understand.

The attribute total of XML file is the number of votes of any item.

So i will pass the id of the answer to PHP.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #15 (permalink)  
Old 05-12-07, 14:56
Member
 
Join Date: Sep 2007
Posts: 37
Rep Power: 0
manheman is on a distinguished road
Re: Flash poll voting systems

i think Number of the selected vote and value ( 0,12 )
I will see if i don't make a error. So i will say to you if i 'm ok.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Flash Multi Gallery
  #16 (permalink)  
Old 05-12-07, 15:03
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,489
Rep Power: 6
Flep is on a distinguished road
Re: Flash poll voting systems

I think we don't need to pass the value.

I mean, if we use mySQL , PHP will increase +1 the value answer with corresponding to the id answer that Flash passes to it.

If we use only PHP and XML, PHP will increase +1 the total attribute value of the node id Flash passes tp it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #17 (permalink)  
Old 05-12-07, 15:20
Member
 
Join Date: Sep 2007
Posts: 37
Rep Power: 0
manheman is on a distinguished road
Re: Flash poll voting systems

I agree with :
Quote:
If we use only PHP and XML, PHP will increase +1 the total attribute value of the node id Flash passes tp it.
but we must modify the xml, so php must rewrite xml. If we don't make this, the value loaded will not change.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #18 (permalink)  
Old 05-12-07, 15:22
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,489
Rep Power: 6
Flep is on a distinguished road
Re: Flash poll voting systems

Yes sure
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #19 (permalink)  
Old 05-12-07, 16:22
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,489
Rep Power: 6
Flep is on a distinguished road
Re: Flash poll voting systems

ok, i attach the files.

The Actionscript checks if the user has already voted.
If he has, Flash stops him.
If he has not, Flash writes a cookie on his machine and calls the PHP.

Everytime you makes a try you must change the name of the cookie:
Code:
private var PollName:String='FlashPollTest1';
Now we need a PHP that when it finish to re-write the XML, it must do this echo:

PHP Code:
$answer="ok";
echo 
"answer=".$answer
Attached Files
File Type: zip polls.zip (547.8 KB, 37 views)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #20 (permalink)  
Old 05-12-07, 16:35
Member
 
Join Date: Sep 2007
Posts: 37
Rep Power: 0
manheman is on a distinguished road
Re: Flash poll voting systems

ok, i will look this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Actionscript 3 Poll in CS3 not working! Pls help flasher10 Actionscript 3.0 newbies 0 01-10-08 10:57


All times are GMT. The time now is 20:15.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406