How To Create A Messege That Appears And Follows The Cursor On An Over State?
Hi everyone I was curious, how would i go about creating a messege that appears and follows the mouse over a button. I was thinking do i make the messege into a movie with its alpha set to 0, when the button is rolled over set the messege alpha to 100 and make it follow the cursor? does that sound right, if so, how do i go about scripting all that. Any kind of help is rad thanks alot Matt
FlashKit > Flash Help > Flash MX
Posted on: 09-08-2005, 09:17 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Keep Cursor State Over Button
hi everyone...who reads this
I wanted to know, if is not to much to ask, to learn how to move the mouse over a button without the cursor to change to the little hand (yes keeping the arrow even on the 'hit' or 'down' state of the button). I'll appreciate anyone who has time to answer this.
Different State Of A Custom Mouse Cursor
Hi everyone,
Just want to ask how I can customize the different state of a button. I have already followed this action script for the mouse cursor.
onClipEvent (enterFrame) {
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
}
How about for the over state and on press state?
Thanks!
How To Create A 'visited' State For A Button
Im making a portfolio site, and iv got a load of little white outline boxes that become full white boxes on mouseover, then shrink a tiny bit when you click them. They then return to the outline state, and i was wondering if there was any way to make a button stay in a different state (when the mouse isnt over it) after youve already clicked on the link once.
hope you know what i mean, like links on the web, they go purple once youve already visited them once
beedle
Create Custom Cursor
Anyone have or recommend any software to create a .cur or .ani file from an image.
The custom cursor will be done in css for html and flash content.
Thanks
+
Create A Custom Cursor On Rollover
is there a way that i can create a custom cursor that is activated when i roll over and invisible button?
if so, what is the code?
Thanks
How To Create A Rubber-band Cursor
Hello everyone:
I want to create a rubber-band cursor (like the one in AutoCad, ie: the mouse cursor is replaced by a vertical line and a horizontal line. The intersection of the 2 lines is the mouse pointer). Does any one know how to do this ? I'm using Flash MX 2004.
Thank you in advance
John Ng
How Do You Create A Background That Moves In The Opposite Way To Your Cursor Please?
Hello,
I am trying to create the following:
My movie has a background. On this background is another background, slightly smaller. It is on this second background that everything else goes. What I would like is, when you move your mouse over the background, it scrolls in the opposite direction. So if you move the mouse down, the background scrolls up.
Does anyone know how to do this or point me to a good tutorial please? I am very new to Flash so please be detailed in your advice.
Many thanks
James
Create A Custom Mouse Cursor [NOTE: This Is Not A Question]
A lot of people have asked me how I create a custom mouse cursor. After seeing some people trying to use the startDrag() formula I decided to post a method in which you can create a mouse cursor the does not joult about and runs smoothly. For this tutorial I used Flash 8, although it is possible on all versions.
1. Create a movie clip in a blank document. The frame rate is not important, nor the background colour. Draw whatever you like for the movie clip but make sure the registration point is where you want the point of the mouse to be e.g. for a normal mouse the registration would be the top left.
2. Give it an instance name. To do this, click on the movie clip and go to the properties bar at the bottom of the screen. On the left hand side there is a box that says <instance name> in it. Type in the name there. I used the instance "cursor" for this. You may use this 1 since it means you will not have to change the actionscript I have written but it does not matter, it is easily changed.
3. Click on the 1st FRAME [the one you are in] on the time line. Then hit F9 to go into the actions panel. Then copy or type in this code:
Mouse.hide();
cursor.onMouseMove = function() {this._x = _xmouse;this._y = _ymouse;updateAfterEvent();}
Explaination:
Mouse.hide(); -
This hides your stanard mouse.
cursor.onMouseMove = function () { -
This tells flash that when the mouse moves, it should perform the actions inside the {} brackets to the specifyed movie clip [cursor]. If you gave your movie clip an instance name different to "cursor", delete cursor and insert it there.
this._x = _xmouse;
this._y = _ymouse; -
This is the action that flash will perform once the mouse is moved. It is saying that the specifyed movie clip x and y coordinates should be the same as the mouses.
updateAfterEvent(); -
This tells flash to update the frame each time the action is performed. It makes the mouse move more smoothly.
4. Hit Ctrl + Enter to see your work.
You are done!
However, if you wish to have an animated cusor, read on.
After you have created the movie clip [step 1], right-click and select edit in place or double click on it to enter the movie clip. Then insert a new keyframe and create your animation. Once you are done, select Scene 1 from just above the timeline to return to the main page then continue as according to this tutorial.
I hope this has helped you.
Let me know.
Peace out...
How To Create Mouse Cursor Witch Is Alway On Highest Level?
Hmm... here comes trouble! I think...
It's not my first time using a custom build cursor, but it's my first time using multiple loaded swf's in a full screen flash website.
I have a main swf, witch in I load my content swf. In my content swf is my main menu and nothing else, therefor I load the different sites into my content swf... with me so far?
PROBLEM -->
I now have a whole set of swfs witch is loaded and placed with the getNextHighestDepth() method, so where should I place my custom mouse cursor, so it will always stay on the highest level???
Hope U can help me out here!
Thnx
Down State In Drop Down Menu-then Return To Up State When Other Button Is Clicked?
Hi - nice to meet everyone,
The drop down menu I'm referring to is located in the main movie. The menu is a movie clip with the buttons inside and I have each button as 'track as menu item' in the properties. The buttons are linked to external swfs that load into an empty movie clip on the main stage. Everything loads perfectly no problem. The problem is that I can't seem to figure out the right code to put on the sub-menu items/buttons in the drop down menu to show the 'down' state when the corresponding movie is loaded (i.e., about-main button, philosophy [menu item], philosophy movie loaded). Then get it to go back to the 'up' state when another button is pressed in the same drop area part of the menu? I hope I explained myself clear enough without confusing anyone!
I would appreciate any help - I think I'm going to lose my mind - this is driving me crazy!!
Thanks - Allee
Active Button State/3 State Buttons
http://www.thecodebehind.com/code/flash ... state.aspx
Does anybody know anything about implmenting the above - but via an external class (.as) file?
I'm still learning, and so it's a bit much to wrap my brain around...
Over State Sound Replays On Down State
I am using Flash CS3 with AS3 and I just can’t figure out why when I put a sound on the over state of a button it plays again on the down state as well.
If you could please try this yourself and let me know what I am doing wrong I would greatly appreciate it.
1. Draw a rectangle 2. Convert to button 3. Double click on button and add key frames for up/over/down/hit states 4. Select the over state 5. Drag a sound onto the stage to add to over state 6. Ctrl + Enter to test movie
If you are having the same problem I am the sound will play on both the over and down states. Let me know if you know what I am doing wrong!
Thank you for your time.
Over State Sound Replays On Down State
I am using Flash CS3 with AS3 and I just can’t figure out why when I put a sound on the over state of a button it plays again on the down state as well.
If you could please try this yourself and let me know what I am doing wrong I would greatly appreciate it.
1. Draw a rectangle 2. Convert to button 3. Double click on button and add key frames for up/over/down/hit states 4. Select the over state 5. Drag a sound onto the stage to add to over state 6. Ctrl + Enter to test movie
If you are having the same problem I am the sound will play on both the over and down states. Let me know if you know what I am doing wrong!
Thank you for your time.
[Moved by Mod]
Cursor Speed And Direction Math To Jump Cursor
Looking for a little help.
I have a project that implements a jump type of desktop mouse interaction. Basically what this does is ...when the user moves the mouse, if moved fast enough (beyond a set speed threshold) the mouse jumps a predetermined amount in the direction the mouse was originally traveling. So I've tried to break it down this way.
First I need to calculate the speed. Based on the below code I can calculate speed on x and y axis but not sure how to evaluate overall speed as a function of both together.
Code:
attachMovie("mouseMC","mouse_mc",1000);
mouse_mc.onLoad = function() {
Mouse.hide();
};
var vxMouse:Number = 0;
var vyMouse:Number = 0;
var xi:Number = _xmouse;
var yi:Number = _ymouse;
mouse_mc.onEnterFrame = function() {
vxMouse = _xmouse - xi;
vyMouse = _ymouse - yi;
xi = _xmouse;
yi = _ymouse;
_root.speedX =vxMouse;
_root.speedY =vyMouse;
_root.cordX =xi;
_root.cordY =yi;
setProperty(this, _x, _root._xmouse);
setProperty(this, _y, _root._ymouse);
updateAfterEvent();
};
I have also added some code to provide a cursor trail.
Code:
onClipEvent (mouseMove) {
if (i >= 100) {
i = 0
}
i++;
this.duplicateMovieClip("flare"+i, i+10);
_root["flare"+i]._x = _root._xmouse;
_root["flare"+i]._y = _root._ymouse;
}
onClipEvent (enterFrame) {
if (this._name == "flareMC") {
_visible = 0;
} else {
this._alpha -= 5;
this._rotation += 2;
this._xscale -= 5;
this._yscale -= 5;
if (this._alpha<=5) {
removeMovieClip(this);
}
}
}
The next part is to evaluate the direction. Now I have done this in reference to a set spot MC using the following code accept that it doesnt update as the mouse moves therefor its only provides the direction from the starting point. Is there a way to update this on the fly as the mouse moves.
Code:
onClipEvent (mouseMove) {
//mouse angle code
x = this._xmouse;
y = this._ymouse*-1;
angle = Math.atan(y/x)/(Math.PI/180);
if (x<0) {
angle += 180;
}
if (x>=0 && y<0) {
angle += 360;
}
_root.angletext = angle;
updateAfterEvent();
}
Thirdly once I have the the speed and the direction how to I go about jumping the mouse distance x in the direction the mouse was moving?
I hope I explained this well enough...if not please shooot me some questions. Any help would be greatly appreciated.
Hand Cursor Turns To Text Cursor Over Button
if you goto the action section and then click the 13th from the left. ( kris foley) the hand turns to a text thing.
I'm not sure whats going on.
Thanks
http://www.ryanhamiltonphotography.com
Custom Cursor To Return To The Regular Mouse Cursor
How can I get my custom cursor to return to the regular mouse cursor when in the bottom 3rd of my flash movie. I need to do this for nav functions and I want the regular cursor actions in this area. So to recap: within the top 2/3 of the movie I will have my custom cursor, upon entering the bottom 3rd of my movie I need the cursor to switch back and vice verse...
my code below, please any suggestions are very helpful as I have tried several things:
stop();
import flash.events.Event;
import flash.events.MouseEvent;
import flash.ui.Mouse;
Mouse.hide();
stage.addEventListener(MouseEvent.MOUSE_MOVE, moving);
function moving(evt:MouseEvent):void {
if (cursor.currentFrame != 0) {
cursor.gotoAndStop(1);
}
cursor.x = stage.mouseX;
cursor.y = stage.mouseY;
cursor.mouseEnabled = false;
evt.updateAfterEvent();
}
//These three eventlisteners are telling flash to "listen" for specific events
//in our case if the mouse moves and if the mouse button is down or up.
//then if one of these events happens, it calls a function (mouse_down, mouse_up or moving).
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouse_down);
stage.addEventListener(MouseEvent.MOUSE_UP, mouse_up);
// This is how to construct a simple function,
// this function will write in our text field "mouse is moving"
// when the even is raised by the eventlistener
// function just like above, just for the mouse down event.
function mouse_down(e:MouseEvent) {
if (mouseX < 800 && mouseY < 450) {
timer.start();
timer2.start();
}
}
// function just like above, just for the mouse up event.
function mouse_up(e:MouseEvent) {
timer.stop();
timer2.stop();
}
Thanks again and help!
MC Follows The Cursor. How To Restrict The MC Movement And Not The Cursor?
I am trying to make something similar to this idea but my MC has a couple of buttons that follow the standard cursor - which is not hidden.
The movieclip movement is working by using:
Code:
onClipEvent (enterFrame) {
this._x += (_root._xmouse-this._x)/25;
this._y += (_root._ymouse-this._y)/25;
}
At the moment with this code, the button mc follows the mouse over the entire stage. I am trying to figure out how I can limit the movement to a smaller proportion of the stage, by either a hit area or some other method
Obviously I wont want this to effect the normal cursor movement, just the MC that follows it. Anyone give me a clue of how I should go about trying to do this?
Thanks
Preloader Bar Only Appears At 95%
My preloader bar only appears when the movie is 95% loaded...
Tried changing the properties of export movie from Bottom/up to Top/down...
still... it didnt worked...
tnx
Preloader, Appears 80% In? HELP ?
Lo guy's & Dolls, I am using some preloaders in a flash site, and i cannot work out why it is trying to load 80% of the second scene before it shows the preloader bar, there is nothing in with the preloader, i.e. something it would have to load first.
The preloader won't show say at 3% or 10% even, but waits until 80% in and then shows itself running along.
Problem is the client is saying well we can't see whats happening..which is right.
I have been over it aand over it and over it. had anyone come across this prob, and could perhaps give me some help??
-=Kev=-
Preloader Bar Appears Only After 50%
Hi,
I'm using Flash MX 2004.
I have several .swf files which I preload before playing. The preloader does work, but does not show up until after 50% or so are loaded. I can't figure out why.
Here is the as on the first frame of each .swf:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
And here you can see the preloader:
Preloader Check
P.S: Let intro play through, then click on one of the above buttons to check preloading. After clicking, preloader bar appeares after a few seconds underneath the "Klimen Car Design"-logo. Why does it show up only after about 50% are loaded? Appreciate your help!
--------------------------
Thanks 4 help in advance.
Disable MC's Once New MC Appears Above Them
Hi,
I've got several MC's which some of them are buttons.
Then I am using another MC on top of all them to display some data (like an internal pop up window). The question is simple. Once I have this pop up MC displayed I need the rest MC's disabled and vise versa.
The way I can achieve this is to use
mc01.enabled = false;
mc02.enabled = false;
mc03.enabled = false;
.....etc.
Is there any other way to do the trick?
thanks
Giorgos
Why It´s Only Appears 9 Images
Another problem.
I have a project of slideshow of images, it this with some defects, example, I have 10 pulled images being, but in the first time that I bring up to date one f5 in the HTML or Ctrl+enter in the flash, it alone he shows to 9 images it to me does not show the second image, and he finishes it is blank, does not appear nothing, but if I to leave it twirling, in the second time it shows the second image but he finishes it continues blank, acontence always, exactly if in param of the HTML I to only place 3 images, happens the same thing, follows the action.
imagem = new Array (_root.i1, _root.i2, _root.i3, _root.i4, _root.i5, _root.i6, _root.i7, _root.i8, _root.i9, _root.i10);
var QtdImagens = 0;
while (QtdImagens<10 && imagem[QtdImagens] != null)
{
QtdImagens++;
}
ImagemAtual = 0;
loadMovie (ExtDef (imagem[ImagemAtual]), "principal_mc");
function someName ()
{
ImagemAtual == QtdImagens ? ImagemAtual=0 : ImagemAtual++;
loadMovie (ExtDef (imagem[ImagemAtual]), "principal_mc");
}
var ImagemAtual = 0;
ImagemAtual = setInterval (someName, 6000);
stop ();
function ExtDef (s)
{
if (s.indexOf ('.') == -1)
{
return s+'.jpg';
}
else
{
return s;
}
}
White Box Appears Why?
Click the follwoing link and look for the white box that appears before the movie is loading up. Does anyone know how i can stop this happening or make it transparent so that all you can see is the cream background???
http://www.cherishedtrinkets.co.uk/blog/tester.html
Why It´s Only Appears 9 Images
Another problem.
I have a project of slideshow of images, it this with some defects, example, I have 10 pulled images being, but in the first time that I bring up to date one f5 in the HTML or Ctrl+enter in the flash, it alone he shows to 9 images it to me does not show the second image, and he finishes it is blank, does not appear nothing, but if I to leave it twirling, in the second time it shows the second image but he finishes it continues blank, acontence always, exactly if in param of the HTML I to only place 3 images, happens the same thing, follows the action.
imagem = new Array (_root.i1, _root.i2, _root.i3, _root.i4, _root.i5, _root.i6, _root.i7, _root.i8, _root.i9, _root.i10);
var QtdImagens = 0;
while (QtdImagens<10 && imagem[QtdImagens] != null)
{
QtdImagens++;
}
ImagemAtual = 0;
loadMovie (ExtDef (imagem[ImagemAtual]), "principal_mc");
function someName ()
{
ImagemAtual == QtdImagens ? ImagemAtual=0 : ImagemAtual++;
loadMovie (ExtDef (imagem[ImagemAtual]), "principal_mc");
}
var ImagemAtual = 0;
ImagemAtual = setInterval (someName, 6000);
stop ();
function ExtDef (s)
{
if (s.indexOf ('.') == -1)
{
return s+'.jpg';
}
else
{
return s;
}
}
Why It´s Only Appears 9 Images
Another problem.
I have a project of slideshow of images, it this with some defects, example, I have 10 pulled images being, but in the first time that I bring up to date one f5 in the HTML or Ctrl+enter in the flash, it alone he shows to 9 images it to me does not show the second image, and he finishes it is blank, does not appear nothing, but if I to leave it twirling, in the second time it shows the second image but he finishes it continues blank, acontence always, exactly if in param of the HTML I to only place 3 images, happens the same thing, follows the action.
imagem = new Array (_root.i1, _root.i2, _root.i3, _root.i4, _root.i5, _root.i6, _root.i7, _root.i8, _root.i9, _root.i10);
var QtdImagens = 0;
while (QtdImagens<10 && imagem[QtdImagens] != null)
{
QtdImagens++;
}
ImagemAtual = 0;
loadMovie (ExtDef (imagem[ImagemAtual]), "principal_mc");
function someName ()
{
ImagemAtual == QtdImagens ? ImagemAtual=0 : ImagemAtual++;
loadMovie (ExtDef (imagem[ImagemAtual]), "principal_mc");
}
var ImagemAtual = 0;
ImagemAtual = setInterval (someName, 6000);
stop ();
function ExtDef (s)
{
if (s.indexOf ('.') == -1)
{
return s+'.jpg';
}
else
{
return s;
}
}
A Green Box Appears
hi every one
once again i have a problem. im using the button compont in a swf but when i load it into another swf file and make the button go to a frame in the loaded swf it leaves a green box where the button was a bit like this
so if you can help thnks because this on got me stumped
Flash Layer Always Appears On Top
Can anyone tell me how to make the swf layer appear behind dhtml menus as they seem to cover the menus
Perhaps it's a layer thing ??? I dunno..
Thanks, Daniel
[Edited by react on 11-02-2001 at 06:15 AM]
Site Appears Blank On Web? Help
ok,
im new at this so bare with me. im sure there is an easy solution to this. my site works fine when testing it through flash but when i load it through my ftp program it appears blank or transparent on the web. ive stripped the site down but i have no clue whats going on so someone please give me a hand.
Preloader Percent Bar Only Appears At 95%
The percentage preloader i'm using only appears when it's 95% loaded.
I thought that it had to do with exporting the movie bottom/up and changed it to top/down...
still it didn't worked.
ANy ideas?
thnx
Preloader Appears Too Late
I have a Standard Preloader that i downloaded on this site, with bar+percents.
I put the preloader into the first frame of my scene,
my movie.swf on frame 2.
THE PROBLEM IS the preloader appears late, the bar is at 60% finished...
It works but it seems that the movie preloads 60% BEFORE go to frame 1 where my preloader is.
I hope its clear, sorry 4 my english.
Help me and THX.
?Choose What Appears In The Next Scene?
In scene 1, I have 10 check boxes (From the Flash MX components). In scene
2 I have a list of 10 independent lines of text.
How can I link the check boxes in scene 1, to the 10 items on scene 2, so
which ever checkboxes you select will deterimine which of the 10 items
appear in scene2?
Preloader Appears Very Late.
Okay, I doing this flash..about 1 MB and after I complete the scenes, I start creating the preloader.
The preloader works fine on testing but problems appear after I upload it.
The movie went blank for about a min and then it appears with the percentage being already 64% and then continues way up to 100%. I'm puzzle about what's taking the preloader so long go appear...
I thought at first that maybe My preloader BG's file size is too big so I got rid of it but it's no use. My preloader's only 4 frames with 5 layers.....all words and a small button.
Anyone tell me wat's wrong?
Thanks.........
Help Nothing Appears In The Preload Sequence
help!!!!
i have never encountered this problem before. when i test my swf file on my server, it comes up blank. it is still downloading in the stat bar. when the swf file is downloaded, then everything is fine.
i have checked everything from the frame script to just throwing out the preload scene.
any help would be greatly appreciated.
When The Animation Appears Really Slow...
I'm trying to make a flash site. the frame rate is 22-24 and when I test the movie on the hard drive the animiation is swift, but on the net, it became really really slow. I'm thinking maybe its because I'm using too many masks and images. Could that be why?? any suggestions? TIA
Movie Appears Smaller
When my movie is published the entire site appears smaller than when I've created it and I don't know why. Does anyone know why this happens? The fonts, etc are barely legible but in the .fla everything is normal.
Suggestions?
http://baseball.gigamanx.com/2ndpreload.swf
Preloader Appears After About 50%loaded
I have a main movie with a working preloader. on scene 3 (where my site is), i have a swf file that is loaded dynamically when it enters frame 1 (only 1 frame total in scene3). there is also a preloader in the first scene of the swf file that is being loaded.
the problem is, this causes the preloaders to only appear only after about 50% has already loaded.
i know i have read somewhere about this problem, but i can't seem to figure out how to solve it.
thanks for your help
Same Published Movie Appears Again, And Again And Again....
hello,
I have published movie stuck somewhere in my computer (or is it a flash bug??)
Every time I publish a new movie, the same movie, lets call it one.swf, appears, and under it the other movie that I try to publish. This has been going on for a while and the only way I can view my movie is if I minimize one.swf, and then the other movie appears behind it.
When I try to open any other swf I have created, it does the same thing.
I suspect its some setting that flash has set up and I need to erase it, or maybe something else.
Please help, is so annoying to have to see the same one.swf all the time b4 I view any other movie.
Thank you
gepo
MC Appears At Random Times.
I am wondering how to make the MC "bonus" appear at random times onto the stage and stay until the MC has stopped playing or it has been clicked on.
I.e
- after 5 seconds, "bonus" appears on stage.
- the 20 frames inside the MC play and then it disappears.
(I want it to show up at random times** not after 5 seconds over and over again?)
Anyone help would be appreciated.
MC Appears At Random Times.
I am wondering how to make the MC "bonus" appear at random times onto the stage and stay until the MC has stopped playing or it has been clicked on.
I.e
- after 5 seconds, "bonus" appears on stage.
- the 20 frames inside the MC play and then it disappears.
(I want it to show up at random times** not after 5 seconds over and over again?)
Anyone help would be appreciated.
How To Disappear A Movieclip When Other MC Appears?
Hello Flash "whatever" addicteds!
I get three movie clips, Flash 5, in the same scene, and when one of them appear, the other two might disappear.
What should I do into AScript?
Very thanks! God bless the Forum... ;-)
Text Appears Fuzzy
When ever I type on the movie the text comes out fuzzy, but text in the text box is crisp, is there any way to change this?
Text Appears Before On(rollover)
Dear all,
I'm using the following code to have a button that can toggle a set text over an input box:
on(rollover){
captionMC._visible = 1
}
on(rollout){
captionMC._visible = 0
}
I want users to be able to see the set text when they decide to press the button.
Ideas anyone? Take a look at what I've done.
|