AS3 :: Flash - Save XY Coordinates?

Jul 21, 2010

I have a widget that looks like an equalizer, the scrubbing on the slider is working. When I relaunch the swf file everything resets.

What can I do to save the setting.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Save/Load Flash Based On X Y Coordinates Of Movie Clips?

Mar 12, 2010

I am developing a tool for analysis where you drag specific events onto a special wheel to analyze events based on time of day etc. I had a few users testing it and they asked for a save and load feature. I have done as much as I can at this point and am just growing confused. Can one of you experts take a look at my .fla and see what can be done...I think I am close but just can't figure it out. Also, if you can provide comments on cleaning up my code would be nice too.

View 4 Replies

ActionScript 3.0 :: Get Movie Clip To Save Coordinates?

Nov 28, 2009

what i am trying to do is create a game that works on the same bases as battle ships but the difference is that its just at a single grid size scale so basically you only have to hit 5 squares in the 8x8 square grid. The trouble i am having is that i have set it up as a movieclip and i cant seem to get it to same the positions on the side that i select on (named the players side) it works fine for the otherside and will hit the 'enemy squares' and you can win the game but never loose the game that the problem.

View 0 Replies

ActionScript 3.0 :: Save The Mouse Coordinates Upon MouseClick?

May 20, 2011

I am making a game where when I click a movie clip on stage and the man will walk to that area. The man only moves one space when click, so it works if you continualy click the mouse. I just want to click the mouse 1 time and the character walks to that spot. Here is my code,

clickObject.addEventListener(MouseEvent.MOUSE_DOWN ,record_Mouse);
function record_Mouse(event:MouseEvent):void {
var record_MouseX:Number= mouseX;[code]........

/*I tried a loop for these last two lines, but it did not work, maybe I am doing it wrong, or maybe there is another solution? I also tried to return the value of man.x and man.y into a ENTER_FRAME event which does not seem possible with AS3*/

man.x+=vx;
man.y+=vy;
}

View 2 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 :: Save File Locally In Flash Without Displaying Save Dialog

Jan 31, 2010

How do we save file locally in Flash (ActionScript 3) without displaying dialog. I know we can use the following code to save file locally but it prompts Save dialog. I don't want this dialog while saving file locally.

[Code]...

View 3 Replies

Flash - How To Rotate Around 3D Coordinates In AS3

Feb 24, 2010

I wanted to write a simple 3d image rotating around the y-axis as the Image carousel. I can place all the photo around the axis but I can't get the main image facing towards the screen. I mean the z-axis isn't pointing towards the screen. Instead, the z-axis is towards the top left corner. How do I make the z-axis pointing perpendicular to the screen?

View 1 Replies

Xml :: DX And DY Coordinates Calculated In Flash?

Jan 13, 2011

I'm trying to update a clients site and the original developer left almost no instructions.The code is all updated through XML.Here is a sample of the code

enter code here<FOLDER NAME="COMMERCIAL">
<GALLERY NAME="LOCANDA VERDE: New York">
<IMG HEIGHT="500" CAPTION="Some photo" WIDTH="393" SRC="locanda1.jpg" DX="60" DY="40"

[code].....

View 1 Replies

ActionScript 2.0 :: Incorporate A 'Save' Button Which Takes A Snapshot Of Their Drawing Which They Can Then Save To Their Computer

Nov 21, 2009

I've designed a painter program where the user can select different colours and 'paint' a custom design on screen. What I would like to do is incorporate a 'Save' button which takes a snapshot of their drawing which they can then save to their computer.

View 0 Replies

Flash :: Get Coordinates In Parent But Not In Stage?

May 12, 2010

I know about Flash's localToGlobal and globalToLocal methods to transform coordinates from the local system to the global system, but is there a way to achieve the intermediate? To transform coordinates from an arbitrary system to any other arbitrary system?

I have a clickable object inside a Sprite, and the Sprite is a child of the stage. I want to retrieve the clicked point in the Sprite.

View 2 Replies

Flash :: Coordinates In Distorted Grid

May 31, 2010

