Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




This Square Grid Thing



I just wanna know how they do the square thing that if u put ur mouse over it then the square will have an outline or blink.

Here's an example
http://www.frostdesign.co.uk
http://grotesk.co.uk/flashhome.htm

Is this done by ActionScript?

Thanks 4 ur help



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 01-25-2004, 10:26 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

This Square Grid Thing
I just wanna know how they do the square thing that if u put ur mouse over it then the square will have an outline or blink.

Here's an example
http://www.frostdesign.co.uk
http://grotesk.co.uk/flashhome.htm

Is this done by ActionScript?

Thanks 4 ur help

This Square Grid Thing
I just wanna know how they do the square thing that if u put ur mouse over it then the square will have an outline or blink.

Here's an example
http://www.frostdesign.co.uk
http://grotesk.co.uk/flashhome.htm

Is this done by ActionScript?

Thanks 4 ur help

This Square Grid Thing
I just wanna know how they do the square thing that if u put ur mouse over it then the square will have an outline or blink.

Here's an example
http://www.frostdesign.co.uk
http://grotesk.co.uk/flashhome.htm

Is this done by ActionScript?

Thanks 4 ur help

Grid Thing
http://www.fmx6.com/teststuff/resizer1.swf
made as a request from Pixeldude

Grid Thing
http://www.fmx6.com/teststuff/resizer1.swf
made as a request from Pixeldude

[F8] Generating Square And Square Root Expressions In Flash
How would u generate x^2 in flash.... the actual expression?
Thanks..Also how would you generate square root of x in flash...the expression?
Thanks in advance

How Do I Cut A Square Out Of A Larger Square Using Actionscript
I want to use actionscript to draw a square in a larger square that appears as a hole or window in the larger square. I know how to use AS to draw a square, but I can not seem to find a way to cut one square out of another. Does anyone know how to do this?

Creating A Grid Of Movieclips And Adjusting The Grid Based On Stage Width And Height
can anyone help me in creating a class or pointing me to a tutorial that shows how to create a grid of movieclips in as3 and also allows the grid to change column num and row num based upon the stage width and height?

Good Way To Dragdrop Mc To A Sticky Grid With Grid Cells That Animate.
Is there a way to get mc._dropTarget to recognize a hidden MC it drops on?

I have am trying to drag drop a movie clip item onto a 9 by 6 grid. The user should not see the grid. Each grid cell has a number of properties, including an animation that plays in it depending on what is dropped in it. What is the best way to do this. I came up with two ways:

A. Do the math:
1. Figure out what the drop point x and y values would convert to in the grid to find the grid cell it applies to.
2. Attach a new movie clip animation to that cell's centered x,y point to show something happened there.


B. Fill the grid with Movie Clips:
Use the mc._droptarget to see what grid cell movie clip was dropped on and then change its animated state to show something happened there.

The problem with A is that it is a little slow and cumbersome.

The problem with B is that I can't let the user see the cell movieclips. mc._droptarget only works to detect if a mc was dropped on visible graphic area of another mc as far as I can tell.

I could sure use some help on this. Is there a better way?
- Wade

How To Show One Pdf File In One Column Of Grid Using <mx:grid> Tag
hi frnds,
can anybody tell me how to display a pdf file in one coulmn of grid as one griditem. tell me me the cod eto do that in mxml tag with attribute form . if not possible then in actionscript form.

reagrds-
ankit

