Multiplayer Flash Game
Hello, i must develop a multiplayer flash game. Ok i'm
studying and try more example but is there some code example
online?
i research source of a easy multiplayer game but i dont
find..
Hi,
I have an online multiplayer flash chess game based on FMS
SharedObject/Audio/Video. You may have a look at
http://go.avmeeting.net
But I can't send you the code because there are more than 20
thousand lines in more than 20 .fla and .as files.
You may try to play a game between at least two computers.
Have fun!
Jeffrey
Similar Messages
-
How to Make Multiplayer TCP Flash Game?
I have a game in the works, and though I got the UDP to work perfectly, I sadly later found out that that is simply just a lossy protocol. There's apparently (as far as my knowledge goes) nothing you can do to make it resend data if the data was not received successfully by the recipient.
So, I was wondering how to use TCP? I've heard it's possible, but I can't seem to find a single tutorial or any information anywhere on how to do it. I found on Adobe's site socket connections, and though I got the server to connect (I think), I have no clue how to send data to it, how to get other clients to connect to it, etc. Any help?
This is the script I've been using, and though it does connect... that's basically all it does, I don't know where to go from here...
package
import flash.display.Sprite;
import flash.events.EventDispatcher;
import flash.events.Event;
import flash.events.*;
import flash.events.IOErrorEvent;
import flash.events.ProgressEvent;
import flash.events.ServerSocketConnectEvent;
import flash.net.ServerSocket;
import flash.net.Socket;
public class TCP extends Sprite
private var serverSocket:ServerSocket;
private var clientSockets:Array = new Array();
public function TCP()
try
// Create the server socket
serverSocket = new ServerSocket();
// Add the event listener
serverSocket.addEventListener( Event.CONNECT, connectHandler );
serverSocket.addEventListener( Event.CLOSE, onClose );
// Bind to local port 8087
serverSocket.bind( 8087, "127.0.0.1" );
// Listen for connections
serverSocket.listen();
trace( "Listening on " + serverSocket.localPort );
catch(e:SecurityError)
trace(e);
public function connectHandler(event:ServerSocketConnectEvent):void
//Thesocket is provided by the event object
var socket:Socket = event.socket as Socket;
clientSockets.push( socket );
socket.addEventListener( ProgressEvent.SOCKET_DATA, socketDataHandler);
socket.addEventListener( Event.CLOSE, onClientClose );
socket.addEventListener( IOErrorEvent.IO_ERROR, onIOError );
//Send a connect message
socket.writeUTFBytes("Connected");
socket.flush();
trace( "Sending connect message" );
public function socketDataHandler(event:ProgressEvent):void
var socket:Socket = event.target as Socket
//Read the message from the socket
var message:String = socket.readUTFBytes( socket.bytesAvailable );
trace( "Received: " + message);
// Echo the received message back to the sender
message = "Echo -- " + message;
socket.writeUTFBytes( message );
socket.flush();
trace( "Sending: " + message );
private function onClientClose( event:Event ):void
trace( "Connection to client closed." );
//Should also remove from clientSockets array...
private function onIOError( errorEvent:IOErrorEvent ):void
trace( "IOError: " + errorEvent.text );
private function onClose( event:Event ):void
trace( "Server socket closed by OS." );again: unless you're using a server that all players connect to, you should be using adobe's peer-to-peer networking (rtmfp).
ie, with multiplayer each player can communicate with a server and the server communicates with each player, or you use peer-to-peer communication. below is an excerpt from a book i wrote (Flash Game Development: In a Social, Mobile and 3D World).
Social Gaming - Multiplayer Games
With multiplayer games, data needs to be communicated among the players. When a player makes a move (changing the game state) the updated game state needs to be communicated to all the other players. In addition, that communication needs to occur in a timely manner.
With turn-based games (like card games) that communication among players can take as long as few seconds without degrading the game experience. With real time games (like shooter games), even a 250 millisecond delay in communicating game state leads to a significantly degraded player experience. Consequently, real time multiplayer games require substantial expertise to successfully develop and deploy.
There are two fundamentally different ways that communication among players can be accomplished. Players can communicate via a server (server-based games) or they can communicate directly from player to player (peer-to-peer) games.
Server Based Multiplayer Games
Generally, the code in each player’s Flash game handles the player’s input, transmits player data to the server, receives other players' data and displays the game state. The server receives player data, validates the data, updates and maintains game state and transmits each player’s data to the other players.
The code used on the server cannot be ActionScript so you will need to learn a server-side coding language like php or c#. Server-side coding is beyond the scope of this book so I will not cover server-based multiplayer games except to say you need to have advanced coding skills in, at least, two languages (ActionScript and a server-side language) to create these game types.
Peer-to-peer games
Since Flash Player 10, you can create multiplayer games without the need of an intermediary server to facilitate player communication. The Flash Player can use a protocol (Adobe's Real-Time Media Flow Protocol) that allows direct peer-to-peer communication.
Instead of using server-side code to handle the game logic and coordinate game state among players, each peer in the network handles their own game logic and game state and communicates that directly to their peers and each peer updates their game state based on the data received from others.
To use peer-to-peer networking each peer must connect with an Adobe server. Peer-to-peer communication does not go through that server (or it that would not be peer-to-peer) but peers must stay connected with the Adobe server in order to communicate with each other.
To communicate with the Adobe server you should use your own server URL and developer key. That URL and key can be obtained at http://www.adobe.com/cfusion/entitlement/index.cfm?e=cirrus.
Below is a simple tic-tac-toe game that uses Adobe's peer-to-peer networking to pair-up players. The NetConnection class is used to establish a connection to the Adobe server while the NetGroup class is used for peer-to-peer communication.
I used only a small part of the NetGroup methods for the tic-tac-toe game but there are more available if you are sharing data among many users and/or sharing large amounts of data.
The tic-tac-toe game is in support files/Chapter 11/multiplayer and is extensively commented -
2 player web-based Flash game problem
I have a two player web-based Flash game. The Flash calls a
JavaScript function on the webpage to get and store the user's IP.
Then an XML file with user's game data is loaded and parsed. The IP
address is used to identify which player is player 1 and which is
player 2 according to the XML file. There is a Java applet to send
and receive messages between the players.
The first player loads everything just fine. All the first
player's messages regarding the progress in loading different parts
of the code sent by the game for debugging are displayed in the
Java applet's text box, but none of the second player's messages
sent by the game for debugging are displayed.
The problem is that the second player's ActionScript code
appears not to be executing except that I do get a message in the
game that the XML file attempted to load but was not successful.
The IP address call is not made and no messages can be sent to the
other player. The second player's Java applet displays only the
messages for debugging that came from the first player's game and
any chat messages sent by the first player.
This problem always happens to the second player, never to
the first player. Both player's are always using IE6 or IE7.
Does anyone have some idea(s) what could cause only the
second player's ActionScript code not to execute and/or not to load
an XML file correctly?
This is just a general question, so any general answers would
be appreciated. Code specific answers are hopefully not required.
Thank You in advance.Hi,
I am not very familiar with the multiplayer Game development. For multiplayer games, you'll need to set up a matchmaking server and have the clients connect to it. It can then pair them off and facilitate communications. If the clients have publicly available
network addresses then it can introduce them and they can talk directly to each other.There isn't anything built in for this so you'll need to either build your own or find a third party implementation. If you are using Unity3d then check out
http://docs.unity3d.com/Documentation/Components/net-MasterServer.html
Also, you can use Xbox services, and I find an article below:
https://msdn.microsoft.com/en-us/library/bb975801.aspx
For windows Azure problem, you should go to windows Azure forum.
Best Wishes!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey. -
Can anyone create some flash games for me? (FOR PAY)
Hello,
I'm looking to create a new website with flash games, most of which need to be multiplayer.
The games I had in mind are a battleship-type game, a pirate's dice game, and a texas holdem game.
I'd also like to have a single player "wheel" that you can spin and win points off.
I'd also like to have a points system where members wager their points over games.
If this sounds like something you can do, please leave your Skype, AIM, MSNM, or YIM or ICQ screenname and I'll contact you.
Please don't PM as I probably won't check that.
Thanks.
Oh and of course I'm not expecting this to be free...i sent a chat invitation a few minutes ago. check the lower right of your gmail screen or a popunder. if your speakers were on you might have heard a notification noise.
i just sent an email, too. -
Looking for someone good at building flash games using stratus
if you know how to take a flash game and turn it into multiplayer with stratus, we have a small hack we want to discuss, pls reply
thanksMany persons buy used items on Craig's List or eBay, however, sometimes they are selling stopen iPads. If there are problems with a purchase you can get a refund on eBay. Make sure when you purchase a used iPad that it has been "wiped clean" and reset to factory settings.
Below are some places wher you can sell used iPads. The sources also sell used iPads.
Sell and Recycle Used Electronics - Gazelle http://www.gazelle.com/
For instant gratification in selling a used iPhone or iPad, Gazelle’s Gadget Trader, an iOS app, is tough to beat. In seconds it detects the device and reveals how much it is worth in good condition. Tap the Sell This Phone to Gazelle button and the deed is done.
Sell Electronics for Cash - Next Worth http://www.nextworth.com/
Buy My Tronics http://www.buymytronics.com/
Sell Your iPad http://www.sellyourmac.com/mac-product-guides/ipad.html
Totem http://www.hellototem.com/
Cheers, Tom -
[HELP] Online Multiplayer Quiz Game!
Hi, I am wondering if it is possible to make online multiplayer quiz game.
With that I mean over the LAN network.
Like it use the bluetooth and you connect to it.
Like the quiz is to answer 0-20 on german and when you click check it will send the answer to the other phone. Like if my mom have it and says whats wrong and right you know. It would be neat if you did help me!
Thanks, Sander over here!
In ActionScript 3 to Air for IOS.multiplayer games are for advanced programmers.
the easiest way to start multiplayer gaming with flash is it use adobe's rtmfp peer-to-peer connections. here's an excerpt from a book (Flash Game Development: In a Social, Mobile and 3D World) i wrote:
Multiplayer Games
With multiplayer games data needs to be communicated among the players. When a player makes a move (changing the game state) the updated game state needs to be communicated to all the other players. In addition, that communication needs to occur in a timely manner.
With turn based games (like card games) that communication among players can take as long as few seconds without degrading the game experience. With real time games (like shooter games), even a 250 millisecond delay in communicating game state leads to a significantly degraded player experience. Consequently, real time multiplayer games require substantial expertise to successfully develop and deploy.
There are two fundamentally different ways that communication among players can be accomplished. Players can communicate via a server (server based games) or they can communicate directly from player to player (peer-to-peer) games.
Server Based Multiplayer Games
Generally, the code in each player’s Flash game handles the player’s input, transmits player data to the server, receives other players' data and displays the game state. The server receives player data, validates the data, updates and maintains game state and transmits each player’s data to the other players.
The code used on the server cannot be ActionScript so you will need to learn a server-side coding language like php or c#. Server-side coding is beyond the scope of this book so I will not cover server based multiplayer games except to say you need to have advanced coding skills in, at least, two languages (ActionScript and a server-side language) to create these game types.
Peer-to-peer games
Since Flash player 10, you can create multiplayer games without the need of an intermediary server to facilitate player communication. The Flash player can use a protocol (Adobe's Real-Time Media Flow Protocol) that allows direct peer-to-peer communication.
Instead of using server-side code to handle the game logic and coordinate game state among players, each peer in the network handles their own game logic and game state and communicates that directly to their peers and each peer updates their game state based on the data received from others.
To use peer-to-peer networking each peer must connect with an Adobe server. Peer-to-peer communication does not go through that server (or it that would not be peer-to-peer) but peers must stay connected with the Adobe server in order to communicate with each other.
To communicate with the Adobe server you should use your own server URL and developer key. That URL and key can be obtained at http://www.adobe.com/cfusion/entitlement/index.cfm?e=cirrus. -
How to let the character in my flash game make a jump using AS3?
i want to make the character in my flash game make a jump when the player presses a key,e.g. 'space',even the player release the key instantly,the character will still finish the complete jump process.Hope somebody will give me some advice, Thank you so much!!!
what's the problem?
-
== Issue
==
I have a problem with my bookmarks, cookies, history or settings
== Description
==
A flash game was accidentally blocked on the website http://www.oyunlar1.com Now I can't access any of the games there. Is there anyway to unblock the flash settings for that website?
== Troubleshooting information
==
Application Basics
Name Firefox
Version 3.6.7
Profile Directory
Open Containing Folder
Installed Plugins
about:plugins
Build Configuration
about:buildconfig
Extensions
Name
Version
Enabled
ID
1-ClickWeather 1.1.9.1 true
Adblock Plus 1.2.1 true
Adobe Contribute Toolbar 5.0 true {01A8CA0A-4C96-465b-A49B-65C46FAD54F9}
AIM Toolbar 5.96.5.1 true
Ask Toolbar for Firefox 2.1.0.5 true
BatchDownload 1.2.4 false [email protected]
Big Fish Games Toolbar 2.0.0 true {6847DFAE-037A-400c-A524-27F0A281B692}
CheckPlaces 2.2.2 false [email protected]
Cooliris 1.12.0.36949 true [email protected]
DownloadHelper 4.7.4 true
DownThemAll! 1.1.10 true
Fast Video Download (with SearchMenu) 3.1.1 true
Fast Youtube Downloader 1.2.2 true [email protected]
Firefox ImageGrabber 1.0.6 false {546d2a00-2bbf-11dc-8314-0800200c9a66}
Flashblock 1.5.13 false {3d7eb24f-2740-49df-8937-200b1cc08f8a}
FlashGot 1.2.1.27 true {19503e42-ca3c-4c27-b1e2-9cdb2170ee34}
FoxyProxy Standard 2.21.3 true [email protected]
Google Toolbar for Firefox 7.0.20100326W true {3112ca9c-de6d-4884-a869-9855de68056c}
Googlepedia 0.6.3 true {1ABADB6E-DC4B-11DA-9F70-791A9CD9513E}
HP Smart Web Printing 4.60 false [email protected]
ImageHost Grabber 1.6.4 true
InvisibleHand 2.4 true [email protected]
iWinGames Plugin 1.0 false {98e34367-8df7-42b4-837b-20b892ff0847}
Java Console 6.0.07 true
Java Console 6.0.04 true
Java Console 6.0.10 true
Java Console 6.0.12 true
Java Console 6.0.13 true
Java Console 6.0.14 true
Java Console 6.0.15 true
Java Console 6.0.17 true
Java Console 6.0.16 true
Java Console 6.0.19 true
Java Console 6.0.20 true
Java Quick Starter 1.0 true [email protected]
MegaUpload DownloadHelper 1.0.2 true [email protected]
Microsoft .NET Framework Assistant 1.2.1 true {20a82645-c095-46ed-80e3-08825760534b}
MSN Toolbar 4.0 false [email protected]
myBabylon English Toolbar 2.6.0.15 true
myibay Firefox extension 1.1.7 true [email protected]
NoScript 1.10 false {73a6fe31-595d-460b-a920-fcc0f8843232}
Ookong 1.5 true {95969329-aa35-473a-b537-3f6f62c0ba23}
Rapidlibrary Search ToolBar 1.0.0 true {2832ABCD-4444-1012-2D45-132D5447C445}
RapidShare DownloadHelper 1.0 false [email protected]
RDown - Rapidshare Downloader 0.6.0 true dave2x@download
Remove It Permanently 1.0.6.7 true {1dbc4a33-ea62-4330-966c-7bdad3455322}
RSFind! 1.1.2 false [email protected]
Search Helper Extension 1.0 true {27182e60-b5f3-411c-b545-b44205977502}
Shareaholic 1.9.9.5 true [email protected]
SkipScreen 0.4.12s false SkipScreen@SkipScreen
Skype extension for Firefox 2.2.0.102 false
Status-bar Scientific Calculator 4.9.2 true ststusscicalc@sunny
StumbleUpon 3.64 true
The Browser Highlighter 1.0.19126 false [email protected]
UnPlug 2.026 true unplug@compunach
Xmarks 3.7.9 true [email protected]
Yahoo! Toolbar 2.1.3.20100310105313 true {635abd67-4fe9-1b23-4f01-e679fa7484c1}
Adobe DLM (powered by getPlus(R)) 1.6.2.63 true
Modified Preferences
Name
Value
accessibility.typeaheadfind.flashBar 0
browser.fixup.alternate.enabled false
browser.history_expire_days.mirror 180
browser.places.smartBookmarksVersion 2
browser.startup.homepage http://www.refdesk.com/
browser.startup.homepage_override.mstone rv:1.9.2.7
extensions.lastAppVersion 3.6.7
general.useragent.extra.microsoftdotnet ( .NET CLR 3.5.30729; .NET4.0E)
javascript.options.showInConsole true
keyword.URL http://slirsredirect.search.aol.com/slirs_http/sredir?sredir=2706&invocationType=tb50-ff-aim-ab-en-us&query=
network.protocol-handler.warn-external.aim false
network.protocol-handler.warn-external.dnupdate false
places.last_vacuum 1279652142
privacy.sanitize.migrateFx3Prefs true
security.warn_viewing_mixed false
== Firefox version
==
3.6.7
== Operating system
==
Windows XP
== User Agent
==
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 GTB7.0 ( .NET CLR 3.5.30729; .NET4.0E)
== Plugins installed
==
*-Cooliris embedded in a tab
*getplusplusadobe16263
*np-mswmp
*Contribute Firefox IBE Plugin DLL
*6.0.12.69
*RealPlayer(tm) LiveConnect-Enabled Plug-In
*1.9.0009.1
*npdnu
*npdnupdater2
*NPTURNMED
*The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
*NPRuntime Script Plug-in Library for Java(TM) Deploy
*Adobe PDF Plug-In For Firefox and Netscape "9.3.3"
*Default Plug-in
*Shockwave Flash 10.1 r53
*BrowserPlus -- Improve your browser! -- http://browserplus.yahoo.com/
*Adobe Shockwave for Director Netscape plug-in, version 11.5
*Delivery Network Acceleration by BitTorrent™
*GEPlugin
*Picasa plugin
*4.0.50524.0
*MSN® Toolbar
*Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
*Google Updater pluginhttp://pack.google.com/
*Google Update
*Java(TM) Platform SE binary
*Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers
*Npdsplay dll
*DRM Store Netscape Plugin
*DRM Netscape Network ObjectThanks, Eric. I'm not sure what I should be checking using your suggestion--as I said, I'm an utter novice with the iMac. However, I saw a reference to problems with the Library entries, so I checked mine and the iWork files were missing, something confirmed when I checked the crash log. In desperation, I did another software update, and that seems to have fixed the problem completely. Now wondering if I dare upgrade to Lion!
-
How Can I Learn To Develop Flash Games For Under $50.00 USD?
I am completely new to anything Flash. I have never written a
single line of Actionscript. I don't know the difference between
Flash and Flex. I don't know in what forums Flash developers hang
out. I don't even know what kind of coffee they drink, or if they
drink tea instead.
However, I have developed games and have been thinking about
developing some casual games and have heard rumors that Adobe is
"pushing" causal game development with Actionscript 3 and their
latest releases. So I went to adobe.com expecting to see a link for
something like "learn how to develop games in flash" or some such.
I poked around the developer related pages and didn't find anything
I thought useful.
What I did find were plenty of stuff for *existing* flash
developers. Links to articles and HowTos for specific topics and
information about products that cost a minimum of several hundred
dollars. I can't learn how to develop games and create a prototype
with a 30-day trial, and I am not going to buy a $1000 pro-grade
tool when I am an indie developer without a budget or a pre-funded
project that would justify such expenditures.
I have seen some open source stuff, but don't know if it can
do anything more than build some annoying shaking banner ads.
So let me introduce myself as a possible use-case for Adobe
Marketing and the Flash (Game) Developer community.
I am an educated experience software developer who has a day
job doing "enterprise" software stuff. I want to *play* in my free
time (evenings and weekends) with "Flash Stuff" and learn enough to
be able to build a simple game that I can put on my personal
website and have my friends download. I am not a student, so I
can't get student discounts. The money I have goes toward
toys^H^H^H^H tools for my other coding habits^H^H^H^H^H projects. I
am not interested in 30-day trials, as I may go 45-days or more
between the first and second weekends I get to play with this. I
know OOP so I want to start out learning how to do the "advanced"
stuff from day one and not have to start with dragging and dropping
PNGs w/o any coding and then "relearn" how to do it in code so I
can do anything beyond having the image appear and rotate.
I *am* willing to put time into this endeavor, but only after
I have a few things spoon-fed to me by "advocates" who's job is to
get me "hooked" and willing to invest my time to go beyond Hello
World. At the same time I am download and playing with GarageGames,
TGE/TGB, Game Maker, Dark Basic, Blitz Basic, etc. and many
complete development environments that are full-featured and
completely free if I limit myself to releasing only freeware games,
or cost me less than $50 for the "professional" version with all
the bells and whistles.
I have heard rumors and rumblings about some open source
tools being available and Adobe maybe open sourcing some of their
previously pay-to-play tools, but also understand that Adobe can
probably provide a better "comprehensive" package of tools,
documentation, tutorials, and support, *if I can find the right
place to ask/start.*
And, most of all, I don't know where to start my search as I
have no personal contacts to bug about stuff like this.
So, where can I find the big red button to push and get
everything I want handed to me on a silver-platter.
[please understand I have written this with some attempt at
self-mocking humor and am not some clueless n00b]
Thank you for taking the time to read my lengthy posting. I
hope to find some helpful replies and start down an interesting
learning path.
--ChaimJust saw your post. Better late than never. You may want to
consider GameBrix.com, where you can create Flash based, casual
games using your web browser. No downloads are required. You can
create a game from scratch using a library of images, sounds and
game mechanics. You can also upload your own. The online script
editor will allow you to view and edit the ActionScripts associated
with each game mechanic. In short, a great way to ramp up on game
design and build your own game without investing a lot of $
upfront.
BTW I am associated with GameBrix so any feedback is
appreciated. -
Flash games problem with Mozilla Firefox
Ok so, I'm trying to play one great flash game, I'm actually Texas hold'em addict :D so, as soon as I open it, firefox just crashes and that's it, nothing appears, no crash report or anything like that..
I'm trying to play this game: [http://www.4yahoo.com/board-card/play-governor-of-poker-2 Governor of Poker 2] and this one [http://www.4yahoo.com/puzzle/play-the-forest-temple The Forest Temple]
What to do? Should I reinstall it or it could be my windows problem?
I don't really want to re-install it, because I have tons of bookmars there and got no idea how to save them, also I'm afraid that it will be waste of time.
So I'm asking you guys, maybe someone faced this problem.
Thanks in advance.I mean, it's ok when I run other games, but those two are the problem :(
-
Mouse & trackpad is not working properly in flash games
I thought the problem was with my mouse. But even my trackpad behaves weird.
When I try to click this game (http://jayisgames.com/games/red-remover-player-pack-2/) or any other games before, single clicking any clickable spots in the flash game works. But in that game, I could single click on "Play Game," "Ok." "the red face," "Play" & box 1. But from that on, I must double click to make anything work. It's not that game that requires double clicks. I've been playing it for a long time, all only single clicks. From there on, I single click on a red box, nothing happens. Then I click on another spot, that previous click happens.
Not just on that flash game, I've tried many others ones, all gave me this click delaying problem.
When I try to click on spot A, nothing happen. Then I click on spot B, the click on spot A happens. So I must double click on everything to work.
I realize I couldn't single click on anything to work on any flash websites (sample:http://www.mono-1.com/monoface/main.html). Clicking once just highlights the link, must click again to make it work.
Please try out that game to see what I'm talking about. I'm not promoting anything here. I got a serious mouse problem.
Thanks.
macbook pro, Mac OS X (10.6.4)
Model Identifier:
MacBookPro7,1
Processor Name:
Intel Core 2 Duo
Processor Speed:
2.4 GHzSame problem on Windows 7 in Chrome browser...
My Windows 7 one at work works fine though..... -
Please help me with a simple flash game problem
I am trying to learn how to make flash games with Adobe flash 5.5. I am doing a tutorial from a book and am stuck.
The game is called concentration and you are suppose to match 2 tiles of the same shape. there are 10 shape tiles
and 1 question mark tile. These tiles are held in an array. 20 tiles are suppose to be displayed 5 to a row with 4 rows
and the question mark is suppose to be up on all 20. My problem is I get a blank screen when I test the movie. I
think the code is good but I beleive I have not uploaded the tiles right. I did upload the 11 tiles to the library and have
those 11 tiles and tile_movieclip in the library. Here is the code:
package {
// importing classes
import flash.display.Sprite;
// end of importing classes
public class Main extends Sprite {
public function Main() {
// variables and constants
const NUMBER_OF_TILES:uint=20;
const TILES_PER_ROW:uint=5;
var tiles:Array=new Array();
var tile:tile_movieclip;
// end of variables and constants
// tiles creation loop
for (var i:uint=0; i<NUMBER_OF_TILES; i++) {
tiles.push(Math.floor(i/2));
trace("My tiles: "+tiles);
// end of tiles creation loop
// shuffling loop
var swap,tmp:uint;
for (i=NUMBER_OF_TILES-1; i>0; i--) {
swap=Math.floor(Math.random()*i);
tmp=tiles[i];
tiles[i]=tiles[swap];
tiles[swap]=tmp;
trace("My shuffled tiles: "+tiles);
// end of shuffling loop
// tile placing loop
for (i=0; i<NUMBER_OF_TILES; i++) {
tile=new tile_movieclip();
addChild(tile);
tile.cardType=tiles[i];
tile.x=5+(tile.width+5)*(i%TILES_PER_ROW);
tile.y=5+(tile.height+5)*(Math.floor(i/TILES_PER_ROW));
tile.gotoAndStop(NUMBER_OF_TILES/2+1);
// end of tile placing loop
Can someone please explain to me what I am suppose to do to make the this work? I beleive the problem is it doesnt know where the tiles are.
Thanks.To create the tiles, draw 10 distinct shapes in the first 10 frames of your symbol, and
the back of the tile in the 11th frame. You are free to draw them as you want, but I suggest you make them as 90 pixels squares with registration point (starting x and y position) at 0, because these are the properties of the tiles used in this chapter's
examples. At least, they should all be the same size.
It didnt say put in a library. It is saying to draw them in frames of symbol but it didnt walk me through that. Can you guide me through this? I also was looking at how to add the link identifier but it said I need a popup window but I cant see one. I thought that was done
when I went to insert new symbol. It said something about actionscript linkage. I am familliar with perl, java and c++ so I can follow the code so far but I dont have much understanding of the flash interface. I made the 10 shape tiles and the 1 question mark tile
in paint. They are .jpeg images. -
Flash games, serious problem with windows 7 bootcamp
when you open a webpage that has a flash game, windows 7 bootcamp stucks from time to time, with no reason! why is this happening? using firefox. tried safari the same thing, and tried latest flash player on both. try facebook games or google random flash games most of them cause windows 7 to stuck or go slow! suggestions please, does anyone else have the same problem?
sorry the whole win 7 freezee on mbp 13", wait for apple update (i hope they notice)! now running XP SP3 and runs great!!! "laptop 2 go drivers" and runs games perfect!
-
How can i record a name a score in a flash game and write down in a soreboard?
Hi. I wrote down the summary of my project so that you can
understand and answer me more easily:
I have to build an application (a little flash game) in which
I record the number of clicks. I want the player to choose a nick
at the beginning and when he finishes one or all the four choices
of target, i want the application to write his nick and final score
in a database for displaying in a scoreboard (hall of fame). All
the new entries should be sorted according to the score. If the
same nick appears again, it's final score will be modified in the
scoreboard only if is higher then the previous.
I was thinking of creating a variable for the name that is
chosen at the beginning and a variable for the score that is
recorded. When the player finishes the game i want the application
to write his data in the database, and then to display the
scoreboard (let's say top 10 players in the database from the
highest to the lowest score).
I never did this before so i am asking what database shoud i
use? I need a programmer to create one for me? Or can flash
generate the database?
Is the variable the good way or should I aproach the problem
by other means? And if a programmer creates a database in MySql is
that good or he should convert it to XML, or Flash generates the
XML?
Thank you.
Mark this message as the answer.The bottom line is you cannot write to a file (database or
XML files) directly from flash.
I have done a number of projects where I needed to have
access to an XML source or a database. In these cases I had to
create server side script. I have done them in .NET, PHP ASP.
The only option you have is to use the Flash's Shared Object.
This does not store the data indefinatly and has a limited size
(100K). Let me know if you need further info.
With regards to using a variables depends on how you are
writing your game. If you are creating classes in ActionScript then
all the data can be stored within the class members. For example
you could have a Player Class and store all the player related
information in that class until the game is over. On the other hand
you can just use varibles to keep things simple. -
Hi
I asked this question again and i reported this bug , i am a computer engineer and i tested it with few macbook pro retina laptops , when u use win 8.1 64 bit or 32 bit and install adobe flash under firefox try to play any game in facebook , view video on youtube or use any FLASH video and move the mouse above the screen of the flash game / video / etc , the screen will lag alot .
under chrome this problem doesnt exist but the screen is blurry in chrome when using retina screen thats why firefox is better , but the problem is annoying .
i tried to disable hardware acceleration as you suggested still the same problemHi thesoulkeeper,
Do you have the bug number? We can try needsinfo to ask for some help.
Maybe you are looking for
-
5230 - Loading sounds Via Computer
The instruction manual for my Nuron 5230 said I could hook the USB to the computer and access the phone as a mass storage device. If I have ringtone files that I've downloaded, which folder do I put them in when the Windows Explorer window comes up?
-
Hai all, 11.2.2 on solaris 10 UPDATE MED_SECURITY_PRICES SET s.change_price = ((w.Prev/10)-(w.Last/10)) ,s.wa_price = ((w.AMT/(w.VOL*100))*1000) -- (DailyValue/DailyVolume)*1000 From MED_SECURITY_PRICES s JOIN stg_ws.DAILYSTKQUOTATIONDATA w ON MED_SE
-
Wonder if you can help-. Two things really: Has anyone tried running HTMLDB 2.0 (APEX) on Microsoft Virtual server? Does ORACLE support this? I was planning on creating four environments on the same hardware, (Live, Staging, Development, Training). A
-
Replacing internal drive on a 2 ghz intel core duo
I am thinking of replacing my internal drive (80GByte) with a bigger one. Is it possible to replace it on ones own? I couldnt find any docs about this. Found only docs about the macbook drive replacement. And: Is there any limit concerning the drive
-
DNxHD footage rejected by FCP but accepted by QuickTime
From Sony Vegas 9e on Boot Camp > Windows 7 with latest free ("LE") DNxHD codecs installed, I rendered a 720p50 project to DNxHD for roundtrip to FCP and back. In Mac OS "Leopard", with the same version of DNxHD installed, the rendered footage played