Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Dynamic Text Movement On Mouse Up/down



i'm trying to make a dymanic text field that you can scoll through using key press <up> and <down> but it just scrolls non stop. Is there a way to set restraints to move only one line at a time?

Thanks,
Drop



FlashKit > Flash Help > Flash MX
Posted on: 10-04-2002, 06:01 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Dynamic Text, Mouse Movement Question... :)
Okay... This will probably be simple for some of you.

How do I make the "animation" stop?

The text moves, based on the mouse movement, and I put a mask over the text to only show a certain area at any given time...

this.mytext.onEnterFrame = function() {
if (_root._ymouse>Stage.height/2) {
_root.speed = -2;
} else if (_root._ymouse<Stage.height/2) {
_root.speed = 2;
}
this._y += _root.speed;
if (this.mymask._y>Stage.height) {
this.mymask._y = 0;
} else if (this.mymask._y<0) {
this.mymask._y = Stage.height;
}
}

Dynamic Movement According To Y Mouse?
hey all,

im sure most of you have seen something where you move the mouse to the right, and a little slider bar moves everything left, or when you move the mouse left, a little slider moves everything right... they can be annoying becaues if you dont have your mouse right in the center of the movie, the dang things just keep scrolling... well i want to make one of those annoying things.. has anyone got any ideas to help me out?? mabye point me in the direction of a movie or give me some AS help?? thanks anyone.

jake

Dynamic Image Animation Based On Mouse Movement
Hi All,

We have made a dynamic image animation using xml. We are attaching the source code herewith. At present, when you place your mouse over the images, the animation will start backwards. I.e., it will reverse the way the images are loading.

We want this animation order (normal and reverse) to control based on the mouse movement. By default, now the images are animating in one direction. That is fine now. But, we want the animation should get reversed when you place your mouse at bottom of the page. And again when you move the cursor towards top of the page, animation should again start as normal (vice versa).

Any idea how we can achieve this task using mouse placement?

Thanks in advance.

Krishhhhh

Move Dynamic Mask Movie.. With Mouse Movement..
Hi everyone, hi like to move my masked dynamic menù, at right and left by mouse move on mask area. I've use an conditions to force the sliding but it doesnt work fine. My mask area is large 973 px



This is the code i ve.


Code:
MovieClip.prototype.easeX = function(x) {
this.onEnterFrame = function() {
this._x = x-(x-this._x)/1.2;
if (Math.abs(x-this._x)<=1) {
//delete this.onEnterFrame;
this._x = x;
}
};
};



Code:
this.onEnterFrame= function() {
if (_root.mask.hitTest(_root._xmouse, _root._ymouse)) {
slideMenu();
}
};


Code:
slideMenu = function () {
if (_root._xmouse>782) {
this.container.easeY(-214);
} else {
this.container.easeY(88);
}
};


Anyone can help me??

Scrolling Text With Mouse Movement
can someone tell me or lead me to a link on how to construct a scrolling system that doesn't use a bar or buttons, but is controlled by the mouse moving up or down?


thanks

Text Movement From Mouse Click
Hi ther, i am a beginning in action script and need some advice for completing a project i have undertaken at university.
So here it is, i want to make text that i make in flash move to the position of the mouse cursor when the mouse is clicked, when the mouse is released the text will go back to where it was originally.

Have a look at this site, and download your version, it shows the idea the text following the mouse cursor when clicked, and a very nice piece also.

Be amazing if i could get some help guys!!

cheers

Scrolling Text With Mouse Movement
can someone tell me or lead me to a link on how to construct a scrolling system that doesn't use a bar or buttons, but is controlled by the mouse moving up or down?


thanks

Scrolling Text With Mouse Movement
can someone tell me or lead me to a link on how to construct a scrolling system that doesn't use a bar or buttons, but is controlled by the mouse moving up or down?


thanks