Grid Thumbnail With Dynamic Grid Lists
After 3 days of browsing and searching any sollution for my problem I decided to ask you directly here. I really like the thumbnail gallery for its simplicity and beauty. But I would like to ad or vertical scroller (I'm unable to find it here too, maybe I'm blind, just I'm more at the end of my seeking options) or a make a grid thumbnails, that will show 2 columns of thumbs and 5 pictures in each columns, then under the 2 columns i would like to ad a sort of arrow or button that if my gallery have more then 10 pictures it will go on the next thumbnail list. I'm not looking for any extra fading effects or special movements. Just would love to have a single thumbnail grid on side, with option to have lists of thumbnails by 10 if there is more then 10 pictures or so. If somebody can please redirect me or help me I would be very happy, also other ppl here that are seeking for the similar. thank you

Making A Thing Any Of Which Will Interact With Any Of Another Type Of Thing
Well i know that title was a bit vague but heres what im trying to do, ive been larning to use flash for the past couple weeks, I'm using flash MX, i am expeirienced in other programming languages. What id like to do is to make an object, in this case a turet, which has code in it and can be duplicated, i know how to do that part, but, i want to be able to make it and copy it, and also have an enemy i can copy, a zobie, and have any of the turrets shoot at any of the zombies that get close. They cant all be pre scripted with eachothers names because i want to be able to create either after the program starts.

Basically, the zombies come out all over during the program and the player clicks where he wants to put turrets and those turrets shoot at whichever zombie is closest to them. Im sure its not that hard, and probably would involve arrays, but since im still learning how flash works im not sure how it can be done. Any help is apriciated, thanks. While i wait for a reply I'm going to read some more on how arays work in flash since i think they may be the answer.

Thing Thing Arena Type Game.
I want to make a shooting game, but I had a question first. How can I make the hand follow the cursor constantly, but never leave a restricted area? I would like to know how, thanks.

Help With Accessing Grid Spaces In A Grid
Hi Guys

I need a bit of help with my coding. I'm building a small editor that allows users to place electrical components onto a grid so that they can see how electricity works. I have built a grid using an array and for loops and attach movieclips dynamically to that grid. What I want the moviclips to do is to look in the four spaces either side of itself i.e. up, down, left and right. I have managed to pull the grid coordinates out of the grid which enables me to tell the clip which grid space to look at but have been unable to successfully get the code to work.

Here is my code:

myGrid = [[1,1,1,1,1,1,1,1],
[1,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,1],
[1,1,1,1,1,1,1,1]];

var board:Object=new Object();
board.tileWidth = 30;
board.tileHeight = 30;
board.depth = 1;
board.path = this.grid;


function buildGrid(map){
var mapWidth = map[0].length;
var mapHeight = map.length;
for (var j:Number = 0; j<mapHeight; ++j){
for (var i:Number = 0; i<mapWidth; ++i){
var Tilename:String = "cell"+j+"_"+i;
var x:Number = i*board.tileWidth;
var y:Number = j*board.tileHeight;
var type:Number = map[j][i];

board.path.attachMovie("tile", Tilename, ++board.depth);

switch(type){
case 0:
board.path[Tilename].dropable = true;
break;
case 1:
board.path[Tilename].dropable = false;
break;
}
board.path[Tilename]._x = x;
board.path[Tilename]._y = y;
board.path[Tilename].gotoAndStop((type+1));
//trace(board.path);
//trace (i);

var depth:Number = 2001;
power.onPress = function(){
this.startDrag();
}
power.onRelease = function(){
this.stopDrag();
trace("drop - "+this._droptarget);
var drop_target = eval(this._droptarget);

if (drop_target != null){
if (drop_target.dropable ==true){
//drop_target.gotoAndStop("topsource");
trace("drop on tiles");
trace("we are dropped!");
this._x = 250;
this._y = 60;
_root.board.path.attachMovie("powersource2_mc", "powersource", depth);
_root.board.path.powersource._x = drop_target._x;
_root.board.path.powersource._y = drop_target._y;
_root.board.path.powersource.onPress = function(){
_root.board.path.powersource.startDrag();
_root.board.path.powersource.swapDepths (2001);

}

_root.board.path.powersource.onRelease = function(){
//this code gets the grid/cell/i_j reference and converts it to numbers that
//gives the x and y position within the array
var gridPos = this._droptarget;
var xcellRef = gridPos.substring (12);
var ycellRef = gridPos.substring (10, 11);
//these variables turn the string values into numbers
var Gridx:Number = xcellRef - 0;
var Gridy:Number = ycellRef - 0;
trace ("current x position is::" +Gridx);
//trace ("curent y position is ::" +Gridy);
//var gridCheck:Number = Gridx+1;//check to the right
//trace ("the square on my right is::" +gridCheck);
if (Gridx+1 == _root.board.path.brightlamp){
trace ("something is there!");
}else{
trace ("nope nothing here!");
}
snapto=30;
_root.board.path.powersource._rotation += 90;
Newx = Math.round(_root.board.path.powersource._x/snapto)*snapto;
Newy = Math.round(_root.board.path.powersource._y/snapto)*snapto;
_root.board.path.powersource._x = Newx;
_root.board.path.powersource._y = Newy;
stopDrag();
}
}else{
this._x = 250;
this._y=60;
}
}

}
}
}


}
buildGrid(myGrid);

sorry about the long post but any help will be greatly appreciated!

Tegalad

Grid Marker Not Data-grid
Hi Geeks!

Curious to know if its possible to created grid like marker over an image within Flash?

Have a look at attached image

Grid Equations | Convert Array To Grid, And X/y To Array Pos
Grids? inside Grids? What?!

So recently I have been getting into grids for interactivity solutions surrounding drag/drop of movieClips. Without doing any internet searching (good/bad?) I sat down with a pad and pen and tried to calculate an equation to help control the code for a couple reasons.

First; I had been using something to increment the rows and columns which let the columns determine when a new row would start. This is messy and just bloats the code.


Code:


   (not actual code)

   for ( var i = 0;  i < len; i++ )
   {
      if( column > totalcolumns )
      {
         column = 0;
         row++;
      }
      else
      {
         column++;
      }

      xPos = column * columnSpace;
   }


[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]

[converts array of items to grid positions]

1 . 2 . 3 . 4 . 5
6 . 7 . 8 . 9 . 10
11. 12. 13. 14. 15



Second; I wanted to determine where a drop occurred in a grid without doing hitTests on more than one item and trying to rationalize < > positions. So I ended up writing out a bunch of numbers, looking at the remainders and eventually leveraging % . (which I later found out is what everyone else probably uses ? the easy way). But how can I make the grid react to my [ _xmouse , _ymouse ] position when dragging an item?


Code:


   (actual code)

   var newY = Math.floor( i / cols ) * ySpace;
   var newX = ( i % cols ) * xSpace;



[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]

[converts array of items to grid positions ( with less code ) ]

1 . 2 . 3 . 4 . 5
6 . 7 . 8 . 9 . 10
11. 12. 13. 14. 15



To solve the second problem I worked backwards and was able to write a way based on [x,y] that finds a position in a grid array and splices my drag item right inside to temporarily resort on the fly. So onMouseMove it looks like all the items adjust to the item I am dragging when over it's future position in the current grid.

To get the position, it looked something like;


Code:


function getGridPos ( newX, newY, array, cols, startX, startY, xSpace, ySpace)
   {
      var len = array.length;

      // max bounds
      var xMaxPosition = cols * xSpace + startX;      
      var yMaxPosition = Math.floor( len / cols ) * ySpace + startY;

      // percentage of width/height
      var xpos = ( ( xMaxPosition - startX  ) / xSpace );
      var ypos = ( ( yMaxPosition - startY  ) / ySpace );

      // convert to position in array
      var xposProduct = Math.floor( ypos ) * cols
      var yposProduct = Math.floor( xpos );

      // position in array
      var newPos = xposProduct + yposProduct;

      return newPos;

   }

      // get array position from x,y
      var arrayPosition = getGridPos ( _xmouse, _ymouse , tempArray, cols, startX, startY, xSpace, ySpace );

      // put inside temp array
      tempArray.splice( arrayPosition , 0 , my_mc );

      // sort new items
      arrayGridSort( tempArray, cols, startX, startY, xSpace, ySpace );




[p = mouse position ]

1 . 2 . 3 . 4 . 5
6 . 7  p8 . 9 . 10
11. 12. 13. 14. 15

[converts x/y position (p) to an array position]

[1,2,3,4,5,6,7, p, 8,9,10,11,12,13,14,15]

[resulting grid resort ]

1 . 2 . 3 . 4 . 5
6 . 7 . p . 8 . 9
10. 11. 12. 13. 14
15




So this works great. I?m able to know exactly where a point converts to an array position which helped me build a class for all future projects, GREAT 2.0! Now I can have a grid resorting when I just drag over and and the array position is known before I drop the item I'm holding - with drastically less code than I had been using previously!


HERE IS THE PROBLEM / CHALLENGE


So for complication sake (and this is more of a challenge than a problem ) what if I want to do the same thing but make groupings? Like, for every 2 columns - items space out 50 extra pixels and likewise for the y values? I understand how to make that function one way, but I have no idea on how to convert that back into an array position as I have been using in the previous example.


Code:


[ colGroups of 2 , colSpacing of 100 ]

1 . 2 . . . . . . 3 . 4  . . . . . . . 5 .6
7 . 8 . . . . . . 9 .10  . . . . . . .11.12
. . . . . . . . . . . . . . . . . . . . . .
13.14  . . . .  . 15.16  . . . . .. . p17.18
19.20  . . . .  . 21.22  . . . .  . . 23.34



Now it?s easy to make that go one way;


Code:


   // original xGrid equation
   var newX = (i % cols) * xSpace;

   // additional xGrid Groupings equation
   var xGroups = 2;
   var xGroupSpace = 100;
   newX += Math.floor(   (i % cols) / xGroups )  * xGroupSpace;




And While that is all said and dandy? What the heck is the reverse of that function to put it back into array form? The problem is just that my current reverse equation really only works on the percentage of the width/height - and that does not take segments into consideration. (solution: bezier hybrid maybe?)

So anybody a math whiz out there? Can I get a little Penner help? I don't need this done ASAP but it would be cool to not have to look back on this problem again.

Thanks!!

Square Has To Fly Away
Yo
Checkin' things out and trying to get a square to vortex out when clicked. How can I do this??
tnx

The Technicolour Square
hi!

I'd like to know how can I modify the colour of a rectangle by mousing down it (if there's a way to do it).

