Flash Gallery | Flash Templates | Flash Menu | Flash Design | Flash Audio & Video

flash page flip

Actionscript 3.0 video tutorials

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22

Thread: Memory Game - Flash CS3 game

  1. #1
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Memory Game - Flash CS3 game

    flash templates
    FlepStudio has created a new free utility.
    This is a game in Flash CS3.
    Many of you will recall that it was a very popular game ( at least when I was a child ).
    In my opinion is still very good as pastime and as coach of memory.
    In practice we 4 colored buttons that perform a sequence (increasing one for each level) and simply reproduce the exact sequence






    This game has been developed with Flash CS3, PHP and mySQL.
    I decided to support it to a database in order to create the Top Ten of the top 10 players.

    You can download the source files and install it easily.

    INSTALLATION
    1) Open the files topTen.php and storeData.php and enter the information of your database (username, password and name DataBase).
    2) Creating the table in the database using the file. Sql that I made available (memory_game.sql).
    3) Load on your domain files topTen.php and storeData.php.
    4) Open the files org/FlepStudio/TopTen.as and org/FlepStudio/StoreData.as and change the urls call to their files PHP.
    5) Re-create the SWF.
    6) Load on your domain main.swf

    Source files:
    Attached Files

  2. #2
    Member Settled In manheman is on a distinguished road
    Join Date
    Sep 2007
    Posts
    38
    Rep Power
    0

    Re: Memory Game - Flash CS3 game

    Very good work !!!
    Now it will be interresting to developp memory game with pair image etc ...
    Thanks a lot

  3. #3
    Junior Member Settled In uacomp is on a distinguished road
    Join Date
    Nov 2007
    Posts
    16
    Rep Power
    0

    Re: Memory Game - Flash CS3 game

    great work. thanks

  4. #4
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: Memory Game - Flash CS3 game

    Fixed a little bug.
    Change the file org/FlepStudio/TopTen.as

    with the following:
    Code:
    /*
     *************************************
     * Memory Game
     * http://www.FlepStudio.org         
     * © Author: Filippo Lughi           
     * version 1.0                       
     *************************************
     */
    package org.FlepStudio
    {
    	import flash.display.*;
    	import flash.events.*;
    	import flash.net.*;
    	import flash.xml.*;
    	import caurina.transitions.Tweener;
    	
    	public class TopTen
    	{
    		private var request:URLRequest=new URLRequest('http://www.flepstudio.org/utilita/MemoryGame/topTen.php');
    		
    		private var _fla:MovieClip;
    		
    		private var players_fields_array:Array;
    		private var scores_fields_array:Array;
    		private var players_array:Array=new Array();
    		private var names_array:Array=new Array();
    		private var surnames_array:Array=new Array();
    		
    		public function TopTen(fla:MovieClip)
    		{
    			_fla=fla;
    			
    			players_fields_array=new Array(_fla.top_mc.player_0_txt,_fla.top_mc.player_1_txt,_fla.top_mc.player_2_txt,_fla.top_mc.player_3_txt,_fla.top_mc.player_4_txt,
    									 				_fla.top_mc.player_5_txt,_fla.top_mc.player_6_txt,_fla.top_mc.player_7_txt,_fla.top_mc.player_8_txt,_fla.top_mc.player_9_txt);
    			scores_fields_array=new Array(_fla.top_mc.score_0_txt,_fla.top_mc.score_1_txt,_fla.top_mc.score_2_txt,_fla.top_mc.score_3_txt,_fla.top_mc.score_4_txt,
    													_fla.top_mc.score_5_txt,_fla.top_mc.score_6_txt,_fla.top_mc.score_7_txt,_fla.top_mc.score_8_txt,_fla.top_mc.score_9_txt);
    			
    			for(var i:int=0;i < players_fields_array.length;i++)
    			{
    				players_fields_array[i].alpha=0;
    				scores_fields_array[i].alpha=0;
    			}
    			
    			this.loadXML();
    		}
    		
    		private function loadXML():void
    		{
    			var loader:URLLoader=new URLLoader();
    			loader.addEventListener(Event.COMPLETE,completeHandler);
    			
    			try 
    			{
    				loader.load(request);
    			} 
    			catch(error:Error) 
    			{
    				trace('Impossibile caricare il documento.');
    			}
    		}
    		
    		private function completeHandler(event:Event):void
    		{
    			var result:XML=new XML(event.target.data);
    			var myXML:XMLDocument=new XMLDocument();
    			myXML.ignoreWhite=true;
    			myXML.parseXML(result.toXMLString());
    			var node:XMLNode=myXML.firstChild;
    			var n:int=int(node.childNodes.length);
    			for(var i:int=0;i10)
    					break;
    			}
    			
    			displayNames();
    			fadeInScores();
    		}
    		
    		private function getRightName(n:int):void
    		{
    			for(var i:int=0;i < players_array.length;i++)
    			{
    				if(players_array[i].score==n)
    				{
    					if(names_array.length<10)
    					{
    						names_array.push(players_array[i].name);
    						surnames_array.push(players_array[i].surname);
    						players_array.splice(i,1);
    					}
    					else
    						break;
    				}
    			}
    			trace(names_array);
    		}
    		
    		private function displayNames():void
    		{
    			for(var j:int=0;j < names_array.length;j++)
    			{
    				players_fields_array[j].text=names_array[j]+" "+surnames_array[j];
    			}
    		}
    		
    		private function fadeInScores():void
    		{
    			for(var i:int=0;i < players_fields_array.length;i++)
    			{
    				Tweener.addTween(players_fields_array[i],{alpha:1,time:0.2,delay:i*0.1,transition:"easeOutQuad"});
    				Tweener.addTween(scores_fields_array[i],{alpha:1,time:0.2,delay:i*0.1,transition:"easeOutQuad"});
    			}
    		}
    	}
    }

  5. #5
    Junior Member Settled In danowen is on a distinguished road
    Join Date
    Jun 2008
    Posts
    8
    Rep Power
    0

    Re: Memory Game - Flash CS3 game

    Thank you, Filippo. It will be used in the children's section of a church site I develop.

    Dan

  6. #6
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: Memory Game - Flash CS3 game

    Quote Originally Posted by danowen View Post
    Thank you, Filippo. It will be used in the children's section of a church site I develop.

    Dan
    Nice one !
    Post the link when it's done please

  7. #7
    Junior Member Settled In mizushobai is on a distinguished road
    Join Date
    Oct 2007
    Posts
    3
    Rep Power
    0

    Re: Memory Game

    Very nice, thanks.
    However, I have trouble to install it on my database:

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf33 0
    {\fonttbl\f0\fmodern\fcharset' at line 1

    Any idea how to solve that?
    Thanks in advance.


  8. #8
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: Memory Game

    Quote Originally Posted by mizushobai View Post
    Very nice, thanks.
    However, I have trouble to install it on my database:

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf33 0
    {\fonttbl\f0\fmodern\fcharset' at line 1

    Any idea how to solve that?
    Thanks in advance.

    I think you need mySQL version 5.

  9. #9
    Junior Member Settled In mizushobai is on a distinguished road
    Join Date
    Oct 2007
    Posts
    3
    Rep Power
    0

    Re: Memory Game

    Quote Originally Posted by Flep View Post
    I think you need mySQL version 5.
    Thanks. It's installed actually:
    MySQL client version: 5.0.45, Server: Localhost via UNIX socket

    Too bad I've no idea about MySQL stuff...

  10. #10
    Junior Member Settled In gunsoftommy is on a distinguished road
    Join Date
    Jul 2008
    Posts
    2
    Rep Power
    0

    Unhappy Re: Memory Game - Flash CS3 game

    That was fun. I just played it the first time and my score was 9090, but i don't see it in the list just yet.

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast

LinkBacks (?)

  1. 11-02-09, 23:40
  2. 13-11-08, 09:54
  3. 29-08-08, 17:31
  4. 29-08-08, 15:05

Similar Threads

  1. Flash Game Tutorial
    By Flep in forum Tutorials
    Replies: 34
    Last Post: 04-07-10, 16:59
  2. 15 numbers game
    By Flep in forum FlepStudio utilities
    Replies: 6
    Last Post: 08-10-09, 03:03
  3. Memory Game - gioco Flash CS3
    By Flep in forum Utilità di FlepStudio
    Replies: 21
    Last Post: 16-03-09, 08:13
  4. Aiuto sul uso di Flash Isometric Game Engine
    By equinox in forum Flash Italiano
    Replies: 0
    Last Post: 30-08-08, 11:00
  5. Open Source Flash Game
    By m2web in forum advanced Actionscript 3.0
    Replies: 1
    Last Post: 06-12-07, 06:01

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts