Flex :: Events - Game Communication Between Entities

Nov 16, 2010

I'm currently developing a Flex game which is a kind of table and cards game. Thinking about developing other games using entities from this one, I chose for creating my entities decoupled from the game and even from other game entities. As a result, I'm currently using events for communication between my game entities.

Game entities, in my case, refers for example a player hand component which can receive a card, or send a card to another unknown component by a custom requesting and dealing events. For instance, the same can happens to a deck of cards holder component. This approach appeared to be a good designer in the beginning, but after some time, my game controller class has a lot of event handler functions which started looking bad for me.

My current idea is to create a game event manager coupled with my game controller for handling events and cleaning the controllers code. Finally, I'm not sure about my design decision exposed above, so I would like to know about you folks which communication design would be indicated for this kind of a game.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Communication With A Server - Upload Game To The Web

Nov 17, 2010

i've recently created a demo of a flash game(AS3) for a client, in which the user hears a word and has to spell it correctly. the client wants the game uploaed to the web, where it will have to communicate with the server. the client's web developers outlined their desired flow for the process: users will go through a log in screen (html page), and fill in their username and password. after signing in, their details will be added to the url in which the flash movie is loaded.

flash has to be able to read the url and identifiy the user through it. additionally, flash has to recieve an xml with the current words the user will be played. finally, flash has to send the user's score back to the server. i've been developing flash bit by bit for about a year now, but this will be my first web project.

View 1 Replies

Flex :: HTML Entities In TextFlow?

Oct 17, 2011

How can HTML entities be made to work with TextFlow (specifically TEXT_LAYOUT_FORMAT)? Example: ' is not converted into a single quote.

View 1 Replies

Flash :: Facebook Game Client-server Communication?

Jul 6, 2011

We're currently working on a small scale indie card game for Facebook, which we hope will reach hundreds of thousands of players (eventually). We have most of the issues figured out (scalability, server-side architecture, etc) - however one question - communication between client & server.

We have the following requirements:

Server side push messages (no client message request) High scalability (should support at first hundreds and later hopefully thousands of CCUs) Secure, reliable layer Work well with most computers, routers & browsers Works with Adobe Flash/AS3

First thing that came to mind was socket connections, but I was wondering, is there a better solution that answers our needs?

View 2 Replies

ActionScript 3.0 :: Load External Sounds To Be Used For Events In A Game?

Mar 20, 2011

I have a game where sounds are triggered when things happen. These sounds need to be loaded externally so they can be changed. It seems like the sound class is just for loading streaming sound files. Is there a good way to load in these sounds and then have them triggerable and controllable by game events?

View 3 Replies

Asp.net :: Asp Communication With Flex?

Oct 26, 2010

i was developed one .net application. It contains flash animation in one of the asp pages. And i need to write action script code for playing and pausing that swf file. I am using flex builder3. However how can i execute the asp application from flex builder? How can i load asp page into mxml file?

View 1 Replies

Flex :: 2d Game Engine For Race Game Built To Webpage?

Nov 19, 2009

I think Flash/Flex is a good aproach for this case.We need to build some like the following

View 2 Replies

Flex :: Communication Between Two Apps?

Aug 11, 2009

I have 2 flex apps on the same page. I want them to be able to call each other's public functions. I am thinking of using either externalInterface calls or FaBridge to do so.

View 2 Replies

Communication Between Two Flex Applications?

Aug 6, 2010

I have two web applications written in Flex I would like to integrate. I would like one Flex app (let's call it application A) to invoke second Flex app (let's call it application B). Application A has access only to swf file of application B (not source code). When application A invokes application B, it should be able to pass some data to application B. After application B is invoked it should be able to pass some data back to application A. These two applications will be hosted on the same server, but will use different server code.

The easiest way of implementing this (or one of the ways to be more precise) would be to have UI element on app A (button, link, menu item, etc) that would invoke app B. But in that case, two Flex applications couldn't communicate directly (since only one is active at a time), and they would have to communicate through server code, which is something I would like to avoid.

In short application A should invoke application B, pass some data to it. Application B should do it's work, display some content, and have a mean of passing some data back to application A. I'm aware of LocalConnection, and I've seen similar question, but in that case I would have to have both application in the same browser window. This would be acceptable to some extend, but only if app B is contained in app A (not if they are both on the same HTML page). Would LocalConnection work in that case?

Do you have any recommendations on how to implement this kind of communication?

View 2 Replies

Actionscript 3 :: Write An Adapter That Maps All The LinkedSetFx Events To The Expected Flex Collection Events(As3Common-collection)

Aug 25, 2010

