ActionScript 2.0 :: Getting Correct X & Y Coordinates?

Feb 21, 2005

When I make a MC and I put another MC inside of it, whenever I write code in the frame of the main stage to use the child MC's x and y coordinates, I get the child MC's coordinates in respect to the _parent MC. If what I wrote didnt make any sense, what I mean is that if I make a tank MC named tankBody and a turret MC named tankTurret, and I stick them both in a MC called tank, if I write code that moves the tank MC's y the tankTurret and tankBody's y will stay the same. How can I make it so that I can read tankTurret's y & x coordinates in repect to the main stage?

View 2 Replies


Similar Posts:


Php :: Get The Correct Coordinates Of Text From That Flex Editor?

Mar 1, 2012

We have an image editor in Flex to add text and other changes. Once all the changes are complete, we need to save this to the server.We are using php to save the images by accepting coordinates from flex about what all edits are made for that image. Using this we are editing that image using imagick function in PHP. But the problem is output is different from what we see in flex. The issue is mainly with text alignment in flex editor and in the output we get after editing in php.Is there any other way to do this without making the user to wait for a long time to save the images? Is it possible to get the correct coordinates of text from that flex editor. Our issue is flex is passing the x,y of the container of that text editor. For this reason, test is misaligned in the output.

View 1 Replies

ActionScript 2.0 :: Displaying X And Z Axes (Coordinates Looks Not Correct)?

Mar 14, 2005

i'm having a problem with the displaying of the x & z axes coordinates. it seems that when i am in postive x & z the always have negitive coordinates displaying. it seem that the whole x n z axes have a wrong coordinates. is there any way to solve the problem to the following code? or are there ways easier to rewrite the code?

