ActionScript 3.0 :: Dynamic Spot Difference Game

Jul 30, 2010

I have recently been looking into making a 'spot the difference' type game that will automatically detect the difference between two similar images.It will eventually do the following:compare two imagesdetect and separate the differences (hotspots)create clickable movieclips from the separate objects (differences)So far I have done the following:loaded two images using XMLdrawn these images into separate BitmapData objectsused the 'compare' method of the BitmapData class to detect opaque pixels that are different between the two imagescreated a third BitmapData object containing the differences.How would I separate the third BitmapData object (the differences) into individual objects?I would like to add click functionality to them individually.I'm pretty sure I need to simplify the objects to black and white blobs and then separate them somehow.I just don't know how.I have found algorithms such as marching ants, but i am not sure if this is the right approach for this type of application.

View 9 Replies


Similar Posts:


ActionScript 3.0 :: Making A Spot The Difference Game?

Jun 10, 2010

Im pretty new at Actionscript 3.0 and I have to make a Spot The Difference game for school.. Now I followed a tutorial, but it's in AS 2.0 and I really cant get it to work in AS 3.0. Also, the tutorial isn't complete, so is there anyone that can help me any further with the code ?Here's the tutorial I followed:[URL]...

View 2 Replies

Unable To Create A Simple Spot Difference Game

Feb 17, 2010

I'm looking to do a very simple spot the difference game using flash CS3 and actionscript 2 for a school project.

I have 2 images on separate layers on a timeline in the same frame, which has been paused using the 'stop' command. I am looking to have around 4 differences that, when clicked, will be recorded at the bottom of the screen.
 
The problem is, I am unable to find a way to get the differences recorded at the bottom in the order the user finds them, where each one is entered when the user clicks it, leaving gaps for those that haven't been found.

Being only a basic user, I am only familiar with scenes and basic timeline controls, and i'm hoping there's a relatively simple way of achieving this. However I am perfectly comfortable with using more complex actionscript, having done some programming before.

View 9 Replies

Flex :: Building Java Multiplayer Server Game - Difference Between Sockets And Webservice?

Aug 8, 2011

I'm building a multiplayer card game using Flex on the client side and Java on the server side and I wanted to know if I must sockets and the accept method in order to connect users to the server for in order for them to join a game room or create one or to chat.In the past I've learned how to build a game server which both sides are JAVA and connection was in sockets but now days the client side will be in FLEX which has few ways to connect to a Java server (XML,SOAP,BLAZEDS(AMF)) and I find it hard to understand how to write the Java server in order to do all the features of a game server,especially managing the rooms and sending data back to the users.

In the sockets way, when a user was connecting to the server and he had opened a room, this room was opened on a thread and who ever was joined that room then he was connected to the same thread and sending the messages to the right place was easy, so the problem is understanding how to do the same using SOAP or BLAZEDS.

View 4 Replies

ActionScript 3.0 :: Dynamic Image Driven Game

Feb 28, 2011

I am making a dynamic image driven game and I am having some problem with preloading all the images at ones, so I am here to seek some help.images is an array that stored the image's url.image_loaded is a variable to see if check how many images have loaded.whenever the image_loaded variables is equals to the images array's length, it will proceed to my desire frame. But for some reason the images isn't showing up all at ones.[code]

View 7 Replies

ActionScript 3.0 :: Implementing Dynamic Starfield Into Game

Jun 1, 2011