Any idea will be wellcome.

Thankx!!

Expanding A Square
Hey, I'd like to have the out line of a square (which will act as a mask) expand (technically keep the top of the square in one spot while dragging the bottom part of it towards the bottom of the screen. I'm not sure how I would do this, also, would it be best to make the square a graphic or image?

thanks
Tyler

How Do I Make A 3D Square
I am trying to make a 3D square rotate and dont know where even to start. is there any scripting involved???

Thanks for taking the time to look at my question.

Stef.

Non-square Shape
I made a shape in photoshop and I pasted it on my flash movie, and it made a square outline on it. Where there was suppose to be no color (in the square outline in the spaces where there was no picture)it automatically put white. And it wouldn't let me erase it. I want to put a graphic underneath the the one I'm talking about, but the white part covers it. Can anyone help?

Not A Square Page.....
hi there...

i need some help on this simple question.....i think most of the flash mc will be in a square type.....i want a little different that the first screen will be in a square type but when user click on the button "help" it will come out a small oval or any shape that's not square.....i think it's a simple question and thanks in advance those can answer my question....




lazyapril

Big Blank Square
ok. so i made my site, exported it as a .swf, then put a link to it on my site, and i get a big white square. any advice?

this is the address : sofancy.querinrecords.com

Circle To Square
i'm trying to change a circle to a square, but the shape tweening wouldn't work. any suggections?

