Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Memory Game - Flash CS3 game

This is a discussion on Memory Game - Flash CS3 game within the FlepStudio utilities forums, part of the Tutorials category; FlepStudio has created a new free utility. This is a game in Flash CS3. Many of you will recall that ...


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

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  3 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 29-08-08, 06:06
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,489
Rep Power: 6
Flep is on a distinguished road
Memory Game - Flash CS3 game

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
File Type: zip MemoryGame.zip (396.5 KB, 448 views)

__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !

Last edited by Flep; 30-08-08 at 12:55..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 29-08-08, 07:39
Member
 
Join Date: Sep 2007
Posts: 37
Rep Power: 0
manheman is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 29-08-08, 09:04
Junior Member
 
Join Date: Nov 2007
Posts: 7
Rep Power: 0
uacomp is on a distinguished road
Re: Memory Game - Flash CS3 game

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

  #4 (permalink)  
Old 29-08-08, 11:19
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,489
Rep Power: 6
Flep is on a distinguished road
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"});
			}
		}
	}
}
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 29-08-08, 13:51
Junior Member
 
Join Date: Jun 2008
Posts: 1
Rep Power: 0
danowen is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Flash Multi Gallery
  #6 (permalink)  
Old 29-08-08, 13:53
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,489
Rep Power: 6
Flep is on a distinguished road
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
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #7 (permalink)  
Old 29-08-08, 15:54
Junior Member
 
Join Date: Oct 2007
Posts: 3
Rep Power: 0
mizushobai is on a distinguished road
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.

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

  #8 (permalink)  
Old 29-08-08, 16:01
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,489
Rep Power: 6
Flep is on a distinguished road
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.
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #9 (permalink)  
Old 29-08-08, 16:49
Junior Member
 
Join Date: Oct 2007
Posts: 3
Rep Power: 0
mizushobai is on a distinguished road
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #10 (permalink)  
Old 29-08-08, 17:14
Junior Member
 
Join Date: Jul 2008
Posts: 2
Rep Power: 0
gunsoftommy is on a distinguished road
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.
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 On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Flash Game Tutorial Flep Tutorials 26 06-11-08 07:46
Flash CS3 Aiuto sul uso di Flash Isometric Game Engine equinox Flash CS3 generale 0 30-08-08 12:00
Memory Game - gioco Flash CS3 Flep Utilità di FlepStudio 3 29-08-08 22:43
Game score manheman PHP | mySQL | Flash CS3 0 18-12-07 07:20
Open Source Flash Game m2web advanced Actionscript 3.0 1 06-12-07 07:01


All times are GMT. The time now is 19:10.


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