Back Button Rollover Not Triggered If Mouse Hasn't Moved
Hi,
I have a strange flash problem that I can't find a solution for... obviously.
I have a movieclip that has 3 frames in it, it is a wizard-type movie.
On the first and second frame there are next buttons and on the second and third frame there are back buttons.
The next buttons and the back buttons are positioned in exactly the same place from frame to frame, so the mouse doesn't need to move to click back or next continuously.
The problem I am having is that if the mouse hasn't moved (at least 1 pixel) it is not registering the new button that appears below the cursor. So if you click on the back button in frame 3 you gotoAndStop on frame 2, there is a new back button displayed directly below the cursor. Clicking the mouse will not do anything. If you move the mouse 1 pixel it then sees the button and triggers the rollover event.
Is there an easy way to fix this problem that I'm missing? Is it common? Is there an actionscript hack that will solve it? Or should I just give up and tell the client that it's impossible and no one would want to use their stupid flash wizard anyway.
Thanks in advance for any help or suggestions,
Bejs.
FlashKit > Flash Help > Flash General Help
Posted on: 06-06-2006, 10:27 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
OnPress Doesn't Work If The Mouse Button Is Pressed Again But The Mouse Is Not Moved.
I have a very simple piece of code but it has one very annoying bug. When I press the button a second time, the code doesn't work. The only way to get the code to work is by moving the mouse a tiny bit, or moving the mouse off the button and back on.
Does anyone know a way to make a button that can be clicked many times without moving the mouse?
Code:
randommultiquiz.onPress = randommultiquizOnPress;
function randommultiquizOnPress() {
_root.attachMovie("connect", "newconnect", 200);
newconnect._x = 0;
newconnect._y = 0;
newconnect._xscale = 100;
newconnect._yscale = 100;
}
Rollover Button To Be Triggered By Area Smaller Than Button
I'm pretty new at Flash. I am creating a flash file to insert into a PowerPoint, since PP has no way to really use mouseovers. This is my first project, but I'm going to want to do a lot with this technique in the future.
I have an image of the toolbar of our software and images (transparent pngs) of the tooltips with arrows that will point to the icon.
I can make a roll-over button that only appears when the user rolls over the icon, but the tooltip text is wider than the icon that triggers it, so the buttons I'm creating overlap.
So I want the area that triggers the roll-over effect to be smaller than the button. Or is there a better way to accomplish this task?
Thanks for any advice!
Rollover Button To Be Triggered By Area Smaller Than Button
Newbie. Trying to simulate tool tips on roll-over toolbar
I'm pretty new at Flash. I am creating a flash file to insert into a PowerPoint, since PP has no way to really use mouseovers. This is my first project, but I'm going to want to do a lot with this technique in the future.
I have an image of the toolbar of our software and images (transparent pngs) of the tooltips with arrows that will point to the icon.
I can make a roll-over button that only appears when the user rolls over the icon, but the tooltip text is wider than the icon that triggers it, so the buttons I'm creating overlap.
So I want the area that triggers the roll-over effect to be smaller than the button. Or is there a better way to accomplish this task?
Thanks for any advice!
Rollover Button/movie In One Location But Triggered Differently
I'm Really new to Flash and can't seem to write code that will do the following (despite spending hours and hours reading, trying, reading, trying again)...
I will be eternally grateful for any advice on getting this to work!!!
Summary:
I have a button on a webpage (button1_btn) that, in its Over state should turn from a b&w graphic to a color graphic (this is easy) and when clicked, link to a new page (easy too). I have another button in a different location on the same page (button2_btn) that, when clicked, should triggor the first button's (button1_btn) nested movie image (which begins with the same b&w image as the button itself) to play. The only time this movie clip should play is if button #2 is clicked.
What I have done so far:
1) Dragged a button instance of button2 onto the stage (button2_btn). This is a very simple button whose only function is to triggor the first button's nested movie clip (buildingbw_mc) to play.
2) Created a movie clip (buildingbw_movie). On the first frame of this movie, I have inserted the code:
if button2_btn.addEventListener() {buildingbw_mc.gotoAndPlay(20, "Scene1")
}
on frame 20 of this movie clip, I have inserted the code:
stop()
3) Created a button (button1_button). In the Up and Down stage of this button I have inserted the above movie clip (buildingbw_mc). On the Over state, I have placed the color version of the b&w graphic (this part works fine); Down state gets the appropriate URL (this works too)
Dragged the instance of this button onto the main stage.
What actually happens:
Button #1's rollover and hit function work fine but the movie clip portion of button #1 simply plays (and loops) when the webpage loads.
What I want to happen:
When the page loads, button #1 should only respond if rolled over directly (in which case the b&w image simply changes to color - NO movie to be played), AND, if button #2 is clicked, the movie clip currently nested in button #1 plays one time.
Button Issue - Not Reseting Unless Mouse Is Moved
I am having a problem with a button, I am using two of them to skip back and forth through my frames with nextFrame and prevFrame, but my problem is that if you do not move the mouse around within the button, it will not work the second time after it is clicked. I want the button to keep working without having to move the mouse around within the button area. Is there a way to reset the button on a release or something? Any other suggestions?
On Load Button "over" Does Not Work Until Mouse Moved
hello,
i have a flash menu that loads from another page. when it loads, the users mouse pointer is over one of the buttons. (because they just clicked on a button on the past page in that same location). the button on the new page does not realize that the pointer is over it until the user moves the mouse slightly, then it switches to the "over" state. is there a way of letting flash know that the mouse is over the button, even though the mouse has not moved yet?
thanks!
Hmm...Button Won't "reset" Until The Mouse Is Moved
Hello,
I'm working on a photo gallery using xml and actionscript to load the images. Everything is working well except when you click the next image or previous image button once, you can't click it a second time unless you move your mouse a little. It will go into the down state when you click, but the image does not advance. Experimenting, it seems that also if I click very frantically without moving the mouse it will eventually "register" it and advance. What do you guys need to see in order to help me with this? (I haven't posted in the Flash forums before!) I can provide the actionscript if you like as well as a link to the swf.
Main Actionscript:
Code:
function loadPhotoXml(filename) //begin fuction: loads the xml file
{
PhotoXml.load(filename); //loads xml file into PhotoXML variable
PhotoXml.onLoad = function (success) //begin function check for success
{
if (success)
{
My_ParentNode = this.firstChild; //Set PhotoGallery xml object as My_ParentNode variable
Next_btn._alpha = 0;
Next_btn.enabled = true;
Previous_btn._alpha = 0; //disable both buttons
Previous_btn.enabled = true;
loadCombo(); //call loadCombo fuction
} // end if
};
} // End of the function
function showPhoto(CategoryName, PhotoNum)
{
for (var _loc2 = 0; _loc2 < My_ParentNode.childNodes.length; ++_loc2) //for each category
{
if (My_ParentNode.childNodes[_loc2].attributes.name == CategoryName) //if image is in selected category
{
var _loc3 = My_ParentNode.childNodes[_loc2]; //set current image xml data into _loc3 variable
My_TotalSlides = _loc3.childNodes.length; //get number of slides in category
} // end if
} // end of for
if (PhotoNum == My_TotalSlides - 1) //if it's the last image
{
Next_btn._alpha = 0; //disable next button
Next_btn.enabled = false;
}
else //if it's not the last image
{
Next_btn._alpha = 100;//enable next button
Next_btn.enabled = true;
} // end else if
if (PhotoNum == 0)//if it's the first image
{
Previous_btn._alpha = 0;//disable the previous button
Previous_btn.enabled = false;
}
else//if it's not the first image
{
Previous_btn._alpha = 100;//enable the previous button
Previous_btn.enabled = true;
} // end else if
var _loc6 = _loc3.childNodes[PhotoNum].attributes.filename;//set image url into _loc6
var _loc7 = _loc3.childNodes[PhotoNum].attributes.heading;//set image heading into _loc7
empty_mc.loadMovie("photos/" + _loc6);//load the image into the movie clip empty_mc
caption_text.text = _loc7;//load the heading into the dynamic textbox caption_text
/* empty_mc._alpha = 50;//make the image half visible
this.onEnterFrame = function ()//begin function to fade in image
{
if (empty_mc._alpha < 100)
{
empty_mc._alpha = empty_mc._alpha + 10;
} // end if
};*/
} // End of the function
function loadCombo() //begin function to load drop list
{
gallery_combo.addItem("-- select --"); //add select option
for (var _loc2 = 0; _loc2 < My_ParentNode.childNodes.length; ++_loc2) //go through the xml for each category
{
gallery_combo.addItem(My_ParentNode.childNodes[_loc2].attributes.name); //add category name to combo list
} // end of for
var _loc3 = new Object();
_loc3.change = function (evt) //begin function to load category when selected
{
if (evt.target.selectedItem.label != "-- select --") //so long as --select-- isn't selected in the drop menu
{
_root.empty_mc1._alpha = 0; //make image invisible
My_SlideNumber = 0; //set variable for slide number to 0
My_SelectedCategory = evt.target.selectedItem.label; //set variable to hold current category
showPhoto(My_SelectedCategory, My_SlideNumber); //show first slide in category
}
else //if --select-- is selected, clear image and text, disable buttons
{
empty_mc.unloadMovie();
caption_text.text = "";
Next_btn._alpha = 0;
Next_btn.enabled = false;
Previous_btn._alpha = 0;
Previous_btn.enabled = false;
} // end else if
};
gallery_combo.addEventListener("change", _loc3); //listens for the drop down choice to change
} // End of the function
var My_SlideNumber;
var My_TotalSlides;
var My_ParentNode;
var My_SelectedCategory;
var PhotoXml = new XML();
PhotoXml.ignoreWhite = true;
loadPhotoXml("photos.xml");
caption_text.text = "Select A Category"
On the buttons:
Code:
on (release)
{
My_SlideNumber = My_SlideNumber - 1;
showPhoto(My_SelectedCategory, My_SlideNumber);
}
Code:
on (release)
{
My_SlideNumber = My_SlideNumber + 1;
showPhoto(My_SelectedCategory, My_SlideNumber);
}
The XML:
Code:
<?xml version="1.0" standalone="yes" ?>
- <PhotoGallery>
- <category name="Landscapes">
<image filename="limg2.jpg" heading="Lake McDonald" />
<image filename="limg1.jpg" heading="Alpine Lake" />
<image filename="limg3.jpg" heading="Lassen National Park" />
<image filename="limg4.jpg" heading="Mountain Tahiti" />
<image filename="limg5.jpg" heading="Mountain Hood" />
</category>
- <category name="Flowers">
<image filename="fimg5.jpg" heading="Iris" />
<image filename="fimg2.jpg" heading="Daisy" />
<image filename="fimg3.jpg" heading="Dahlia" />
<image filename="fimg4.jpg" heading="Lily" />
<image filename="fimg1.jpg" heading="Apple Blossoms" />
</category>
- <category name="Others">
<image filename="oimg1.jpg" heading="Ballet" />
<image filename="oimg2.jpg" heading="Tropical Bloom" />
<image filename="oimg3.jpg" heading="Puppies" />
</category>
</PhotoGallery>
The SWF:
http://www.whitecapgraphics.com/gallery.swf
I appreciate any help. I'm not much of a flasher.
My Movies Refresh As If My Mouse MOVED
the website I'm talking about is...
www.acornentertainment.com/main.htm
I am building this web page and I have a movie file that will animate forward when the mouse rolls over it and animate backward on the roll-out. This is good. But when I reach where another menu is on the timeline and I still have my mouse on top of it, it will load agian. I just want it so that when I leave my mouse over it after I click on it, it just stays the way it is and doesn't refresh. I've attached an image of my timeline. It's solid all the way across and I just have some frame actions to stop at every menu. It might be too hard to tell, but maybe you had the same problem and can help me. Anyone?
ps. here's the script I used for the movie animation...
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
It was on this tutorial...
http://www.flashkit.com/tutorials/Ac...-804/index.php
Object Moved By Mouse Cursor
I like to make an object move away when your mouse cursor comes near it... can someone help me on this or with a tutorial?
thanx
Delimiting Mouse-moved MC Area
hi.
i was wondering if you could help me with this:
i need to use actionscript so a movie clip can follow the mouse movement, that's easy. what i don't know how to do is to delimit an area for that, since the scripts i've read use the whole document size.
i'm making this doll and want her eyes to follow the mouse without the iris/pupil getting out of the sclera, leaving the doll looking like a zombie and i have no idea of how to do it. help!
http://danae.tv/solongasweare.html
How To Make Movie Clp Play Thru Even If Mouse Is Moved Off
i want to know what the best way is to make a movie clip play thru to the end even if i take my mouse off it. for instance: if i want a button of a bug to take off (just the picture of the bug) and fly in a loop and stop back at the beginning... even if the mouse moves away...? help
Mouserollovers Get Stuck When Mouse Moved Swiftly...
Hi,
Thanks to all for the tips that have who've helped me get this far with putting together my first completely flash site. I'm getting some probs with my buttons; I'm using a movie clip as a button, with the buttons in the movie clip itself, controlling the different mouse states with actions. It's working great, and giving me great flexiblity to create complex mouseover effects using clips. However...what's happenin is when the mouse is moved fast over the 'button'(actually a movie clip) the button/clip will stay open, stuck on the rollover state.
Here's the simple code I'm using for example for the button to play a rollover movie clip:
on (rollOver) {
play (10);
}
on (press) {
gotoAndPlay (35);
}
Anything I can add to this to ensure the clip stops precisely no matter how fast the mouse movement?
Thanks a bunch
blk
OnRollOver Functions Only Work When Mouse Is Moved? How Do I Fix This?
ok i have a code i want it to blink between the hand cursor and normal cursor when i roll over a box i have on the stage... the code works as long as i keep moving the mouse over the box... i want it to work even when im not moving it... just as long as my mouse is over the box,.
here is my code...
on the stage all i have is a movie clip called box... nothing else
ActionScript Code:
/* variables below are defined... they will make more sense as you read
through the rest of my code... (onEnterFrame and below..)
~ og
*/
mouseblinkspeed = 30 // speed that the mouse blinks at
show2 = 1
myTimer = 1
myTimer2 = 1
/*
end of defining
*/
_root.onEnterFrame = function() {
box.onRollOver = function() {
box.onEnterFrame = function() {
myTimer = myTimer + 1
myTimer2 = myTimer2 + 1
if (show2 == 1) {
box.useHandCursor = false;
if (myTimer >= mouseblinkspeed) {
show2 = 2
myTimer = 1
myTimer2 = 1
}
}
if (show2 == 2) {
box.useHandCursor = true;
if (myTimer2 >= mouseblinkspeed) {
show2 = 1
myTimer = 1
myTimer2 = 1
}
}
}
}
}
Make A Video Play While Mouse Is Not Moved For A While?
hi, im working on a flash website which uses a virtual coach to guid the users trought the site. this is done via video greenscreen captures of an actor. now i want to make a script that works kinda lika an screensafer. when the mouse is not moved for a while i want to play an randome video, and when the mouse is moved again i want to stop the randome playing. i have 5 video scenes to choose from. it should work like the virtual coach makes some funny things while the user doesent do a thing.
the only problem is, i have no idea of how to pull of something like this, cause im a total as3 noob.
i know its a very special question and i hope you can help a me.
thanks so much in advance.
Mouse Over Triggered Action In Flash MX
hello! hope someone can help me out. I am a newbie using Flash MX and I have a basic question. I am sure you all have seen this on a lot of flash websites: when your mouse hovers over a graphic object or whatever, and an action happens. just in case, below is a link to a website that demonstrates what i'm talking about:
http://www.sonymusic.co.jp/Music/Inf...eng/index.html
you'll notice that if you mouseover the words information, profile, and mail on that website, flowers will appear and disappear. I am looking to do a similar function on my website. So if any one can provide me with an example of the actionscript needed to do this simple function, it would be much appreciated! Remember, I am using Flash MX. peace~
Menu Bar Triggered By Mouse Position--please Help Me
My code is below. What am I doing wrong? I am trying to have my menu enter the stage and exit the stage when the mouse goes below/above a certain point (425px). I could really use someone's help.
navBar == 0;
Mouse.addListener(listener);
if(_ymouse >= 425){
trace("hi");
navBar_mc.gotoAndPlay("intro");
navBar == 1;
}
else{
if ( _ymouse <= 425 && navBar == 1) {
navBar_mc.gotoAndPlay("exit");
navBar == 0;
}
}
OnEnterFrame Triggered By Mouse Events
So basically my idea is as follows, i have this shape stored within a movie clip, instance named "maskMC", that i want to use as a mask for other movie clips, no big deal so far.
But the idea is to trigger onEnterFrame events for this mask to expand in x and y whenever i mouse over or click it etc.
My first attempt was to write something like this. Code:
_root.maskMC.onRollOver.onEnterFrame = function(){}
However i quickly realised this wasn't gonna work, so i tried variables instead, but for some reason, it seems like Flash will only see one of the mouse events.
For instance, when i added my onRelease part of the code, the only thing that would work was when i clicked the MC, not when i rolled over it.
Any ideas on how to solve this problem?
Code:
_root.maskMC.onRelease = function() {
clicked = true;
}
_root.maskMC.onRollOver = function() {
rolloverred = true;
}
_root.maskMC.onRollOut = function() {
rolloverred = false;
}
if(rolloverred == true){
_root.maskMC.onEnterFrame = function() {
if (_root.maskMC._yscale < 600) {
_root.maskMC._yscale += 8
}
}
}else{
if(_root.maskMC._yscale > 500) {
_root.maskMC._yscale -= 8
}
}
_root.maskMC.onEnterFrame = function() {
if(clicked == true) {
if(_root.maskMC._xscale < 1000) {
_root.maskMC._xscale += 12
}
}
}
Buttons Sticking Or Losing Focus Until Mouse Is Moved
I've built a language lesson tool which uses forward and back buttons to scroll through a series of movieclips which have data loaded into them from text files. There is always a current, previous and next screen loaded so that movement from one to the other is instant. If you move forward, the last movieclip is removed and a new one added on to the beginning and the opposite occus if moving backwards.
The problem I am having is that the buttons sometimes "stick." Meaning I can't just keep clicking "Next" to move through the screens because clicking on Next does nothing. If I move the mouse just ever so slightly, the button works again.
Here is the swf: http://www.loquella.com/learn-spanish
Anyone have any idea why this occurs? It is not consistent, doesn't happen all of the time. You are more likely to experience the problem if you use the drop downs to change the sentence number and then start using the buttons
Event Triggered By MC Mouse Click Problem
Hi all
I have a problem that i just cant work out, but am convinced is pretty simple to accomplish.
What im trying to do is to get a MC (test) to animate when i click a MC (nubo) with an onRelease function.
the MC buttons code is set withing a frame script on the main timeline like so:
nubo.onRelease = function ()
The target MC (test) has code within it that tells it to animate to a designated position:
onClipEvent (enterFrame) {
speed = 5;
if (this._y > 110) {
this._y -= speed;
} else {
this._y = 110
}
}
Of course it cannot be achieved using the above onClipEvent - that was solely to get the MC to move the way i intend it to move when it gets the message from the nubo MC.
And there lays the problem - how do i write the code that the target MC activates the code on/within it when i click the nubo MC.
This does not appear to be the most complicated thing to do in Flash, far from it - it appears (to my primative knowledge) to require some kind of conditional referencing i.e:
if the nubo MC is clicked then * = true, which activates the relavent code on the test MC which is dependant on a kind of: if * == true then activate my own motion code.
if that makes any sense.
i'm not versed in the way of listeners, so i have'nt tried that (or know how to).
can someone be so kind as to provide the framework or structure i need to create to accomplish my goal
i have been away from flash for a good year or so, so be very easy on me.
many thanx to all that can help
Event Triggered By MC Mouse Click Problem
Hi all
I have a problem that i just cant work out, but am convinced is pretty simple to accomplish.
What im trying to do is to get a MC (test) to animate when i click a MC (nubo) with an onRelease function.
the MC buttons code is set withing a frame script on the main timeline like so:
nubo.onRelease = function ()
The target MC (test) has code within it that tells it to animate to a designated position:
onClipEvent (enterFrame) {
speed = 5;
if (this._y > 110) {
this._y -= speed;
} else {
this._y = 110
}
}
Of course it cannot be achieved using the above onClipEvent - that was solely to get the MC to move the way i intend it to move when it gets the message from the nubo MC.
And there lays the problem - how do i write the code that the target MC activates the code on/within it when i click the nubo MC.
This does not appear to be the most complicated thing to do in Flash, far from it - it appears (to my primative knowledge) to require some kind of conditional referencing i.e:
if the nubo MC is clicked then * = true, which activates the relavent code on the test MC which is dependant on a kind of: if * == true then activate my own motion code.
if that makes any sense.
i'm not versed in the way of listeners, so i have'nt tried that (or know how to).
can someone be so kind as to provide the framework or structure i need to create to accomplish my goal
i have been away from flash for a good year or so, so be very easy on me.
many thanx to all that can help
RollOver When Mouse Button Is Down
Anyone know if there is a way for a rollover to still work while the mouse button is down? I have a mouse listener set up, and Im trying to make it so you can hold the mouse button down and activate buttons by rolling over them. As it stands right now, it doesnt even detect a roll over when the mouse button is down. Any ideas?
No Mouse Hand On Button Rollover
I remember seeing a tutorial ages ago for creating a button that has no mouse hand on rollover, it did this by faking it somehow, anyone know how this can be done? I don't want to use mouse hide and replace the cursor, it must be the original mouse pointer.
[CS3] Dragging Mouse Over Button - Want Rollover To Work
I would like to be able to click the mouse down on a bat, whilst the mouse is held down drag it over a target and then play a movie clip.
This is what I have so far:
on(rollOver){
if (handisDragging){
spank.gotoAndPlay(2);
} }
but it isn't working, 'hand' is the name of the object being dragged over and 'spank' the name of the movie clip.
Making Movie Play When Mouse Is Moved But Letting It Finsh When Stopped Moving....
Hmm I don't ask for much do I?
Basically what I have is a logo, that is writing with animated radio waves spewing out of it. The movie takes about 1 second to finish and its on a loop. I find this quite distracting as its on the site the whole time, so I thought it would be nice to have it only playing when the mouse is moved (anywhere on the screen), and have it stop when the mouse is at rest. However, when the mouse is stopped, it lets it finish the loop its on, so it looks nice.
I don't know much about Flash, so is it possible (and how!), and am more than willing to help with any PHP/MYSQL stuff in return. Cheers.
Button Problem: Animation Stops When Cursor Is Moved Off Of Button.
I have a row of buttons for my navigation bar. On the over state of each button I placed a quick movie clip. I'm trying to figure out how to get the movie clip to complete even when the cursor is moved off of the button. As it stands right now, if I move my cursor off the button the movie clip cuts out and the button returns to its original state.
Any help would be very much appreciated.
Thank you.
Ease Function Not Triggered, Trace Triggered
Here is my code Everything loads and I get the traces Hey, Buddy when I execute my code but doEase() does not trigger. If you give me an email I will be glad to send a zip of all the test files.
Attach Code
this.createEmptyMovieClip("container_mc", this.getNextHighestDepth());
Movieclip.prototype.oldLoadMovie = Movieclip.prototype.loadMovie;
Movieclip.prototype.loadMovie = function(url, vars) {
if (this.onData != undefined && this.onData != null) {
this._parent.createEmptyMovieClip("__fixEvents", 7777);
this._parent.__fixEvents.theTarget = this;
this._parent.__fixEvents.onData = this.onData;
if (this.onLoad != undefined && this.onLoad != null) {
this._parent.__fixEvents.onLoad = this.onLoad;
}
this._parent.__fixEvents.onEnterFrame = function() {
this.oldv = this.v;
this.v = this.theTarget.getBytesLoaded();
if (this.v != this.oldv) {
this.onData.call(this.theTarget);
}
if (this.v == this.theTarget.getBytesTotal()) {
this.theTarget.onData = this.onData;
if (this.onLoad != undefined) {
this.theTarget.onLoad = this.onLoad;
}
this.onLoad.call(this.theTarget);
this.removeMovieClip();
}
};
}
this.oldLoadMovie(url, vars);
};
/////////////////////////////
var easing = 0.2;
var targX = -10;
var targY = 250;
/////////////////////////////
namesArray = new Array("bg", "widget1", "widget2", "widget3", "MainLogo", "MainMessage");
locationsArray = new Array([0, 0], [-500, 250], [275, 225], [445, 250], [530, 105], [410, 23]);
for (var i = 0; i<namesArray.length; i++) {
//create a clip on the root using a reference
container_mc.createEmptyMovieClip(namesArray[i]+"_mc", i);
container_mc[namesArray[i]+"_mc"]._x = locationsArray[i][0];
container_mc[namesArray[i]+"_mc"]._y = locationsArray[i][1];
container_mc[namesArray[i]+"_mc"].onLoad = function(){
trace ("Buddy");
container_mc.widget1_mc.doEase();
}
container_mc[namesArray[i]+"_mc"].onData = function(){
trace ("Hey");
}
if (i == 0) {
container_mc[namesArray[i]+"_mc"].loadMovie("images/"+namesArray[i]+".jpg");
} else {
container_mc[namesArray[i]+"_mc"].loadMovie("images/"+namesArray[i]+".swf");
}
}
//////////////////////////////
function doEase(target) {
target.onEnterFrame = ease;
function ease() {
var dx = targX-this._x;
var dy = targY-this._y;
if (Math.abs(dx)<=1) {
this._x = targX;
this._y = targY;
delete this.onEnterFrame;
trace("done");
} else {
var vx = dx*easing;
var vy = dy*easing;
this._x += vx;
this._y += vy;
}
}
}
//////////////////////////////
//////////////////////////////
var myXML_xml = new XML();
myXML_xml.ignoreWhite = true;
myXML_xml.onLoad = myFunction;
myXML_xml.load("xml/links.xml");
function myFunction() {
for (i=1; i<=4; i++) {
_root["link"+i] = myXML_xml.firstChild.childNodes[i-1];
//trace(_root["link"+i].firstChild);
container_mc[namesArray[i]+"_mc"].onPress = function() {
getURL(_root["link"+this.id].firstChild, "_parent");
};
}
}
///////////////////////////////
Button(rollOver) Makes Movieclip Follow Mouse
The title basically explains it.
I have 2 movieclips.
One is base (border)- on rollover, Pop is supposed to follow the mouse
The other pops up when rolling over border (Pop)- _alpha is set to 0 when rolled out of border
Border Actions:
ActionScript Code:
on(rollOver){
_root.Pop._alpha=100;
_root.Pop._x = _xmouse;
_root.Pop._y = _ymouse;
updateAfterEvent();
}
on(rollOut){
_root.Pop._alpha=0
}
My question: How do i have Pop follow the mouse, on(rollOver) of border?
Can You Use The Back Button In A Browser To Go Back To Go Back In A Flash Movie?
Hi
In html pages it is easy to go back (the back button in the browser) to the last page you were on. But when you have got a flash site in a html page you cannot go back to the last page in the flash site using the 'back' button in the browser. Is there anyway you can change this so that you can use the back button in a browser to go back to the last flash frame?
Why Is My Button Only Triggered By The Text?
I am creating a button, and it is only triggered when the mouse is precisely positioned over the text. How do I trigger the button events just simply over a block area?? I have a rectangle as part of the button with the text on top and would have figured that the mouse events would trigger anywhere on the rectangle and text, but such is not the case.
I know this is probably a dumb question, but I am simply stuck here.
Thank you in advance!
-Robbie
Button-Triggered Fading
I can't seem to get this for some reason..
I have a button. When you roll over the button, a movie clip appears (just an attachMovie, no fading).
However, I want a different effect for when I roll off the button. I want the movieclip to fade out (using alpha) on that rollout.
Can anyone provide some help?
Button Triggered Popups
Hi!
Question: Being new (and green) to Flash I am obviously in dire straits looking for a solution to the following problem which might be fairly easy for an advanced Flasher to solve:
I need to make an interactive map of a country with information popup windows. Here is what I mean: the country is divided into 16 regions: when a user scrolls over a region it changes its look (this I can do), when a user clicks on a region a text window appears with information about the region--this information should include links to additional pages and this text window should stay visible only when the user decides to use it and disapear when the user moves onto another region. If you know of a toturial about it or an example I can examine I'd really appreciate it. Can anyone help? Thanks.
Juru
Button Triggered Animation, But Only Once?
I am in the process of creating a flash based website. It will be one main .swf that loads external .swf(s) when a button is clicked. This is not a problem, as I have created a site before like this, where there are transitions and a preloader. But with this particular site, I would like it to start out with the menu (four different buttons) in the center of the page, then when you click on any one of them, this menu moves over to the side, and loads the respective .swf. Then if the user clicks a different button on this menu (which is now to the side) it loads that button's .swf but without the menu snapping back to the middle and then re-animating to the side. Does this make sense? I am just unclear on what method of AS to use to accomplish this. Much appreciated! Thanks
-Filmguy
Button Triggered Popups
Hi!
Question: Being new (and green) to Flash I am obviously in dire straits looking for a solution to the following problem which might be fairly easy for an advanced Flasher to solve:
I need to make an interactive map of a country with information popup windows. Here is what I mean: the country is divided into 16 regions: when a user scrolls over a region it changes its look (this I can do), when a user clicks on a region a text window appears with information about the region--this information should include links to additional pages and this text window should stay visible only when the user decides to use it and disapear when the user moves onto another region. If you know of a toturial about it or an example I can examine I'd really appreciate it. Can anyone help? Thanks.
Juru
Background Change Triggered By Button
Hi!
I have calmed through the forum but didn't seem to find the full answer for my problem.
Here it goes. I have a movieclip which on rollover triggers the whole background picture to change, but when I would rollout the movieclip, the background picture should change back, or if I rollover other movieclips, the background picture of should change too.
My problem is, that the background picture is part of the movieclip and whenever I rollover it and then rollout it, the background picture stays the same because it fills the whole background, hmm.
I have received help, but not so I would be able to solve the issue.
Please help
Thanks
Button Triggered Object Movement
alright i know i can tell a target to change it's position on(press) of a button.
i would like to rewrite
Code:
on(mouseOver){
box._x+5;
}
so that you don't have to keep putting the mouse on and off the button but you can just leave the mouse over the button and the object will move
i'm sure it's a simple solution i'm just not thinking of at the moment, your help is greatly appreciated
thx
Image Transition, Button Triggered
Hi!
I need some actionscript help or other..
What im trying to achieve is an alpha effect with image transitions.
I have some links that I want to make an alpha fade for images when the users passes over the buttons.
The effect that im searching for is like this one:
http://www.kirupa.com/developer/mx/alpha_fade.htm
.
But only, they should be triggered by rollovers not mousemovement. In addition i have some images connected to the buttons. for instance on productslink the product image should be "alpha 100%" and the previous image should animate from 100 to 0 % alpha.
Any ideas??
cheers!¨//Avaloon
Image Transition, Button Triggered
Hi!
I need some actionscript help or other..
What im trying to achieve is an alpha effect with image transitions.
I have some links that I want to make an alpha fade for images when the users passes over the buttons.
The effect that im searching for is like this one:
http://www.kirupa.com/developer/mx/alpha_fade.htm
.
But only, they should be triggered by rollovers not mousemovement. In addition i have some images connected to the buttons. for instance on productslink the product image should be "alpha 100%" and the previous image should animate from 100 to 0 % alpha.
Any ideas??
cheers!¨//Avaloon
Image Transition, Button Triggered
Hi!
I need some actionscript help or other..
What im trying to achieve is an alpha effect with image transitions.
I have some links that I want to make an alpha fade for images when the users passes over the buttons.
The effect that im searching for is like this one:
http://www.kirupa.com/developer/mx/alpha_fade.htm
.
But only, they should be triggered by rollovers not mousemovement. In addition i have some images connected to the buttons. for instance on productslink the product image should be "alpha 100%" and the previous image should animate from 100 to 0 % alpha.
Any ideas??
cheers!¨//Avaloon
Fuse Animation Triggered By A Button
ok I have a very simple fuse animation which is triggered by a couple different buttons. A next and prev btn cause a movieclip to scroll up and down. Now I want to keep the movieclip from scrolling beyond its beginning point and and the end point which is dynamically calculated. This all works like it should. The problem is if you click on the button too quickly it throws off the movieclip position calc. Is there a better way to do this or a way to test if the fuse animation is still running.
Anyway here is the button code:
Code:
next_btn.onRelease = function()
{
var cpos = grid_mc._y
var posMax = (Math.floor(numItems/6))*170;
if(cpos != (0 - posMax))
{
var f:Fuse = new Fuse( { _y:'-170'});
f.target = grid_mc;
f.start();
}
}
Advice On Smooth-fading, Button Triggered Images
Hi,
I'm going after an effect that when the user moves over a button a logo slowly fades into the background, then when the move over another button a different logo.
I could manage that all fine but the problem I forsee is not being able to make it smooth, i.e. If the users brings up image1, then quickly brings up image2, if I use dragOut/rollOut to link to the 'fading out' section of tweening it will abruptly cut from being 50% alpha'd in to being 100% and then fading out.
Clearly the answer lies in code not using predefined animations (although I can think of ways to do that)
So I need a bit of guidance as to what commands etc to use, I've had a look at some tutorials that look helpful but sorting what I need and what I don't is a bit tricky.
mouseOver button1 -> (Image One) fades in
mouseOver button2 -> (Image One) fades OUT, but from the _alpha it had currently reached while (Image Two) alphas in from zero
There are other butons also
Thanks in advance for any help
- Psaldorn
Advice On Smooth-fading, Button Triggered Images
Hi,
I'm going after an effect that when the user moves over a button a logo slowly fades into the background, then when the move over another button a different logo.
I could manage that all fine but the problem I forsee is not being able to make it smooth, i.e. If the users brings up image1, then quickly brings up image2, if I use dragOut/rollOut to link to the 'fading out' section of tweening it will abruptly cut from being 50% alpha'd in to being 100% and then fading out.
Clearly the answer lies in code not using predefined animations (although I can think of ways to do that)
So I need a bit of guidance as to what commands etc to use, I've had a look at some tutorials that look helpful but sorting what I need and what I don't is a bit tricky.
mouseOver button1 -> (Image One) fades in
mouseOver button2 -> (Image One) fades OUT, but from the _alpha it had currently reached while (Image Two) alphas in from zero
There are other butons also
Thanks in advance for any help
- Psaldorn
Keyboard Back Button Acting As Browser Back Button
I'm having problems with a Flash MX Sign up form I'm implementing on my website.
The form has a series of frames which take the user through the sign up process, before clicking through to the online payment gateway. Each of these frames is anchored to allow the user to click the browser Back button to go back to the previous frame (rather than the previous movie).
However, the keyboard back button is now acting as a browser back button.... Any ideas why?
Any help with - or solutions to this probelm - would be greatly appreciated.
Thanks in advance for your time.
Regards
Rob
|