ActionScript 2.0 :: Positions Of MC (x And Y Co-ordinates)
Jul 20, 2010
I have 52 (pack of cards) movieclips on stage all turned invisible When selected they turn visible. and need to display in one of five set positions (e.g. x and Y co-ordinates). If the first slot if full the card should be displayed in slot two. IF slot two is full the next dard displays in slolt three. I card two is then removed and a space left the next card chosen should go in there.
View 3 Replies
Similar Posts:
Jan 22, 2007
I have thumbs placed on the stage. I create an empty mc to load swf. But my thumbs disappear from the stage when I test the movie ( html or swf) if I settle the _ and _y position of the empty mc.why the emptymovieclip positions affect the positions of my thumbnails?
View 2 Replies
Apr 26, 2009
allowing a user to enter there own x and y co-ordiantes and then a rectange gets position in the x and y co-ordinates declared
View 4 Replies
Jun 28, 2009
How should I set the Co-ordinates of one object relative to another?
Eg: Balloon, Monkey
If I need the Monkey co-ordinates fixed relative to the Balloon only and my Global or Stage Co-ordinates fixed at the Top - Left hand corner should not affect my Monkey's movements.
i.e Monkey's co-ordinates computed with respect to Balloon's only.
View 1 Replies
Jul 25, 2011
Am updating a 2D game I made to have an isometric view, problem is am having issues when converting the 2d coordinates of given movieclips into isometric ones. The way I converted my game into an isometric one is just by rotating rectangular graphic 45 degrees and increasing its width such that its 2 times the height.I having problems converting all my 2D coordinates into isometric ones.Is there a function to convert them, or a mathematical formula I could use? by the way the game am making is not tile based, so functions that use tiles to convert the coordinates are not going to work unfortunately.
EDIT: I managed to fix it, I just changed the alignment to be the upper left corner, i.e. though the game is isometric and has a demimonde shape, I imagined that it is contained in a box, and that box's upper left edge is where it is aligned...this way both x and y coordinates r the same ones in both 2D and "isometric" view.
View 2 Replies
Apr 22, 2010
There is something i do not understand, i'm making a Tetris like game and i want borders (limits) but when put an height and width to my MovieClip nothing appears.
Code:
public class Thugtris_V2 extends MovieClip
{
var ts:ThugtrisShapes;//ShapeManager.GetInstance().CreateShape(ThugtrisShapes.RLSHAPE);[code]....
I have second problem, i check my coordinates of my dropping shapes and my shape disapeared from the screen,fell completely down, and it's last coordinates were : pos = (x=-6, y=371).My bottom is suppose to be at 440? The entire screen does not "measure" 400 pixels? How can u get a negative coordinate,are'nt the coordinates suppose to be like texture coordinates, only positive and (0,0) is at the top left corner?How do u measure the pixels limits of the top DisplayObject? How are the coordinates actually "setuped"? Like cartesian but only the upper part?
View 5 Replies
Nov 7, 2010
I am hoping to tween a movieclip from the outside of the stage to the centre. I have been trying but am unable to get it to stop in the centre. Attached are my files that I have been working with.
View 1 Replies
Feb 8, 2010
Lets say you have a sitation where you have
Code:
stage
--container1 {30, 30}
[code].....
View 1 Replies
Jun 20, 2011
Is it possible to change the x y co-ordinates of various levels within a movie.I havecreated a movie that references a lot of other movies on different level and loads them when required, from buttons etc. I have since created another movie that is basically border/interface around the original parent movie. The original parent movie loads exactly where I want it to, but the subsequent movies still load with x:0 y:0 so they are all out. I figure the easiest way would be to change the x, y co-ordinates of the levels in the riginal parent movie but I can't seem to find a solution.
View 3 Replies
Oct 14, 2008
How it is possible to draw a square in Flash if co-ordinates are is in XML?
View 3 Replies
Aug 8, 2010
I've set a movie to appear in my flash library using attachMovie. In the movie(Red), on release of a button there is a command that removes the movie Red/game_mc from the _root and code to make it an new file. I've given co-ordinates to other clips loaded in this way and they appear where they should.
[Code]....
The _root.game_mc being removed is an instance of a different movie clip loaded earlier. The problem is that the clip that loads at the origin (0,0) of the main document rather than the _x and _y co-ordinates from the clip.
View 4 Replies
Feb 18, 2009
I am generating some dynamic movieclips [reading polygons from SVG] and then adding them to a container movieclip [it happens to be a movieclip/class which was exported from FlashMC]. Now all these new movieclips are generated at runtime and I am not assured of their X and Y coordinates; I want them to be at a place where parent MC's co-ordiante falls.... say x:10, y:10.
Now the issue is i can not use MouseEvent.localX / stageX as I want the placement to happen soon after the MCs are generated. I hope I have described it to major extent...
View 6 Replies
Jan 12, 2009
I've got a clip on the stage at (100, 100) and I execute the following code:
[Code]....
Given that circle1 is on the stage, shouldn't localToGlobal leave the co-ordinates unchanged? I think the result of its call is wrong!
View 2 Replies
Oct 23, 2008
I have attempted to make a movieclip scale in the y axis using _yscale but I can't seem to make it scale to the exact mouse co-ordinates.
Its within a rotating movie clip (controlled by the position of the mouse) and that works fine.
Here's the code I'm using at the moment.
Code:
onClipEvent(enterFrame){
var disty = this._y - this._ymouse
var dist = Math.sqrt(disty*disty)
this._xscale = 100 + dist;
}
View 6 Replies
Oct 12, 2009
I'm not an expert in actionscript but I know a thing or two, but basically I've been given a task in a new web-based piece of software whereby users can drag and drop objects onto a background bitmap. The amount of objects and the co-ordinates of each object will then need to be saved for each user, so when they log back in (regardless of what machine they are using, they'll see where they have left off.)I've seen mentions of using the shared object, but this won't do as the user will not always be using the same machine.
View 1 Replies
Apr 15, 2011
explain why the lines drawn between the circles in the code below are not aligned with the centre of the circles? It seems the x and y properties of the circles are not up to date with their actual positions but how can this be?
import flash.display.Sprite
import fl.transitions.*;
import fl.transitions.easing.*;
var mcs=[];
[Code]...
View 1 Replies
Feb 17, 2009
I have just started with creating Drawing Pad, which can save and reload the image drawn once. I have completed the basic interface which includes drawing and erasing part. I am storing the co-ordinates in a text file. I am using MultiDimensional Array to store X,Y co-ordinates. But now I am facing a problem that how to load these variables into the flash back and using these redraw the image. I tried using 'loadvars', but it didn't helped me as it doesn't return string data. Can somebody help me in this so that I can load co-ordinates from text file and redraw the image.
View 1 Replies
Dec 29, 2008
How to access x and y co-ordinates when a mouse's left button is clicked upon a JPG file whichis placed on a stage, so that we can view the jpeg contents on the stage?
View 7 Replies
Oct 9, 2009
I have a movieclip in the library that I am exporting for actionscript. I duplicate the movieclip by adding a child for each occurance of a tag in actionscript. This works fine, but I can't figure out how to change the y postion of each new child to be 30 pixels below form the last child. Here is a snippet of the code where I am having the problem:
for (var i in xmlData.region){ for (var k in xmlData.region[i].regionInfo.payment);
var mcRI:regionInfo = new regionInfo(); this.addChild(mcRI); mcRI.txtPayment.htmlText = xmlData.region[i].regionInfo.payment[k].card; mcRI.y += 30; }
}
Instead of each new child's y position changing +30, every duplicate is on top of each other at +30.
View 3 Replies
Aug 11, 2009
What I'm really looking to be able to do, is have a clip in the root move to the same x and y as a clip that is embedded into another movieclip. How would I pick up the X and Y co-ordinates of this embedded movie clip?
To summarise,
ClipA is embedded into ClipB, what I want, is for ClipC - that is based in the root - to match ClipA's position.
View 2 Replies
Aug 14, 2004
ok I am having what I think is a targeting problem.I'm loading a swf into a blank container inside another movie (main). The AS in the loaded swf refers to positions of MC's in itself _x & _y etc.However once it is loaded, those positions are not true... ex. if the center of the swf is 200 by itself depending in where it is loaded, it might become 400 or any other number - reletive to the main movie's stage (I hope Im being clear).I need the AS in the loaded swf to refer to itself (x/y values relative to its OWN stage). So how do I target that? _root.MC.containerMC doesnt seem to work, but is this on the right track? Basically when an swf is loaded into another, does its _root now become the main timeline of the movie its loaded into???
View 2 Replies
Jan 5, 2010
Is there any way to get the positions of points in a shape on stage at runtime? for instance a triangle, is there any way to get the positions of the 3 points that make the triangle?
View 2 Replies
Jan 13, 2009
what I am trying to do is calculate the position of a point along a curve, what I want to do is create a function where i am able to determine where a point intersects the curve when I provide an X value.I have created a simple diagram to illustrate what I am looking for:So assuming I know the x,y of each black dot, and the x of the red dot, how do I calculate it's y value?
View 2 Replies
Jan 19, 2009
im trying to get this project done. Basically i'm pulling info out of an XML file:
Code:
<COVER>
<COVER_FILE_LOC>myImage1.png</COVER_FILE_LOC>
[code].....
View 0 Replies
Sep 4, 2009
When creating content for the web, I have certain elements I always want to be in view - no matter on what display or size it is being viewed from..How do I actionscript an mc, nested within a swf file to stay in a specified position / relative to the edge of a web browser
View 0 Replies
Nov 10, 2009
I have a function that finds the position of a specific string.[code]...
But indexOf searches the string and returns the position of the first occurrence.I know there's a startIndex parameter but I dont know how to use it so that I could go through an entire string.
Like for example: " Hello there little boy. What's your name boy?"
How can I get the position of first boy word and then the position of second boy word ?
View 2 Replies
Nov 14, 2009
i wanna know how to change positions of movieclips.[URL]
View 4 Replies
Apr 24, 2010
I have made a colouring application. The mouse changes to a brush when the user enters a page, but I dont know how to change the brush back to a mouse when the mouse is outside the colouring canvas,so the user can click on the navigation buttons.
View 1 Replies
Jun 1, 2010
I have a flash where users drag and drop icons around a matrix to indicate their opinions. I would like to have an option for them to save the positions of the movie clips that they have dragged and dropped so the next time they open it, they are where they left them.
View 5 Replies
Aug 21, 2010
well i'm working on a small scale game and I appear to be coming across some small issues that I was hoping someone could help me with. I have this:
ActionScript Code:
if (_root.mc_player._x <= 540){
stop();
}else{
gotoAndStop(2);
}
in the frames actions.What I am trying to achieve is that when the players x position is greater than or equal to 540 it changes frame, I've tried various adaptations of this such as the following:
ActionScript Code:
stop();
if(_root.mc_player._x >= 540){
gotoAndStop(2);
}
mc_player is the instance name of the player (obviously :P) and when i enter the second code it just jumps straight to frame 2, so far it seems that the code is just setting the players x position at 540, so i tried setting it using actionscript like:
ActionScript Code:
_root.mc_player.x = 179
_root.mc_player.x = 143
it would set it at that and then the if the player reached the x position of 540 it would change frames but in that case it just didn't change frames.
View 9 Replies