Mouse-movement Triggers Background Movement - Help Me Find Tutorial
I want to learn how to make an image react on my mouse-movement, so you get the effect as if you're looking around. You move the mouse to the right, and the image on the screen moves to the right, etc. I've seen an example of that on http://www.center-of-the-world.com/ - but I don't know how to find a tutorial for that on the Flashkit-site. Can anyone help?

Pen Movement According To Dynamic Text
I have a bit of a doozy and wondered if anyone might be able to explain how this effect was put together.

View animation here: http://jsgraphicdesign.com/flash/index.htm
The source files are here: http://jsgraphicdesign.com/flash/index.zip

You'll see how this pen animation enters and writes according to the text that appears on the page. Now, I have opened the FLA file and have discovered that the pen animation is keyframed, not actionscripted. If I wanted to spend hours of time doing this, I wouldn't foresee it as a problem.

So HERE is where the problem lies. My client wants the signature to be dynamic, so that it can be changed according to the assigned realtor. Obviously, since the pen animation is keyframed and not actionscripted, the animation will not line up according to all the unique names he has. Now, he is insisting (mind you he has no working knowledge of Flash whatsoever) that the designer who originally created this FLA file, used actionscript 1.0 to dictate that the pen would move according to the dynamic text. He provided me with several similar SWF files to show me that the pen does, indeed move accordingly. I am not willing to keyframe the pen animation for over 100 different names, and since he knows nothing of actionscripting versus keyframing, it has been useless for me to try to explain this predicament.

Therefore, I wondered if someone could take a look at these files and offer a suggestion that would fulfill my client's expectations and achieve a sufficient end result.

Thank you VERY much for your time!
Jodi Salisbury

Capturing Mouse Movement/locking Out A Direction Of Movement
does anyone have a good solution in AS 2 for simulating horizontal and vertical finger gestures like on an iPhone?

I have a Mouse listener that calculates movement in both directions and whichever one is larger in value (primary movement of mouse) then it locks out the other using a boolean value. And then once the mouseUp event is triggered, it sets the values to true again to listen for another horizontal or vertical gesture movement.

the problem I'm running into is that every once in awhile while I'm "gesturing" or moving the mouse in a particular direction, I'll get some funky results which clues me into that the other direction might not being totally locked out.

Make any sense?

Antialiasing/movement Of Dynamic Text
Related to a previous thread of mine, I want to use dynamic text in a MC that is moved around using AS.

Problem is, that dynamic text shows up unaliased and pixelated, and its movement in the MC is sort of lumpy and erratic. The AS function works perfectly well with static text, which moves smoothly and is antialiased.

Do I need to render the dynamic text in some way, or is there some other method of making it look more normal? Should I use tweening rather than AS to make it move?

Sample file attached.

Antialiasing/movement Of Dynamic Text
Related to a previous thread of mine, I want to use dynamic text in a MC that is moved around using AS.

Problem is, that dynamic text shows up unaliased and pixelated, and its movement in the MC is sort of lumpy and erratic. The AS function works perfectly well with static text, which moves smoothly and is antialiased.

Do I need to render the dynamic text in some way, or is there some other method of making it look more normal? Should I use tweening rather than AS to make it move?

Sample file attached.

Flowing Mc Movement Opposite Of Mouse Movement
I have a mc (fStrip) which looks like a piece of filmstrip with thumbnail images in it. I want this mc to move when the users mouse is positioned over it, but I only want it to move only along it's x-axis and in a direction opposite that of the mouse. And I want it to move or flow smoothly.

I've been trying to figure this out (see my lame attempt below) but without much luck. Can anyone help me out? Thanks.


onClipEvent (mouseMove) {
buffer=20 //movement buffer
mousePos=_root.fStrip._xmouse //store mouse position
if (mymouse!=_root.fStrip._xmouse){ //if the mouse has moved
diff=mymouse-_root.fStrip._xmouse; //find amount of movement
_root.fStrip._x-=diff/buffer; //buffer & set strips movement
updateAfterEvent(); //adding this makes the movement cleaner
}
}

