Y And X Mouse Positioned Scroller
I'm making a scoller for images that scrolls from left to right after the _ymouse position is past a certain point. It works fine except that I want it to stop after it goes 26 pixels down further. here is the script I have at the moment.
I have 3 frames, on the first frame it has this with a movieclip named "reel":
center = 400;
reelPos = reel._x;
leftStop = -1264;
rightStop = 2064;
reelStop = reelPos;
Then on the second frame named "loop" I have this:
if (_ymouse>300) {
reelSpeed = (_xmouse-center)/10;
reelPos = Math.round(reelPos+reelSpeed);
if (reelPos<leftStop) {
reelPos = leftStop;
}
if (reelPos>rightStop) {
reelPos = rightStop;
}
reel._x = reelPos;
}
And on the third frame is a gotoAndPlay "loop" tag.
I want the scrolling to stop if "_ymouse>326" but I can't figure out how I would do this. I also wouldn't mind it stopping if "_xmouse<216" and if "_xmouse>580"
If anyone can help with this it would be awesome.
The rest of the movie is just a movieclip with images going lengthwise and masked so the images show up in a certain section only(just to give you an idea of what I'm doing)
Tahnks for any help
FlashKit > Flash Help > Flash ActionScript
Posted on: 12-01-2002, 04:48 PM
View Complete Forum Thread with Replies
Sponsored Links:
Text Scroller With Image With Mouse Scroller
Hi to all,
I have problem with flash. that i want to creat dynamic text & image scroller in scroller by creating custom scroller (not inbuilt component) That scroller i can scroll with help of mouse's scroller. (the mouse's scroller & image must be include in to the scroller box)
Help me !
Help me !
Reply me fast if u have solution for it!!!!
Regards,
Samual
View Replies !
View Related
Scroller That Moves According To Mouse Movement Not Mouse Location.
I am trying to recreate the effect seen here:
Express Top Ten
alright here's the request:
I have found many scroller tutes most of which use buttons to control them. What I need or think I need is a tute or file to refer to, that uses a mouseover effect to move the movieclip with respect to how much the mouse has moved and still uses easing.
I have found files that make the movieclip move according to the mouse position on the stage, but i need it to move in according to how far it just moved.
feel free to email me with any questions.
thanks in advance,
chris
email me
View Replies !
View Related
MC Positioned By X/Y - But When Scaled X/Y Changes? Help?
I have an MC that is dynamically positioned by XML coordinates that are stored within an XML file.
When a button is clicked, the MC moves to the specified X/Y coordinates (which works fine). When I scale the to 75%, the X/Y coordinates change within the MC and when the button is clicked the MC moves to the wrong position.
How do I accurately update the X/Y coordinates based on the current scale? Im so confused.
Thanks in advance for your help....
View Replies !
View Related
Positioned Pop Up In Flash
Normally I use this code for a pop up. How would I edit this to have it positioned at the top left screen of my monitor?
getURL ("javascript:window.open('index2.htm','winName','width=800,height=600'); void(0);");
Thanks in advance
View Replies !
View Related
Mouse Scroller
i have made my own version of this scrolling clip from this persons movie but i want to change one thing, the way it scrolls.
at the moment when the mouse goes to the far right it scrolls left and vice versa, what i want is it to scroll left when the mouse goes to the far left, and if possible i would like it to be a never ending movie clip that if you keep going left it will just keep duplicating itself.
thanks in advance for any help.
View Replies !
View Related
Mouse Scroller
Something I've never seen before...
Anyone ever tried getting the mouse's scroller to interact with Flash?
I'm going to have to figure it out pretty soon, kind find any reference of it though.
Cheers
Rob
View Replies !
View Related
Using The Mouse Scroller
hi... does anyone know how to implement the mouse scroller in flash? (ie.. the scroll button in the middle of the two mouse buttons)
I have scrolling text which i would like to be able to use the mouse scroller with as well.
Any ideas?
thanx.
View Replies !
View Related
Mouse Scroller
Is there any way that when you scroll the mouse wheel up or down it performs an action?
Theres no key class and i think it has something to do with the word 'delta'.
I need it to go 'nextframe' when scrolled up and 'prevframe' when mousewheel is scrolled down.
Help please!?
View Replies !
View Related
Mouse Scroller
I've looked through all the past messages on the subject and a few people seem to be able to control objects in a flash file using the mouse scroller.
Only problem is that it's quite tricky to understand the code when it's just up on the screen, does anyone have a HTML and FLA files with it working that I could take a peek at, pleaseeeee.
View Replies !
View Related
Mouse Scroller Problems
I have tried about four tutorials and failed each time. I need some help with the "mouse scrolling images" trick. I have a sample that seems to work, but when I switched out my images for thiers, checked all the code, but my image loop isn't right. Does anyone have a really simple tutorial or solution for me today?
View Replies !
View Related
How Can I Stop The Mouse Following A Scroller?
I have made a scrolling menu that follows the _x position of the mouse, the problem is that the scroller stays attached to the mouse cursor no matter where is it on the screen, not only when it is above the menu.
How can I change it so that the scroller only follows the mouse when it is over its hit point?
Heres the code I am using, on frame 1:
code: fscommand("allowscale", "false");
if (_xmouse < 100) {
setProperty("_root.slider", _x, (-1*_xmouse) + 700);
} else if (_xmouse > 100) {
setProperty("_root.slider", _x, (-1*_xmouse) + 700);
} else {
trace("=");
setProperty("_root.slider", _x, _xmouse);
}
Frame 2:
code: if (_xmouse<100) {
setProperty("_root.slider", _x, (-1*_xmouse)+700);
} else if (_xmouse>100) {
trace(">");
setProperty("_root.slider", _x, (-1*_xmouse)+700);
} else {
setProperty("_root.slider", _x, _xmouse);
}
setProperty("_root.drag", _x, _xmouse);
gotoAndPlay(1);
Any help would be appreciated. I have attached the source file I am using
View Replies !
View Related
Mouse Activated Scroller
Can anybody point an example on how to do a mouse activated scroller that moves on the specific area only. Example would be here:
http://www.microsoft.com/games/fligh...sh/default.htm And click on Dynamic Living World. The scroller on the lower right. Notice it also has easing effect on mouse out in the hit area. Thanks in advance.
View Replies !
View Related
[F8] Mouse (scroller?) Effect Help
So, For a few days now, I've been trying to make a flash homepage to my website look somewhat like the following:
http://fluxx.nu/bio.html
However, I'm Fairly new to Action script and I'm having a terrible time trying to make it work right. (And I'd post some AS code I wrote, but it would be pretty embarrassing.. )
I use Flash 8 and have come close to making it work.. but still no cigar.
Any ideas or suggestions (or Code!) that could possibly help me make this work?
I was also thinking how I would go about with the image. Do I just make a long image, or separate frames? (Depending on the code, I guess..)
Thanks in advance!
View Replies !
View Related
Moving Mouse Over Scroller
I have a problem with this actionscript, I keep getting errors on line 33, what have i done wrong?
stageWidth = Stage.width;
speed1 = 34;
speed2 = 33.5;
mc1Width = front_mc._width;
mc2Width = back_mc._width;
mc1X = front_mc._x;
mc2X = back_mc._x;
xLeft = 100;
xRight = stageWidth-100;
lock_scroll = false;
_root.onEnterFrame = function() {
if (!lock_scroll) {
scroll_mc();
}
};
function scroll_mc() {
var xdist = _xmouse-(stageWidth/2);
if (mc1X>=0) {
mc1X = 0;
}
if (mc1X<=stageWidth-mc1Width) {
mc1X = stageWidth-mc1Width;
}
if (mc2X>=0) {
mc2X = 0;
}
if (mc2X<=stageWidth-mc2Width) {
mc2X = stageWidth-mc2Width;
}
if (_xmouse<=xLeft) {
var xdist = _xmouse*10;
move mc1X
mc1X = stageWidth-mc1Width;
mc1X += -xdist/speed1;
mc2X += -xdist/speed2;
setProperty("front_mc", _x, mc1X);
setProperty("back_mc", _x, mc2X);
} else {
if (_xmouse<=xRight) {
var xdist = _xmouse*10;
mc2X = stageWidth-mc2Width;
mc1X += -xdist/speed1;
mc2X += -xdist/speed2;
setProperty("front_mc", _x, mc1X);
setProperty("back_mc", _x, mc2X);
}
}
if (_xmouse<=xLeft) {
//we are in left zone, so move background to the left
back_mc._x -= (_xmouse-xLeft)*-0.5;
//move front mc to give parallax scrolling effect
front_mc._x -= (_xmouse-xLeft)*-0.3;
}
if (_xmouse>=xRight) {
//check to see if we need to move it
if (back_mc._x>=0) {
back_mc._x = 0;
} else {
back_mc._x += (_xmouse-xRight)*0.5;
//move front mc to give parallax scrolling effect
front_mc._x += (_xmouse-xRight)*0.3;
}
}
}
//create an empty mc container for content to display
createEmptyMovieClip("content_box", 200);
content_box._x = 190;
content_box._y = 92;
View Replies !
View Related
Scroll With Mouse Scroller - Possible?
hello!
i'm in desperate need!! for this website i'm helping in, the client wanted me to scroll this section with words AND images. so , i used the scroll pane component from Flash mx8. it works. but, now the client wants it to scroll faster when using their mouse scroller.
currently it does scroll, but very slowly. is there another tutorial i could scroll both text and images with the mouse scroller? i'm still using action script 2.0
View Replies !
View Related
Mouse Position Scroller Help.
I attached a scroller that claudio made and modified it a bit. I want to know if it is possible to scroll by using mouse movement. ie. If you move you mouse down the info it will scroll down and if you move your mouse up it will scroll up....Thanks in advance for all your help.
View Replies !
View Related
FlashTyper Effect Positioned Wrong
Now that I at least got my FlashTyper effect to appear in the browser when uploaded (i guess the server was not working, cause I had everything the same as before)
My problem is that its not appearing correctly. Its supposed to be centered with the "flashing boxes" moving over it. It's centered properly in my fla document and when I export it. However, when I upload both swf's ( my flashtyper swf and my intro file swf) my flash typer effect does not appear properly in the browser.
Go take a look, the movie is only 107 k, won't take long to load !!
http://www.geocities.com/katiekatexxx/
View Replies !
View Related
Can Flash Player Be Positioned By Actionscript?
I am not talking about a .swf embedded in html. I mean is it possible to position the flash player standalone using actionscript in the .swf. So it is centered for example.
I am not talking about projectors, just the simplicity that when I click an swf file I can determine where on my screen it appears.
Is this posssible (and simple)?
TIA
r
View Replies !
View Related
How To Duplicete Mc & Random Positioned Without Overlaping Others
It is quite simpele when i draw it on paper.
I have mc object that is almost elipsed shape. That mc i want to duplicate 30 times or more randomly on stage. And it musnt be in position that is overlaping other that have already been duplicated.
I done this with
xpos=random(560)+10
ypos=random(450)+15
than i checked with FOR loop and with
compearing new xpos & ypos with all already duplicated moviceclips x&y. And with Math.sqrt function i checked radius that must be enough big to the closed mc. If one radius in For loop to all mc is too small than new mc would be overlaping some of the mc already on stagea and in that case i start to looking new xpos & ypos for mc that i want to duplicate.
All fine but this procedure is slow and when it is turn in FOR loop to duplicate mc:number 25 then flash is looking quite some time to randomly find right position on stage.
************************************
DOES anybody KNOW how to deal or write better function for duplicating mc and putting on stage that are not overlaping ?
And that could find those 30 unique positiones at no time.
Big thx for halping me out.
View Replies !
View Related
[F8] Movie Clip Blurs When Being Positioned
Hello,
I have a movie clip, instance name is 'loadbar'. This 'loadbar' width's is 1280 px, height's is 2 px.
The movie clip contains a 1 px high yellow rectangle (x: 0, y: 0) and below this a 1 px high blue rectangle (x: 0, y: 1).
The movie's background is black.
When I compile the movie everything works fine.
However when I position this 'loadbar' with AS 2.0, the movie clip just
blurs. I mean the yellow will be not true yellow, it blurs.
Do you know why is this happening?
The AS positioning:
Code:
Stage.scaleMode = "noScale";
Stage.align = "TL";
var stageListener:Object = new Object();
stageListener.onResize = function() {
loadbar._x=(Stage.width - 1280) / 2;
loadbar._y=Stage.height / 2;
};
Stage.addListener(stageListener);
stageListener.onResize();
Thanks,
Mac
View Replies !
View Related
Items Positioned With AS Disappear On Refresh
Hey all, my menu bar and menus disappear if you refresh the page. Everything is dynamically positioned with AS using the code below. To see what I'm talking about go here then refresh the page in the browser. It also appears to do it when I navigate away and return.
Code:
//mouse listener to close menus
mLoc = new Object();
mLoc.onMouseMove = function () {
//register mouse position as globals for menus
_global.mX =_xmouse;
_global.mY =_ymouse;
};
//add listeners
Mouse.addListener(mLoc);
function init() {
var bgObj = new Object();
bgObj.onResize = function() {
position();
};
//sizing function
position = function(){
//background full size
bg._width = Stage.width;
bg._height = Stage.height;
bg._x = Stage.width*.5;
bg._y = Stage.height*.5;
//menus
home._y = (Stage.height-home._height) - 20;
mediation._y = home._y;
contact._y = home._y +23;
//menu bar super wide and bottom align
bar._width = Stage.width + 1000;
bar._height = Stage.height *.0675;
bar._y = home._y + 80 ;
//main window 90% wide 80% height and centered
main._width = Stage.width * .9;
main._height = Stage.height *.8;
main._x = Stage.width*.5;
main._y = Stage.height*.5;
}
Stage.scaleMode = "noScale";
Stage.align = "tl";
Stage.addListener(bgObj);
position();
}
init();
Any ideas? Oh and I'm running IE6 and the width/height of the movie is set to 100% using CSS.
View Replies !
View Related
[CS3 AS2] Loading Dynamically Positioned Movieclips
We have a main.fla - much of the content positioning part does nothing yet :
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
stop();
// loader
var myMCL:MovieClipLoader = new MovieClipLoader();
/// tween all loads
var myListener:Object = new Object();
myMCL.addListener(myListener);
myListener.onLoadInit = function(target:MovieClip):Void {
tweenImage(target);
};
function tweenImage(target:MovieClip):Void {
var myTween:Tween = new Tween(target, "_alpha", mx.transitions.easing.Regular.easeIn, 0, 100, 0.5, true);
//execute when tween complete
myTween.onMotionFinished = function():Void {
};
}
// unless we specifically don't want tweens
var noTweenMCL:MovieClipLoader = new MovieClipLoader();
/* dynamically position content - based on a tutorial from Justin Windle (http://blog.soulwire.co.uk/tag/flash) */
// Setup the Stage properties
Stage.scaleMode = "noScale";
Stage.align = "TL";
// Variables (in pixels)
var navHeight:Number = 435;
var navWidth:Number = 222;
var contactHeight:Number = 0;
var contactWidth:Number = 0;
var descHeight:Number = 117;
var descWidth:Number = 222;
// Variables (in percent)
var headHeight:Number = 11;
var galHeight:Number = 60;
var thumbsHeight:Number = 6;
// Prototype function to position MovieClips
MovieClip.prototype.pos = function (r, s, w, h)
{
this._x = r;
this._y = s;
this._width = w;
this._height = h;
};
// positioning function
function setStage ()
{
var sw:Number = Stage.width;
var sh:Number = Stage.height;
// Calculate dynamic dimensions
var Ny:Number = sh / 100 * headHeight;
var Dy:Number = Ny + navHeight;
var Gw:Number = sw - navWidth - contactWidth;
var Gh:Number = sh / 100 * galHeight;
var Cx:Number = navWidth + Gw;
var Ty:Number = 0.8 * sh;
var Th:Number = sh / 100 * thumbsHeight;
var Hh:Number = sh / 100 * headHeight;
//apply sizes & positions
nav_mc.pos (0, Hh, navWidth, navHeight);
gal_mc.pos (navWidth, Hh, Gw, Gh);
contact_mc.pos (Cx, Hh, contactWidth, contactHeight);
desc_mc.pos (0, Dy, descWidth, descHeight);
thumbs_mc.pos (navWidth, Ty, Gw, Th);
}
// text "frames" do not resize and image "frames" should fill up all remaining browser space
var stageListener:Object = new Object ();
Stage.addListener (stageListener);
stageListener.onResize = setStage;
setStage ();
//load navigation menu and make clips for the other sections to come
_root.createEmptyMovieClip("nav_mc",1);
myMCL.loadClip("nav.swf","nav_mc");
_root.createEmptyMovieClip("thumbs_mc",2);
_root.createEmptyMovieClip("gal_mc",3);
_root.createEmptyMovieClip("contact_mc",4);
_root.createEmptyMovieClip("desc_mc",5);
ok, then we have nav.fla that only contains one (for now) menu button (named button1_btn) on the stage, and the following code on the timeline:
Code:
this.button1_btn.onPress = function() {
_level0.myMCL.loadClip("button1thumbs.swf","thumbs_mc");
_level0.setStage();
};
button1thumbs.fla doesn't have any actions in it (yet) as i cannot get it to load in the space defined by "thumbs_mc".
For the life of me I just can't figure out a syntax to make button1thumbs.swf load into that movie clip, and I've tried all I can think of, but it's probably something dumb on my part. Any suggestions?
View Replies !
View Related
Items Positioned With AS Disappear On Refresh
Hey all, my menu bar and menus disappear if you refresh the page. Everything is dynamically positioned with AS using the code below. To see what I'm talking about go here then refresh the page in the browser. It also appears to do it when I navigate away and return.
Code:
//mouse listener to close menus
mLoc = new Object();
mLoc.onMouseMove = function () {
//register mouse position as globals for menus
_global.mX =_xmouse;
_global.mY =_ymouse;
};
//add listeners
Mouse.addListener(mLoc);
function init() {
var bgObj = new Object();
bgObj.onResize = function() {
position();
};
//sizing function
position = function(){
//background full size
bg._width = Stage.width;
bg._height = Stage.height;
bg._x = Stage.width*.5;
bg._y = Stage.height*.5;
//menus
home._y = (Stage.height-home._height) - 20;
mediation._y = home._y;
contact._y = home._y +23;
//menu bar super wide and bottom align
bar._width = Stage.width + 1000;
bar._height = Stage.height *.0675;
bar._y = home._y + 80 ;
//main window 90% wide 80% height and centered
main._width = Stage.width * .9;
main._height = Stage.height *.8;
main._x = Stage.width*.5;
main._y = Stage.height*.5;
}
Stage.scaleMode = "noScale";
Stage.align = "tl";
Stage.addListener(bgObj);
position();
}
init();
Any ideas? Oh and I'm running IE6 and the width/height of the movie is set to 100% using CSS.
View Replies !
View Related
[ScrollPane] Maintaining Positioned Content
Okay, I know with this one there's gotta be something stupid I'm missing. Either that or it's not possible.
Have a ScrollPane set to maintain it's size at Stage.width x Stage.height.
Have a MovieClip that is loaded into the ScrollPane via it's Linkage ID. This MC/Class maintains a constant 655px width, and a height of at least 750 and upper range of Stage.height.
No big deal there. I can load it in fine, and use an event listener on Stage to center it horizontally when the stage is resized.
However, any time the you click the scroll buttons to scroll the content, the content mc moves to 0.0, then begins the scroll.
In working with this, I've already tried to use an event listener on ScrollPane.scroll (ScrollPane_instance.addEventListener("scroll", sp_listener) ) with absolutely no effect. Tracing reports that the _x of the movie clip has been set correctly, but the effects are not seen in the movie. I'm guessing the "scroll" function is setting _x more often than my listener can actually respond (i've seen this with other AS).
So, I'm about out of ideas. The only one (that just occured to me) is to override the ScrollPane.onScroll() function to affect only the _y component, though I have no clue what the internals of this method look like.
Begging for help.
Jhereg.
View Replies !
View Related
Mouse Over Pic Scroller /jpg Flicker Problems
Hi there!
ok dunno if anyone has had this same problem with vr-scrollers
..you know the scrollers that when you mouse over your pics shuffle left and right.
Anyways ive been using these for awhile now and the one thing i havent beeb able to ever sort out is the small flickering of jpgs..its like the pictures when you scroll move just a little....its like a flickering effect..
I dont know if it has to do with jpg quality and or compression.An example of this so called scroller i have done can be seen on
http://taxfree.silja.fi/index.html
its not that bad but still i would like to try and rectify this flicker prob when you mouse over.Or then perhaps there is nothing to be done about this, dunno, but maybe someone can help me out
Cheers!
View Replies !
View Related
Scroller Mouse Wheel Problem
Hey guys,
was trying to use this verticle mouse scroller I found and it has the mouse wheel actionscript on it, is there an updated version where the mouse wheel works or anyone know why it doesnt work?
it seems to output correctly but the "content" never moves.
Thanks.
View Replies !
View Related
Freezing A Mouse Controlled Scroller?
K, so I've finally got it all working; the scroller loads, reads mouse movement and when the mouse moves away from it stops reading the mouse movement. Near perfect.
if(_root._xmouse<= 500 && _root._ymouse>= 400){
dX = ../track:_x-230;
ypos = ../track:_y;
if (Number(ypos)<60) {
ypos = 60;
}
}
setProperty("", _x, _x-dX/14);
reset = _xscale/100*360;
if (Number(_x)>Number((230+Number(reset)))) {
setProperty("", _x, _x-(_width/2));
} else if (Number(_x)<Number((230-reset))) {
setProperty("", _x, Number(_x)+Number((_width/2)));{
}
} else {
}
When the mouse is not near the scroller, its scrolls at the last speed it was left at. How can I get it to "freeze" or stop until the mouse moves back to the scroller?
View Replies !
View Related
Mouse Menu Image Scroller
Hi I'm trying to work out how they did the image menu scoll in the www.joop.com web site. if you click into the fashion section, you will notice when you move your mouse the images move the opposite way. Anyone got any odeas on how to get this technique working?
Thanks
View Replies !
View Related
Mouse-spinning Image Scroller
How did they do this? On mousedown you can drag in either direction. The faster you drag, the faster it rolls. On mousedown drag and release you can virtually roll/spin the images in both directions.
Check it out:
http://www.emdashdesign.com/
Any clues on how they did this would be appreciated.
Thanks,
Gazzer
View Replies !
View Related
Mouse Menu Image Scroller
Hi I'm trying to work out how they did the image menu scoll in the www.joop.com web site. if you click into the fashion section, you will notice when you move your mouse the images move the opposite way. Anyone got any odeas on how to get this technique working?
Thanks
View Replies !
View Related
Mouse Activated Text Scroller
Hi,
I'm working in Flash CS3 and was wondering if any one knew how to create a vertically text scroller controlled by the mouse when clicked and dragged. Would like a nice clean motion with possibly a bounce when it reaches the top or bottom. This is to fit within a header banner. Cheers for any help in advance.
View Replies !
View Related
Adjusting Speed For Randomly Positioned Object
Hi I have a problem.
I have a object that moves randomly but it's doing so very fast
I don't know how to adjust it's speed.
I have two MCs. One with actions and one with the object
Here is the code in action MC:
onClipEvent (enterFrame) {
_root.box._x = random(628);
}
I am also attaching the file in MX format
View Replies !
View Related
Full Screen With Elements Staying Positioned
Hi there,
I'm tyring to achieve a layout for a site similar to the one seen here - www.digitalsoundboy.com
I'd like to have a background image which resizes to fit the browser window but also have the navigation and content areas stay in position.
How is this possible? At what size do I publish the movie? What size should the background image be at to maintain a clear quality?
Any help with this would be appreciated.
Cheers
View Replies !
View Related
JS To Open Sized & Positioned Newwindow Fails
Anyone familiar with this?
(I searched here for the subject and found some exchanges from 2002 and 2005 that came close but didn't seem to resolve themselves successfully.)
/*
on (release) {
getURL ("javascript:NewWindow=window.open('TriCarTop.html ','','width=700,height=644,left=0,top=0,toolba r=No,location=No,scrollbars=Yes,status=No, resizable=No,fullscreen=No'); NewWindow.focus(); setTimeout('NewWindow.moveTo(75,50)',1500);void(0) ;");
}
*/
It works but the opening is herky-jerky; the page opens in one place and then jumps to its correct position. It looks like a mistake.
So I modified it to remove the setTimeout and just changed the left and top entries from zeros to where I wanted it to open.
Like this:
/*
on (release) {
getURL ("javascript:NewWindow=window.open('TriCarTop.html ','','width=700,height=644,left=200,top=175,to olbar=No,location=No,scrollbars=Yes,status=No, resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}
*/
This works--but only sometimes. Results vary from one trial to another, even though I'm emptying browser cache each time.
Any ideas? TIA
View Replies !
View Related
How To Add Mouse Control To Existing Image Scroller ?
image scroller as shown below url
http://www.cyberxpdemo1.com/
Currently, it just a simple image scroller, scrolling from right to left.
Now my boss want to add some interactive control on it. The addon function should able to
1. when user click any of the images, that image will display a larger image size.
2. moving mouse to either right edge or left edge will trigger the image scroller direction and will speed up scroll when closer to either edge.
I'm just a newbie on Flash. anybody give me directions or techniques on how to implement it.
View Replies !
View Related
How To Add Mouse Control To Existing Image Scroller ?
image scroller as shown below url
http://www.cyberxpdemo1.com/
Currently, it just a simple image scroller, scrolling from right to left.
Now my boss want to add some interactive control on it. New functions should able to
1. when user click any of the images, that image will be displayed in a larger image size.
2. moving mouse to either right edge or left edge will trigger the scroller scrolling direction and will speed up scrolling when closer to either edge.
I'm just a newbie on Flash. anybody give me directions or techniques on how to implement it.
View Replies !
View Related
Mouse Position Based Horizontal Scroller
Hi,
I am fairly new to Flash. I have looked around the internet for clues but I can't find exactly what I need.
I have a timeline movie (movieclip) which is 1740pixels wide.
I want the timeline to scroll left and right as the mouse is moved left and right from the center of the parent movie (744px wide)
I want the scrolling to be faster at the edges than at the center.
I also want the scrolling to stop when it reaches the end of the timeline + 200px.
Any help would be appreciated - I have given the timeline an instance name of 'timeline'
View Replies !
View Related
AS3 - Mouse Controlled Scroller - How Do I Get It To Stop Scrolling?
hi guys,
i have a script that scrolls a movie clip according to the mouse's x position and whether or not it is moving left or right. i am trying to figure out a way to make the scrolling slow down, or just stop completely when the mouse has stopped moving or is idle. my script so far handles the scrolling part, but not the stopping/slowing of the scroll. can anyone point me in the right direction?
http://www.bobthabuilda.net/misc/tutorials_AS3.swf
and the code:
Code:
var prevX:uint = 0;
var curX:uint = 0;
var scrollRight:Boolean = false;
var scrollLeft:Boolean = false;
var scrollAmt:Number = (links_mc.width / stage.stageWidth) * 10;
function checkDirection(event:MouseEvent):void
{
prevX = curX;
curX = mouseX;
trace(scrollLeft);
trace(scrollRight);
if (curX > prevX)
{
scrollRight = false;
scrollLeft = true;
}
else if (prevX > curX)
{
scrollLeft = false;
scrollRight = true;
}
else
{
null;
}
}
function scrollMenu(event:Event):void
{
if (scrollRight && (links_mc.x < 0))
{
links_mc.x += scrollAmt;
}
else if (scrollLeft && (links_mc.x > -606))
{
links_mc.x -= scrollAmt;
}
else
{
null;
}
}
stage.addEventListener(MouseEvent.MOUSE_MOVE, checkDirection);
stage.addEventListener(Event.ENTER_FRAME, scrollMenu);
thanks!
john
View Replies !
View Related
Stop Moving When Mouse Is Outside Certain Area (parallax Scroller)
Hi everyone.
I have a problem with a "paralax scroller" movie clip. I downloaded the original from this site and I'm currently modifying it. Currently I'm loading it into the .swf as another .swf like this:
Code:
loadMovie("parallax_01.swf", parallax_mc);
which is fine.
My problem is that it continues to scroll even when the mouse isn't over it. Please check it out here to see what I mean. As you can see, it works perfectly, as long as the mouse remains within the bounds of the loaded .swf, but once outside those bounds - ie outside the box - it continues to scroll (which is bad).
Can anyone help me modify my code so that this can be fixed? I guess its something about checking where the mouse is? getBounds maybe? The code governing the movement is inside the loaded "parallax_01.swf" and reads as follows:
(foreground layer)
Code:
onClipEvent (enterFrame) {
if (_root.parallax_mc.mainVar == 0) {
homeX = (-_root.parallax_mc._xmouse*3)+540;
} else {
homeX = (-_root.parallax_mc.mainVar*3)+540;
}
thisX = _x;
diffX = homeX-thisX;
if (_root.parallax_mc.mainVar == 0) {
moveX = diffX/30;
} else {
moveX = diffX/5;
}
_x = thisX+moveX;
}
(middleground layer)
Code:
onClipEvent (enterFrame) {
if (_root.parallax_mc.mainVar == 0) {
homeX = (-_root.parallax_mc._xmouse*2)+405;
} else {
homeX = (-_root.parallax_mc.mainVar*2)+405;
}
thisX = _x;
diffX = homeX-thisX;
if (_root.parallax_mc.mainVar == 0) {
moveX = diffX/30;
} else {
moveX = diffX/5;
}
_x = thisX+moveX;
}
(background layer)
Code:
onClipEvent (enterFrame) {
if (_root.parallax_mc.mainVar == 0) {
homeX = (-_root.parallax_mc._xmouse)+270;
} else {
homeX = (-_root.parallax_mc.mainVar)+270;
}
thisX = _x;
diffX = homeX-thisX;
if (_root.parallax_mc.mainVar == 0) {
moveX = diffX/30;
} else {
moveX = diffX/5;
}
_x = thisX+moveX;
}
I'm sure its fairly simple but I just can't figure it out. Thank you for looking I really appreciate it.
View Replies !
View Related
Making The Infinite Scroller Advance Via Clicking, Instead Of Mouse Movement.
Hello all,
I have a question...Of course...I want to make Kirupa's infinite scroller advance by clicking an arrow instead of on mouse movement. Does anyone know if this is possible? The tutorial is here...
http://www.kirupa.com/developer/mx/infinite.htm
Essentially I want a line of images to be advanced by the clicking of a button (arrow). BUT I want the images to be back to back so you can see a couple at a time.
THANKS!
View Replies !
View Related
|