Scroll Wheel - Control Page Scroll?
Alrightly... So I have a flash file that is 750 x 1000 px and is embedded into an html page. Since it's height is a 1000px in order to see the whole flash file one needs to scroll down on the page. This is fine except that when people are working with the flash file (have clicked on it) and then want to use the scroll wheel it won't scroll the html page..
I realize this is because in flash you can assign your own properties to the scroll wheel. But is there a way to have the scroll wheel perform it's normal function of scrolling the html page?
I'm not sure if there is an easy way or if I would have to write some code for flash to call javascript to scroll the page? I know people must have run into this problem before and probably have some good solutions.
Thanks in advance
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 04-28-2007, 08:49 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Mouse Wheel Makes The Html Page Scroll ?
Hi,
I'm trying to use mouse wheel without scrolling the html page.
Somebody had the same problem here, but no solution so far : http://readlist.com/lists/chattyfig....s/4/23733.html
Even when the mouse cursor is over the swf, using the mouse wheel scroll down and up the html page which is nearly impossible to use.
[scroll] Scroll That Reacts To The Mouse Wheel
Hy guys,
Do you know how can I make a scrollable text that reacts to the mouse wheel. Here you can see an example: link here
Look at the news section, or at the about us section.
The majority oh the text scrollers on the web didn't react at the mouse wheel. I found this site and I was surprised when I found that I can scroll with my mouse wheel.
Hope some one knows how they do that.
Thx.
Scroll Wheel?
Does anybody know how to make the scroll wheel work in flash mx?? It's only in my macromedia apps that it doesn't work?
Mik
Scroll Wheel
Hey guys I know you can select a button to whether or not to use scrolling with scroll wheel on mouse.
Is there a selection button (or something) than enables a viewer to use/not use the scroll wheel on the mouse.
The reason I wonder is because I have a few sites and all of them scroll with the scroll wheel.
The last site I made, I can't get the scroll wheel to scroll down the site if I click in the flash area. The text in the flash area scrolls but the interface doesn't unless I click outside of the flash area and on the HTML page.
Any ideas?
Thanks
Scroll Wheel
Hi
I'm currently making a game and I want the player to be able to use the scroll wheel to switch between 5 weapons. I used this code:
(First Frame)
ActionScript Code:
var mouseListener:Object = new Object();
(Main Code for the Game)
ActionScript Code:
mouseListener.onMouseWheel = function(delta) {
nofiring = true;
divideDelta = delta/9;
weapon = weapon + divideDelta;
if (weapon>5) {
weapon = 5;
}
if (weapon<1) {
weapon = 1;
}
};
Mouse.addListener(mouseListener);
I found the 'divideDelta = delta/9' part by trial and error. This code worked fine on my PC. But when I tried it on another PC, the scroll wheel jumped between weapons 1,3 and 5. All I can presume is that the wheel is more sensitve on the other PC. Could anyone please tell me a way of using the scroll wheel to consistently change a variable?
Scroll Wheel
I'm not sure if anyone else has had this problem or not but say I have a multi line textfield in a flash file loaded in the browser, with a scroll bar—the scroll wheel on the mouse only works when used on a pc and not on a mac.
the scroll button on the mouse will scroll through the textField in the flash file only when viewed on a PC. I'm on two separate Macs and it doesn't work when viewing through the browser on the mac. Same browser (Firefox) on both platforms.
Strange too, becuase the files are all created on the mac. I just use the PC to test the projects. Anyone else know of this?
The Scroll Wheel ?
hi there... is it possible to use the scroll wheel from your mouse in flash? i know you can get the info from javascript but is there an other way, because i need it in a projector...?
Scroll Wheel Code?
I just came back from the Flash MX forum and I am wondering what the code would be for Flash MX (not '04) mouse wheel. If I remember correctly, Player 7 beta came out before MX 2004. What would the code be for triggering something when mouseWheel is used (or is there)??
Scroll Wheel Ideas?
can anybody give me any ideas on how to construct a scroll wheel like the one on the iPod?
i've tried using multiple pie slice shaped movies and determining which direction to scroll based on hitTest. but this is proving to be weak.
any other ideas?
thanks.
Scroll With The Mouse Wheel
I need to make the followin' thing: the scoll wheel must scroll the dynamic text field. Any ideas on the script, guys?
Horizontal Scroll Wheel ?
hey im new to this..
im trying to create a horizontal scroll wheel for boxes on my media page..
so the viewer can scroll through different pictures and videos
can anyone help me ??
thanks a lot
Scroll Bar And Mouse Wheel
Hello Flashers.
How many times have you read that one???
Okay here's the thing;
How do you get the "mouse wheel" to work just like it does on a regular html page, is there a code for this?
And
Since I'm still learning, I geuss I'll always be learning and I'm okay with that, I don't know how to make the scroll bar component that comes with FLAS MX work on a Movie Clip like it does on a text field so I kind of made my own, well almost.
I got the top and bottom buttons of the scroll bar to work, it's the center bar part that's a pain. I looked at one of the Samples that comes with Flash MX, "Movement-sliders.fla" and it was kind of helpful but I'm still lost when it comes to the advamce coding. I got the intended target to scroll but I couldn't control it like I can the buttons, and I also couldn't make the bar move up or down when clicking on the bottuns.
Any daring soul/flasher want to take a shot at this?
Thank You
Peace
Jose Antonio
[F8] Scroll Wheel Works In IE, But Not In FF?
Hey gang,
I can't figure out why on earth it's doing this, but a datagrid I am using will not enable the scroll wheel when viewed in FireFox. Basically, I wanted to use a datagrid so that I could control 3 columns of xml-driven text with one scrollbar. I set the background component of the datagrid to invisible, which also got rid of the datagrid functionality (sorting by column, rollOver, clicking), which was fine with me since all I need for this project is non-interactive textboxes that I can control with one scrollbar. It works fine in IE, but in FF it doesn't. Anyone have a clue why?
PHP Code:
showDG.showHeaders = false;
obj = {_visible:false};
_global.styles.ScrollSelectList.setStyle("backgroundColor", obj);
_global.styles.ScrollSelectList.setStyle("vGridLines", false);
showDG.mouseWheelEnabled = true;
showDG.setStyle("borderStyle", "none");
showDG.setStyle("fontFamily", "arial");
showDG.setStyle("color", "0xB2A399");
showDG.setStyle("fontWeight", "bold");
showDG.setStyle("fontSize", "11");
showDG.columnNames = ["showDate", "showVenue", "showLocation"];
var temp = showDG.getColumnAt(0);
temp.width = 115;
temp = showDG.getColumnAt(1);
temp.width = 160;
temp.setStyle("textAlign", "center");
temp = showDG.getColumnAt(2);
temp.setStyle("marginLeft", "20");
temp.width = 152;
//------ Begin XML Search ----//
var myXML:XML = new XML();
//ignore the white space
myXML.ignoreWhite = true;
myXML.load("shows.xml");
//Search XML file for results
myXML.onLoad = function(success) {
if (success) {
var showNode = this.firstChild.firstChild;
while (showNode) {
var insert_obj = {showDate:showNode.childNodes[0].firstChild.nodeValue, showVenue:showNode.childNodes[1].firstChild.nodeValue, showLocation:showNode.childNodes[2].firstChild.nodeValue};
showDG.addItem(insert_obj);
showNode = showNode.nextSibling;
}
} else {
trace("There was an error!");
}
};
Any help is most appreciated!
Getting A The Scroll Wheel To Work
How do I make something scroll wheel compatible? and not specifically for a scrollbar. Could someone let me know? Is there a tutorial or source anywhere?
Scroll Bar And Wheel Mice
With Flash MX, placing a scrolling text box into your applications, or web-based projects has become quite easy.
Something I had found out, though is that you cannot use the wheel on a mouse to scroll the information.
Does anyone have a solution for this issue, as it has come up a few times with the online application that I had created in the scrollable text boxes. I guess they want to make it even simpler.
Thanks in advance!
-Kevin Taylor
Marketing Publications
Datamax Corporation
Orlando, FL
Wheel Scroll Going TOO FAST..
Hi, I'm trying to get a script to use the wheel to scroll things. I've searched and found a few things out there, but now I'm stuck with a minor problem...
My script works fine, it scrolls, it stops to prevent the content from going out of the stage... The problem is if I leave the frame where this scroll is, and later come back, it goes TWICE AS FAST, etc, etc..!!!
I've got a textfield that display the "delta", and it doesn't change, it's always 4 or -4... But the amount by what it moves the content, each time I leave and come back, goes up by 4..!!!
I'll post my code, but d'you guys have any idea why it does that.??
Code:
clip_mc._y = 0; // i set my MC to make sure it starts at 0
mouseListener = new Object();
mouseListener.onMouseWheel = function(delta:Number) {
if (delta > 0) { // checks if i scroll up or down
if (clip_mc._y < 0) { // checks to make sure I don't scroll too far
clip_mc._y += delta;
} else {
clip_mc._y = 0;
}
} else {
if (clip_mc._y > -50) {
clip_mc._y += delta;
} else {
clip_mc._y = -50;
}
}
};
Mouse.addListener(mouseListener);
That's it.. I've got this code on my frame, and the content to scroll is clip_mc...
Scroll Wheel Zooming On Mac
Hi
I've just switched from pc to mac and I always used the 'ctrl+shift+scroll wheel' to zoom in and out on the stage in flash however i can't seem to find the right shortcut to do this on the mac.
Anyone know what it is or where to find out?
Scroll Wheel Zoom Mac
Hi, I have recently moved from PC to mac, i used to always use ctrl+shift+scroll wheel to zoom in and out on the stage in flash how ever i can't seem to find the equivilent shortcut for the mac. There isn't a setting for this in the configure shortcuts menu for either version. Anyone got any ideas as it slows my workflow.
thanks
Jon
Scroll Wheel Zoom Mac
Hi, I have recently moved from PC to mac, i used to always use ctrl+shift+scroll wheel to zoom in and out on the stage in flash how ever i can't seem to find the equivilent shortcut for the mac. There isn't a setting for this in the configure shortcuts menu for either version. Anyone got any ideas as it slows my workflow.
thanks
Jon
Scroll Wheel Usage
Hi!
Does anyone know any good tutorial on enabling the scrollwheel to control some movements, maybe in a simple scrollpane //i know that the basic component can handle it, but i need to create something different.//
thanks
Scroll Wheel UP And DOWN Nav In Flash
The first time I saw this was at the FWA website I had hard time to figure out how to navigate and accidently i scrolled the down arrow and Alas it worked.
Anyway this is too simple but works !
Hope it helps, Check it out!
http://www.sharebigfile.com/file/179669/ScrollMouse-txt-zip.html
Ben
Scroll Wheel Functionality
How do I include scroll wheel functionality on my scrollbars in my website whenever you rollover the mask for the text?
There is a mc called mask that masks out the txt mc then on the side there is a mc called scrollbar on top of a mc called scrollbarBG which is the scrollbar.
Here is my code:
ActionScript Code:
txt.setMask(mask)
scrollbar.onMouseDown = function() {
if (this.hitTest(_root._xmouse, _root._ymouse) && txt._height>mask._height) {
this.startDrag(false, scrollbarBG._x, scrollbarBG._y, scrollbarBG._x, scrollbarBG._height-this._height)
txt.onEnterFrame = scrollThumbs;
dragging = true
}
};
scrollbar.onMouseUp = function() {
stopDrag()
dragging = false
delete this.onEnterFrame;
};
function scrollThumbs() {
var funkyVar = -this._parent.scrollbar._y*(((this._height-this._parent.scrollbar._height)/(this._parent.scrollbarBG._height-this._parent.scrollbar._height))-1)
this.Y = (funkyVar-this._y)*.2;
this._y += this.Y;
if(Math.abs(funkyVar-this._y)<1 && !dragging){
delete this.onEnterFrame
}
}
I have seen it done before I just dont know how.
If you would like to see my .fla please let me know.
Thanks!
Austin
Scroll Wheel Works
i whish to type some code here but it's going to be only example :-)
i saw few posts here and there - and everybody say it's imposible - i'm using IBM USB mouse and scroll wheel works here
after you open everything in menu on left side scroll bar will apeare, it's very interesting i wonder if it works for everybody?
ycc
Scroll MC With Mouse Wheel?
I know someone had posted a script to scroll an mc with a mouse wheel.
Can someone point me to that thread por favor?! :D
Mouse Scroll Wheel And Flash
Does anyone know if there is a way to make the mouse scroll wheel to work in a flash movie. I've gotten the scroll bars to work in flash, but most people use a mouse scroller when going through pages. If anyones knows how to get this to work, please let me know...
Scroll Text With Wheel Mouse
Hello Everyone,
I have been playing with flash mx getting to know how everything works, and I created a simple application that loads text from an external file into a scrolling text box. Everything works fine except that I cannot scroll using my wheel on my mouse. Does anyone know how I can get this to work? Thanks
-Jorge Perez
Flash And The Mouse Scroll Wheel
Hi there, does anybody know if you can program Flash to respond to the mouse scroll wheel? If so, does anhone have a script that will work?
Thanks for your help.
Darren
[F8] Mouse Wheel Scroll Text
does anyone know any tutorials on using the mouse wheel to scroll a text block like this.
http://www.animallogic.com/#News,CURRENT%20NEWS
i'm using a mac and this works.
cheers
Rat
Mouse Wheel Scroll In Safari...
It has been brought to my attention that Safari does not recognize the Mouse Wheel in flash...and I have found a solution...but I cannot get it to work right...I have followed the instructions word for word, and I cannot get the mouse wheel to produce anything in Safari...it works fine in FF and IE...but nothing in Safari...anyone know what gives?
Paul
Here is what I am trying to implement...
http://blog.pixelbreaker.com/flash/swfmacmousewheel/
[F8] Scroll Wheel Stops Working
Noticed that when I click on a swf (and as a result the flash movie gets focus) the mouse's scroll wheel won't work anymore. I mean in combination with the browser's vertical scrollbar. Is there something I have to to in the html code or flash to keep the browser scrollbar working with the mouse's scrollwheel? No matter when the swf doesn't have focus (scrollwheel works) or does have focus when I click on it (scrollwheel stops working)?
Add Wheel Mouse To Scroll And Resize Fix
Sorry but this is a 2 part question.
Below is my code for a full screen flash web site that will introduce a scrollbar with Inertia if needed based on the Browser size/resize.
This is the code for full size site with the onresize methods.
Code:
Stage.scaleMode = "noScale";
Stage.align = "TL";
Stage.showMenu = false;
function buildStage() {
bg_image._width = Stage.width;
footer._width = Stage.width;
bar._height = Stage.height-footer._height;
EXTRA = main._height-Stage.height;
dragger._height = Stage.height-EXTRA;
bg_image._x = Stage.width/2;
footer._x = Stage.width/2;
footer._y = Stage.height-footer._height;
mask_mc._x = Stage.width/2;
main._x = Stage.width/2;
bar._x = Stage.width-bar._width;
dragger._x = Stage.width-dragger._width;
mask_mc._height = Stage.height-25;
//This is for the scroller
space = 20;
friction = 0.9;
speed = 4;
y = dragger._y;
top = main._y;
bottom = main._y+mask_mc._height-main._height-space;
if (Stage.height>main._height) {
dragger._visible = false;
bar._visible = false;
} else {
dragger._visible = true;
bar._visible = true;
}
}
buildStage();
var resizeListener:Object = new Object();
Stage.addListener(resizeListener);
resizeListener.onResize = function() {
buildStage();
};
This is the scroll bar code that I got from searching the forums.
Code:
bar.useHandCursor = dragger.useHandCursor=false;
dragger.onPress = function() {
drag = true;
this.startDrag(false, this._x, this._parent.y, this._x, this._parent.y+this._parent.bar._height-this._height);
dragger.scrollEase();
};
dragger.onMouseUp = function() {
this.stopDrag();
drag = false;
};
bar.onPress = function() {
drag = true;
if (this._parent._ymouse>this._y+this._height-this._parent.dragger._height) {
this._parent.dragger._y = this._parent._ymouse;
this._parent.dragger._y = this._y+this._height-this._parent.dragger._height;
} else {
this._parent.dragger._y = this._parent._ymouse;
}
dragger.scrollEase();
};
bar.onMouseUp = function() {
drag = false;
};
moveDragger = function (d) {
if ((dragger._y>=y+bar._height-dragger._height && d == 1) || (dragger._y<=y && d == -1)) {
clearInterval(myInterval);
} else {
dragger._y += d;
dragger.scrollEase();
updateAfterEvent();
}
};
up_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, -1);
};
down_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, 1);
};
up_btn.onMouseUp = down_btn.onMouseUp=function () {
clearInterval(myInterval);
};
MovieClip.prototype.scrollEase = function() {
this.onEnterFrame = function() {
if (Math.abs(dy) == 0 && drag == false) {
delete this.onEnterFrame;
}
r = (this._y-y)/(bar._height-this._height);
dy = Math.round((((top-(top-bottom)*r)-main._y)/speed)*friction);
main._y += dy;
};
};
My two questions are how to add the Mouse Wheel - This is what I've got
Code:
var mouseListener = new Object();
mouseListener.onMouseWheel = function(wheelMotion) {
dragger._y -= wheelMotion;
};
Mouse.addListener(mouseListener);
And secondly, My scrollbar adjusts based onthe window size however the minute that the content is not sitting at a y of 0, the scrollbar resets and assumes that the top of the content is where it's sitting on the stage now. I think that may not make sense but basically the scrollbar seems to reset itself not knowing where the content is?
Thanks for any help and feel free to use the code wherever you want.
Mouse Wheel Scroll In Safari...
It has been brought to my attention that Safari does not recognize the Mouse Wheel in flash...and I have found a solution...but I cannot get it to work right...I have followed the instructions word for word, and I cannot get the mouse wheel to produce anything in Safari...it works fine in FF and IE...but nothing in Safari...anyone know what gives?
Paul
Here is what I am trying to implement...
http://blog.pixelbreaker.com/flash/swfmacmousewheel/
Mouse Wheel Scroll In Safari...
It has been brought to my attention that Safari does not recognize the Mouse Wheel in flash...and I have found a solution...but I cannot get it to work right...I have followed the instructions word for word, and I cannot get the mouse wheel to produce anything in Safari...it works fine in FF and IE...but nothing in Safari...anyone know what gives?
Paul
Here is what I am trying to implement...
http://blog.pixelbreaker.com/flash/swfmacmousewheel/
Scroll Wheel Navigation In Flash
Hi - I am wondering whether anyone knows how (or if) the scroll wheel can be used in flash, say - to navigat through a listbox or something - ?
Thanks,
Sam
Scroll A Combo Box With Mouse Wheel
I have a combo box that is populated from a xml page, and this works great. But what I need to be able to do is scroll in the combo box with the wheel on my mouse once i've selected the combo box. I have used the combo box that is furnished in the componets. Any help or push in the right direction would be deeply appreciated.
Using Mouse Scroll Wheel Data?
Has anyone ever done this, considered it? I don't even know if it's possible at this point. I'll be updating this thread with my findings, if you have any info please feel free to chime in 8)
-cayennecode
Scrolling Text With A Mouse Scroll Wheel
Is it possible to scroll text in Flash with a mouse scroll wheel? If you don't know what I'm talking about, this is the wheel between the two mouse buttons found on PCs.
If you've done this, please give me some direction. How is it done? Is there an FLA somewhere? Etc.
Thanks in advance.
-scott
http://scottmanning.com
Mouse Wheel Making The Window Scroll
Hi,
I need to make the mousewheel scroll the window that the flash movie in embedded in. Any ideas? maybe using javascript?
thanks for any help
boombanguk
Mouse Wheel Making Window Scroll?
Hi,
I need to make the mousewheel scroll the window that the flash movie in embedded in. Any ideas? maybe using javascript?
thanks for any help
boombanguk
Dynamic Text Scroll Wheel Problems
I am having trouble setting up a text box that dynamically loads an external text file into it (with HTML enabled in the actionscript). I would like the user to be able to scroll through the text with their mouse wheel. There are lots of things online that say what to do but they either don't work or don't seem to be applicable. I am wondering if anyone knows what I should do!
|