ActionScript 3.0 :: Change Coordinates Of Y Value So Y Increase In Value / When It Goes Up Screen?
Oct 13, 2010
is there a way to change the coordinates of the Y value so Y increase in value when it goes up the screen?Currently I change the Y points this way but of course when I do a hitTestPoint I ned to convert back Y value points.[code]
View 3 Replies
Similar Posts:
Sep 21, 2009
I wrote a class for an object that as soon as it is created moves around the screen and can create another object (replicating itself). That seems to work fine for a while, but after like 20 or so objects on the screen things slow down a lot! I create the first object on frame one. The rest is all done by the objects themselves.
Would it be better if the objects did not move around on their own, but rather through a loop on frame one or does it not matter? I am working on a simulation that should go up to over 100 objects, but with this problem can't get there. The object is just a movie clip (imported png picture about 4 by 7 pixel, not animated). I was going to replace it with an animated one later, but that seems unlikely now.
View 4 Replies
Dec 10, 2010
I am trying to get coordinates of my graphic that is on the screen and failing. I am using AS2.
View 2 Replies
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
Oct 2, 2009
If i have a set of xyz coordinates,
[Code]...
how do i draw them to screen seeing as they will not be straight lines?
View 2 Replies
Jan 15, 2012
If the counter reaches 350 and I move my mouse down now it hops on over to 250. I just want it to start counting down. I.e. 349, 348, 347 and so on. What do I need to change?
//Function
function countUp(e:TimerEvent):void{
if (mouseY < 180)
{
[code]...
EDIT: What do I need to write in AS3 to make a dynamic text field increase in increments of 1 if the user hovers at the upper half of the screen, and decrease in increments of 1 if the user hovers at the lower half of the screen?Purpose, it isn't a game.
What I have right now isn't actually doing any of those things, I've just been mucking about trying to get all the masks working and they finally are.
I've included the code to offer as much information as possible about my specific project. There is also a few more lines that changes the colour of the dial when the user rolls over the specific coloured bars. I can post that as well if it helps.
To clarify the scene, the arrow part of the dial tracks the user's mouse. Always pointing towards it. The bars, when rolled over changes the colour of said dial. The "73M" is static, as well is "POINTS" but the 380 value is dynamic. It is that string I need to affect.
If anything is unclear please feel free to ask, I've been at this all night so there is a chance I'm so into it that I can't see straight.
[code]
View 1 Replies
Jan 16, 2012
I'm new to Flex, I've tried to do this using a CartesianDataCanvas inside backgroundElements in mxml, then using ActionScript to draw lines on the data canvas using moveTo(x1,y1) and lineTo(x2,y2), which draws a line between (x1,y1) and (x2,y2).
The problem with the above method is the tick mark length is a function of the chart area (which depends on the browser window size).
What I need is a method that:
(1) starts at a data coordinate (e.g. moveTo(x1,y1) works fine for this)
(2) draws a line to a screen coordinate (e.g. lineTo(x_screen, y_screen) where x_screen and y_screen are screen coordinates).
Is there anything that can accomplish this in Flex/AS3?
Alternatively, could I use screen coordinates for both steps above? If so, how to convert between screen and data coordinates? For example, is the upper right corner of the screen always a fixed data coordinate that I could reference is creating such a conversion?
Alternatively, could I save a five-pixel line in Illustrator and simply paste that image in the chart somehow? If so, how to paste it exactly at a data coordinate?
View 1 Replies
Feb 10, 2007
I use the following code to change the color of a gradient logo:
var myColor:Color = new Color(logo_mc);
myColor.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0});
Playing around with Fireworks, however, I found out that if I were to increase HUE from 0 to 121 the logo would look much better. how to modify the object {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0} to reflect a HUE increase of 121 points?
View 3 Replies
May 10, 2011
im making an application on the chicago bulls, its nearly finished but ive hit a problem i cant fix, when i try and move from the roster screen to any of the other screens the items on the roster screen stay visible and the script on the new screen doesnt work.URL...
View 7 Replies
Aug 19, 2011
How can I increase the _height property of a window without increase the height of the title and the bar at the top of the window ?
I want only to increase the part of the window where I put textFields and buttons.
View 6 Replies
Jun 28, 2010
I need to have my cursor changed only for a certain section of my screen.I remember doing this a while back with x y co-ordinates, but I cant remember how the code goes. I cant find any code like it online. What I have at the moment is..
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (enterFrame) {
[code]....
I just really need for the mouse to return back to normal when it is away from the bottom half of the screen.Placing things inside movieclips doesn't make any difference.
View 4 Replies
Sep 29, 2011
Is it possible to change the coordinates of a project so that is it more like a graph?
Eg. The center of the page is 0,0 and the bottom is -200 and the top is 200
View 4 Replies
Jun 4, 2006
how do i change an object's _rotation based on the xy coordinates of another object (so it is facing it)?
View 3 Replies
Dec 29, 2011
I want to trigger via mouseDown a function that plays a 30 frame mc while the mouseX coordinate increases and the mouse Y decreases. Then when the mouseX coordinates decreases and mouseY increases ie. the mouse moves up on the stage - mc plays in reverse So basically the movieClip is scrolled by the mousemovement. When the mouse is not moving mc stops at currentFrame
View 3 Replies
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
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
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
Aug 22, 2011
function fullscreenOnClicked(e:MouseEvent):void {
stage.displayState = StageDisplayState.FULL_SCREEN;
}
function fullscreenOffClicked(e:MouseEvent):void {
[Code].....
my player 4:3
above script is like below
but i want like this
How to change or build my script?
View 10 Replies
Nov 29, 2010
How to change screen background color in ActionScript 3.0 ? and how to navigate one screen to another screen in ActionScript3.0; i have used a button in my project, when i click the button the present screen should be invisible and another screen should come
in the onclick method i called like this :
presentscree.visible = false;
nextscreen:NextScreen = new NextScree();
nextscreen.visible = true;
View 2 Replies
Jul 8, 2008
how can i detect the change in screen resolution inside my Action Script 3 code and could do anything i want after detecting the desired resolution(i-e 800x600)?
View 6 Replies
Apr 23, 2010
How do change the ratio of my website so that, no matter how big someone's screen is, it will go as large as possible without messing up the ratio? I want a 4:3 ratio, by the way.
View 1 Replies
May 13, 2011
I make flash util with as3. Utility like paint program and export png file your draw shape. Our users put anything on own screen and shape frame this thing with mouse. Then send me exported png. I want equal users drawn shape and png shape sizes. But users screen resolution different. I want all screen resolution my flash stage same size on screen. How can do this?
View 7 Replies
Aug 27, 2010
I am trying to create animation which is based on user input on speed and distance... also it needs to work consistently on different screens and resolutionwhat functions do i use to get the pixel size of the container where the animation is playing- to make the calculations?
View 1 Replies
Dec 2, 2010
I have objects placed on the screen using x/y coordinates. I want a way to update that based on changes in Screen Width/Height. So if used re-sized browser window x/y should change. How do I cick off a function every time the screen is re-sized.
View 3 Replies
Jul 26, 2009
Monitors are different sizes so does a flash player change to fit
i changed this as i have no replies is this not this would be common process to change, the size of the screen to fit different size browsers.
View 0 Replies
Apr 27, 2009
I�m using these lines to make the site fullscreen:
Code:
//fullscreen
var full:Boolean = false;
aviso_mc.full_btn.onRelease = function() {
[Code]...
how can I detect when the user press ESC and change to normal mode?
View 2 Replies
Aug 31, 2011
I am editing my website, a full flash site bought from Template Monsters and it seem there is a problem with screen resolution. When i publish the fla in flash only, it fits the screen exactly with no scroll bar but when i publish in html the flash content is bigger than screen size and menu bar stays outside the screen in the way that i have to scroll down to see menu contents and tabs.In order to make this site more user friendly I have tried to resize the screen to a smaller but seems to be not a good idea. I have also tried to use different .js and includes in order to solve the problem but still not giving the result i am looking for.
View 5 Replies
Dec 22, 2003
What code would I use to change the focus of an object so it would rotate around the center of the screen like for a car game with a scrolling ground that moved based on key presses?
View 1 Replies
Sep 27, 2010
How do I move an image across the screen when I press a button and change its property.[code]...
View 3 Replies
Mar 12, 2012
Does the value of Stage.stageWidth or Stage.stageHeight change as per the screen-resolution, monitor-size, browser etc ?
View 2 Replies