Need Mc To Zoom To Mouse X&y Coords.
Hey all,
I have an mc that when I press a key it will either zoom in or out. Right now it zooms in/out, but it does with with the up-left corner as the point to zoom from.
Can anyone direct me on how to zoom in/out where ever the mouse is relative to the mc? If the mouse is in the middle, then it zooms from the middle and so on.
Thanks!
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 07-12-2007, 06:54 PM
View Complete Forum Thread with Replies
Sponsored Links:
[F8] Need Mc To Zoom To Mouse X&y Coords.
Hey all,
I have an mc that when I press a key it will either zoom in or out. Right now it zooms in/out, but it does with with the up-left corner as the point to zoom from.
Can anyone direct me on how to zoom in/out where ever the mouse is relative to the mc? If the mouse is in the middle, then it zooms from the middle and so on.
Thanks!
View Replies !
View Related
Need Mc To Zoom To Mouse X&y Coords.
Hey all,
I have an mc that when I press a key it will either zoom in or out. Right now it zooms in/out, but it does with with the up-left corner as the point to zoom from.
Can anyone direct me on how to zoom in/out where ever the mouse is relative to the mc? If the mouse is in the middle, then it zooms from the middle and so on.
Thanks!
View Replies !
View Related
Mouse Coords.
How do i get the values of the coords. of the mouse
ANYWHERE ON SCREEN. even it the mouse is OUT SIDE of the flash window.
i am trying to make the "Eyeball looking at mouse" type of thing.
but i can only get it to recognize WITHIN the movie
Thanks,
TriAdX@aol.com
View Replies !
View Related
Do NOT Follow The Mouse Coords
I have found this FLA a while back, and I was wondering if it is possible to make the brackets not follow the mouse, instead, to be in the corner when starting, then going back when rolled off a link. If you download the FLA, you will see what I am talking about.
Thanks.
View Replies !
View Related
Mouse Coords Outside Swf File
_root._xmouse and _root._ymouse will detect the coordinates of the mouse while it's over the flash movie and those coordinates will be relative to the dimensions of the flash movie
is it possible to detect the position of the mouse on the screen? say for instance i have an html page with a small flash file in it and i wanted to detect the mouse coordinates anywhere on the screen for use as a variable in that flash file
possible?
View Replies !
View Related
Mouse Coords Return Problem
I am returning the position of the mouse position to two text boxes named "x_pos" and "y_pos". My code, in the main timeline, is as follows:
onClipEvent (mouseMove) {
x_pos = _root._xmouse;
y_pos = _root._ymouse;
}
When I test the movie, the response I in the output window is:
"Scene=Scene 1, Layer=Layer 1, Frame=1: Line 3: Clip events are permitted only for movie clip instances
onClipEvent (mouseMove) {"
The mouse is not a movie clip, nor is it ever unless I hide it and subsitute it for one, yet, this is the method taught in the F1 lessons. Any clue, anyone, as to what's being done wrong?
View Replies !
View Related
[F8] Movieclip Moves To Mouse Coords
i can get a movieclip jumping from its position to match the mouses coordinates when the mouse is clicked.
but how would i go about making the movie clip move towards the mousedown coordinates at a speed which i can state in the actionscript?
thank you.
View Replies !
View Related
Rotating A Circle Using Mouse Coords.
I'm trying to rotate a circle. I want the circle to rotate in relation to the mouse movement across the y axis. Here is my code so far:
onClipEvent (enterFrame) {
_root.xVal = Math.round(_root._xmouse-this._x);
_root.xMove = Math.round(_root.xVal/10);
this._x += _root.xMove;
_root.circle._rotation += _root.xMove*.4;
}
And here is the swf so far: HERE
As you can see, this is the idea i am getting at. I would like the globe to rotate CW when the mouse is moved to the right of the globe and CCW when the mouse is moved to the left of the globe. I would also like the globe to slow as it comes closer to the mouse, but faster as the mouse is further away.. similar to the box that moves above the globe.
When the mouse is put on the globe i woul like it to come to a stop slowly so that the user can select something. If anyone has any ideas please help.
Much appreciated,
Thanks.
View Replies !
View Related
Mouse Coords Detection Without OnClipEvent
MX04
I have an application where I need to detect if the mouse is less than 200 px from the left sie of the screen, then play an animation... Once the mouse is moved back out of the 200 px area I want the animation to reverse.
I'm using the Tween Class for animation and have been messing around with onclipevents with no luck like:
onClipEvent (enterFrame) {
if(_xmouse <= 200)
{
_root.theSwitch = "on";
}else{
_root.theSwitch = "off";
}
if(_root.theSwitch=="on")
{
trace("on")
}
}
(This has been dumbed down)
This will obviously produce a million "on" traces when the mouse is over there - what is the best method for detecting the change once, setting a variable, then playing the animation?
Thanks in advance!
View Replies !
View Related
Button: Zoom In Mouse Over, Zoom Out Mouse Out? (noob)
Please humour my ineptitude here. I want to make buttons that "zoom in" or scale up upon mouseover, depress on click and zoom out on mouse out. I figure I need a script for this withe on mouse over go to frame # whatever, but i dont fully understand the functions and commands of MX. Please would someone run me through what I would need to do to create this effect?
View Replies !
View Related
Can Flash Track Mouse X & Y Coords For Entire Screen? Help.
I've been fooling around with both a java & a flash xy mouse tracker...
Can flash/swf detect the mouse x & y coordinates OUTSIDE of the swf?
My problem is that as soon as I roll out of the swf borders it stops working.
So I guess I want to know how to track the x&y coords for the monitor/screen instead of tracking the x&y for the swf.
Seems tricky - what method is best if at all possible?
Any suggestions?
View Replies !
View Related
Back To Basics, Tracking Mouse Coords Into An Array
Hello all,
I've been reading through all the various threads related to the drawing API and saving drawings. About a hundred times I've seen mention of "log mouse positions into an array" and stuff like that, but I can't find any clear and simple examples of how to do this.
Let's take a very simple use of the drawing object to do freeform drawing. What is the AS to capture the mouse XYs as the user draws and put that into an array. I can't figure out how to get Flash to keep updating things as I go, it invariably grabs the fist point and that's it.
Could one of you AS gods just write out a super simple routine for this? I know I'm not the only one that needs this (as it seems to be asked every week)
Let's use the most basic drawing example I can find:
ActionScript Code:
_root.createEmptyMovieClip("line",1);_root.onMouseDown = function(){ line.moveTo(_xmouse,_ymouse); line.lineStyle(0,0x000000,100); this.onEnterFrame = function(){ line.lineTo(_xmouse,_ymouse); }}_root.onMouseUp = function(){ this.onEnterFrame = null;}
Where/what gets added to just capture all those _xmouse and _ymouse?
Thanks a bajillion everyone
View Replies !
View Related
Back To Basics, Tracking Mouse Coords Into An Array
Hello all,
I've been reading through all the various threads related to the drawing API and saving drawings. About a hundred times I've seen mention of "log mouse positions into an array" and stuff like that, but I can't find any clear and simple examples of how to do this.
Let's take a very simple use of the drawing object to do freeform drawing. What is the AS to capture the mouse XYs as the user draws and put that into an array. I can't figure out how to get Flash to keep updating things as I go, it invariably grabs the fist point and that's it.
Could one of you AS gods just write out a super simple routine for this? I know I'm not the only one that needs this (as it seems to be asked every week)
Let's use the most basic drawing example I can find:
ActionScript Code:
_root.createEmptyMovieClip("line",1);_root.onMouseDown = function(){ line.moveTo(_xmouse,_ymouse); line.lineStyle(0,0x000000,100); this.onEnterFrame = function(){ line.lineTo(_xmouse,_ymouse); }}_root.onMouseUp = function(){ this.onEnterFrame = null;}
Where/what gets added to just capture all those _xmouse and _ymouse?
Thanks a bajillion everyone
View Replies !
View Related
How Can I Do Zoom In And Zoom Out With Mouse?
Hello Dear Friends,
hi,
Dear there is a web site
http://www.amplifier.com/
here he has used a very good navigation.
When we click on (+) button it zoom in and when we click
on (-) button it zoom out.
and there is also a smoothness when we click on any button.
it move smoothly.
it is not only on website that have used this type of navigation, there is a lot of websites now a days that have used this type of.....
i have searched a lot of, but i can't get any help?
I want to know how it is possible to do this to zoom in or zoom out with mouse.
If someone have a link or tutorial or and suggestions
then please tell me i shall be very thankful to you for this
purpose.
Your Sincerely,
Amir
View Replies !
View Related
[F8] Zoom On Mouse Over
I have a vectorial map with some landmarks and I want that when you pass the mouse over the landmarks (a mc or a specific x,y) you zoom in that zone of the map and on mouse out, the map goes to the initial position.
I have found a way to to that with the map "moving" all the time, what I'm asking for is the same as that but keeping the map always in the same position....
Hope anyone can help!
View Replies !
View Related
Zoom To Mouse X & Y
Folks,
Got a question regarding a zoomable map I'm building. I've got the zoom function sorted, but I'd like to build something that zooms in on the current mouse position, rather than setting the map's x & y to that of the mouse, that's not quite right, attached is the code I'm using, anyone any ideas how I acheive this?
ActionScript Code:
onMouseDown = function() { curMouseX = _root._xmouse; curMouseY = _root._ymouse; map._xscale += 10; map._yscale += 10; map._x = curMouseX; map._y = curMouseY;}
Cheers
View Replies !
View Related
Zoom - Like OSX Dock W/o Mouse...
Ok so i have five images, at 50%, that scroll left and right across the screen, when they get in the center of the screen they are supposed to gradually get larger until, when they are in the center of the screen, they are 100%. Also when the mouse moves right or left, it scrolls right or left. I can do that, but the closer to the edges it's supposed to move faster, yet still be smooth.
I've gone in circles and finally decided to ask and see if anyone has any good ideas of what to try.
It's kind of like the OS X dock only instead of getting bigger when the mouse rolles over it, it get's bigger when it's closer to the center of the movie, and it scrols right or left depending on where the mouse is.
Any help would be great.
Twister
View Replies !
View Related
Zoom In/Out Picture Using Mouse (X,Y)
Hi!
I have problems with zooming in/out picture on mouse click. For example:
When I click on specific coordinate on the picture it should zoom it in 400% and apear at the center of my Movie Clip. Unfortinuntly it doesnt work for me. The problem is that it zooms completly different coordinates NOT that ones that I've specified.
If anybody had the same problem please help me (dont send me links from FlashKit.com Ive already checked all of them). I'll be very happy to see the source file.
Source right here: http://www.rvprojects.com/map
Email: id_dmitri@hotmail.com
Thanx
View Replies !
View Related
Zoom Into Image Where X/y Mouse Is
Hi im having a problem trying to figure out how i zoom into an image (contained in a MC) depending on where the mouse is positioned. I've looked at a sample movie on flashkit but its code is really complex - almost like another syntax.
So what i'd like to do is:
1.Click on an MC (scaled at 60%).
2.Calculate what part of the MC is the focal point.
3.Scale the image to 100% with the focal point in the location of the mouse.
I would post some code here - but i've written and deleted so many versions of this.
Would really appreciate some help.
Thanks
B
View Replies !
View Related
Zoom Effect With Mouse Over
i am going to make several lines of text appear where each letter will come in one by one, so they are all going to be different objects (movie clips or graphics). when they're done i want to have the text to have an mouse over effect...
i want it to zoom in on mouseover, but not all at the same time and same size. so that the letter right under the mouse is zoomed in most and that other ones nearby are zoomed in little bit less and the ones further away even lesser. and i want the zoom to be gliding, so that you see the zoom in happening.... and the other way around so that when you move away from the letters they will be zooming out to original size.
pff it's hard to explain escpecially in english...
i hope that someone can help me out with this
i know that is been done before but don't know how to do it...
thanx in advance
waarzegger
View Replies !
View Related
Wheel Mouse Zoom
Anyone know if you can set the wheel mouse to be zoom in and out when using the flash editing environment? The default for the wheel is to scroll the current scene up and down which is pretty useless, but if it could be zoom ( similar to Photoshop ) it would be very handy.
Thanks
James
View Replies !
View Related
Zoom Into Mouse Position
Can anyone tell me if this is possible with flash?
Say I have an image on the stage - When the user mouses over it, it enlarges from the point where the mouse is and not just from the centre as would usually happen. Make sense???
View Replies !
View Related
Mouse Wheel ZOOM?
Hi I would like to apply a zoom feature where the user can scroll the mouse wheel to zoom in and out on a movieclip. I currently have zoom implemented as buttons. How would I go about implementing the wheel action?
button zoom code:
code:
small.onPress = function(){
ROOT.onEnterFrame = function(){
zoom._xscale*=0.9;
zoom._yscale*=0.9;
checkBounds(0,0,0,0);
}
}
small.onRelease = function() {
delete ROOT.onEnterFrame;
}
small.onReleaseOutside = function() {
delete ROOT.onEnterFrame;
}
big.onPress = function(){
ROOT.onEnterFrame = function(){
zoom._xscale*=1.1;
zoom._yscale*=1.1;
checkBounds(0,0,0,0);
}
}
big.onRelease = function() {
delete ROOT.onEnterFrame;
}
big.onReleaseOutside = function() {
delete ROOT.onEnterFrame;
}
View Replies !
View Related
Zoom In To Mouse Position
i am trying to create a function that when you click takes the x & y co-ordinates of the mouse position and either zooms or scales in at that place.
i have looked around for ages but cant seem to find anything in AS3 that could help me, does anybody know of a tutorial or some existing code i could study?
thanks
Dan
View Replies !
View Related
Mouse Scroll Zoom
Hey, this took me a LONG time to sort out so i thought i'd post it online so others find it easier.
This allows you to zoom on a mc with the mouse scroll while keeping the mc centered by the cursor.
ActionScript Code:
addEventListener(MouseEvent.MOUSE_WHEEL, Zoom);
function Zoom(e:MouseEvent):void
{
var mod:Number = 10;
map_drag.scaleX += e.delta / mod;
map_drag.scaleY += e.delta / mod;
map_drag.x = ((2 * mouseX) - (2 * (e.localX * map_drag.scaleX))) / 2;
map_drag.y = ((2 * mouseY) - (2 * (e.localY * map_drag.scaleY))) / 2;
}
Hope this helps
View Replies !
View Related
Zoom In On Mouse Click
Hi Guys,
i am working on a magazine (just to learn as3 and xml).
It currently works by pulling in all the content, images, buttons, vids using xml. I would like to give the user the ability to zoom in closer on the magazine. it would work by the cursor changing from a pointer to a magnify glass when the cursor hovers over the magzine and zoom in when the user clicks the mouse (left bttn).
Can this be created using as3?
some pointers would be nice
cheers
dazzclub
View Replies !
View Related
Square Zoom On Mouse Over
how can i make a square zooming continuesly on mouse over
the script i've written is not working . it is working once on rollover.
-----------------------------------------
square.onRollOver = function() {
i=2;
square._width = square._width+i;
square._height = square._height+i;
for(i=0;i<=400;i++);
};
---------------------------------------
View Replies !
View Related
Zoom With Mouse (over) On Image
Hi,
I have an image 600x50 and I would like to zoom in on rollover.
When i rollover on the image its zooming in but from the center of the picture.
I would like to also be able to zoom when I mouse the mouse to the left or to the right so I zoom on specific areas.
How do I do that ?Can someone help me?
Thank you,
Melissa Anne
View Replies !
View Related
Mouse Wheel ZOOM?
Hi I would like to apply a zoom feature where the user can scroll the mouse wheel to zoom in and out on a movieclip. I currently have zoom implemented as buttons. How would I go about implementing the wheel action?
button zoom code:
ActionScript Code:
small.onPress = function(){ ROOT.onEnterFrame = function(){ zoom._xscale*=0.9; zoom._yscale*=0.9; checkBounds(0,0,0,0); }}small.onRelease = function() { delete ROOT.onEnterFrame;}small.onReleaseOutside = function() { delete ROOT.onEnterFrame;}big.onPress = function(){ ROOT.onEnterFrame = function(){ zoom._xscale*=1.1; zoom._yscale*=1.1; checkBounds(0,0,0,0); }}big.onRelease = function() { delete ROOT.onEnterFrame;}big.onReleaseOutside = function() { delete ROOT.onEnterFrame;}
View Replies !
View Related
Mouse Scroll Zoom Tip
Hey, this took me a LONG time to sort out so i thought i'd post it online so others find it eaier.
This allows you to zoom on a mc with the mouse scroll while keeping the mc centered by the cursor.
Code:
addEventListener(MouseEvent.MOUSE_WHEEL, Zoom);
function Zoom(e:MouseEvent):void
{
var mod:Number = 10;
map_drag.scaleX += e.delta / mod;
map_drag.scaleY += e.delta / mod;
map_drag.x = ((2 * mouseX) - (2 * (e.localX * map_drag.scaleX))) / 2;
map_drag.y = ((2 * mouseY) - (2 * (e.localY * map_drag.scaleY))) / 2;
}
Hope this helps
View Replies !
View Related
Square Zoom On Mouse Over
how can i make a square zooming continuesly on mouse over
the script i've written is not working . it is working once on rollover.
-----------------------------------------
square.onRollOver = function() {
i=2;
square._width = square._width+i;
square._height = square._height+i;
for(i=0;i<=400;i++);
};
---------------------------------------
View Replies !
View Related
Mouse Wheel ZOOM?
Hi I would like to apply a zoom feature where the user can scroll the mouse wheel to zoom in and out on a movieclip. I currently have zoom implemented as buttons. How would I go about implementing the wheel action?
button zoom code:
[AS]
small.onPress = function(){
ROOT.onEnterFrame = function(){
zoom._xscale*=0.9;
zoom._yscale*=0.9;
checkBounds(0,0,0,0);
}
}
small.onRelease = function() {
delete ROOT.onEnterFrame;
}
small.onReleaseOutside = function() {
delete ROOT.onEnterFrame;
}
big.onPress = function(){
ROOT.onEnterFrame = function(){
zoom._xscale*=1.1;
zoom._yscale*=1.1;
checkBounds(0,0,0,0);
}
}
big.onRelease = function() {
delete ROOT.onEnterFrame;
}
big.onReleaseOutside = function() {
delete ROOT.onEnterFrame;
}
[/AS]
View Replies !
View Related
Right Mouse Click/Zoom In
Is there a way to simulate the effect of right mouse click/zoom in?
I have to forbid the menu on right click, but I was wondering is there a simple way to get the same result without write an actionscript to scaling the main movie and drag it with the mouse
View Replies !
View Related
Mouse Over Text Zoom
I want to make my lines of text enlarge when a mouse rolls over each line and the nearest adjacent lines to gradually get smaller until the reach the main text block size. If i'm not making much sense the nearest example I can think of would be the way you drag your mouse over the aplications panel in mac osx...the icons enlarge as you roll your mouse over them.
I'd be grateful of any help.
Thankx
View Replies !
View Related
Zoom According To Mouse Position
Hi, I have a stupid effect question,
I used to know how to do it but now I'm like totally forgot the way to do it, I haven't use Flash for 2 monthes now and forgot all the logic and stuff...so sad...
here's what I want to do,
there's a movieClip on the stage, and when the mouse get closer to it, it become's larger and larger to a certain size, and when the mouse move away from it, it gets smaller and smaller to its original size...please help me, it feel so terrible when you forget what you used to ba able to do....T_T..thanks a lot for your help guys..
View Replies !
View Related
Zoom On Mouse Over Move To Front
I need help with scripting.
I have 7 graphics and on mouseover I want them to Zoom to fill the blue dotted line I have in layer 2.
I also think ther will be a problem with over lapping. The script would have to bring to front.
File is attached in link.
Download Link
View Replies !
View Related
Zoom On Mouse Over Move To Front
I need help with scripting.
I have 7 graphics and on mouseover I want them to Zoom to fill the blue dotted line I have in layer 2.
I also think ther will be a problem with over lapping. The script would have to bring to front.
File is attached in link.
Download File
View Replies !
View Related
Zoom On Mouse Over Move To Front HELP
I need help with scripting.
I have 7 graphics and on mouseover I want them to Zoom to fill the blue dotted line I have in layer 2.
I also think ther will be a problem with over lapping. The script would have to bring to front.
File is attached in link
I will have photos in each one of my graphics and it will zoom large in the center of the page. As of now I have a number to hold the place of each photo. Each time I hove a graphic it will swap out and zoom to the center.
Can anyone help?
null
View Replies !
View Related
3D Plane With Mouse Move Zoom And Pan
I'm goint to need help determining how to make a 3D plane, such as a forest with trees. I want the user to mouse over the plane to pan and zoom through the forest. I can do timeline, but as far as actionscript goes I only know really basic stuff. Can anyone point me in the right direction with what to study, or how to proceed?
Thanks.
View Replies !
View Related
Zoom On Mouse Over Move To Front
I need help with scripting.
I have 7 graphics and on mouseover I want them to Zoom to fill the blue dotted line I have in layer 2.
I also think ther will be a problem with over lapping. The script would have to bring to front.
File is attached in link.
Download Link
View Replies !
View Related
Zoom And Center MC At Mouse Click?
Hi,
I've searched some to find a smooth solution and tried several different things but I can't seem to find that smooth zoom-and-center solution yet.
I have a MovieClip that I want to zoom in, let's say 25%, at each click by mouse. That much I can handle with xscale/yscale but I want the MC to smoothly zoom to center the point that was clicked.
B ut i can't seem to find the math behind it. It sounds simple but I'm stuck.
Anyone done this before that can give me some help or ideas?
Thanks!
View Replies !
View Related
MC Image Zoom On Mouse Click & Position.
Howdy all again,
I have a picture of a product within an MC that I'd like to zoom in and out behind a mask with a click and is restrained within the size of the MC.
Something like this that I found on this forum.
http://www.flashkit.com/movies/Inter...8487/index.php
I have no idea what I am doing..ha and for some reason it doesnt want to work when I replicate it in a new flash pro 8 doc.
What id like is to have that example work as or inside an MC and only when the mouse is over it. Am I asking for too much?..ha
If someone could figure it out for me there will be a "virtual" slab of beer in it for them. Pointing me in the right direction might help just bear in mind my website is built around the cut & paste method..lol
Cheers.
View Replies !
View Related
Zoom Moive On Mouse Click Location
Below is a simple actionscript I had applied to a button to zoom in. I want this same type of zoom to happen but don't want it applied to a button. I want to be able to zoom in on the area in which the mouse is clicked.
Question 1: Is there an actionscript to zoom in with the click of a mouse, not using a button or any other object? If so, can it zoom out on next click?
Question 2: Considering Question 1 is possible... Once zoomed in, is there a way to have the user to view other parts of the stage?
EXAMPLE LINK: http://www.ashevillevisitorguide.com/
on(press) {
movie._xscale=200;
movie._yscale=200;
}
//
on (release) {
movie._xscale=100;
movie._yscale=100;
}
Any thoughts, input, or ideas is always appreciated. Thanks in advance!
Luke
View Replies !
View Related
X & Y Coords
Can you drag an object/clip only by the X or Y coords of the mouse, not by the center? I want to create an effect like http://www.yigal-azrouel.com/.
I posted this with the wrong subject before:/
-Lissa
View Replies !
View Related
Coords
Hi there
could someone help me with this thing i want to make for a web site. so what i want is just a simple cross made out of two lines but working so that when i move the mouse on the screen those lines will follow the pointer. and as it is the coordinates of the mouse will appear next to the pointer. there must be a script to do that or a tutorial which i could follow to make that script. i have some experience from scripting, but i would love to get some help on this one. cheers.
Tero
or tero.helenius@suomi24.fi
View Replies !
View Related
X 'n' Y Coords
Hi,
I have set up a MC that detects and displays the mouse coordinates. However, I want it to have X_ and Y_ before that actual coords. How do I do that?
Thanks as always.
YP
View Replies !
View Related
|