LinkeSetFx has its own CollectionEvent, but I don't know how to map the LinkedSetFx event to mx.events.collectionEvent(I want use it in ComboBox). LinkedSetFx is in AS3Commons-collection framework.Here is the url, choose the as3commons-collections-1.0.0.zip, you'll find LinkedSetFx in srcorgas3commonscollectionsfx

View 1 Replies

Flex :: Communication Between Module And Application?

Jul 21, 2011

Ok, modules in Flex are popular but I have no idea why documentation and examples on the different uses of Flex modules can be so scarce.Anyway, for this question, I will take the classic Employee/Department example. I have a main.mxml that contains an mx:TabNavigator. Each tab is loaded by an s:ModuleLoader.Tables: Employees {empID,empName,deptID}, Deparments {deptID,deptName}The Tab Navigator contains only one tab (for our example) called Employee. I have an Employee.mxml module. In that module, I have a datagrid that is populated with Employee details. I use the getEmployees($deptID) function. This function, as you may guess, returns me an array of Employees who work in a particular department.

Outside the TabNavigator, I have a departmentDropDownList that is populated with departments.deptName.My objective is to load the Employee module when I select a particular department from the DropDownList. I have a changeHandler for the DropDownList that can give me the deptID.

protected function departmentDropDownList_changeHandler(event:IndexChangeEvent):void
{
MyDeptID=departmentDropDownList.selectedItem.deptID;

[code].....

View 3 Replies

Actionscript 3 :: Communication Between Flex And Java?

Nov 9, 2011

Is there any way a Adobe Flash Builder could call methods from a java class? Without any servers? just like a API where i could call use methods from java clasees?

View 2 Replies

Flex :: Adobe Air And REST Communication?

Mar 2, 2012

Can someone recommend me a good example of Adobe air and REST API communication and authentication?

View 1 Replies

Get Hexcode Of Html Entities?

Sep 20, 2011

I have a string as "€".

I want to convert it to hex to get the value as "u20AC" so that I can send it to flash.[code]...

View 2 Replies

ActionScript 3.0 :: Flex Socket Communication With C# Produces

Jul 15, 2010

I use C# to read a string (BinaryReader.ReadString()) from the socket stream. But the problem is that flex doesn't writes the string in suitable format, so C# will be able to read that. C# reads a 7 bit encoded integer which indicates the length of the string, and just then reads the string. But flex doesn't writes a string in this format (I use socket.WriteUTF(), and even socket.WriteUTFBytes() didn't work), so C# can't read the string. Here's a little information of how C# reads/writes a string from a socket stream:
[URL]

View 1 Replies

Php :: Real-Time Communication Between Flex Application?

Nov 19, 2010

I have a Flex/AIR application communicating with a PHP server application. Recently my client requested real-time-like connectivity between the applications to replace what we currently have; refresh buttons which have to be clicked to refresh data.So effectively the server needs to push data to the client when something changes. I can write the code that detects when something changes, but I'm not sure about the push side of things.

View 4 Replies

Flash :: Communication Between 2 Flex Apps On The Same Webpage?

Dec 21, 2010

What's the best way to communicate between 2 Flex/Flash apps on the same webpage? I need a 3rd party Flash app to call a function on my Flex 4 app (they are ready to customize their 3rd party app how I specify). I use ExternalInterface.call("javascript_function", arguments) extensively. I know there's a bridge to go from Javascript to Actionscript as well. So I guess I could go from their flash app -> javascript function -> flex bridge -> my flex app. Do I have to go through javascript? Is there a better way?

View 1 Replies

Actionscript 3 :: Communication Between Flex And Java Socket?

May 19, 2011

I have a Flex AIR app, and i am trying to get data from a Java Server. Can some one tell me if this approach will work?

Start a ServerSocket in Java and wait for a connection. Use Flex to connect to the same port. Write some data to the socket from Java Server. Read the data at the Flex end and process it.

I think i am able to get this working, but the data that i read back at Flex end seems to be empty.

My server code is :

socket = new ServerSocket(port);
client = socket.accept();
InetAddress address = client.getInetAddress();

[Code].....

My current problem is socket.bytesAvailable becoming 0 and therefore obj is coming up as "". So how to read data sent from the server using a Socket in Flex?

View 1 Replies

Actionscript 3 :: Communication Between 2 Flex Playbook Applications?

Aug 4, 2011

The overall aim of my project is to communicate between two Playbook flex applications. I found this article and tried it out:

[URL]

Application 1 (Called 'App1')

var folder:File = File.applicationStorageDirectory.resolvePath("shared/misc");
folder.createDirectory();
employeeDB = File.applicationStorageDirectory.resolvePath('shared/misc/employee.db');

[Code].....

View 1 Replies

Flex :: Components And Main.mxml Communication?

Mar 7, 2012

I'm building a Flex 4 Application in AIR.I've made a main.mxml and a login.mxml component. It all works but i can't communicate between my two mxmls (MAIN and COMPONENT)The login works but then it has to send a event tot the main that i can change the state in the main.Here is my cropped code.

login.mxml
//resulthandler if login is succesfull
loginUserResult.addEventListener(ResultEvent.RESULT, loginUserResultHandler);

[code].....

View 3 Replies

HTML ASCII Entities In Flash?

Aug 12, 2011

I am taking feed files from an XML, so in order to make those not throw out errors when reading the XML, I convert all entities to their numerical equivalents and write them as "�" for example.This then gets imported into a database, so that it now has "�" in the database.

I then take the text in the database and use that to generate a new XML file, which still contains the "".Flash then reads this XML file and displays the text.Now I think every character is fine (haven't seen all of them, but seen many), including "" (), however, for some reason, the ï symbol refuses to work () and it just displays and not the symbol.

View 4 Replies

ActionScript 2.0 :: SendAndLoad Html Entities?

Apr 16, 2007

I have an issue trying to send out a url with value name pairs in different languages. Does anyone know if there is a function in flash to convert the characters to html entities before hand?

View 1 Replies

ActionScript 3.0 :: Getting HTML Entities In XML Data?

Sep 21, 2010

I'm stuck adding some links to a flash map that I didn't create myself and am having trouble getting my HTML to show properly in my XML. I've found some resources that I thought would help, trouble is that the person who set this up used what looks to be a different method than anything I can find.

[URL]

I'm trying to get the HTML to work in the desc field, I've used CDATA tags which didn't yield any results for me.

View 3 Replies

Actionscript 3 :: Communication Between Two Flex Mobile Applications Over A Network

Jan 8, 2012

I have two mobile devices on a local network, A and B. I would ideally like A to be able call functions on B, returning a response to A.

I am aware of LocalConnection, but unfortunately this isn't supported on mobile. What is the best way to achieve this? Do I have to setup B as a server using BlaseDS?

View 1 Replies

Slideshows - Multiple Flash Entities In Page

Mar 3, 2010

What I want to build is a photography site using flash for the thumbnail pages and slideshow, but have the navigation buttons their own separate flash entities. Can these separate flash button entities influence the thumbnail flash entity? The purpose of the multiple flash entities is so that I can embed it in my html and use css to position them so that it stretches or shrinks to fit a browser window depending on screen size. Or is that a bad idea?

View 2 Replies

ActionScript 2.0 :: Replace Html Character Entities?

Jan 25, 2010

i've encountered this several times and wondering if there's a solution beyond actually changing the database field values...The problem is that i have string values being pushed to flash (via xml) with html character codes in them like:

"natronp&apos:s funland"
when ideally, i would get:
"natronp's funland"

Anyway to replace these in flash that i've missed? Otherwise it seems i would need a pretty heavy-duty find/replace actionscript script/class to make this happen!

View 2 Replies

Actionscript 2.0 :: Encode A String To Html Entities?

Mar 15, 2010

In an application I'm writing, there's a chat section. Whenever anyone says something I show their name in bold, and a picture using an img tag, so therefore I make my chat area a dynamic text box with html enabled. However, this means anyone in the chat can start typing html tags all over the place and I do not want this to happen.

Is there a way I can encode a string to html entities so that I can prevent this sort of thing happening?

View 2 Replies

ActionScript 2.0 :: FMX-html Entities In Text Field

Sep 10, 2003

I am dinamically loading and external text from a text file (data.txt) into a text field in flash. That text field reads the external string as html text so I can format the text (face, color, etc) in the text field externally. Easy huh? The problem is that for some reason flash doesn't detect html entities. Example: If flash encounters an ampersand in that external text it doesn't load the rest of the text. If I use the html entity for that character (that is &) it doesn't work either. why all the html tags are recognized but not the entities?

View 5 Replies

Flex :: Removing Flash Meta-policy Communication Warning?

Jun 6, 2009

I am communicating to an external server via a URLLoader and receiving the following warning: Warning: Domain domain name does not specify a meta-policy.Applying default meta-policy 'master-only'.This configuration is deprecated.

The provided link redirected me to another page, which didn't really explain how to remove this warning. It looks like it might involve modifying the crossdomain.xml file on the server, but I'm not sure exactly how. how to remove this warning?

View 1 Replies

ActionScript 1/2 :: Hittest Multiple SAME Movie Clip Entities?

Feb 15, 2010

By using the attachMovie function, I create multiple entities of the same movieClip. Is it possible to detect collisions from the same, but multiple movie clips (And, with different Linkage Identifiers with each entity of the same movieClip.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved