ActionScript 2.0 :: Grid Based Games - MovieClips Combining Unexpectedly
Oct 6, 2010
I have a grid based game with eight bots each moving under their own instruction set, I have set them to return their ID and location when clicked, the game as it stands now is over 2k lines so I wont post it all here. On occasion two of the bots are merging into the same MC, clicking on either one or between the two merged ones will return the same ID (bot 0 returns that it is bot 1 in bot 1s location for example). To make it more confusing they are continuing to run their own separate code, bot 0 is not moving the same way as bot 1 is. Doing a var dump does not show anything as wrong, they all show up with the right IDs and locations.
View 0 Replies
Similar Posts:
Mar 1, 2004
if i have created some games..in different flash files. how do i combine all these game files into one main flash file, and publish it as one projector/flash file?
View 2 Replies
Mar 1, 2004
i have created some games..in different flash files. how do i combine all these game files into one main flash file, and publish it as one projector/flash file?
View 2 Replies
Jan 10, 2005
i'm fiddling about with tile based games at the moment and am working from the super good tonypa tutorials. i'd like to change the source code a bit so that i can play about with placing items onto the tile grid dynamically but need some help! tile_dev2.fla.i've linked to the source file and would basically like some help to change a value in the map array so that it change the graphic displayed on the screen using a button or keypress maybe? i have a detectKey function working on the stage that is used to control the movement of the little birdy character i made. also maybe a function the change the character displayed on the screen.
View 1 Replies
Mar 25, 2011
I'm trying to create a simple side scrolling platform game. So, my question is, which direction should i go in? Tile based or art based?So far i have a jpg that extends far beyond the stage and if i wanted to make a real level then instead of having it 480x2000 i would need to make it more like 480x5000 at the least.Im interested in tile based but all the guides i've found are rather dated.
View 1 Replies
Nov 3, 2011
I want to make some really simple board games that be played in your browser. AFAIK, there are really only two technologies capable of doing this: HTML5 Canvas, and Flash. I think Flash is on it's way out, so I think I should start learning how to work with the canvas.
My questions: Are there any other competing technologies/technologies I should consider? If canvas is the way to go, where can I get started? I already know HTML, JavaScript, and jQuery. I'm mostly interested in learning how to draw basic shapes and detect click events on these shapes.
I'm not overly concerned about supporting old browsers. Obviously I'd like to reach as large an audience as possible, but... I think it's about time people start upgrading their browsers if they want to keep up with the rest of the world, and this isn't going to be the sort of site you [should] visit at work, so corporate policies don't apply.
View 4 Replies
Oct 13, 2007
i want to transform some desktop based flash games fro mobile.is there any tool that transforms for mobile.so that i can do easily.
View 0 Replies
Oct 21, 2010
[URL]
I have a "person" so to speak, in flash, with a few different parts; head, pants, shirt and hat. There can be, for example, 10 different colors of shirts for the person. I've done a lot of the AS3 code behind it, but I'm awful in flash, and I've had a ton of trouble with this.
What I'm really trying got figure out (in vain) is how I can have basically a blank skeleton structure (i.e. I'm trying to have "blank" or "placeholder" symbols connected by Inverse Kinematics as bones) consisting of the pants, shirt, & head, and when I find out that shirt #6 needs to be on the person... put it in that placeholder. Does that make sense? That's the big problem. The other thing is that I've had nothing but trouble figuring out how to have, for example, one or two outlines of shirts, and when it sees shirt #6, it fills in that shirt with blue dynamically. But that might be for another question.
How I have it now: In AS3, each of the parts, the shirt, the pants, the head & hat, have their own custom classes behind movieclips, and for example, I've got it set up that the body contains the pants, shirt and head classes, and the head contains the hat class, etc.
View 1 Replies
Sep 22, 2008
I just make a grid based on array... my problem is how to highlight boxes that contain only character I mean if the box contain character it will gotoAndPlay(2)...eg:[code]
View 1 Replies
Jul 7, 2009
A 3*3 grid, consisting of 9 squares (0-0, 0-1, 0-2, 1-0, 1-1, 1-2, 2-0, 2-1, 2-2). I want to be able to navigate the grid using a keyboard by going up, down, left and right. If I hit the edge of the grid, I would like to "wrap" to the other side. This kind of menu is seen on games, mobile devices etc.
Does anyone have a good implementation of navigation algorithm (does not to be in AS3), rather something I can refer to?
View 3 Replies
May 11, 2010
I have a store style website that uses a grid format gallery to display a grid of thumbnail products which can then be clicked.url...I have created xml captions that sit ontop of each thumbnail in the grid. They display fine when static but I wanted them to only display when you mouse over the corresponding thumbnail.I have code that tweens all of the captions (thumb_caption) to 0% alpha and the tweens to 100% alpha upon MouseOver and then back to 0% alpha on MouseOut.At the moment there is one problem - When you hover over ANY thumbnail the caption for the LAST thumbnail fades in not the corresponding one for THAT thumbnail.Example - if I have 10 thumbnails and I hover over thumbnail 1 the caption for thumbnail 10 appears ontop of thumbnail 10. (not caption 1 over thumbnail 1 like it should!)[code]
View 1 Replies
Aug 21, 2009
I have a flex data grid. It contains two column Maths Mark and English Mark. If Math Mark >English Mark for any row then it will set that particular row color as Green.
View 1 Replies
Aug 9, 2010
I am trying to build a experimental interface (menu, text etc) which is based on a fine grid of points, on which i try to render custom fonts and shapes, by connecting the dots. I would store coordinates for characters (O consists of 4 lines for instance) and render them in an animation line by line, character by character.(this non interactive version is my first step)My question is, what would be the best way to store such a font collection, and execute the above. Any Thoughts? all ideas are welcome
View 1 Replies
Mar 2, 2011
Our client has tasked to dynamically generate grids with different size boxes. The grid should not have defined edges, but each movieclip should have a certain defined border. I'm pretty new to AS3 still, but can handle pretty much everything besides this sort of giant math problem. Here's a simple layout of what I'm looking for on a much smaller scale: [URL].
I can almost emulate this, but sometimes my boxes will overlap, and that's a dealbreaker. If I start hitTesting it works up until I try it with 55+ movieclips, then I fear that the script could freeze. Here's the code that works, but may freeze at times. How can I optimize this so that stack overflow errors can't happen?
package {
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.utils.getDefinitionByName;
public class box_builder extends MovieClip {
private var _path:MovieClip;
[Code] .....
View 2 Replies
Mar 15, 2011
I want to create a grid of movieclips using an array. But every movieclip added needs some sort of unique idenifier so i can access each individual movieclip.
The grid is 6 movieclips on the Y and variable on the X(that doesnt really matter to be honest)
I have managed to create an Array that displays 6 movieclips on the Y using this [code]...
now i tried creating another class and storing the 6 tickets i made in this class in another movieclip and then using the same method in the other class (i called it Ticket_Batch) i created another row of 6 movieclips. although this kind of worked visually i could no longer access each individual ticket.
my question is: how do i create a 6 x 36(or any other multiple of 6) grid of my movieclips in the same class using an array (or 2 arrays) and giving each movieclip an instance name that i can access and use?
View 4 Replies
May 12, 2009
I've been using it fine - until the last month - I've completely uninstalled it - and reinstalled it. I was having this problem before I upgraded to 10.5.6... thought upgrading the OS may work - it hasn't. I'm on a MacBook Pro
View 6 Replies
Dec 10, 2009
I'm currently running Mac OSx 10.6.2 and Flash CS4 with the most recent updates. Every time I open Flash CS4, the application quits with the following error: Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000004Crashed Thread:
I've updated the latest version of Java. What the heck is going on?
View 1 Replies
Jan 28, 2011
I have a Flash site which uses SWFAddress, it has been working fine for more than a year. Recently I opened the fla file again in order to update the site, which I do often. When I publish the swf to test it and click on a link which is supposed to link to another page within the swf itself, instead this opens up Google Chrome, which appears to be going to chromium.org, then the browser crashes. After this, all links within the swf work normally. This is happening with fla / swf files that were working perfectly fine before, and haven't been modified since.
When I upload the file onto the web server to update the site, it behaves a bit randomly; sometimes it works fine, other times the very first clicked link doesn't work, however if I click the same link again or any other link on the page it works fine from then on.
View 0 Replies
Sep 8, 2009
I'm trying to setup a DataGrid that contains a column of combo boxes. The values of the combo boxes are defined by data specific to that row. I cannot get this to work though, I'm asking for a solution to this, either fixing what I have below or a recommendation on a different way.One of the columns of my DataGrid has an object derived from a ComboBox for an ItemEditor. The itemEditor is set like this:
<mx:DataGridColumn editorDataField="selectedItem" dataField="type" editable="true" >
<mx:itemEditor>
<mx:Component>
[code].....
View 1 Replies
Sep 16, 2009
When it loads, my AS3 script generates input type text fields with filler content text e.g. "type your text here."
The problem is, when the user clicks the text field, the content inexplicably moves to the left so that the first several characters are outside the text box and no longer visible. [code]...
View 4 Replies
Mar 1, 2010
When broadcasting pre-recorded streams on a live applicationFMS always stops streaming at a certain time...
It can be after 10 seconds, it can be after 2 hours, or it can be after any other time, the frame just freezes on the client and the buffer drops to 0.
any attempt to diconnect / reconnect does not resume the streaming, althought the FMS console registers the connected client, no streaming is ensuing. One of the common events we get on the client in such instances when the streaming stops results in get "NetStream.Play.InsufficientBW".[code]...
View 4 Replies
Dec 2, 2002
Next I'm going to make a game with ball physics on it so if anyone can tell me how to make ball physics with bouncing from angled objects.Also, I need the collision detection to be based on movieclips because I need to be able to modify the levels in the game.
View 14 Replies
Oct 26, 2009
I'm trying to trigger some events (fading of nearby movieclips) based on cue points of a currently playing FLV. I'm using the FLVPlayback component (not Netstream) and have added cue points from inside flash (so they're "Actionscript" type). I actually found a nice article here: [URL] but it's AS2. To put it simply, let's say I have the following:
1) FLVPlayback component which has a parameter called "movie.flv" for the clip that it's supposed to play.
2) The instance of the component is called "movie_inst".
3) There are 2 cue points added through the component's parameters rollout, one called "point1", another called "point2".
What's the simplest code to tell flash "when you get to point1 I want you to do ___"?
View 1 Replies
Aug 12, 2010
I have multiple nested movieclip in its own different movieclip, and i would like to arrange them accordingly. My idea was to use the localToGlobal function. I can get the position of the MC on stage, but how do I use the function and place the MC based on stage?
cAPos = new Point(objectA.y);
newcAPos = objectA.localToGlobal(cAPos);
cBPos = new Point(objectB.y);
newcBPos = objectB.localToGlobal(cBPos);
objectB.y=objectA.y+objectA.height <-- based on stage
View 1 Replies
Apr 15, 2005
i have a simple xml/flash portfolio script (similar to the one in the xml/flash) tutorial and the problem is my pics are not uniform in size.this is probbaly an easy problem but how would i get flash to create a mc getting the size from either the xml (manually put it in the xml) or automatically get it from the jpeg??
View 1 Replies
Apr 15, 2005
I have a simple xml/flash portfolio script (similar to the one in the xml/flash) tutorial and the problem is my pics are not uniform in size. This is probably an easy problem but how would I get flash to create a mc getting the size from either the xml (manually put it in the xml) or automatically get it from the jpeg?
View 1 Replies
May 8, 2009
On my stage I have 5 items labeled item1_mc, item2_mc, item3_mc and so forth...they all have two keyframes on their respective timelines, one labeled "active" and the other "inactive". My code contains 2 arrays, inactiveArray and activeArray and a variable known as energy that regularly goes to and from 0 - 100.What I am looking to achieve is basically the function of...if energy >= "insert given items 'active threshold' 20, 40, 60, etc..." then add it to the activeArray, if it is not, remove it and add it to the inactive array.
all objects in activeArray gotoAndStop("active");
all objects in inactiveArray gotoAndStop("inactive");
I have tried many different ways of achieving this effect but I always end up with duplicates and extras or something doesn't move when it's supposed to, where it's supposed to, it just ends up into a giant cluttered mess and I start from scratch.
View 2 Replies
Aug 1, 2011
I use the following code to load some banners: a "banner" is a clickable PNG image. I get the URL it must point to through a parameter of the AdLoader class.
package
{
import flash.display.MovieClip;
import flash.display.Loader;
[Code].....
In practice, I create some MovieClip containers (loader_1, loader_2, etc.) and in each container I want to load one image.
What happens: when the images are loaded I want to position each image at the y+10 pixel of the preceding, so if the first is at y:0 and its height is 140, I want the second image at y:150 (and so on). I can't understand what it happens but sometimes the code works, while most of the time it doesn't.
View 1 Replies
Mar 1, 2012
I'm writing a game with Flash CS5/AS 3.0 that tries to simulate depth of field by drawing all the relevant Movie Clips based on their Y position in ascending order, i.e. things lower on the stage overlap things higher on the stage. A MovieClip with a Y position of 10 would therefore need to have a lower index compared to a MovieClip with a Y position of 20, so the second one gets drawn on top of the first.
I wrote a quick and dirty function just to test this. During the trace, I've noticed that the truck's index hits 0 when I go near the top of the stage, but if I go too far up it will completely disappear from the stage. Trace then starts generating this error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/getChildIndex()
at EICT::Game/ReorganizeDisplayIndexes()
[Code].....
View 2 Replies
May 11, 2010
for each (var link:XML in settingsXML.links.link) {
menuItem = new MenuItem();
menuItem.menuLabel.text = link.@name;
[code]......
View 1 Replies