Code:
onClipEvent (load) {
// position of origin
origin_x = 300;
origin_y = 200;

[code]....

View 1 Replies

ActionScript 2.0 :: Displaying X & Z Axes (Coordinates Looks Not Correct)?

Mar 14, 2005

i'm having a problem with the displaying of the x & z axes coordinates. it seems that when i am in postive x & z the always have negitive coordinates displaying. it seem that the whole x n z axes have a wrong coordinates. is there any way to solve the problem to the following code? or are there ways easier to rewrite the code?

Code:
onClipEvent (load) {
// position of origin
origin_x = 300;
origin_y = 200;

[code]....

View 1 Replies

ActionScript 2.0 :: Getting The Correct Coordinates For The Amount Of Left And Right Scroll?

Jan 27, 2006

The problem I'm having is gettin the correct coordinates for the amount of left and right scroll. I've tried countless variations and nothing is working - which is getting very frustrating.

[Code]...

View 1 Replies

ActionScript 3.0 :: Get The Depths Of All The Blocks To Be At The Correct Levels At The Correct Times

Dec 30, 2009

I'm trying to get the depths of all the blocks to be at the correct levels at the correct times so that the 3d effect is maintained. I've tried many things, but have had little success. All the instances of the blocks are stored in an array, but since it's adding them in accordance with when they're added to the stage, it doesn't help me locate them to swap depths. Is there a way to arrange them by location on the board?

View 4 Replies

Actionscript 3 :: Convert Global Coordinates To Local Coordinates Of A UIComplenent In Flex Project?

Dec 19, 2011

I was trying to convert global coordinates to local coordinates of a UIComplenent in my flex project using below code using below code

var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point

uic is UIComponent in which I have subclass of Sprite for drawing something I have set the sprite's mouseEnabled and mouseChildren to false to not interrupt the mouse event. above code is within uic's mousemove event where I was tracing the gp and lp gp was giving correct value and suprisingly lp was giving negetive values. when I move the move to the top left corner of uic i expect lp to be 0,0 but it is giving the -width of of uic. I broke my head for hours and ended up finding an alternate by using offsets. Infact my original code was much simpler like this which was same issue

var lp:Point = new Point(e.localX,e.localY);

I am not sure what exactly is causing this problem. the workaround had lot of issues and it creating a mess in my rest of the algorithms.Just now I found even more interesting thing (which is actually weird). for some reason I went and create a new lp2

var lp2:Point = new Point(e.localX,e.localY);

now surprisingly it was giving correct values as expected and I went back and changed the code as

var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point
var lp2:Point = new Point(e.localX,e.localY);
var lp2:Point = uic.globalToLocal(gp);

now it is expected to have all the lp, lp2 and lp3 variables to be same but weiredly lp two is giving wrong value and lp2 and lp3 were giving correct. I am suspecting using the variable lp has something to do. I am not sure about that but above proves it so right now I am using lp2.

View 1 Replies

ActionScript 2.0 :: Converts 3d Coordinates To 2d Coordinates - Difference Between MoveTo And LineTo?

May 21, 2007

I was reading the 'Isometric Transformations' tutorial by Danko Kozar and I have a few questions. I understand what all the code does, but not how it does it. First of all, how does the following code work:

transforms x,y,z coordinates into Flash x coordinate
xFla = function (x, y, z) {
// cartesian coordinates[code].....

I understand that it converts 3d coordinates to 2d coordinates, but I don't understand how. What numbers whould be punched into x, y, and z to acquire certain desired effects?Also, what's the difference between moveTo and lineTo:

red line
style(1, "0xFF0000", 100);
plot(0, 0, 0);
draw(200, 0, 0);

View 4 Replies

ActionScript 3.0 :: Converting Papervision Coordinates Into Cartesian 2D Coordinates?

May 3, 2010

Im making a little app in flash using papervision I want to make a regular movieClip show up in the same place as a papervision object. The coordinates seem like perspective is affecting the number displayed.

View 2 Replies

ActionScript 3.0 :: Get The Correct GetQualifiedClassName

Jan 11, 2011

I'm running into an issue with a Library class not being able to get the correct getQualifiedClassName. Here is my setup. I have a lot of MovieClips on the stage with instances names like item0, item1, item2 and so on. What I need to do is extend some of those items and give them extra functionality so I opened the items Symbol properties dialog box that I wanted to add a custom Base class to and Checked Export For Actionscript. Kept the Class name the same as the stage instance name. as it needs a unique class name. Then for the BaseClass I added a path to my class that I wanted each item to have extra functionality. The base class was called StageItem which extends MovieClip

[Code]...

View 2 Replies

Sending A Swf Movie Is Correct?

Sep 24, 2009

Using CS4. I made a little 300x250 animated ad to place into online newspapers and published a swf movie. At work, they opened it in safari and it shows the whole safari screen and objects outside of the 300x250 boundary show up. Can I assume that when it goes into the 300x250 slot in the newspaper only the ad will show with it's true boundaries? They think at work that the newspaper will shrink down the whole thing. And sending a swf movie is correct? Not some other file type? And is it correct to save the movie for Flash Player 10 or would 9 be a safer bet?

View 5 Replies

Exporting A Swf As An Animated .gif The Correct Way?

Nov 17, 2009

I have read all kinds of posts on this, most are old from back in the early 00's. I have some flash banners that I made that need .gif back ups and I find myself pretty screwed if I can't do this. I tried exporting an .swf thru the publishing settings in Flash and no matter which setting I choose the gifs are pixelated and very bad quality. I just finished reading a post where it said to use the file - export from the menu which I did use and the quality is much better but nothing near acceptable for the client.

I also read to export the swf to Quicktime and QT can convert to animated gif so while I look at that option is there someone that can point me in the right direction as this could spell trouble for me if I cannot come up with a solution as I have multiple swfs that need to go through Google analyctics and need the gif back ups.

View 3 Replies

Can't Locate The Correct ActionScript

Sep 2, 2009

On my website I go to "movie explorer" and go through all the ActionScript and on the bar tab it does open upa moving vertical options (it shows up when I have it in swf or preview it) but while I am in Flash CS4 I can't find it....there are extra componentsin separate files inside the folders (mx) and (tm). It is not live on my site yet but what I am trying to do is have certain tabs go directly to a different webpage (not all of them to the flash tabs as specified) as you will see by visiting my site: [URL]

View 4 Replies

Actionscript 3 :: Correct Implementation Of MVC?

Nov 10, 2011

All the program does is you click a button and it tells you how many times you clicked the button in a textfield. Document Class: This is the entry point of the code.

[Code]...

View 3 Replies

ActionScript 2.0 :: Correct Use Of Var Object?

Dec 30, 2009

I am trying to store the x and y position of a mc and thought I would do it using object. I am getting a compile error but do not see why?

"Case insensitive identifier 'object' will obscure built-in object 'Object'"

Code:
var some_mc = new object ({_x:150, _y:50});
trace("some_mc x position is " + some_mc._x);

View 3 Replies

ActionScript 2.0 :: Anyone To Correct This File?

Dec 9, 2003

this is an atempt to make a infinite menu, but the AS has something wrong.

please try and make it OK.

View 2 Replies

ActionScript 2.0 :: Correct Way To Use AttachMovie?

May 27, 2007

I'm trying to make a file that creates an empty MC, then another MC is attached. Here is what I have, but it isn't working:[code]In the linkage properties for logoMC, I have the identifier set as "logoMC" and I left everything else blank.

View 1 Replies

ActionScript 3.0 :: Get The Correct [ I ] Id On Click?

Sep 7, 2009

I'm translating a script AS2 to AS3 ... I'm actually rebuilding because I noticed that it is almost impossible to translate I need to just get the ID [i] of a MC duplicated, only this.My structure is like this:

[Code]...

View 8 Replies

Image Won't Import At Correct Size

Apr 6, 2009

I have a background image at 720x576px. My flash document is also set to the same. When I import my graphic and drag it onto the stage it is a completely different size?

This means I have to re-size using the free transform tool, and as I have to re-size many images for different movies that have to be exact, what is the best way to re-size them? Should my imported image not fit the stage size exactly without re-sizing at all?

View 9 Replies

ActionScript 3.0 :: Destroying A MovieClip The Correct Way?

Jun 14, 2009

I understand the developer has no control over flash player's garbage collection routine, but whats the best way to ensure you've deleted a movie clip and done pretty much everything you can? I want to make absolutely sure there are no memory leaks or resource management problems.Here's what I've got so far in my document class:

Code:
public function addMC():void
{

[code].....

View 9 Replies

Flash8 :: Mouse Detecting The Correct MC?

Jul 12, 2009

I am tring to create a "find and destroy" game..I have 20 ball shaped movie clips..they move around randomly..I want to click(destroy) only the ones having certain names (enemy1,enemy2...enemy8)or having certain color....how can I write a function so that I can explode them clicking with my mouse .

onClipEvent(enterFrame)//on(Press)
{
if(this==enemy1)

[code]....

View 1 Replies

ActionScript 3.0 :: Correct Way To Use External Packages?

Sep 8, 2009

I'm brand new to AS 3.0, and I'm having a lot of trouble with it. Basically, all I want to do is load in an external swf when a button is clicked. The swf to be loaded would be defined by a variable, rather than hardcoded. Sounds pretty simple, no?[code]....

View 4 Replies

ActionScript 2.0 :: Add Score (if Correct +10), (if Wrong -10)

Dec 14, 2009

I have a game which I want to add score (if correct +10), (if wrong -10)

View 6 Replies

ActionScript 3.0 :: Getting Correct Instance Name With Arrays?

Apr 14, 2010

I'm new to Actionscript 3.0 and flash and I'm trying to make a simple drag and drop project that using externalinterfacecall will have javascript check or uncheck a value on a webpage when an image is dropped into a certain box. I'm trying to give myself a solid string to pass through to the javascript however when I do this one way, I get a stack overflow that is as follows :

Actionscript Code:[code]........

View 3 Replies

AttachMovie Not Loading On Correct Level?

May 1, 2010

Code:

thumb03.onRelease = function(){
image_holder.loadMovie("images/03.jpg");
submenu01_holder.attachMovie( "submenu01", "submenu01_new",this.getNextHighestDepth());
getURL("./htm/03.html", "tracker");
};

So I'm working on a portfolio and I'm trying to load an image with a submenu on top of it that will let you click through a couple different related images. However, right now the submenu keeps loading underneath the image, so the buttons are there and you can see it a split second before the other image loads over the top. I tried manually putting in levels for the image and submenu and no luck.

View 4 Replies

ActionScript 3.0 :: Looping To Correct URL Link?

Oct 3, 2010

I have set up an XML Gallery but having trouble linking the large image to it's corresponding URL. I keep getting the last URL in the list. I

Actionscript Code:
var thumbs:Sprite = new Sprite();var thumbBtns:Array = new Array();var detailLoader:Loader;var num:Number;removeChild(detail);function showGallery(gallerySource:XMLList):void { gallery = gallerySource; if (gallery.img.length() > 5) { addEventListener(Event.ENTER_FRAME, onMoveSlider);  }  buildThumbs();  setupDetail(0);  addChild(detail);}function

[code]....

View 21 Replies

ActionScript 3.0 :: Programming 100% Correct, But Still Flickering SWF?

Jul 2, 2011

Let me sum up the game the best I can real quick and then get to the problem. I cannot upload any code because I am under contract. I also know the code is working 100% correct. The game I am working on will have "X" number of large images. The "X" images will then be broken down into smaller images. I have around 3,000 images, all in the Flash Library, classes are named correctly, the files are named and sized correctly, etc. The game works perfectly on images 1-66. When I get to image number 67, the game SWF starts flickering from scene 1 to scene 2 and then back to scene 1 for a non-stop loop. No matter what image I use for #67, the swf flickers. My FLA is around 300MB and my SWF is 102MB.

So, does anyone have any ideas on why adding a 67th image would make the SWF freak out? Could it be some type of file size issue, graphics card issue, virus, etc? I've tried it on multiple computers both PC and MAC.

View 3 Replies

Can't Find The Correct Flash Player?

Jul 4, 2011

I got a 7" netbook running WIN CE 6.0 and can't find the correct Flash Player.Every time I seem to find one and intall I get a "Not a WIN CE" app Where can I get a player for this book?

View 2 Replies

Transparent Nav Looks Correct / But Can't Click Links

Jun 18, 2009

What I have is an "expandable" navbar swf. The swf expands over the page content, so I have set the swf's "wmode" to "transparent" (z-index is also set so the swf is above page content, in case that matters).Everything looks great, but I cannot click any of the links on the page below the navbar swf. I can see them, but I can't click them.

View 6 Replies

FLA To MOV - Unable To Get The Correct Frame Rate?

Dec 22, 2009

I have a problem exporting a flash movie to a Quicktime movie with the correct frame rate. When I try to transfer it to a DVD that will play in loop, the video is jerking. I really need to get a 30 fps video.
 
I'm using Flash CS3 on Mac OS X. I built my flash animation with photos and text only (no SWF or movies linked or embeded, no actionscript, no sound, one scene only). The frame rate I specified in my flash movie is 30 fps. My scene format is 1360 x 768 pixels (16:9).
 
I need to export my flash movie in an almost uncompressed format to bring it to a DVD.

[Code]...

View 2 Replies







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