Image Movement Based On Mouse Movement
I have my Flash canvas. In the Canvas I have an image that's centered and larger than the canvas. Obviously the entire image isn't shown. How can I use actionscript to move the image according to where the mouse is? So if I move my mouse to the top right corner I want the image to move accordingly to display the top-right corner (obviously in a smooth fashion . I tried looking for examples but wanted to know if anybody out there new.

Any ideas?

Little help and thanks in advance!
Brian

Object Movement Based On Mouse Movement
Not sure how to word this but. I have a object on the stage lets say that is 300 pixels wide. The actual stage is only 100px wide. I want to be able to "pan" the object left and right based on mouse position/movement. I saw a tutorial for it a while back but cant seem to find it. Anyone have a link to a tut or can throw out a little source code? It would be greatly appreciated.

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

Mouse Over On A Dynamic Text Box
Hi,

I want to do a mouse over action on a dynamically created text box.. Is it possible ...

Dynamic Text With Mouse Lock
Hello everyone! I am making a links page for my site. What I have is a button for the URL link, and on rollover a description 'locks' to the mouse (like at safeplaces.net).

So for example, when I rollover 'www.flashkit.com' a description locks to the mouse of 'fun for all the family!'.

So I have a dynamic text variable within the mouse- locked movie, but this does not update. I have checked that the global variables work in other places in the movie and they update fine.

any thoughts? thanks guys.

Hiding The Mouse Over Dynamic Text
Hey there

Does anyone know if it possible to hide the mouse pointer completely so that no cursor appears over a dynamic text item.

I replace the mouse pointer on my page using Mouse.hide(). This successfully hides the pointer on my PC. However - if the mouse passes over some dynamic text or input text units then the vertical text selection bar appears over the item i am replacing the pointer with. Very annoying.

has anyone had this problem before? Any ideas?

Cheers

Dynamic Text And Mouse Wheel
Hi all,
I use a dynamic text with a UIScrollBar component.
II set the "selectable" flag to false, cause I don't want the users to select the text, and I noticed that the mouse wheel doesn't work anymore. I suppose that the dynamic text doesn't get focused. Is it any other solution to work with the mouse wheel?

Thanks in advance

Mouse Over Effect On Dynamic Text
Hi there!
I have an dynamic text box with many links. How can i make the link change its color on mouse over?

Dynamic Text Mouse Follower
You ever see one of those things where you move the mouse around the screen, and some text, like "Loading..." follows it around, but the letters move at different speeds? Well, I figured out how to do it in Flash the easy way. The hard way is to write out your message beforehand, break it down, make individual movie clips, give them instance names, and then program them to move where they need to be. This method is preferrable if you want to use really fancy text, but otherwise I've created a dynamic method - where you specify what it says simply by changing one string in the 28 lines of code.

Check it out.

Mouse Over Effect On Dynamic Text
Hi there!
I have an dynamic text box with many links. How can i make the link change its color on mouse over?

Mouse Wheel Scroll For Dynamic Text?
I'm a flash newb. Is there any way to have a dynamic text box scroll with the mouse wheel?

Did MX Come Out With A Dynamic Text On Mouse Over Cursor Doesn't Change
That thing that changes to a >>> I <<<< shaped thing when you roll over a dynamic text field. did MX come out with a function to not do that so it stays an arrow like how the static text field works??

Updating A Dynamic Text Field With A Mouse Rollover
This is driving me bananas.

I have a 3 frame movieclip that I borrowed from FK:

FRAME 1:
text="hi there";
max = length(text);
i = "1";

FRAME 2:
i = Number(i)+1;
screen = substring(text, 1, i);

FRAME 3:
if (Number(i)>Number(max)) {
stop();
} else {
gotoAndPlay(2);
}

...on one layer. On another layer, across the 3 frames, is a dynamic text field, no instance name, and it's variable is set to 'screen' (right as it came from FlashKit).

The whole thing is housed in a movieclip instantiated on root as "typewriter". This, as expected, WORKS FINE.

But why doesn't this?

FRAME 1:
_root.popup.home.onRollOver=function(){text="HOME" };
_root.popup.gallery1.onRollOver=function(){text="G allery 1"};
max = length(text);
i = "1";

...FRAMEs 2 and 3 are the same as above.

"popup" is a movieclip instance on root, that houses buttons; "home" is a button instance within "popup".

I've tried every configuration I can imagine, nothing is working. What am I doing wrong...please?

Thanks as always,
Shawn

How To Add Mouse Event Listener To A Dynamic Text Field?
I don't think this is possible? Has anyone been able to do this?
Add a dyn txt field
give it an instance name
add a mouse event listener
run it, it doesn't work? Or, does it give you this?

TypeError: Error #1010: A term is undefined and has no properties.
at MethodInfo-102()

HELP: How To Detect Line Number/string Under Mouse In A Static/dynamic Text Field
Hi folks,

Is there a way to detect the line number/string under the mouse in a static/dynamic text field, like we can do in Macromedia Director?

Need help urgently.

Thanks in advance.

Yossarian,
Mumbai, India.

No Mouse Movement
is there a way of making a movie jump to another part of a movie when the mouse has not been used for a while. So in say, 30 seconds, the mouse has stayed still it goes and plays an introdustion part of the movie?

Mouse Movement
Ok here is my problem I have made my mouse disapear then i use an aimer to mask it but when i move off of the flash screen it disappears and i cant see where my mouse is is there any way to tell flash like when it can show my mouse iand when it cannot

Mouse Movement
Dear All,

I am trying to create an effect with a JPG. My idea is to reduce the alpha of the JPG when you move the mouse to the left and increase the alpha of the JPG when you move the mouse to the right.

How can I create this effect with Actionsript?

Thanks for your help

Mouse Movement
i want to manipulate a movie . i want to move the mouse left or right. a specific movie will move in _x ( same direction as the movement of the mouse)


thanks!

MC Mouse Movement
Hi,

I need some help with my problem, I have 3 MC with some dynamic text inside, this text come from a txt with variables.
If I have all MC visibles(with text) I can swap , but now I have a small problem , each one of them goes for one level different, and the nº 3 have a very very slow movement.

How can I correct this, I try with :

myMC.onMouseMove = function() {
updateAfterEvent();

And I dont see changes on it or I didn't use this in correct way, can someone help me with this, pls.

Thx

Mouse Movement
Hi;
Is there a way to detect if somebody is uing the mouse and therefore, if no movement is detected, I can re-run the movie?

Thanks
Riyad

Movement With Mouse
You have all seen those flash movies where a movie moves according to where your mouse is on the screen, scrolls left or right etc. usually with some type of easing.

Anybody knows simple code to achieve this, or where to find a tutorial?

Mouse Movement
hi there..i want to draw 2 boxes with a mouse cursor but the user while i'm drawing won't be able to do anything on the stage...i've seen that effect at
http://www.thanea.com/ars/

smth like that i suppose..any help would be useful..
thank u..!!

Containing Mouse Movement
I am making an interactive map and am trying to contain my mouse movement to only stay within a certain box instead of the whole page / flash movie template.

I have made a Movie Clip and given it an Instance Name of "menu"

This is the code I have used to make the mouse move all around at free will.
difference = _xmouse - arrow._x;
arrow._x = arrow._x + (difference/delay);
menu._x = - arrow._x;

difference = _ymouse - arrow._y;
arrow._y = arrow._y + (difference/delay);
menu._y = - arrow._y;

//second frame
prevFrame();
play();


Here's a link to the actual file so you can look at it and know exactly what I mean. > http://www.inkworth.com/smart/map.html <

I want to keep that mouse movement for that map inside the grey box so when I move the moues outside of it, the map stops moving, and I can continue to navigate the rest of the site (not seen)

Can anyone help??

[F8] Mouse Movement
Hi Everyone,

I was wondering if anyone had a Flash 8 script that could make a movie clip rotate and face the mouse. Then when a key, (w) is pressed, the clip would move whichever way it was facing.

I am using this script for a game, so a hittest script for walls would be nice too.

Thanks,

Mr_Welfare

Containing Mouse Movement
I am making an interactive map and am trying to contain my mouse movement to only stay within a certain box instead of the whole page / flash movie template.

I have made a Movie Clip and given it an Instance Name of "menu"

This is the code I have used to make the mouse move all around at free will.
difference = _xmouse - arrow._x;
arrow._x = arrow._x + (difference/delay);
menu._x = - arrow._x;

difference = _ymouse - arrow._y;
arrow._y = arrow._y + (difference/delay);
menu._y = - arrow._y;

Here's a link to the actual file so you can look at it and know exactly what I mean. > http://www.inkworth.com/smart/map.html <

I want to keep that mouse movement for that map inside the grey box so when I move the moues outside of it, the map stops moving, and I can continue to navigate the rest of the site (not seen)

Can anyone help??

Mouse Movement Help
Hi to all,

This is vertical xml gallery, where the mouse will move up, then the scoller will move up and vice versa. now i want the reverse . if it move up , then the scoller come down and if it move down , then the scoller move up.

can anyone please help me.

Thanks


Code:
this.onEnterFrame = function()
{
mask_y = _root.main.mask._y;
mask_h = _root.main.mask._height;
mask_middle = (mask_y + mask_h) / 2;

roller_y = _root.main.roller._y;
roller_h = _root.main.roller._height;
ymouse = _root.main.mask._ymouse;

if (ymouse < mask_y || ymouse> mask_y + mask_h)
speed = 0;
else
speed = (ymouse - mask_middle)/ 30;

if ((roller_y+roller_h)<(mask_y+mask_h) && speed <0)
speed = 0;

if (roller_y > mask_y && speed > 0)
speed = 0;
_root.main.roller._y += speed;
}
stop();

Mouse Movement
I made a little script that controls the y position of an object based on the y position of the mouse. Here it is:


ActionScript Code:
import flash.display.*;
import flash.events.Event;

var mcPaddle_r:paddleObj = new paddleObj();

mcPaddle_r.height = 50;
mcPaddle_r.width = 5;
mcPaddle_r.x = (stage.stageWidth - mcPaddle_r.width - 2);
mcPaddle_r.y = (stage.stageHeight / 2) - (mcPaddle_r.height / 2);
addChild(mcPaddle_r);

stage.addEventListener(MouseEvent.MOUSE_MOVE, process_mouse_input);

function process_mouse_input(event:MouseEvent):void
{
    if ((stage.mouseY > 50) && (stage.mouseY < (stage.stageHeight - 50 - mcPaddle_r.height)))
        mcPaddle_r.y = stage.mouseY;
}

The script isn't working. When I move the mouse, the paddle does not move with it. Am I doing something wrong?

Thanks for any help.

PS I also tried the following but it didn't work either:

ActionScript Code:
function process_mouse_input(event:MouseEvent):void
{
    if ((event.stageY > 50) && (event.stageY < (stage.stageHeight - 50 - mcPaddle_r.height)))
        mcPaddle_r.y = event.stageY;
}

PPS I traced the problem and it appears it is in the if statement. It won't trace if I place the trace whithin the if statement, but it will trace it if I place it before the if statement.

Mouse Movement
Hi all,

I am using this code for vertical scrolling gallery. How to add the X and Y Positions For Mouse up and Down for the Below code.

if (_global.chk == undefined) {
_global.chk = 1;
}

mask_y = getProperty("_root.main.verti.mask", _y);
mask_h = getProperty("_root.main.verti.mask", _height);
roller_y = getProperty("_root.main.verti.roller", _y);
roller_h = getProperty("_root.main.verti.roller", _height);

if (_global.chk == 1) {
if ((roller_y+roller_h)>(mask_y+mask_h)) {
setProperty("_root.main.verti.roller", _y, getProperty("_root.main.verti.roller", _y)-3);
} else {
_global.chk = 2;
}

} else if(_global.chk == 2) {
if (roller_y<=mask_h) {
setProperty("_root.main.verti.roller", _y, getProperty("_root.main.verti.roller", _y)+3);
} else {
_global.chk = 1;
}
}

Thanks
krishna

Mouse Movement
Hello, does anybody know how this works?

http://www.experiencewonderyou.co.uk/

Im interested in how the mouse moves across the picture, so the stage is almost like a view finder.

im sure their are many other examples of sites that use this... cant find any at the moment.

Thanks!!

Mouse Movement...
hi there..i want to draw 2 boxes with a mouse cursor but the user while i'm drawing won't be able to do anything on the stage...i've seen that effect at
http://www.thanea.com/ars/

smth like that i suppose..any help would be useful..
thank u..!!

*HeLp Please* MC Movement By Mouse
Hey anyone that has time to help me...

I've mastered the way of image panning on an x asis for menus and so forth, but im trying to get it working with an x and y asis... if you dont get what i mean i mean like the main mavigation in this example

http://www.chromazone-imaging.co.uk/flashindex.html

thanks very much to anyone who can help

sam

No Mouse Movement
I need help coming up with a AS that if there is no mouse movement a function will be called. I have the following code but it does not always work. If the user moves the mouse too fast out of the SWF this code does not get called. Therefore the images in here do not get reseted.


Code:
var myListener = new Object ();
myListener.onMouseMove = function () {
if ((_root._xmouse>=255) or (_root._ymouse>=255) or (_root._xmouse<=11) or (_root._ymouse<=11)) {
reset ();
}
trace (_xmouse);
};
Mouse.addListener (myListener);

Mouse Movement Help
Hi to all,

This is vertical xml gallery code, where the mouse will move up, then the scoller will move up and vice versa. now i want the reverse . if it move up , then the scoller come down and if it move down , then the scoller move up.

Can anyone please help me.

Thanks


Code:
this.onEnterFrame = function()
{
mask_y = _root.main.verti.mask._y;
mask_h = _root.main.verti.mask._height;
mask_middle = (mask_y + mask_h) / 2; // take middle of mask as reference

roller_y = _root.main.verti.roller._y;
roller_h = _root.main.verti.roller._height;
ymouse = _root.main.verti.mask._ymouse;

// if mous out of range
if (ymouse < mask_y || ymouse> mask_y + mask_h)
speed = 0;
else
speed = (ymouse - mask_middle)/ 10;
// calculate speed -> the closer to middle-> slower, closer to edges-> faster


// if roller bottom reaches mask bottom and scroll up, stop
if ((roller_y+roller_h)<(mask_y+mask_h) && speed < 0)
speed = 0;
// if roller top reaches mask top and scroll down, stop
if (roller_y > mask_y && speed > 0)
speed = 0;
_root.main.verti.roller._y += speed;
}
stop();

On Mouse Movement
Here's what I need to do:
Let's say I have a movie clip that is 750x500 and within that
I've created a 300x200 square that is going to be the like the viewing screen for an image I need to load.
I want the image to be behind the box, so that when you move the mouse within the square you move to different sections of the picture...such as a map.

What is the best way to do that. I know it involves actionscript but it also involves some masking and I have more problem with the masking than the actionscript for some reason.

I saw a tutorial out there one time on moving the movieclip north, east, south, or west dependent on where the mouse was....that's part of what I need.

Thanks for taking the time to read this.
Jason

Copyright © 2005-08 www.BigResource.com, All rights reserved