I'm trying to implement a dynamic starfield into the game blaster mines (chapter 11) from the book "The Essential Guide To Flash Games" (from Jeff and Steve Fulton) but had no success yet. I built a separate starManager.as class and a BasicBlitArrayStar.as class for it. Also I'm using a pool for inactive and active stars (basically I think it's the same method when building the projectiles or rather particles except that the stars move only when the mouse moves (using the same direction).

If u don't know what I mean check out the parallax starfield from [URL]:
freeactionscript.com/2010/06/endless-starfield-parallax-scrolling

Currently it's not working. The inactive pool is full of stars but when I try to draw them on the background I can see absolutely no star. Even when there is an active star available it doesn't draw it on the background. The goal is a starfield that uses similar techniques from the framework like particles and projectiles do. I have some things in mind like getting the child index for creating different star layers but currently I'm not able to realize it properly.

Here are some code excerpts:
starManager.as:
package {
import flash.display.BitmapData;
import com.framework_mod.src.BlitArrayAsset;
import com.framework_mod.src.BasicBlitArrayStar;
[Code] .....

View 1 Replies

ActionScript 2.0 :: Q&A Game - Dynamic Text And Arrays?

Mar 20, 2007

I would like one of the dynamic text boxes (picked at random) to display the Answer and the other 3 to be filled in with (Answer+2, Answer-2, Answer*5).My problem seems to be in picking the random box and then assigning Answer to itThis is my test actionscript so far..

questionArray = ["What is 5 multiplied by 5?"];
answerArray = ["25"];
Question = (questionArray [0]);

[code]....

View 4 Replies

ActionScript 2.0 :: Dynamic Swf - Load Only Once At The Start Of The Game

Aug 6, 2008

I am making a big big big game, and I came across a huge problem. My game has over 60 unique units, which mean that the library of my .fla file is REALLY huge. Flash just can't handle it anymore, and crashes every 5 min. I can't optimize it(already did) and I can't cut through the content. I think I found a solution: I will load my units from external .swf. Sooo, the thing is, I want to load these swf only once, at the start of the game. Here is how it goes: I divided my units in many packets, and set every unit to be "exported for Actionscript" in the library. This way, ill load the .swf and its library at the beginning of the game and I will be able to attach the units MC over runtime.

[Code]....

View 1 Replies

ActionScript 3.0 :: Creating A Dynamic Grid From Game?

Oct 12, 2010

So I'm making a game that uses blocks... I want to create an initial grid of blocks on the screen inside a grid container. as you move the grid container around, more blocks would be added dynamically to the grid... either to the left, right, or bottom.

View 1 Replies

Multiple Instances Of Dynamic Text Slows Down Game?

Feb 25, 2011

My game is rather dependant on dynamic text fields, for giving players in game hints, signalling to them how far they've progressed (round/wave), how many points they've scored for destroying an enemy ect.

It's come to my attention that, the game lags whenever I update these dynamic text boxes. This happens particularly with the in game messages, (black glow filter) that fade in and out. Without any dynamic text messages at all, the game seems to run fine even on battery saving mode/slow computers.

Is there anyway to keep the dynamic text and get rid of the lag? I think I've tried all the different options for the textfields (I'm using CS4):Character Embedding Bitmap/Antialiazed text (Bitmap works slightly better) Multiline/single line Non selectable [URL]..

View 2 Replies

ActionScript 3.0 :: Dynamic Text In Simple Drag & Drop Game?

Aug 24, 2010

So Im working on a very simple drag and drop flash game using AS3. Everything is complete but I'm having an issue with the dynamic text. For some reason when you drop the item onto its target and accompanying dynamic text is all effed up.. for example when it should say "Try Again!" it says "r ain!".. I've been banging my head for the last few hours with no luck..And here is my code:

Code:
var startX:Number;
var startY:Number;

[code].....

View 2 Replies

Actionscript 3.0 :: String - Accessing Dynamic Text From Class To Game

Apr 4, 2012

I have here a bubble popping game where bubbles fall from top of the game to the bottom and the player tries to pop as many bubbles as possible in 30 seconds. It is a 3 frame game, 1st frame is the start button, 2nd frame is the game, 3rd frame is the score and play again. 1st frame: Buttons to go to the second frame 2nd Frame: timer to count 30 seconds of play time 3rd frame: buttons to play again. ScoreValue is a dynamic textbox in the last frame of the game. It records the points based on size the size scale of the bubble, and should be change based on the amount of bubbles the player has popped.

[Code]...

Im getting this as output in my program, does any one know why? Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts.

View 2 Replies

Flash :: Implementing Dynamic In-game Advertising Inside Games

Jul 17, 2010

I'm a django(python) web developer. I can also make 2D flash games. I'm planning to make :

online flash games distribute them to various websites then use dynamic in-game ads inside these games( ad changes during game play).

[Code]...

View 1 Replies

ActionScript 3.0 :: Object Oriented Game - Referencing Dynamic Objects

Jun 26, 2009

I'm doing this object oriented game and I create a bunch of 'boxes' via a for loop

Code:
Select allfor (var z=0; z < numOfBoxes; z++){
var box:Object = new Object();
box.mc = new Box();
box.mc.name = "box"+z
box.mc.x = Math.round((Math.random()*(530-box.mc.width)) + 20);
for (var i=0; i<boxXArray.length; i++){
[Code] .....

I get my random amount of boxes scattered over my stage (I haven't put in any checks to see if they are touching). How do I 'name' these boxes so I can reference them later? Say I want to move the .x of boxA in another function? Is there a simple way to call them box+z instead of just all as box? (Then I can run them through a loop later to talk to them).

View 2 Replies

Certain Spot On A Layer Called 'copy

Jan 4, 2010

I have four buttons that I'd like to press and go to a certain spot on a layer called 'copy'. My code:[code]However, the copy text loops endlessly, even when I press the buttons. I have an actionscript layer, a copy layer, and a background layer. The copy layer has four frames of text. The background layer has four identical frames of background.

View 3 Replies

Flash Jump To Certain Spot Code?

Aug 14, 2010

I need to know how to write some code in flash that will make it jump down to a certain point on the page. Similar to this page.If you click on a state it will take you straight to a section down at the bottom. How exactly would i go about writing this code.

View 1 Replies

Creating Pulsating Spot That Looks Like Red Light

Oct 16, 2011

I want to make a pulsating spot that looks like red light. The pulsating effect is done but the circle with gradient red goes from red center to black. I want it to go from red to nothing/transparent, so that whatever background can be seen through the edge of the "light". Is that possible? I use Flash 8.

View 2 Replies

ActionScript 3.0 :: Add Hot Spot URL Links To An FLV File?

Nov 23, 2008

I'd like to add hot spot URL links to an FLV file, which is being played in a customised swf. I dont want to embed the video into the timeline, so I would like the hotspots on the FLV itself. Does anyone know how to do this. youtube seems to do it just fine. Is it triggered via an event embedded on the FLV, in which case does anyone know the AS code for it?

View 15 Replies

Determine The X/y Coords Of A Spot On The Stage?

Jun 23, 2009

Is there any way for me to move the mouse to a spot on the stage and determine what the x/y coords are? It's really hard writing some action script and just continually guessing what x/y coord i want until i get it close enough.

View 1 Replies

ActionScript 3.0 :: Moving MovieClips From One Spot To Another

Dec 16, 2011

I know how to move movieclips from one spot to another with a click of a button. I want to go further. After a few seconds, that movieclip will move again to another spot. So, with one click, my movieclip will move to one spot, and then after a few seconds will move to another spot.

View 6 Replies

Flash :: Multiple Movieclips All Go To The Same Spot?

Mar 7, 2011

So I'm trying to shoot multiple bullets out of my body and it all works except I have an odd problem of just one bullet showing up and updating to set position for the new ones.
I have a move able player thats supposed to shoot and I test this code by moving the player and shooting. Im taking it step by step in creating this.

The result of tracing the bulletContainer counts correctly in that its telling me that movieclips ARE being added to the stage; I Just know it comes down to some kind of logic that im forgetting. Here's My Code (The Bullet it self is a class)

[Code]...

View 3 Replies

ActionScript 2.0 :: Reapears In Some Random Spot?

Mar 2, 2010

Its for a turtle and it works perfectly.. Except that when it hits my wall, it reapears in some random spot lol. Anyone know how to fix this?PS: this code has other random stuff, but try to find the problem.

Code:
hitSquare._visible = false
var players:Array;

[code]....

View 5 Replies

ActionScript 3.0 :: Hot Spot With Popup Text

Apr 29, 2010

I'm working on a flash movie(?) where I would like to place some hot spots on a image and with mouse over that display an info text. It got to be dynamical since I load location and text from a xml file. But I don't know where to start. Should I use SimpleButton for the hot spot and let the mouseover display a TextField with the info text?

View 0 Replies

ActionScript 2.0 :: Load A Movie Into A Certain Spot?

Apr 18, 2003

how i load a movie into a certain spot (_x,_y)..

View 12 Replies

ActionScript 2.0 :: Put A Specific Moviclip In The Spot?

Jun 14, 2006

How do you make it so that wherever you click, the AS will get that location and put a specific moviclip in the spot? I've tried several things to achieve this, but i am still having problems with this.

View 1 Replies

ActionScript 3.0 :: Closest Instance To A Certain Spot?

Feb 7, 2011

How would I go about finding the closest instance to a certain spot? I was thinking about using the distance formula and looping through all the instances on the stage, but I don't know how to find the shortest distance between all those measured.

View 14 Replies

ActionScript 2.0 :: Get A Picture To Appear In A Spot When Click It?

Dec 18, 2004

how to get a picture to appear in a spot when you click it. (Example: Customizing a picture with flash.) When I say this I mean, I have the stuff I want to customize, I put it all into flash, and now I want to make it so when it's on the net people can customize the given object, by clicking what they want added. No Click and Drag, just clicking.

View 2 Replies

Unable To Load External Swf In The Correct Spot?

Dec 28, 2009

I'm using AS2 and Flash CS4. I'm having problems loading an external swf correctly. I get it loaded and displayed ok, but not in the correct spot. The movie clip is the same size as swf, and the registration point is in the top left corner. However, each time it loads it ends up in the bottom right corner of the screen.

View 1 Replies

Professional :: Change Custom Cursor Hot Spot?

Jan 24, 2011

I've been looking everywhere but I can't find the solution to this problem. I made a custom cursor and I want the hotspot not to be in the upper left part of the movie clip but in the place of the movie clip that I choose. So, how do you change the hot spot of a custom cursor? I'm using Flash CS4 AS3. I can't believe no one asked this before.

View 3 Replies

Professional :: Use Buttons To Go To A Specific Spot In The Timeline?

Sep 7, 2011

I have a flash document that publishes to an swf I embedd into an html page. The flass is made up of three movie clips that I have managed to program to run in succession and then loop. Each movie clip (frame 1, frame 2 and frame 3) drill down into their own animation. I set the movie up this way so that each of the animations could be linked to a different web page. Now I want to add navigation within the flash itself by creating three dots that when clicked will send the movie to frame 1, 2 or 3. I can't seem to find an example of this and am just not well versed enough in script to figure this out.

View 2 Replies







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