ActionScript 2.0 :: Creating Field Of Tiles?

Jan 7, 2007

Basicly this should work just like a non OOP tile game board. It just stacks the tiles on top of each other and never changes the color. So I assume that _root.cname is the wrong way to referance it.

Code:
//Create beginning variables
var checks_ver:Number = 8;

[code].....

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Creating Chatbox With Name And Comment Field

Mar 10, 2009

I am trying to make a chatbox for my website, I don't even think I need a database because I don't want people to sign in. I want a Name field, and a comment field. So I want it to appear in a box saying:
Name:NAMEHERE
Comments:These are the comments.

And so on. So I am still kind of new working with actionscript, I don't really know how this would work. I am looking to make something that looks like this: [URL]. That is my old freewebs account and I am shooting for something like that chatbox but instead of you having to log in you just type your name in a field and it appears.

I am Using Action Script 2.0 but I can make it 3.0 if required and I am running Flash CS3

View 2 Replies

ActionScript 2.0 :: Creating A Button With A Text Field?

May 14, 2007

I'm loading a xml file into a text field, now how can I tranform it to a button with the same file I loaded? Do I have to do a other button with the same var?

View 2 Replies

ActionScript 2.0 :: Creating And Calling Text To To Field?

Nov 24, 2003

I am creating a photo gallery , and everytime you hit a button a picture loads and a caption appears. The image loads fine, but how do I call the text... this is what I got so far, this AS is in the Button:

Code:
button.onPress.createTextField("theField_txt", 1, 20, 26.9, 242.9, 22.30);
theField_txt.text = "Rugged Coastline & Beach"
theField_txt._visible = true;

Also, how can I hide it afterwards to load another caption in the field, or should will it erase the last caption automaticaly?

View 3 Replies

ActionScript 3.0 :: Creating Search Field For A List Component?

Nov 4, 2009

what i would like to do is create a search field that as the user types in the search bar if there are any matching entries in the list, the focus/selection jumps to that particular item in list. i don't want to clear the list just go to the item that matches.i would like it to be predictive so if i have these entries:and the user types "s" in the search box to the first "s" entry in the list (samson) is selected, if they type "se" the selection jumps to the first entry with "se" in it (seek) if they type "seet" the selection jumps to "seether" and so on.i have absolutely no idea how to do it, but more importantly...is this possible? Attachments: glossary.zip (1.0 MB)

View 6 Replies

Flex :: Get Users From An ArrayList & Another Field For Creating A New User?

Aug 21, 2011

I'd like to create a combobox which will get users from an arrayList & another field for creating a new user. for example when i open the combobox i'd like to see the rows :

Create new user
User A
User B

where the users come form an arrayList and the "create new user" option is always there.

How can I do it?P.S I don't wan't to add "create new user" obj to the arryList - so this is not a desired solution.

View 1 Replies

Actionscript 3 :: Creating Text Field In White Board?

Sep 16, 2011

I have to create a white board in Flash Action Script 3.. I'm unable to create the text box property in the white box. When i open the swf i need a text box property with whch i can create a text box field where ever the user wishes.

View 2 Replies

ActionScript 3.0 :: Creating A Text Field Dynamically From Class Script

Jun 9, 2011

I've come across a couple threads that pertain t my question but after reading them, trying different approaches, and searching the internet I am still confused. How do I create visual elements, such as a text field, dynamically from Actionscript in a class file?
 
Basically I created a class file that loads an external XML file and now I want to create dynamic text fields for the elements in the XML file. I did some debugging and I know the XML is loaded correctly. I can also get it to create dynamic text fields when I place the code inside of the fla. The problem is when the code is in the class file. I've read that you need to pass the display object to the class but I am still unclear on how to do it.
   
My fla has the following code on the first frame:
 
import classes.estimatesheet;
var sheet1:estimatesheet = new estimatesheet("xml/estimationSheetFields.xml");
   
Here is my class file:
 
