Flash Database: Making Flash Polling Interface



Flash Database Step By Step Tutorial - Part 6: Now, we create objects for polling interface. We use user interface component that you can access by windows > components on menubar.
  1. Right Click on second frame.
  2. Choose Insert Keyframe.

  3. Drag Text Tool to stage. This object is designed for question of polling.

  4. Still work with that object, Choose Dynamic Text.
  5. Give name "question".

  6. From menubar, click: Windows > Components. You will get Components panel.
  7. Expands User Interface.
  8. Drag Radio Button to stage.

  9. At properties, give name "myRadio".
  10. Then, click right at second frame again. Choose actions.
  11. Enter following code:
    question.text = myVar.title;
    
    a = 2;
    
    while(myVar['choice' + a] != undefined ){
      duplicateMovieClip(myRadio, 'myRadio' + a, a);
      this['myRadio' + a]._y = _root.myRadio._y + (this['myRadio' + a]._height * (a - 1) * 4);
      this['myRadio' + a].setLabel(myVar['choice' + a]);
      this['myRadio' + a].setData(a);
      this['myRadio' + a].setState(false);
      this['myRadio' + a].setGroupName('radioGroup');
      
      a++;
    }
    
    myRadio.setData(1);
    myRadio.setLabel(myVar.choice1);
    myRadio.setState(false);
    

Ok, now, you can test it. Ctr + Enter to test movie. You may get like this:



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


Tag: flash, database, interface Category: PHP Application Post : March 24th 2008 Read: 2,339 Bookmark and Share

blog comments powered by Disqus