ActionScript 2.0 :: Zoom Using The Mousewheel?
Aug 14, 2008I am working on a zooming file. I want to zoom using the mousewheel
View 3 RepliesI am working on a zooming file. I want to zoom using the mousewheel
View 3 RepliesI want to make a scope wich can zoom in on button click and go back to previous stage (zoom out) also by clicking a button.Now i made it work for zooming in (when i click my button it zooms) but when i want to zoom out everything i tried didn't work .Here is the code:
//button for zoom in
zoom.addEventListener(MouseEvent.CLICK,glassMove);
function glassMove(event:MouseEvent):void{[code]..............
i've made a button that zooms into a movie clip on a rollover, but it on moves it a certain amount each time you rollover the button. code below:
on (rollOver){
_root.Mypic._width += 5;
_root.Mypic._height += 5;
}
wot i want it to do is to continue zooming in for as long as the mouse is over the button, is there anyway i can change the code to zoom in at the same amount but do it continuously until the mouse is moved off the button. Also is there anyway that i can set it so that the zoom stops at a certain percentage, i.e. it only zooms in so much and then stops. What i mean is that the user can zoom in but the picture will only zoom in to say 200% of the original size.
I am working on flash application TELESCOPE or Camera. My goal is to move around the scene and zoom-in or zoom-out I found that if I move scene, I have to move registration point, because I always want to zoom in the centre of my ocular. So far application works fine only if I move, zoom-in and than before I move any further, zoom-out! But when I move, zoom-in (not fully), move again and zoom-in again, the second zooming doesn't appear on desirable registration point
View 1 RepliesI have this code for my effect to zoom in and zoom out in certains buttons
canada.addEventListener(MouseEvent.MOUSE_OVER, canadaover);
function canadaover(event:MouseEvent):void
{[code]....
the problem is when u reach certain corner of the button it kinda gets into a loop, any ideas how can i fix this?
Using flex / air 2.6 working on an Android device, I am using a canvas with a TransformGestureEvent for zoom in on a map. The listening of the efect is working ok, but I can´t seem to find the information on wether the user intended zoom in or zoom out (fingers getting closer or getting apart).I expected the intention of the gesture to be identifiable with the offsetX and offsetY properties of the event, as you will do on a swipe gesture event. But I always get 0 for both properties, no matter how I do the gesture in the device.How can I know if the fingers getting closer or getting apart in a gesture zoom event?
View 1 Repliesi had a flash file, and the image was dynamically loaded in a movieClip. when i double click the image it will zoom max. and another double click it will retain its best fit.
View 0 RepliesDoes the mouseWheel command work on a mac? Because various tutorials won't let me use it when I go to see examples. Also I was reading some where, might of been flashkit that it was windows only. Is this true? Because I want to add it to my site if possible.
View 7 RepliesI need to have a button to be clicked for the zoom effcet to be activated, then when the mouse hovers over an image it should zoom to 200%. I have 40 images which I'd like to have this effect by.Also when the cursor is over the image is it possible to make the change the cursor to a magnifying glass?
View 1 RepliesI'm developing a full screen zoom/pan UI. Everything is working great, except I can't get it to center on the correct point when zooming in.
You can view what I have here: [URL]
The numbers in the top-left corner are the navigation, and the white boxes represent the individual sections.
I have a large container movieclip that fills the entire page. Inside of that movieclip (site) I have all of my individual section movieclips (section1-section6). I'm also using a dynamic registration point class to dynamically set the registration point of the "site" movieclip to the current selected section, so that the zoom in/out is centered on that section.
When a user clicks on a navigation item, I first reduce the _xscale and _yscale of "site" to 80, when that is complete I move _x and _y to the position of the selected section's movieclip. When that is complete, I set the _xscale and _yscale back to 100. Right now, it is not zooming in centered, so I have a final step where I correct the _x and _y position after zooming back in.
If I don't zoom in/out I can successfully pan the movieclip and center on the correct section. I believe the problem is that I am moving the _x and _y to the position of the "site" movieclip as if it is at 100%, but since it is at 80% it is not moving to the correct position. I tried to fix this by giving the _x and _y coordinates as:
endX = endX / 100 * 80;
Which made it a little better, but still not centered. I have a feeling that there may be a fundamental flaw in my approach to this.
For some reason the forum won't let me attach my .zip, so I posted it online, as well: [URL]
My code below, in case you don't want to download the file:
Code:
tile._alpha = 0;
currentSection = section1;
//** Set Stage **//
[Code]....
How to make several MCs to zoom in on mouse over and zoom out to it�s original scale on mouse out??? all this with actionscript and with some ease (elasticity) to make the motion more natural?
View 2 RepliesI need to have a button to be clicked for the zoom effcet to be activated, then when the mouse hovers over an image it should zoom to 200%. I have 40 images which I'd like to have this effect by.Also when the cursor is over the image is it possible to make the change the cursor to a magnifying glass?
View 3 RepliesI have created a rotating menu movie from tutorial from here http:[url]....and changed the script a little.i am now trying to add a mouse wheel scroll that I found from here;http:[url]....The code being:
// Import MouseEvent
import flash.events.MouseEvent;
Create MouseWheel Event[code]....
but when I paste the code in, the rotating menu disappears, seems like there is an error with the script somewhere, can anyone help find where?
I'm hosting a flash game on a site on Heroku, built in Ruby on Rails. For some reason, the mouse wheel functionality isn't working in Firefox and Chrome (although it works in IE). This wasn't a problem when hosting the game on other sites.
View 1 Repliesi've a scrollable dynamic text attached to a UIscroller, how to i nsync my mouse wheel to the text so that it will scroll?
View 0 Repliesi got a scrollbar script wich works fine for me. it scrolls dynamic content and all.I only tried to add a mousewheel function. i just can get it to work.[code]
View 3 RepliesTrying to get a swf with a mousewheel to work on a mac
ran across this but don't quite get how to implement it...
[URL]
thoughts? i get what he's saying, but don't get where he is coding "example"
how do you edit a movie so that when you right click the movie...it wont show all the things like "zoom in" or "zoom out"???
View 2 RepliesI'm trying to handle the mouseWheel event in an advancedDataGrid with not success. Without any additional code my adg can be scrolled with the mouse in IE but not in firefox and Chrome, why? Why does it behave different in that browsers?[code]
View 1 RepliesI'm trying to move a scrollRect up and down using the mousewheel. that part i've got fine but now i wanted to add easing and am not sure on the maths..
ActionScript Code:
function handleMouseWheel(event:MouseEvent):void {
var rect:Rectangle = this.scrollRect;
var scrollSpeed:int = 10;
[code]....
I am attempting to use the mouse wheel with the UIScrollBar as3 component. I know the MOUSE_WHEEL event does not work on a MAC, only PC. I would like the user to be able to scroll using the mousewheel and the content as well as the Scrollbar updates (on a PC). The main issue that I can't figure out is how to update the scrollbar.
Code:
Select all//mcBorder is the visible content area
//mcContainer is the content that should scroll
var sb:ScrollBar = new ScrollBar();
addChild(sb);
setScrollBar();
addEventListener(MouseEvent.MOUSE_WHEEL, wheel_event);
[Code] .....
Since last few hours I'm trying to add mouse wheel feature (i.e. scrolling on mouse wheel movement) in MX components (scroll pane, list box) but in vain.
View 2 Repliesget the mousewheel working with my tree component? I have this code - but it doesn't seem to work. hmmmm [AS]var mouseListener:Object = new Object(); mouseListener.onMouseWheel = function(delta) { trace(delta); trace('hello'); } Mouse.addListener(mouseListener);[/AS]
View 3 RepliesDesigning a flash website with a Flash-scrollbar that works with the mousewheel on your mouse. It works on pc, EXCEPT that you have to click the swf first to get focus on the swf. I used an onLoad javascript to set the focus to the swf, but that doesn't work. You still have to click the swf, after that you can use the mousewheel on your mouse to scroll. Here's a working example: [URL].
View 3 RepliesDoes anyone know how to make this scrollbar also function with mousewheel ?[URL]..Ive been looking for a solution for a while, but still didnt find it
* edit: Im sorry for posting this twice admin. The first post didnt show for me the first 10 min, so i made another one :s
However I am using embedded .swf files, and the scrollable image I want to control is on _level10 (within a master file _level0). I am decent with actionscript and based on tests with the example file, I know the code works. BUT my problem is getting it to function within a different flash level. I'm about 99% sure it isn't working because the code is looking for my movieclips or the scroll function on the main timeline and not that of _level10, but I can't figure out where the code I need to change is. Its driving me crazy.Here's the code (from the above link). This goes into the main timeline, where "area1" is the movieclip you hover over to enable the mousewheel and "mc1" is the mc that is moved by the mousewheel:
Actionscript Code:
// IMPORT import FlashCommon.MouseControl;import mx.utils.Delegate;Stage.scaleMode = "noScale";// ADD SCROLL FOR AREAS - addScroll(id, mc, function)//// adding scroll
[code].....
I've a dynamic text field, populated from an external file,and with a scrollbar. I'd also like it to respond to mousewheel or trackpad scrolling. I have tried setting mouseWheelEnabled to true,but that doesn't seem to do the job (and seems to require clicking the field anyway). What else should I be looking at? Would I also need so listen for the mousewheel or scrolling event?
View 13 RepliesI'm working on a menu system in flash. If the mousewheel scrolls up each menu item shift up and visa versa for mouse wheel scrolling down.
The problem I have is there seems to be multiple "steps" going on.
In my mouse wheel handler I trace out the text "wheel" to test. If I mouse the mouse wheel just once "wheel" gets traced out twice. So for every one mouse wheel move my handler is being called twice and thus the scrolling of my menu always skips an item.
I am using the scroll in a swf file.. is there anyway to disable the scroll mousewheel on all browsers. I get it working for IE and FF but Webkit is not working:
$(document).ready(function() {
$("#ebook").hover(
function () {
document.onmousewheel = function(){
[Code]...
I'm trying to change event for mousewheel after leaving / entering flash content.
on flash - I want to scroll flash carousel
on web - I want to scroll web content
My problem is:
Different browsers give different "focus" for flash element and therefore not properly triggered in events: Event.MOUSE_LEAVE, MouseEvent.MOUSE_OVER. I have JS triggered for MOUSE_OVER and MOUSE_LEAVE but this seems not to work.
Also mouseWheel is attributed to the browser, not a flash object.
Firefox 4.x/5.0 - fires them properly, without clicking Chrome 12.0.742.112 - it fires after the grant of "focus" or click on the flash object, like IE 9.0.1
JS code:
function stopWheel(e){
if(!e){ e = window.event; } /* IE7, IE8, Chrome, Safari */
if(e.preventDefault) { e.preventDefault(); } /* Chrome, Safari, Firefox */
[Code]....