I have a grid in a 2D system like the one in the before image where all points A,B,C,D,A',B',C',D' are given (meaning I know the respective x- and y-coordinates).I need to calculate the x- and y-coordinates of A(new), B(new), C(new) and D(new) when the grid is distorted (so that A' is moved to A'(new), B' is moved to B'(new), C' is moved to C'(new) and D' is moved to D'(new)).The distortion happens in a way in which the lines of the grid are each divided into sub-lines of equal length (meaning for example that AB is divided into 5 parts of the equal length |AB|/5 and A(new)B(new) is divided into 5 parts of the equal length |A(new)B(new)|/5).The distortion is done with the DistortImage class of the Sandy 3D Flash engine. (My practical task is to distort an image using this class where the handles are not positioned at the corners of the image like in this demo but somewhere within it).

View 7 Replies

Flash - How To Find Absolute X / Y And Z Coordinates In AS3

Feb 11, 2011

I have been working on Flash AS3 project. I am designing a 3D system. Consider a MovieClip A which is at (0,0,0). A contains B which is at (10,10,10). If I rotate A by 10 degrees then the position of B with respect to A remains the same but position of B with respect to the system changes. To find Global X and Y of B, we have the function localToGlobal but it does not tell anything about the Z property. How to find that?

View 2 Replies

Flash :: Xml - Export XY Coordinates For Object

Dec 7, 2011

I have a Flash project that I would like to export the coordinates of an object from. Ideally, I would like the position of the object for each frame in the animation.

View 1 Replies

Flex :: Bypass The Save Dialog Box Of FileReference.save?

Jul 6, 2011

Can we Bypass the save dialog box of FileRefernce.save()? If not, then Is there any workaround to save a file from web application in Flex without asking user where to save file?

View 1 Replies

ActionScript 2.0 :: Save File By Prompting Save Window?

Nov 21, 2006

I need to create a notepad in flash.here how could i save the file by prompting the save window?

View 11 Replies

ActionScript 3.0 :: Save Images With My MyProject.as With FileReference.save?

Dec 20, 2010

i have movie clip with Images and button Save and class MyProject.as how save images with my MyProject.as, with help FileReference.save? what to write in code? how code should look like? tell me good people I want to write everything in a separate class

View 3 Replies

Flash :: Determine Absolute Object Coordinates?

Oct 27, 2009

What is the simplest way to determine absolute object coordinates in AS3?

View 1 Replies

Flash :: Getting 2D Screen Coordinates Of A 3D Object In Papervision 2.0

Jan 27, 2010

How do I get the 2D screen coordinates of a 3D object when using Papervision 2.0 (Great White)? I've read that following properties should return the screen coords but these always return 0.

[Code]...

View 2 Replies

Flash :: Add Image From Library At Specific Coordinates?

Apr 20, 2011

I have 500x500px images in my Library that I want to load to a specific set of coordinates. I've found various hints on how to insert images programatically, but none state how to insert to a specific location.Currently, my code goes something like this:

var image:Bitmap;
switch(conStyle){
case 4:
var chart:IF= new IF(); //Flash CS5 doesn't need the dimensions passed on
image= new Bitmap(IF);
}

However, this sets the default location to the upper left corner. How can I set the xy coordinates for the image to be displayed at?

View 1 Replies

ActionScript 3.0 :: Flash Isometric Z-soring By Coordinates Not X/y?

Jul 7, 2011

I want to do a z-sorting for an isometric game via i,j, sizeI and sizeJ of the objects, and not the x/y values. I don't plan on using z axis.

I have searched google a lot and only sorting via x/y comes up. Thus I have come, like always to Kirupa to ask for help and guidance.

If I failed to put some crucial detail to the problem don't be afraid to ask for it, I am in dire need of help

View 2 Replies

Actionscript 3 :: Finding Out Coordinates Of Drawn Objects In Flash?

Jan 6, 2010

I'm in the process of making a board game in Flash; as part of process of getting fully to grips with Flash AS3.

I have a JPEG of the original board. This contains ~ 1000 circles that players may move pieces between. Pretty standard board-game stuff. The circles are not in any way regularly spaced.

So far, I've drawn the circles in Flash, by hand, and positioned them where they need to be. This looks great - I can see all my places.

What I want to do now is create these circles programatically. I want to be able to do this so I can adjust how the spaces look (depending on game state). Eventually I'll want to be able to zoom / pan the entire game board as well.

