ActionScript 2.0 :: Shift The Co-ords Of The Mouse?
Jul 30, 2006
Am having a poke around with an area when pressed, it will reloated the mouse position.I dont think it is this simple.
_root.nozone.onPress = function(){
_root._ymouse = 10;
_root._xmouse = 10;
}
View 1 Replies
Similar Posts:
May 11, 2010
In Chrome OSX last distro I'm seeing no hand cursor over any button or useHandCursor sprites that normally show the hand cursor in other browsers. Also, the nightly distro seems to fail to pick up the shift parameter of mouse events.
View 1 Replies
Jul 2, 2003
I have a movie clip, behind a mask, and I am trying to control the position it moves to, dependent on the menu button pressed.
If I am honest I am trying to copy the effect used in www.lostinbeta.com when pages are loaded.I have got everything working, but currently I do not know how to set the finishing x position depending on the button pressed.
I think the issue is becuase I am trying to use the technique to make the movement slowdown as it reaches its correct co-ordinates.
View 7 Replies
Jan 8, 2010
Im making a game, where a player controls a character moving around the screen using the mouse.the player moves using a tween, using the current x y pos and the click x y pos to move the character around here's the thing, i have objects on the screen (such as rocks, etc) that i do not want the user to be able to walk through. i do not want to use hit test to simply chuck the character off the object in real time because that's messy and it would mean the tween continued and stuff.. instead, i want to add some code to the top of the "movePlayer" function that checks to see if an object (such as some rocks) is going to be hit, and if it does, i want the tween to only go to this point (yellow in the below diagram)
Here's what i mean:the player clicks on the screen ( the blue dot) and instead of walking straight to the blue dot, the code determines the point at which the player will hit the big orange block, and only tween to that point, if there are multiple orange blocks in the way, the tween will stop the closest block.
View 9 Replies
Dec 12, 2006
Im creating an array to hold co-ords, scale, rotation, etc for a menu system. I'm having trouble working out the best way to tell it that its current position is, say, mc_A and now it should show, say, mc_D. At present in my array I have a status parameter which is set to true if its the current movieclip, so mc_A is true. Now mc_D is triggered, what is the best way to tell the array that now mc_D is true and mc_A is now false. I understand that I could just have a line saying _root.myMenuArray[0].status = "false"; before I call_root.myMenuArray[4].status = "true";
View 2 Replies
Nov 15, 2009
My code is on the main timeline.I call a function loop to draw lines between them.The lines are drawing between the right x, y values BUT between those values on the main stage, not those values within the kite.For example, dot1_mc is at x100, y0 inside kite. the line that should go from its center, draws from stage x100, 0.How do I draw the lines inside kite so that they draw between the dots?Heres my code that draws the linesPHP Code:
function loop():void{ lineDrawing.graphics.clear(); var a:Point = new Point(kite_mc.dot1_mc.x, kite_mc.dot1_mc.y); var b:Point = new Point(kite_mc.dot2_mc.x, kite_mc.dot2_mc.y); var c:Point = new
[code].....
View 4 Replies
Jun 21, 2010
I have a psd that is to be the background of a flash site that i'm working on. I've tried every combination of exporting from photoshop and flash but the end result (in the browser) is always significantly brighter.Does anyone know what the best prossess for keeping the colour of imported raster content accurate in swf while keeping the size moderate?
View 1 Replies
May 7, 2009
I have a simple movie of a person - torso, arms, legs, each on a separate layer. I'm adding a walk cycle and use tweens to move the arms and legs. This works fine when I export to an swf. But when I group and try to export to a movieclip, the arms jump way up. This seems like a simple problem of adjusting coordinates, origins, etc. But I'm kind of a newbie, so does someone have a suggestion for me? How do I export to a movieclip and have it playback the same as when exporting to a swf?
View 5 Replies
Jun 21, 2010
I have a psd that is to be the background of a flash site that i'm working on. I've tried every combination of exporting from photoshop and flash but the end result (in the browser) is always significantly brighter. Does anyone know what the best prossess for keeping the colour of imported raster content accurate in swf while keeping the size moderate
View 1 Replies
Jan 14, 2009
I have an issue with links in a text box which are pulled in from a xml file.The problem is that when I have the antialias setting set to Advanced the links will shift their position to the left when you hover over them. If i turn the antialias setting off or to Normal the problem is fixed, but the text doesn't look as nice.
Here are the settings for my textbox.
Code:
bodyText.defaultTextFormat = txtFmt;
bodyText.styleSheet = cssStyle;
bodyText.embedFonts = true;
bodyText.antiAliasType = AntiAliasType.ADVANCED;
[code].....
View 0 Replies
Jun 17, 2009
As mentioned in this post KeyLocation.LEFT and KeyLocation.RIGHT only work a Windows PC, not on a Mac. I found that out the hard way during a presentation today :X
Is there any fix to determine which shift key is pressed on a Mac?
View 5 Replies
Jan 12, 2010
I was just wondering is there a way to say like if BOTH shift and space are down gotoAndStop(3);?
View 1 Replies
Apr 19, 2010
when a moive clip is clicked in my program it's instance is saved in a var _root.dis_one. My code makes the movie clip move when the shift key isn't down according to the arrow keys, and it is supposed to resize the clip if the shift key is down _root.dis_one is storing the proper var, but i am having a trouble with the resizing part. It will rezise a pre-maid movie clip, but it won't resize my dynamic movie clips. is there a certain way to rezise a dynamic MC?
[Code]....
View 3 Replies
Sep 22, 2006
So i am building a site for a client, and in it i have incorporated an automatically cross-fading background made of large photos.Wheneve they cross fade programatically my CPU gets WORKED!
I am using
Code:
if (this.photo1.imageholder1._alpha<100-this.fadeSpeed) {
this.photo1.imageholder1._alpha += this.fadeSpeed;
}
as the fading command. Is it just a characteristic of flash that it HATES to do ALPHA changes?
View 6 Replies
May 1, 2009
I broke apart all JPGs and converted them to symbols.And they all have correct X & Y coordinates.But while tweening the JPGs shift a tiny bit. Anyone know how to stop the JPGs doing the jiggle shift error?(I've seen it before, and thought I could fix it by breaking apart the JPGs and making symbols out of them, but the JPGs still have that quiver bug now)
View 2 Replies
Aug 2, 2009
why the below script does not keep circularly shifting my array (ie. array = [1,2,3,4] -> [4,1,2,3]->[3,4,1,2] etc..)
var myArray:Array = new Array();
var tempArr:Array = new Array();
myArray[0] = 1;
[code]....
View 1 Replies
Dec 28, 2011
How can I pop or shift more than one element of an array in the same time? I have been searching, and I can't find the answer anywhere. My new project is to pop or shift 3 element of an array of let's say of 100 elements, and with a click of a button display them into a textfield having in mind the date factor. If today I click the button, it'll give me the same numbers, all the day; but when tomorow i'll click the button, it will give me another set of numbers all the day long, and so on. Do I make sense and continue, or I just forget about it ? I have the button, the array, how to acces the date, and flash CS 5.5. All I need I believe, is How to pop or to shift more than one element.
[Code]....
View 6 Replies
Jan 1, 2010
differencePercentage = Math.round(((Pay.init / Pay.current) * 100) - 100);
and that gives me the difference in percent between initial and current pay, but it's reversed. When it's positive i.e. pay is above the initial value it says -X%, and when it's below it says X%.
View 2 Replies
Jan 18, 2012
If I encode all colors into one single float value (RGB) as:
//Each Channels are from 0 - 255
red << 16 | green << 8 | blue;
How can I retrieve those color channels back in AGAL? There doesn't seem to be any bitwise operators.
View 2 Replies
Aug 9, 2011
I have attached and sample file with problem that show when you hover over the red link it shift the text. It only happens when I use antiAliasType = advance or my text field set to readability in combination to external or internal StyleSheet.
View 6 Replies
Jan 15, 2012
What I'm trying to do is take a recording from the mic which is converted into bytearray. It will look something like this
ActionScript Code:
function startRecord():void{
mic.addEventListener(SampleDataEvent.SAMPLE_DATA, micSampleDataHandler);
}function stopRecord():void{
mic.removeEventListener(SampleDataEvent.SAMPLE_DATA, micSampleDataHandler);
soundBytes.position = 0;
[Code] .....
View 2 Replies
Mar 28, 2003
I am trying to make something along the lines of http:[url]....isn't that cool? here is what i have so far http:[url]....
View 13 Replies
Mar 28, 2003
I am trying to make something along the lines of [URL] isn't that cool? here is what i have so far [URL] as u can see, i am way off here
View 13 Replies
Nov 9, 2005
I've looked in the documentation and found nothing. I'm in MX 2004 pro.
here's my code:
Code:
var arrayName = "name";
trace(arrayName);
var numberofPics = arrayName.length;
[code]....
when it gets to the 'trace("shifted = " + shifted)' it comes back as "shifted = " when it gets to the 'trace("ordered pic is " + shifted)' it comes back as "ordered pic is " so is it just that a variable can't be used as the name of an array when using shift and push?
View 4 Replies
Feb 28, 2009
How do you shift the colors of a bitmap image, with a red/yellow cloud, so that red becomes orange, then yellow, then orange, then red again? The yellow should go trough the same process, but start and end with yellow. Same with all the other colors in between.Kind of like when you play with the hue-setting in photoshop, but instead of looping trough the whole spectrum, it only loops trough red>orange>yellow>orange>red.
View 7 Replies
Jun 25, 2009
I found this tutorial on kirupa about identifying keyboard and using them to navigate,however I cant seem to get it to work using (shift) and left, right, up, down.I am going to use left and right arrows for one thing and shift left or right to do another.Does anyone know how to make this happen? Here is my code so far (not working for combing shift and value)
function reactToArrowKeys(keyEvent:KeyboardEvent) {
if (keyEvent.keyCode == 38) {
trace("Up Arrow pressed.");
[code].....
View 7 Replies
Apr 28, 2011
Say I have a video tutorial. This tutorial is one MovieClip we'll call oneMC (with text, movieclips, and sprites within it).I have a color picker that allows the viewer to change the background color.Any ideas on how to shift the color(s) of all the nested objects once this happens? I need everything to contrast with the background color. (hence black text wouldn't disappear on a black background).Changing the blend mode of oneMC to Invert. This works except ALL nested clips then have the same color. No good.I changed the .color attribute of oneMC to a tint of the background color's opposite (for anyone curious as to how you get it, subtract the user's selected hexadecimal color from 0xFFFFFF). This is ok, but not ideal. Colors appear washed out.Changing the hue. This works on everything but black objects/text.I don't want to resort to colorTransforming each individual child because the EnterFrame requisite is too cumbersome. I really need an elegant solution to keep processes down.
View 4 Replies
Oct 13, 2011
My name is jemerson, I'm from Brazil and I'm in big trouble this script only works when I do shift + enter into the flash ... when I open the swf outside flash does not work. I must use it on my website plus it also does not work on the server
[Code]...
View 4 Replies
Jun 17, 2011
I have discovered a bug with KeyboardEvent.KEY_UP keyLocation values for the shift keys. how to reproduce this:
1.when no other keys are down the value for left shift is 1 and for right shift is 2 for KeyboardEvent.KEY_DOWN and KeyboardEvent.KEY_UP
2. when you have pressed shift and then press another key - when releasing shift the value for left and right become 0.
There is absolutely no reason why these values should report anything other then what they initially reported on key down as each key fires its own event with details for each , regardless of any key combinations. Im using cs5.5 windows 7 basic.
View 6 Replies
Feb 11, 2010
I know that you can use the context menu using a right-mouse-click in a control to choose to cut, copy, paste, etc. I've also noticed that you can use the windows keyboard shortcuts CTRL-C for Copy and CTRL-V for Paste.
Windows supports native CTRL-Insert (for copy) and SHIFT-Insert (for paste).
However, within Flex, it seems these do not appear to work. Has anyone been able to either allow these keyboard events?
View 2 Replies