Zoom Square
Hello,

i am looking for a certain efect:
it's a square divided in 9 parts. Each part has something in it. When u put your mouse over that small square it becomes bigger and the other 8 smaller but the big square is allways the same size...

Cheers,
Miguel

Thrown Square
Ok, is there anyone out there that would know how to create the effect of a flat square getting essentially thrown on to the screen where it lands flat and then is pulled towards us in a flash.
Perhaps an example of this can be seen here.
http://jaijin.com/andru/ (enter 1,2 for the password to enter)

Any help

Square In Parts
When I draw a square the out line and fill are all parts. There must be a switch that I'm missing when I want the square to be a solid unit, lines and fill as one part.

Bob

Circle To Square? Possible?
yeah im a crazy beginner and i wanna turn a circle into a sqaure. how the mother do i do that? i thank in advance whoever helps me. it is ten thousand times appreciated!
--crazy joolie

Withe Square?
Hi,
I try to publish a .fla from a client and I just have a withe square for .swf !
It's possible that he block the publishing of his file ?
Where can I Disable that ?
the .swf seem to be empthy (24k)
any other suggestion about the problem ?
Pleasssssssssssssssse help me... It's urgent and I try and try and try... with NO result !
Thanks a lot

10 Square Preloader?
Help please!

I want to make a preloader that has about 10 squares that light up/fade to white. every 10 percent or so.

Is this hard? Does anybody have action script they can offer?

Thanx!

How Do I Create A Square?
I need to create a square which will represent a wall, whereby the user types into 2 text fields one displaying the thickness of the wall and one displaying the length of the wall. And then when you click a button it creates the wall/square.

for example,
Thickness(inches)= 8
Length (meters) = 20

CREATE WALL(BUTTON) //this button then creates the wall/square

And then for the user to be able to Drag the wall anywhere on the screen.

Please can anyone help me with ?

it will greatly appreciated!

Resize Square
hi,
i wanted to know ho do i increase the size of a squre box by tweening. when i do it the normal way in flah the box does resize but only toward the left hand side and the upper side. i wantyed to know how to resize a box symmetrically from either side.

Square With Corners
When you draw a square ouline using rectangle tool (using stroke only/no fill) then increase the line thickness the corners become rounded.

How do you draw square corners at this thickness?
How do you make the line thicker than '10'?
+

Non-square MC For StopDrag()
I am trying to develop a drag and drop system that has dynamic 'dropzones'(moveTo() & lineTo()). These dropzones need to initate a function if the dragging object is dropped on. However, I need these dropzones to be rhombuses, not squares.

It appears that _droptarget and hitTest() use the square(x,y,height,width) of my dropzones making them bigger than they are suppose to.

Is there a mathematical way to determine whether or not the draggable object was dropped onto the rhombus hotspot?