My question is, is there a way of tagging each circle with a unique reference and then looping through and recording locations?

I'm thinking something a bit like the Javascript DOM "getElementsByTagName" or similar.

At the moment I can only see two options:

Convert each circle to a symbol and give it a unique class name so I can access it from code Go through and write down the X/Y of each circle (add to my DB of board locations that I already have) so I can plot them programatically

View 1 Replies

Flash :: Group Width When Elements At Negative Coordinates?

Apr 27, 2011

<s:Group id="g1">
<s:Group id="g2" width="100" x="-40"/>
</s:Group>

I have a group that contains elements placed at negative coordinate values. I would like to get the total width of the group including parts of elements placed at negative values. In the example above g1.width returns 60 (100-40) but i like to get the value 100. In the example bellow g3.width returns 0 and still i like to get the value 100. How can I do this.I have debugged the application and no property of g1 or g3 is 100.I get the values I want if I use the Box class instead but how do I get the values i want with the Group class?

<s:Group id="g3">
<s:Group id="g4" width="100" x="-150"/>
</s:Group>

[code]......

View 1 Replies

Flash :: Movieclip Saves Bitmap At Wrong Coordinates?

Oct 8, 2011

I have a MovieClip inside a stage that is mostly(not accurately) centered to the middle of the stage.

When I try to save the MovieClip into a bitmap in order to upload it to facebook, I either get a cropped image or a white image(blank). Here is the code for generating the bitmap:

var source:BitmapData = new BitmapData(board.width, board.height);
source.draw(board);
var bitmap:Bitmap = new Bitmap(source);

The result I am getting is the yellow area in the following image:

[Code]...

View 2 Replies

ActionScript 3.0 :: Flash LocalToGlobal And GlobalToLocal - Get Value In Global Coordinates

Oct 27, 2010

I have a small problem with usage localToGlobal and than back to local. I can get global coordinate of my nested mc in question alright. Than i check if this coordinate + value of my mc.width is more than my stage width. I get to this part with no problem. Than if value is bigger (so mc is not on the stage i mean if part is off the stage i change value so it is stage width - mc.width). So i get value in global coordinates that i need. But how do i apply this to my nested clip is my question? For reference here is my code:

[Code]...

View 3 Replies

ActionScript 3.0 :: Flash - Find Coordinates Of Another Movieclip On Stage?

May 4, 2011

I just started coding classes and I am having some pretty good success thus far coding individual objects. BUT I realized that I don't know how to find coordinates of another object that is on the stage!Say I am coding in the class "Zombieguy".With the other movieclips linkage "Armyguy" I try toracetrace(Armyguy.y);ORtrace(Armyguy.Y);Both come up with "access of possibly undefined property y through reference with static type Class".I'm sure this is probably pretty simple, but can someone inform me of how to do this small step that is holding me back?

View 12 Replies

ActionScript 3.0 :: Get Rid Of Save Dialog Box In Filereference.save()?

Sep 22, 2010

Is there a way to get rid of the save dialog box in filereference.save()?I want to specify the filename and location rather then letting the user do it.

View 6 Replies

Professional :: Save CS4 Documents In CS5 Without Save As Dialog?

May 7, 2011

At my college, they have CS4 (master suite) and at home I've got CS5 (design premium). I can save files in CS5 as CS4 so they can be read at college (by Flash) but I have to do it via the "save as" every time I save. After a couple of times, it get rather irritating. Is it possible for me to save in the usual way (as if it was a CS5 document) without the save as dialog every time I save my work?

View 5 Replies

Flash :: Finding Closest Object In Proxmity To Mouse Coordinates

Mar 30, 2010

i've been working on a problem for a while now, which involves targeting the closest movieClip in relation to the x y coords of the mouse, I've attached a nice little acompanying graphic.Each mc added to the stage has it's own sub-class (HotSpots) which uses Pythag to measure distance from mouse. At this stage i can determine the closest value from my Main class but can't figure out how to reference it back to the movieclip... hope this makes sense. Below are the two Classes.My Main Class which attachs the mcs, and monitors mouse movement and traces closest value.[code]

View 3 Replies







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