ActionScript 2.0 :: Flash 5 - X And Y Positioning Of MovieClip

Oct 28, 2009

I always run into the same bug concerning the x and y positioning of a Movie clip. When I try to get the X and Y values of a movie clip inside another movie clip, they aren't the same values (since I guess every MC has it's own x,y grid starting at point 0,0 where that MC is placed on the work area). How do I get the x and y values of a MC inside another MC when I want those values to be the same as the _root's x and y values? In other words: The movie clip that is inside the other one is moving on a simple guide path. I want to create "lasers" (or whatever) at its own coordinates every few seconds depending on where that moving MC is at when the shooting counter is up.

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Flash Website - Relative Movieclip Positioning

Jun 8, 2010

I have been wondering over this for a while now and I have tried a number of different soloutions to no avail. I am used to designing HMTL website but for a portfolio I would like to create a Flash site. One problem is dynamic screen sizes, although I have a soloution it isn't idealy what I would like.

My current soloution is to size the stage to a 1024 x 768 resoloution and scale it to 100% on a webpage. The background for my flash is massive, 1920 x 1080, equivelent to full HD size, to support as many screens as possible, the flash has a No Scale atribute. Unfortunatly this method dosen't only increase filesize, but makes the content restricted to a small area of the screen which looks terrible on large displays.

View 8 Replies

Flash :: Positioning Objects Relative To MovieClip That Has ScaleX And ScaleY Changed

Sep 23, 2010

I have one Sprite which acts as a container for two other Sprites. One has a picture the other has a series of hotspots.

If i change the scaleX and scaleY of the picture, the hotspots don't line up anymore. Do you know the correct equation so that any scale i set will always make the hotspots appear at the right place?

I'm trying stuff like this:

hotspot.x *= scaleFactor;
hotspot.y *= scaleFactor;

but i can't quite sort it.

View 1 Replies

ActionScript 2.0 :: HitTest And Positioning - Create An Invisible Movieclip That Has The Exact Size And Shape Of The Animated Movieclip

Aug 23, 2005

This is the third thread I've written for my current project (1st was answered perfectly, 2nd failed [but I still figured it out anyways]) but I'm not sure if there is a solution to this problem. I can't really explain my problem, so once again I've included a helpful animation to show you what I mean. Bear in mind that the pale-blue box represents the movie clip's borders, and those borders are usually changed to include the animation (instead of the borders moving with the animation, the borders get bigger).

For the animation problem, I've already got a solution: create an invisible movie clip that has the exact size and shape of the animated movie clip and make it follow the movie clip as it animates, and make the hitTest check the invisible movie clip instead of the animated one. As for the rotation problem, well, I don't know how to fix it. Is there a way to change that?

View 1 Replies

ActionScript 2.0 :: Positioning MovieClip To Always 20px Below Another

Apr 8, 2009

I have a movie clip named "footer" and another movieclip named "portf". I want footer to always be 20 pixels below movieclip portf. How can I do that.

View 7 Replies

ActionScript 2.0 :: Dupicating Movieclip & Positioning Them?

Nov 12, 2003

What I'm trying to do, is duplicate a movie clip an x amount of times, based on a variable loaded externally, not the problem though, got that working fine.My problem comes in while I'm trying to reposition the duplicated movies, to line up in a stacked order.It duplicates the movie the number of times I need it, but when trying to call upon the movie clip, which is the a=this["a"+i]; script, nothing happens, the clips don't get repositioned.[code]

View 1 Replies

IDE :: Motion Tween - Positioning MovieClip

Jun 11, 2009

i put my MovieClip on frame 1 than i put it on frame 60 and made motion tween between them. that works until i decided to positioning MovieClip at frame 1 with actionscript, i write this at frame one.

[Code]...

View 1 Replies

ActionScript 2.0 :: Movieclip Positioning And Pagination?

Dec 18, 2010

i am trying to do some xml based driven search. i am right now stuck with positioning of movieclip inside movieclip and pagination for the same.Since the data is going beyond main movieclip container. i have just started actionscripting.

