ActionScript 3.0 :: Create A Grid Where The Users Can 'draw' Across It?
Jun 8, 2009
I'm trying to create a grid where the users can 'draw' across it and change the colors of the grid squares to a chosen color.In the following code, I'm creating the grid with squares. I've got the functionality 'working', but it's only working on the last square instanced.How do I get it to work on all the squares, not just the last one?
Code:
package {
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.MouseEvent;
[code]....
View 5 Replies
Similar Posts:
Oct 9, 2009
I need to create a simple multiplication grid where children will fill the grid. Its an empty grid at the begining, when they start the time start as well.Its a grid of 10 x 10. when they enter the last number, the grid should show what they did wrong and the time they spend. It's an idea of how it could work but if anyone has something that looks like this.
View 6 Replies
Jun 11, 2011
I'm trying to dynamically draw out an isometric grid but I'm hitting a few problems, currently I'm using a matrix transformation to get the grid to look more isometric that tile based but it has it's problems so I want to add the grid with out using the matrix transformations. currently I have..
[Code]....
I tried to draw it out using Sin ,Cos and Tan functions to try to set the coordinates but it didn't behave like I had expected,
View 9 Replies
Jan 22, 2010
I'm currently using actionscript 3.0 to make a simple game. I'm currently working on a platforming game.I'm at a complete loss to a lot of the draw functions, so I wanted tI want to know how I can DRAW A GRID. That's it. A simple grid where I tell it, the grid is (550 X 400) pixels and each sqaure is 20X20 pixels empty.The code that I tried didn't work:
Code:
designGrid=new Shape();
for(var w=0;w<=roomWidth/10;w+=1)
[code].....
View 1 Replies
Feb 19, 2011
Is there any simple method to draw a grid? Is it possible to do this by drawing lines?
View 2 Replies
Oct 9, 2009
I have been learning how to draw rectangles. How would I draw a grid of rectangles so each is separated by some spacing? For example 4 col x 3 rows.
View 9 Replies
Nov 25, 2008
I am trying to draw a set number of squares in a grid type layout and have pretty much gotten it to do what I want. The
problems is that I want to be able to manipulate each square individually later on and I'm pretty sure I need to assign each one a unique instance name.something like "square_0_0" all the way down to "square_10_10" (it's a 10x10 table of squares).how do assign a unique instance name to each square as it's added to the stage? I attached the code I currently have running.
View 3 Replies
Mar 2, 2009
i'm trying to create a swf that retrieves the users location (town)I've looked about online and it seems this could be done by using longitutde/latitude values for example(Guessing thats how you would do it - open to suggestions though!)I've seen working examples of this on various peices of flash that magically tell you what town your.
View 2 Replies
Nov 27, 2010
I want to make a game where a user logs in. Once the user logs in, they have access to a database (let's just say a database of weapons). They could choose a certain amount of "weapons" and every time they log in, they still have the same weapons, regardless of cookies, because the "weapons" are linked to their username. Then the users could use their weapons to battle other users. Also, the user's username keeps track of their wins and losses. I have newb to basic flash knowledge (I took an animations class); I could animate, make buttons, websites, etc. Does anyone have some insight that could point me in the right direction?
View 2 Replies
Jan 17, 2011
I am looking to build an app that allows end users to draw and save mini animations (simple predetermined shapes that move in 2D). So far I have a written a app that allows the user to draw a single frame using simple shapes and lines, but I am having some small troubles at this stage, and have not attempted to allow the user to animate or save the drawing.
If anyone knows of a tutorial or some other resource to put me on the right path I would be very grateful. I can also share what I have if anyone would be willing to give me some pointers
View 2 Replies
Jul 10, 2010
I am developing a ASP.NET web site where users will need to be able to create their own business cards. So, I'm looking for a tool (most likely Flash) that I can easily integrate into a web site and lets users add text and custom images to their cards and then create an image and/or PDF from their work.
is there a plugin that does this?
View 2 Replies
Jan 30, 2012
HOW CAN I CREATE BUTTONS THAT LET USERS SET THE SIZE OF THE SHAPES THAT THEY PAINT? I have written syntax that let mouse movements paint ellipses and rectangles and I have also added buttons that allow users to switch between painting ellipse and painting rectangles.
[Code]...
View 2 Replies
Nov 24, 2009
For my wishlist site, I would like to propose widgets to my users in order to publish their wishlist on their blog or personal website. The idea is to propose a few lines of code to my users that they only need to copy/paste to insert the widget displaying their wishlist. What is the best way to create/develop a widget ?
[Code]...
View 2 Replies
Aug 12, 2003
i'm trying to create an online brochure that users design with products/images they've selected. users will be able to drag a thumbnail to a pre-designed area, then swap them around to their liking. currently i'm in the beginning stages and just learning the power of actionscript.
i've attached two sample .fla files i've been working with. the first sample i have two thumbnails drag to a target and enlarge to a defined size. the second sample i used a tutorial from flashkit --- drag drop swap. it works but the as is not up-to-date. i'm trying to incorporate the two ideas together but get bizarre effects. most of the examples i find are close but no cigar.
View 7 Replies
Aug 10, 2004
I'm creating a grid and I can place everything in nice columns but how to create a new row.
Code:
var numColumns:Number = 7;
var columnWidth:Number = Stage.width/7;
var numRows:Number = 6;
var rowHeight:Number = Stage.height/6;
var firstDay:Number = 1;
[Code] .....
How do I go about creating a new row in that 'if' statement? I don't want to hardcode any values in there.
View 4 Replies
Oct 8, 2010
I want to create a flash application where users will have access to 10, 5 seconds audio loops. They can choose any 4 tracks to make a 20 second track. I then want that mp3 to be stored somewhere or flash to create to a file which can be sent to friends in facebook where they can listen to that beat. There will be a little button at the bottom saying 'click here' to make your own beat.
View 1 Replies
Dec 19, 2010
I am relatively new to flash. I am trying to create a square grid and add it to the movie.When I open the actionscript panel by pressing F9 and when I type the following code, var square:SquareClip = new SquareClip();addChild(square);
Things are working fine (the squareclip is appearing in the movie). Instead when I do this however, I deleted the above code and just create a new instance of Main,
[Code]...
View 2 Replies
Jun 18, 2011
This is my current code:
_root.createEmptyMovieClip("noteGrid", _root.getNextHighestDepth());
for(i = 1; i <= 14; i++){
currentBlock = _root.noteGrid.attachMovie("block", "block" + i, _root.noteGrid.getNextHighestDepth);
currentBlock._x = Math.floor(i / 7) * 25;
currentBlock._y = (i % 7) * 25;
}
I have a movieclip with linkage set to block. When I compile this, the block appears however they are all on top of each other. When I used trace commands to find currentBlock._x, they are the correct values.
View 1 Replies
Oct 29, 2004
I'm having problems creating a grid that will change individual movieclips' frame when rolled over when the mouse is down. My script seems to be acting erratically, when I push buttons, all of the mcs change even though the code to change them is onRollOver.[code]....
View 12 Replies
Feb 8, 2006
Let's say I have a movie clip of a square in my library and I want to use a for loop to create a 10x10 grid of those squares. How do I approach that?
Spacing each square horizontally or vertically isn't a problem for me but I'm hung up on how to add 10 squares and then start a new line.
View 7 Replies
May 10, 2009
How can we create a grid containing pixels in flash . for example A square contains a matrix of 4X4 pixel grids and these gids must be visible like sudoku board.
View 1 Replies
Jun 18, 2011
I'm trying to create a grid of boxes with actionscript. I have a box, with linkage set to block.
Code:
_root.createEmptyMovieClip("noteGrid", _root.getNextHighestDepth());
for(i = 1; i < 14; i++){
currentBlock = _root.noteGrid.attachMovie("block", "block" + i, _root.noteGrid.getNextHighestDepth);
currentBlock._x = Math.floor(i / 7) * 25;
currentBlock._y = (i % 7) * 25;
}
However, all the boxes are at the same position. When I add trace(currentBlock), I get _level0.noteGrid.block1 ... , however when I do trace(_root.noteGrid.block1) I get undefined.
View 1 Replies
Aug 30, 2011
I was wondering is it possible to create a simple flash file that allows users to make their own spider diagram and then print it.
Is it just a matter of letting them create their own boxes and labeling them?
View 3 Replies
Sep 24, 2009
I'm trying to create a resizing script for a client that is allowing users to upload photos through their site. SInce most of the photos will be huge this will help in performance. I've had some experience in the saving of a jpeg from Flash but I'm stuck with the scaling. I'm saving the uploaded file to the server. Reloading it into a movie clip, resizing it based on my desired sizes and then saving it back to the server in its new size. When I'm resizing I'm just using the scale properties to resize the loaded large image. When I get my bitmap data of the scale mc it's not taking the data from the scaled clip it's taking the data from the unscaled mc. So my data is basically the upper left hand corner of the original image instead of the whole image.
I've tried nesting the movie clips so that the top clip isn't scaled.I've tried duplicating the data from the scaled clip into a new non scaled clip and that doesn't work either.I've tried not using scale and just using width and height, doesn't work either.
View 3 Replies
Jul 29, 2009
I want to render a very simple Flex data grid. How do I anchor the SWF flash file in the HTML? Do I need to compile a special .swf or can I use a 'standard' data grid .swf - and just pass the data to it?
View 1 Replies
Oct 6, 2009
I'd like to know how to create an "overlay" in Flex's Advanced Grid? See the sample here [URL].
View 1 Replies
Dec 19, 2010
I am trying to create a square grid and add it to the movie. When I open the actionscript panel by pressing F9 and when I type the following code,
Code:
var square:SquareClip = new SquareClip();
addChild(square);
Things are working fine (the squareclip is appearing in the movie).Instead when I do this however, I deleted the above code and just create a new instance of Main,
Code:
new Main
and inside Main.as
[code].......
And when I run the code, my square is not coming.
View 5 Replies
Nov 1, 2006
Am in a need to create a table (looks like a grid) in flash using action script.
View 2 Replies
Jul 11, 2004
I'm trying to create a grid of hexagons by using nested for loops. I picked up this code trawling the forums but this creates a diamond shaped pattern of hexes rather than neat rows that interlock together. I want to create one row in the first place, increment the x and y placing coords so as the next row is offset as appropriate to lock it into place under row above. Can't get my head round it. It's been a long day-too much wine-Flash newbie.[code]...
View 1 Replies
Sep 1, 2011
I have 2 grid of 15x15 using BitmapData (One of 32x32, and one of 10x10). I've try 2 ways :
1) Create multiple bitmap
[Code].....
Both method works, I was thinking of using a single bitmap will be better for memory performance but if I want to create a 50x50 grid of 40x40 pixels, it will be very huge.
View 2 Replies