Square Navigation
i have a square divided into four smaller squares. When you rollover either of the four small squares, i wanted it to grow and almost fill the main large square with the other 3 squares just sort of shifting over to accomodate the growing square. Then when you roll off it, it shrinks back to it's original size.

How do i do this in actionscript without buttons and tweening?

any feedback is appreciated.

Expanding Square
a saw a cool effect often done on steves-templates.com, where a square expands first by its corners and then kinda stretches out from its sides. how do i do that?

Square Brackets 2.0
Hi

Just a question on square brackets

what are they used for? it seem to be a reference to a variable but im not sure

and could some one give me an example of where you would use one and for what reason

Thank you

Moving Square
Hi...

I want to make a flash page with a square (containing text and pictures) that moves horizontal when the menubuttons are pressed.

I've found an example af the effect here...

http://www.fiveight.com/

But I can't figure out how it's done

Can anyone help me out??

Thanks in advance
J-12

Do Textboxes Have To Always Be Square?
What if I wanted to make one the shape of a heart? and have the text stay within the confines of the heart?

any tuts or geniuses can help? Yes, I searched.

How To Draw A Square With As3?
I am trying to draw a rectangle that starts off small and then expands to become the border of my flash site are there any tutorials on drawing anything like this???Thanks

Square's Properties
I created a symbol with the instance name of square. in actionscript code (actions), i want to see a little window displaying the squares properties. for example, when i type "square." then a little window displaying a list of properties should appear but it is not. is there a way to get it to appear?

Square Roots
Hi, does anyone know if there is a way to display a square root symbol in a text box as part of the actionscript code. For instance the square root of 4. I just want to display the problem not the calculation. Thanks

Square Symbols
How can i make symbols is Flash that are not surrounded with a square box. Like i want to make a round hill were you can walk up.

But when i hitTest the object it already hits the hill before.(cause of the sqare box)


please help
thank you

Resizing A Square
Hi guys,

Can someone please help me. I'm looking for a way to resize a square in actionscript 3. The code I already have is this.


ActionScript Code:
function onOver(e:MouseEvent):void
{
    var itemName:String = e.target.name;
    if (itemName.match("item1") || itemName.match("item2"))
    {
        var item:Object = e.target;
        while (e.target.width < 300)
        {
            item.width += 1;
            trace(e.target.width);
        }
    }
}

Problem is, that this causes 'item1' to resize to 300 too fast (sub 0.01s). I'm VERY new to AS3, so if there is a way of making it resize to 300px in another way that won't make it change so fast, please let me know.

Thanks!

Square In Flash?
Hi! How it is possible to draw a square in Flash if co-ordinates are is in XML? Please help with a script.

Square Array
Hi!

I want to create a rectangular array from a number of images. Basically something like this:

-----
-----
-----

I want to do this using actionscript with duplicateMovieClip and setProperty commands.

Here is what I have so far

i=1;
while(i<5) {
duplicateMovieClip(square, "square" + i, i);
setProperty("square" + i, _x, 75);
setProperty("square" + i, _y, 40);
setProperty("square" + i + ".mask", _x, 80*(i-1));
trace("square" + i);
i++;
}

This duplicates the mc square 4x and changes the position of 'mask' within the clip to be in one row.
On the next row, the parent clip square should remain in the same location, but the 'mask' mc needs to move in x and y direction as well... and so on.

This is in principle a relatively easy problem, but I can't get my head around how to make the mask clip move in the y direction every time a row is complete.

Any suggestions?

Thanks!

Square Art Generator...
http://www.michael.harvardroad.com/images/blocks.html
This is not a big deal at all, and please be nice about it, but it's just a cool little thing, a skill builder type thing, anyway if you guys would like the source code it is at this link...

http://www.michael.harvardroad.com/f...topic.php?t=52

-Michael

** WARNING ** this code is not optimized yet!

Circle To Square
I am a newbie, I was wondering on how to animate a circle changing to square.

Mysterious Square
I'm building a shopping cart for a gallery site. I hadn't even worked on it for a week, but when I checked it yesterday, there was a strange problem. When you click directly on the datagrid a mysterious green square appears. The square doesn't inherit the transform of the data grid, but it does inherit the alpha value. The really strange thing is that it only happens when I post the files online. There is no problem when testing locally. I've talked to tech support and they were stumped.... Can anyone help? (please don't try to purchase anything, the site is far from finished)



the data grid comes up when you press add to cart or show cart http://danielbourdet.com/susanbourdet/SBgallery.html

Copyright © 2005-08 www.BigResource.com, All rights reserved