PHP Code:
on (press) {
var getSearch = myText.text;

[code]....

View 2 Replies

ActionScript 2.0 :: Duplicating Movieclip & Positioning Them?

Nov 12, 2003

What I'm trying to do, is duplicate a movie clip an x amount of times, based on a variable loaded externally, not the problem though, got that working fine. My problem comes in while I'm trying to reposition the duplicated movies, to line up in a stacked order. It duplicates the movie the number of times I need it, but when trying to call upon the movie clip, which is the a=this["a"+i]; script, nothing happens, the clips don't get repositioned.

[Code]...

View 1 Replies

ActionScript 3.0 :: Positioning Changing With Embedding Of MovieClip?

Nov 15, 2008

I created a class called GameBoard that uses a pair offor-loops to populate a 2-dimensional array and display the array'selements in alternating rows of 14 and 13 objects respectively. Thefirst dimension of the array holds the arrays for each row of thegrid. The array for a row holds a set of objects from a class thatextends MovieClip. The objects are arranged with just enough roomfor each one.

The objects are displayed via addChild(). Their coordinatesare set via .x and .y properties. The intervals for theseproperties are unsigned integer values.When I test GameBoard on its own stage, everything worksperfectly. When I place a GameBoard object in another file,however, the spacing between the objects in GameBoard showsseemingly random changes, with some objects appearing to slightlyoverlap. The Stage of the file I am importing GameBoard into is

View 5 Replies

ActionScript 2.0 :: Attaching And Positioning The Movieclip According To The Last Node?

Feb 22, 2010

Im trying to build a script that attaches and positions an instance of a movieclip for each node of an xml sheet. However, I can't seem to get it to loop properly. The script is simply attaching and positioning the movieclip according to the last node in the xml file. Here is my script:

Code:
var myXML:XML = new XML();
myXML.ignoreWhite=true;
myXML.load("map.xml");

[code]....

View 1 Replies

ActionScript 3.0 :: Fluid Positioning - Align MovieClip To Middle Of Screen

Mar 1, 2009

I'm new to AS 3.0 and I don't get this fluid thing fully. Everything works fine when I want my movieclip to align to the middle of the screen but when I try to make a button (or any movieclip) always align to bottom right I can't figure out how. Here's my AS, how do I make the "ball_mc" align bottom left?

import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
stage.addEventListener(Event.RESIZE, resizeListener);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
[Code] .....

Here's an example of how I want my movieclip to get placed, (like the "fullscreen" button): [URL]

View 2 Replies

Flash :: Get Positioning After Rotation?

Nov 28, 2011

I built an app in flash where you can rotate objects and save positions and rotation to xml.... that xml then feeds html to produce a layout that is then rendered the a pdf It seems that every time it goes to the html, a rotated object in positioned a little to the lower right then the position in flash.

I know the rotation in css in different, but I think if I can find the true top left of the rotated object in flash and pass that it will solve the issue.

I tried this

newx = imageHolder.parent.localToGlobal(new Point(imageHolder.x,0)).x;
newy = imageHolder.parent.localToGlobal(new Point(0,imageHolder.y)).y;
also this imageHolder.parent.globalToLocal(imageHolder.localToGlobal(imageHolder.getBounds(imageHolder).topLeft));

neither work. Is there something else?

View 1 Replies

Flash :: Recenter The Positioning Of A Symbol

Apr 9, 2011

You know how you can choose where the center of a symbol is when you make it? Top right, center, bottom left, etc. Well, I'm editing a symbol and the graphics have gone pretty far off center, so I'm wondering if there's a way to make it recenter itself without recreating the symbol. If not, what's the best alternative, such as a way to move around the point?

View 1 Replies

Html :: Positioning Flash Content Using Css?

Aug 26, 2011

I am designing a website which will have four hover buttons in the corners and flash content in the middle:

I am using the following code for the buttons which works fine:

HTML:

div.container { position:relative; }
img.positioned { position:absolute; height:63px; width:122px; }
img#topleft { top:0; left:0; }

[Code]...

But I am having difficulty positioning the flash content.

What would be the correct html and css code to position the 4 buttons with a hover effect and the flash content.

View 1 Replies

Css :: Positioning And Sizing A Flash Element Properly In A Div?

Jan 19, 2010

Here is the code I'm using for the div in question (which is the 3rd box of the javascript dynamic box):

<div class="contentdiv" style="margin:-20px 0 10px -30px;">
<object height="100%" cellSpacing="0" cellPadding="0">
<param name="movie" value="images/tri.swf">

[Code]....

I want the .swf graphic to fit the div just like the image in box #5 does.

Right now I can't get it to be either the proper size or the proper alignment. I'm admittedly not a Flash expert, so any clues would be great here.

Also, other stuff on the page is totally broken because this is just the "dev" version of the site where I test stuff out. So hopefully that can all be ignored.

View 1 Replies

Flash :: Absolute Positioning In A Flex 4 Application?

Feb 14, 2011

With flex 4 you can't seem to just do layout="absolute" any more. Is there a way to get the application layout set as absolute in flex 4?

View 2 Replies

Flash :: Change TabBar Background Positioning

Jul 12, 2011

I have a TabNavigator with custom skins on the buttons and inside the content. I want to put an image behind the individual Tabs. One long bar of about 20px high that runs the width of the control. The buttons and the navigator content are both spark components while the actual tab navigator control group is of type mx. The only property I can change is the background color. Is there a way I can just tell the background to position itself as top="-10" or something similar or do I need to go the CSS route?

View 1 Replies

Flash :: Dynamically Positioning A Sound With Panning

Sep 13, 2011

I'm trying to make a minigame in Flash about a mosquito getting smashed and I want the mosquito sound to pan as if it was in front of the player (so if the mosquito is at the right of the screen pan would be 1, and -1 in the left).Problem is, I can only use the sound transform in the play method, which leaves me with many sounds playing if I want to update the position of the mosquito (which happens on enterframe, 24fps).

View 1 Replies

ActionScript 2.0 :: Tutorial On Absolute Positioning In Flash

Nov 1, 2005

I am looking for a tutorial on Absolute Positioning in Flash. I have noticed a ton of sites where something will stay in a spacific area. For instance in my new site, i am looking to give credit to people. I want it to be a hitTest area that stays on the bottom of the screen no matter how large or small the movie gets with a limit on the small side so it stops getting smaller when the screen is smaller than 800 x 600. This way the movie clip will expand depending upon the users screen size but the content of the hidden area will stay the same size so it does not distort. I think Solenior(sp) did this and maybe a few others. I am looking to learn the actions script behind it not just a "here you go" type of deal. I want to really learn AS not just copy and paste it.

View 4 Replies

IDE :: Full Screen Flash Centering With X-Positioning?

Jun 24, 2009

I can't get the content to center correctly when the browser window is resized. Despite efforts of trying to make the design work within all screen resolutions, it still does not fit correctly on smaller ones. What I want is for the content to center itself completely - Right now it only centers from left to right. Here is the code.

Code:
// Aligns everything to the top left side
Stage.align = "TL";
// Disables the movie from scaling
Stage.scaleMode = "noScale";

[code]....

The first thing I tried was simply adding all_mc._y = Stage.width/2; to the start values and the sizeListener, which worked until you clicked on the navigation and the all_mc movieclip is moved to a new X coordinate. It moves fine, but when you try to resize the browser, it jumps the movieclip back up to the top and moves back down again.

View 3 Replies

ActionScript 2.0 :: Full Screen Flash Centering With X-Positioning?

Jun 24, 2009

The website I am working on is here:

[URL]

I have not included a preloader yet, so it will be blank for a few moments before it loads.

My problem is, I can't get the content to center correctly when the browser window is resized. Despite efforts of trying to make the design work within all screen resolutions, it still does not fit correctly on smaller ones.

What I want is for the content to center itself completely - Right now it only centers from left to right. Here is the code.

Code:
// Aligns everything to the top left side
Stage.align = "TL";
// Disables the movie from scaling

[Code].....

all_mc is the movie clip that holds all of the website content. Pressing the buttons on the navigation makes the entire movieclip shift up and down.

The first thing I tried was simply adding all_mc._y = Stage.width/2; to the start values and the sizeListener, which worked until you clicked on the navigation and the all_mc movieclip is moved to a new X coordinate. It moves fine, but when you try to resize the browser, it jumps the movieclip back up to the top and moves back down again.

how to tell the movieclip to stay center after the x position changes.

View 3 Replies

ActionScript 2.0 :: Positioning Screwed Up When Flash Movie Inside Another?

Mar 26, 2010

I have the positioning for a movieclip set via _x and _y parameters. It works fine when I publish and test just that flash file with the movieclip in it. Problem is, this flash file is embed inside another. Once I load the main flash file, the _x and _y are relative to that parent file.

View 1 Replies

ActionScript 2.0 :: Flash - Positioning In Javascript Document.write?

Jun 10, 2004

I have this code:
[
AS]
{document.write("<embed name='midi' src="+mide+" loop='1' autostart='true' hidden='false' width='300' height='100'>")}
[/AS]

I want to define a position for this object on the screen. How and where can I put a position? I have tried with document.left=400 or document.style.left=400.This is actually a part of a flash project.

View 3 Replies

ActionScript 2.0 :: Positioning And Function With Full Browser Flash?

Jul 18, 2006

I'm having an issue with getting external .swf's to load and position properly in my full browser flash site. I used a template I created for an XML slideshow which worked perfectly, but now the positioning and stage listener doesn't seem to work properly.

Here is the AS in frame one of the stage. Content is to be externally loaded into an MC called "container". The problem is, the container is not showing up initially until I resize the browser or .swf window, and when it does show up, the registration point is all wrong. I put the loadMovie script on a button since it was not loading at all with a simple loadMovie script on a keyframe. This seems to load the movie properly, but once it's loaded, not only is it positioned to the bottom right of the screen, it doesn't move at all when I resize the browser!

[AS]
/////////////// Full Browser Control
//no scale
stop();
Stage.scaleMode = "noScale";

[code]....

View 4 Replies

ActionScript 2.0 :: Positioning - Place Every Thing On The Flash Dynamically

Jul 14, 2008

I am using actionscript to place every thing on the flash dynamically. However, when I was finished I noticed a tiny little bug that I just can't fix. Whenever the stage.height is an even number one of the objects is misaligned by half a pixel. When ever the stage.height is odd it is perfect. See images below for what I mean. Here is the related actionscript (called upon load and resize):

[Code]...

View 1 Replies

ActionScript 3.0 :: Flash Positioning TextField Around Center X Position?

Jun 18, 2010

when I create a textfield and use the centering property in the following way, I position it at x=0... but the middle of the text isn't at zero; seemingly the left border of a large... area of some sort is at x=0.

[Code]....

View 2 Replies

ActionScript 3.0 :: Flash XML Array / Dynamic Text Box Positioning?

Jun 24, 2010

I am loading an XML file into several textboxes. Each group of textboxes is contained in a movieclip. There is a textbox in each group that varies in height and I want to put each movieclip underneath each other. So I need to get the height of the previous mc in my for loop so I can set the y position of the next mc. I am not quite sure how this is done, but here is my as3:


[code]...

View 1 Replies

ActionScript 2.0 :: Flash And Javascript Positioning In Document.write?

Jun 10, 2004

I don't know much about javascripts I have this code:[AS]

{document.write("<embed name='midi' src="+mide+" loop='1' autostart='true' hidden='false' width='300' height='100'>")}
[/AS]

I want to define a position for this object on the screen. How and where can I put a position? I have tried with document.left=400 or document.style.left=400, NO luck.

View 3 Replies

Actionscript 3 :: Positioning Flash Graphic Drawn With Graphics Class?

Mar 3, 2010

I'm using Flash CS3 to build a simple drawing application. When the user clicks a button, they select a particular movieclip. After clicking elsewhere on the stage, the clip is instantiated and added to the stage at the position of the cursor. I've also added the option of being able to click on the added clip and drag it around on the screen. And this all works fine.

The problem is that I also want to be able to dynamically draw and add objects to the stage via the Graphics class. Whenever I add objects in this manner, their x and y coordinates are always 0,0 no matter where I place them on the stage. This makes positioning these graphics very very problematic. I created a modified positioning function specifically for these dynamically drawn graphics and while it does "work", it feels less responsive than the positioning for movieclip objects. I'm still trying to optimize this function, but it seems to me that the ideal solution is for the graphics to have non-zero coordinates when placed in the middle of the stage like movieclip objects. Is there some "workaround" to achieve this?

View 3 Replies







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