package classes {
import flash.xml.*;import flash.display.*;import flash.events.*;import flash.net.*;import flash.utils.*;import flash.text.*;

[Coe].....

View 16 Replies

ActionScript 3.0 :: Creating A Line Break In A Dynamic Text Field?

Aug 27, 2009

What is the syntax for creating a line break in a dynamic text field?

Similar to:

PHP Code:
<p>The cow<br />jumped over the moon.</p> 

View 2 Replies

ActionScript 3.0 :: How To Make Tiles

Dec 7, 2009

How do you make tiles in AS3? I can't find any good tutorials that actually teach it. I'm wanting to create an isometric tile based game, but I don't understand how to make the objects line up together.
 
I have an isometric engine in AS2 but I don't know how to get it into AS3.

View 5 Replies

Flash :: Represent Tiles In XML?

Jun 28, 2010

So, I'm writing an AS3 program that tiles floor tiles. I want the user to be to be able to create their own floor schematic represented by different rectangles. It'll be drag-and-drop. They will lay out their schematic (which is composed of different size rectangular tiles) and drop colors/patterns onto them.

This schematic will then be tiled on a 3D plane to represent what the actual floor would look like.

I've got the 3D part working, drag-and-drop working, etc. What I'm missing is the floor schematic stuff. I've spent a lot of time trying to figure out the best solution, but I can't QUITE get there.

Here are some examples (out of a WHOLE bunch of possible combinations) of how the floor schematics could look:

The different tiles within the schematic are the droppable regions. My problem: How can represent these schematics in XML? Don't worry about tiling, sizing, etc. I've got that all figured out already. I just literally do not know how I can represent a tile schematic in XML and draw it correctly with AS3.

View 4 Replies

IDE :: Pathfinding With Direction Tiles

Oct 25, 2009

I've been experimenting with path finding, in particular the A* algorithm. I've understand the basics for it and can currently get an object to move from point A to B avoiding walls. However I'm trying to create one way blocks, (then eventually add turn left and right only and T juncs etc) so I don't have to use thick walls to prevent the object from taking a certain route. The code I have so far is....

[Code]...

View 1 Replies

ActionScript 3.0 :: How To Place Tiles On Background

Sep 17, 2010

I'm trying to place tiles on background. I have a tile (20X20) on stage ( 600X400px) and I have declared it as a Symbol of Class BgTile (also have checked to export for actionscript), Problem is that it is working only partially. Some Tiles in the second row are missing and a (or more) tile(s) is(are) placed at the origin (Registration point is in the center) strangely.

function CreateBG():void{
for(var i:uint=0;i<20;i++){
for(var j:uint=0;j<30;j++){
var tempBG=new BgTile();
tempBG.name="tile"+i+j;
addChild(tempBG);
getChildByName("tile"+i+j).x=j*20+10;
getChildByName("tile"+i+j).y=i*20+10;
}}}
CreateBG();

View 4 Replies

ActionScript 3.0 :: Making A Column Of Tiles?

Oct 12, 2010

I'm trying to learn how to make grids using the Vector method. I have my tiles set at 100x100. I made a function to layout the first set of tiles in the first column. Here is my function:

public function Grid():void  { for ( var i:int = 0; i < 5; i++)  groundTileList.push(new Ground_tile());  var column:Ground_tile = groundTileList[i];  addChild(column);  column.x += 100;  }

[code]....

View 3 Replies

ActionScript 3.0 :: Get Multiple Tiles From One Picture?

May 24, 2011

I have a .png file with 16x16 tiles that I want to make into their own variables. I've tried using BitmapData like this:

bitmapData=new BitmapData(16,16,true,0x000000);
bitmapData.draw(loader);
bitmap=new Bitmap(bitmapData);

addChild(bitmap);But I then realised that would only work for the top-left tile of the picture. How would I be able to get the rest of the tiles?

View 2 Replies

ActionScript 2.0 :: Create A Map Using Tiles And An Array?

Nov 9, 2009

This is my first time using Actionscript in probably 4 years and I'm learning everything all over again. For example, here's what I tried to jump right into doing and just realized I don't remember how. I'm trying to generate a world map out of tiles I created in Photoshop. I've created a symbol in the library for each tile and want to use an array and a for loop to create the full map.

So far I seem stuck on creating the array itself. I've started by creating a variable for each tile that exists such as m73 = "Lake South" where "Lake South" is the name of the symbol in the library. The full map will be a 32x32 grid of tiles but for now (until I get it working) the array is much smaller. An example of it is like this:

worldMapArray = [m4,m4,m4,m4]
[m0,m4,m4,m4,]
[m17,m16,m16,m16];

Hopefully this is enough to convey what I'm trying to do. However, when I use something like trace(worldMapArray[0][1]); it comes up as undefined. I've already created the needed for loops that use attachMovie for each iteration in the array, but as the array itself isn't set up right nothing happens.

View 1 Replies

ActionScript 2.0 :: Grid With Different Size Tiles?

Mar 12, 2011

following a recent question below is the code for a grid with different size tiles

Code:
var mcWidth:Number = 50;
var mcHeight:Number = 50;
var spacing:Number = 5;
var numberOfRows:Number = 3;

[code]....

View 0 Replies

ActionScript 3.0 :: Resizing Tiles Using Loops?

Mar 18, 2011

I found the following code online for a Flash Memory Game. You click on pairs on grey tiles, when you click they reveal a color and when the two colours match the tiles disappear.

The problem I'm having is that the tiles are too big and I need to resize them. However when I do only the first 9 of 16 tiles are resized. It's as if the nested loops calculate the first 9 tiles and the last row and column take up whatever space is left.

Anyway lines 19 and 20 are the ones in which the tiles are calulated:

tile.x = (x-1)*50;
tile.y = (y-1)*50;

Code:

package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events.TimerEvent;

[Code]....

View 4 Replies

ActionScript 3.0 :: Generating The Random Tiles?

May 5, 2011

I have an engine for platformer game and I need to generate random blocks while moving and of course delete old ones, when the hero leave pervious position.Here is the code for generating random platforms when the game starts (costructor):

ActionScript Code:
public function TheGame()
{
bla-bla...

[code]....

As you can see, I create a loop which creates 10 platforms in different positions.My goal is to create a function which will delete blocks from the array which are not in the stage anymore and create new blocks when screen is moving up.

View 2 Replies

ActionScript 3.0 :: Managing Many Tiles (or Symbols)

Mar 5, 2012

I'd like to display a group of squares following a pre-determined path to create rows. Like row 1 to 10 would be Row1(), 11 to 20 Row2() and so on. The main reason for this is to hide the Menu before actually showing/building it. After the Menu is build up, I could remove the squares any way I want to reveal the Menu behind.

View 0 Replies

ActionScript 3.0 :: Swapping Tiles From Board (9 Frames)

Dec 29, 2009

I create a board using the class Baldosa (which is a tile on my .fla file with 9frames, each is a tile of a different color). I first create and array of numbers which indicates which frame (color) the baldosa element will display. As grey baldosas are more than the other colors (this is intended), then I unsort the array to avoid grey baldosas accumulating on the right side of the board. Then I push each baldosa in an array, and add each of them as child of the contenedorBaldosas(container) to avoid adding events for each Baldosa.

The problem comes when I want to check collisions. If there's a collision, I swap positions of each Baldosa. It only works if I swap the tile at depth number 0 and the last at depth 79, for the rest of Baldosas, it doesn't detect any collision (the baldosa clicked will return to its original position as nothing had happened. I made a trace and it seems the baldosa clicked doesnt collide with another baldosa in the array (each baldosa is given the name baldosaxx using the variable in the for loop), but rather an unnamed instancexxxx.

Also I'm treating the baldosa elements as Sprites, but as the baldosa in my .fla is a MovieClip, and it contains a Timeline where each frame is a baldosa of a different color, the problem may be also here.
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
[Code] .....

View 1 Replies

ActionScript 3.0 :: Check The Existance Of Other Tiles On The Same Row And Column?

Apr 20, 2011

I'm working on a tile game and need to figure out an equation.. I have a grid which is 12x11.. when I place a tile I need to check the existance of other tiles on the same row and column and add up their values..I need to create an equation with the following variables :-
 
Receives a number between 1 and 132 :-
 
divides and/or multiplies the number into all the possible divisions of 12 in between 1 and 132 adds or subtracts the correct amount of tiles which lie either side dependant on it's position(I have drawn out the grid, and, for example, tile 66 has five tiles either side, tile 121 has 11 to it's right because it's in the bottom left hand corner)

View 10 Replies

Actionscript 3 :: Image - Slice A Bitmap Into Tiles

Aug 9, 2011

I have the Bitmap data from a Loader object and I would like to slice it up into 32x32 squares to use as tiles. What is the most efficient way to do so?

View 2 Replies

ActionScript 3.0 :: Snap MovieClips Together - Hybrid Tiles

Apr 11, 2011

Here's the functionality I am trying to achieve: I have 30 tiles on my stage. I can move them around through multitouch like this:

ActionScript Code:
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
import flash.events.TouchEvent;
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
for(var i:int = 1;i<=30;i++){
this["tile"+i].addEventListener(TouchEvent.TOUCH_OVER, onBegin);
}function onBegin(e:TouchEvent):void{
e.currentTarget.startTouchDrag(e.touchPointID)
}

What I want to happen is that when a tile is released on another it snaps to that tile and they become one tile so when moving around you actually move them both. When you release the 2 tile 'hybrid' onto another tile it becomes three tiles together and so on.

View 0 Replies

ActionScript 3.0 :: Random Grid With Different Sized Tiles?

Jul 23, 2009

need to fill a grid with tiles that will be of different sizes,but all multiples of the stage size - something like this:I want to randomize number of tiles placed into the grid without having any tile overlap. It will then place a tile at a random position on the grid, but not in any grid cells that have already been covered by a tile. And...also I want the grid/tiles to be dynamic enough to scale if the stage is resized.

View 14 Replies

IDE :: OOP/Event Related: Transition Game Tiles?

Oct 13, 2009

I'm working on OOP skills by creating a fun Mahjong game. I made a working concept (not very OOPed yet), and am trying to get everything OOPed before its too late. I want the tiles to transition in, maybe teleport in like a Star Trek movie. The tile object is a movie clip, so it can play the transition as it is added to the stage. Tiles will be added in, in increments so there's a cool wave-like effect of teleporting.

How would I know when the tiles have finished transitioning in? Would the tiles generate an events that the game object detects, starting the game after receiving X 'finished' events? Or should I create a timer in the game object where the amount of time to wait for the transition depends on the number of tiles being added to the board?

I think I'm close, but could use any general feedback on the concept. The coding is not an issue. I'm just trying to wrap my head around things.

View 2 Replies

ActionScript 2.0 :: Create Tiles Based On A 2 Dimensional Array?

May 28, 2008

I'm having a big problem with my tile-based game. I create tiles based on a 2 dimensional array. Each tile is a Movie Clip, created using attachMovie. The problem is that when there are many of these tiles, the game lags, because so many properties must be stored for each MC. Is there a better method for creating "tiles" than attachMovie, or a way to free the memory used for each one?

View 10 Replies

ActionScript 3.0 :: Turning Image Into Tiles And Random Movement?

May 7, 2011

Im looking to convert an image into set number of tiles, and have the tiles just randomly move around for a few seconds before falling back into place to create the image. Id have this looped indefinately aswell.

View 6 Replies

ActionScript 3.0 :: Nested For Loop - Update The Tiles With The New Array Value?

May 25, 2011

i'm running a simple nested for loop (code below) that when you go over a tile makes it change its color, so far so good but i also want to make it so that when you go over a tile you can then continue only on the tiles connected to it

Code:
for (var colum = 0; colum < field_h; colum++)
{
for (var row = 0; row < field_w; row++)[code].....

i think i should be able to do it using arrays but i can't seem to understand how after the tiles are placed and the array updated accordingly to update the tiles with the new array value (enter frame event ? )

View 5 Replies

ActionScript 2.0 :: Setting Up The Tiles On The Screen - AttachMovie Not Working

Jun 22, 2011

I'm trying to build a little tile editor for a game I'm about to make, but in setting up the tiles on the screen something goes wrong. Here's the code:

[Code]...

the trace just spits a whole bunch of 'undefined's at me. I double checked the variables once again just to be sure, and they're all right.

View 1 Replies







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