Invisble Button And Rollover Issue
I have a banner with an invisble button that covers the entire banner. Underneath I have a basic rollover that text changes color when I rollover. The invisble button however blocks the rollover. How do I fix this?thanks
Adobe > Flash General Discussion
Posted on: 01/27/2009 07:14:20 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Make Button Invisble When Movie Starts To Play
I have a FLV file in a FLVplayback component. Once it has played and reaches the end I have a button become visible. But my delimma is if I want to watch the movie again and click play, the button remains. How can I make it go back to being invisible until it reaches the end again?
Any help would be greatly appreciated.
thepopguy
Rollover Button Issue
ok so i have 5 buttons, when i roll the mouse over them i would like to have a text box change content saying what each button is. admin, home, about, contact, projects.
anywho i have this setup
admin.onRollOver = function(){
buttonName.text = "admin";
}
home.onRollOver = function(){
buttonName.text = "home";
}
etc...
now nothign is happening, the text box's name is buttonName, and it is a dynamic text box
thanks for your help.
RollOver/Out Button Issue
Hi , i need some help with a rollover button i made using this code.
stop();
catreApicultura_mc.addEventListener(MouseEvent.ROL L_OVER, rolover);
catreApicultura_mc.addEventListener(MouseEvent.ROL L_OUT, rollout);
catreApicultura_mc.addEventListener(MouseEvent.CLI CK, gonext);
function rolover(event:MouseEvent):void {
stage.removeEventListener(Event.ENTER_FRAME, rewind);
catreApicultura_mc.gotoAndPlay(2);
//basically it plays an animation that is inside catreApicultura_mc until last frame where there is a stop();
}
function rollout(event:MouseEvent):void {
stage.addEventListener(Event.ENTER_FRAME, rewind);
}
function rewind(event:Event):void {
catreApicultura_mc.prevFrame();
}
function gonext(event) {
gotoAndStop(2);
}
The problem is, when i get to frame 2 of the file (using the button) i get this output error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Apicultura_fla::MainTimeline/rewind()
Edit: I forgot to mention the button in the next frame does no exist and i do not want it to exist there.
Is there a way to fix this? or is my code wrong? Please help. Thank you
Here is the .FLA for the RollOver button.
Button Rollover Issue
I'm very new to Flash so this probably isn't all that difficult. I want to change a pushbutton so it will be brighter when my cursor is over it. I've managed to do that (I went into the library and changed fpb_over, deleted frame5, added a new symbol that was just a lighter colored square than the default and named it frame5). It seems to work, except when I mouse over the new symbol moves SLIGHTLY (1 or 2 pixels) to the right and everything else stays as it should. The bigger the button is, the more it moves to the right. I've checked multiple times and all of the symbols in fpb_over have the same coordinates and width that they do in fpb_up, so this doesn't make a whole lot of sense to me. What else do I have to change to get this to work?
Button Rollover Issue
Hey everyone,
I have a small problem. I've created a button so that when you do a rollover, text that describes the function of the button appears above it. The problem is when you roll over the area in which the text loads, it appears also. I just want the text to appear ONLY when you're over the button. Any suggestions?
Rollover Button Sound Issue
I have a rollover button for my index page to my site. And for some reason when you leave the mouse over the button the sound just seems to loop. Does anyone know why this is?
Button Rollover Layering Issue
I'm using Flash 8. I'm currently upkeeping a large flash site that is essentially a map with cities in text. Rolling over the text has various images that appear over the map. The images are unique to each city.
Now, there are a -lot- of cities on this map. Since I got a hold of these files, there is currently 2 layers: map background and layer containing all the cities. Cities are buttons.
My problem is, as I am adding new rollover images, layering is becoming a problem. These images are being bled into from the other city buttons below it. Since no button is on its own layer, how can i fix this? Is there a script or anything that will move the rollover images as the top layer?
Note that it is impossible at this point to move the buttons to their own layers. Currently, I am just attempting to place these new images in an area on the map where there isn't any buttons to interfere -- i'm running out of space.
(Sorry, I would link to the site, but for some reason the domain is down. I do not have the rights to post the .fla file here.)
Rollover Movieclip/button Issue
okie so...i haven't really searched for another similar post, but then again..i don't know what to search for... basically, i have this animated button, pretty similar to what lee did...it's after his idea, you know... but i'm having some trouble... so onRollOver, onRollOut..i did it differently. i had the movie clip containing the background square, a graphic, and then, a button with the text in it, and the on(rollOver/Out) actions applied directly to the button. when the button reaches that middle area, when i click it, i want it to play some labeled frame... but..it won't..i've tried a whole lot of things, but i'm not sure i tried them in the right way, or all of them, for that matter...
here is the file
http://download.yousendit.com/B446101C47D28E01
(in lack of better hosting ideas)
so...any help is welcomed...
cheers
Complex Button RollOver/RollOut Effects: Issue...
Hey people...
I was following the tutorial for a RollOver/RollOut effects button...and I came into a snag. Everything worked great...with exception for a little bit that I wanted to change.
I wanted the RollOver/RollOut effect but have multiple buttons with different links. In this tutorial, you can only go to one URL. I was interested in using the RollOver/RollOut feature as part of a custom drop down menu in flash.
To get a better understanding of exactly what I'm trying to do...here is a link to my swf file...
http://smartnetnyc.com/2007/top_nav.html
I've also zipped up and attached the file that I'm working with. If this is something too complex to simply take care of, I'm more then willing to pay you for your time.
Issue On Rollover Button - Works On Sides Of Object Only...
Using Flash 8;
Using timeline-based animation, not actionscript;
Hello,
I could not find this previously posted, please forgive me if it was!!
I have created a few buttons, button symbols, with the up, over, down and hit states.
My hit state is a rectangle which is much larger than the button text. My problem comes during runtime, when the user rolls over the buttons.
It seems the buttons only react to the Over State, when the mouse enters or rolls over the edge of the Hit State. When the mouse is over the middle it does not react and show the "over" color as I would think it should.
Also, the mouse-pointer icon changes from the pointer (arrow) to the hand on the button rollover, which is correct, but then when it's directly over the middle of the hit area, the icon changes to the icon which looks like a capital "I", a line vertical line with two horizontal lines on top and bottom.
Does anyone know how to correct this? to get the icon to remain a "hand" on rollover, not just when it enters or leaves the hit area? Also, how do I get the "over" state to actually remain there when the mouse is over the direct middle of the hit area, not just leaving or entering the hit area?
thank you for your help!!
Dave.
Movie Clip/button Issue With Rollover/rollout AS
I have movie clips on my root timeline that are controlled with onRollover/onRollOut actionscript. Basically, when you rollover it will play the movie clip from frame 2 - 7. When you rollout it goes to frame 8 and plays through to frame 1. On frame 7 of the movie clip is another movie clip that has buttons in it. The buttons do not act as you would expect, and I'm pretty sure it's because of the rollover/rollout actions on the parent movie clip. How do I solve this issue?
MC Button Issue On RollOver...need Some1 To Push Me In Correct Direction/cliff
Hi all,
This has been killing me for 2 days now and I just can't get over why its not functioning.
Ok I have 2 button mc on the stage (for the example). Basically when you rollOver btn 1 it tells that mc's timeline to go to a frame label and on mouse out to another label that eventually lands back to the start. Part of the rollOver animation is suppose to cover up the second button. So essentially i have a blue and orange button...I roll over the orange button the blue button becomes orange as well. If I release the btn the frame gets stopped and all you see is the orange button and the other button is orange as well.
Just thinking section basically. Section one will show all the squares in orange and section 2 will show them in blue when clicked on respectively. I will show additional navigation in part 2 that will allow the user to click back to the original.
I have tried numerous things to this point. I have tried nesting the movies and calling them from the main stage etc but it just seems that the mc's I am hiding cause some sort of glitch. I attached my flash file and a jpeg.
Maybe I am attacking this incorrectly from an AS perspective I can't tell at this point...any feedback would be wonderful.
Code:
var link = 0;
stop();
nav.nav1_btn.onRollOver = function() {
if (link != 1) {
nav.gotoAndPlay("a1");
}
};
nav.nav1_btn.onRollOut = function() {
if (link != 1) {
nav.gotoAndPlay("a2"); // this fades it back to its normal color
}
};
nav.nav1_btn.onRelease = function() {
if (link != 1) {
_root["nav.nav1_btn"+_root.link].gotoAndPlay("a2");
//trace ((_root["nav.nav1_btn"+_root.link]));
_root.link = 1;
}
};
nav.nav2_btn.onRollOver = function() {
if (link != 2) {
nav.gotoAndPlay("b1");
}
};
nav.nav2_btn.onRollOut = function() {
if (link != 2) {
nav.gotoAndPlay("b2");
}
};
nav.nav2_btn.onRelease = function() {
if (link != 2) {
_root["item"+_root.link].gotoAndPlay("b2");
_root.link = 2;
}
};
Visible / Invisble Help Needed
howdie, l need some help. ln my flash movie l have a subscription movie clip where l want it to sit and remain invisible on the main stage ((This movie clip has a stop action in the first frame which has no animation, the animation starts on frame2)). When the user hits the subscription button it will play the invisible movie (becoming visible) so the user can enter their details. then they can click on the close button which will make the subscription movie invisible again. How can l do this. Can anyone point me in the right direction?
Thx in advance
Getting Rid Of Extra Invisble Characters Which Create Double Line Breaks In Text
Hi
These characters are created in Notepad when you hit 'Return', making a single line break a double line break when the txt is imported into the swf and viewed off line (online, there actually is no problem, but I'm making a CD presentation).
Does anyone know a method to get rid of these unseen, unwanted characters?
(BTW, %0A at the end of the line does not solve the problem )
Trying To Make A Button Rollover, Wait And Recheck Rollover
hi. i'm mostly comfortable with the graphical elements of using flash and there a gaps in my knowledge when i want to polish things up.
i have a bunch of buttons which, when rolled over, trigger some text to sweep accross in an area above the buttons and sweep away when rolled out.
this works nicely but if the viewer sweeps the mouse over a few buttons quickly all the MCs with text in play and it gets very messy.
the only way i can think to tidy this up is to make the button delay when rolled over and recheck about half a second later. if it's still rolled over then it plays the MC. i tried this the obvious way (triggering a small MC with onRollover > play MC at the end) but it needs the actual act of rolling over to trigger so i had to roll out and over again which defies the point >.<
i realise this is a really specific problem and it's very cheeky to ask others to solve my problems but if any of you have come accross similar problems and can point me in a better direction i'd really appreciate it.
Button RollOver/RollOut Effects WITH Looping On RollOver
I'm planning to use this tutorial, below to make a button:
http://www.kirupa.com/developer/mx2004/button_effect.htm
My question is how can I make it so that only on the rollover, the effect will keep looping?
Example: http://jump5.com/
On the right side, the navigation has this nice hover animation with the pointing arrow that continues to twitch on rollover.
Rollover Issue
I have a slight issue. Created 2 movie clips to control content.
They are exactly the same size and occupy the same space. I need both of them selectable.
The mc's are in different layers
The container of the MC's are square so they lay on top of each other
code to control clips
***************
stop();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
***********
example link
http://www.icanmarketyou.com/guys_wo...ontroller.html
Any ideas on how to make both tabs hot and keep the integrity of this design?
Thanks for any help
RollOver Issue
I'm modding a template for a friend, the site is pgaloans.com
When you go to the first page or the last page, everything works fine. The menu also corresponds to the current page by having the button remaining highlighted. However this isn't working for pages 2 - 5, any idea why?
Code:
on (rollOver) {
if (_root.link<>4) {
this.gotoAndPlay("s1");
}
}
on (releaseOutside, rollOut) {
if (_root.link<>4) {
this.gotoAndPlay("s2");
}
}
on (release) {
if (_root.link<>4) {
_root["item"+_root.link].gotoAndPlay("s2");
_root.link = 4;
getURL("about.html");
}
}
The actionscript is the same for every button, except the get URL and the _root.link=4 do change to the appropriate url/number.
Issue With Rollover
I want my buttons to show a movie clip on a rollover but only while its rolled over. I will then chance the text as the pointer goes over the other buttons but keep the movie clip consistant. I tried it and its just not working. this is my code and flash is telling me there is a syntax eroor
dee.onRollOver = over;
dee.onRollOut = out;
function over() {
dee._visible = true;
dee._x = 15.6 and dee._y = 72.8
this.gotoAndPlay(2);
}
function out() {
dee._visible = false;
dee._x = 15.6 and dee._y = 72.8
this.gotoAndPlay(7);
}
this is what flash is telling me
**Error** Symbol=button, layer=Layer 15, frame=1:Line 6: Left side of assignment operator must be variable or property.
dee._x = 15.6 and dee._y = 72.8
**Error** Symbol=button, layer=Layer 15, frame=1:Line 12: Left side of assignment operator must be variable or property.
dee._x = 15.6 and dee._y = 72.8
Total ActionScript Errors: 2 Reported Errors: 2
Buttons Rollover Issue
i've noticed that a common problem with using Button.onRollOver/Button.onRollOut is that if you roll out too quickly, the onRollOut effect does not trigger. for exemple, on an expanding menu element, if you move the mouse across it very quickly the submenu expands but doesn't contract. i'm guessing this is something to do with the framerate - if two events happen in the same frame, only the first occurs? perhaps someone can tell me if that's the case?
i'm looking for a solution to the problem. my first thought is to use onEnterFrame to check if the mouse is within the x/y coordinates of the button/clip. that way, even if the movie does not detect the mouse rolling off in the first frame it happens, it will get it next frame. am i thinking in the right direction, or is there a better solution?
thanks in advance for any help!
On(rollOver) And On(rollOut) Issue
Hello all,
I am having a bit of a frustrating problem with a button state. I have a button with the following code:
Code:
on(rollOver) {
this.gotoAndStop(2);
}
on(rollOut) {
this.gotoAndStop(1);
}
then on Frame (2) I have only:
Code:
on(rollOut){
this.gotoAndStop(1);
}
Everything works really nicely except when I mouse through the button very quickly, and it stays on the rollOver state, or Frame 2.
I have tried to use the Hittest function, however, on Frame 2 another button shows up on top of the original (an X so that the original button can be closed, like closing a pop-up window in XP) and when you are over it, the hittest fails, making the MC go back to Frame (1).
Basically what I am doing is creating a room with various furniture. Maybe you place a couple desks in the room, but then you decide you want to get rid of one. I want to enable the user to rollOver the desk, see the red X button appear, and click it to remove that specific desk.
Does anyone know a quick fix to this? Any help is greatly appreciated. The Fla is attached.
Simple Rollover Issue
I want to make a MC play when someone rolls over a button. The Button is
a logo and I want part of the logo to spin on rollover so the MC is in
the same spot as the button.
I tried to do this the most basic way possible, so I created a graphic
for the logo, I dragged it into a new symbol of a MC and animated it and
then I made a button and dragged the graphic into all of the states
expect the over state, and I placed the MC on the over state so it plays
this on rollover. I then positioned everything so it is on the same X
and Y coordinates.
However, when I test the movie when it is on the stage, it works though,
but the rollover (the MC) moves to a different location when the button
is rolled over?
Why is it doing this????
Submenu Rollover Issue
Hi guys,
I have a question. In an animation I am working on, I have a menu which I load via an xml file.
The problem I have is that when I move the mouse away or I click on a link in the submenu, it does not clear itself and stays on active. How can I make this work?
When I add clear_child(inview); to function menuchild_init, that removes the links in the submenu when it's clicked, but the background of the submenu remains active and on top of the animation.
What changes to the function are needed to remove the background too?
The script is below:
Attach Code
inview=0;
function menuitem_init(i,label, action) {
item=menuitem.duplicateMovieClip("menuitem" add i,i);
item.label=label;
item._x=10;
item._y=(10+(28*i));
_root.item.button.onRelease = function (){
if (action<>""){
loadMovie(action, "load");
}
}
_root.item.button.onRollOver = function (){
_level0.prova="ciao" add action;
i_temp=this._target.substring(9,10);
if (_root.inview==0) {
_root.inview=i_temp;
} else {
clear_child(inview);
_root.inview=i_temp;
}
for (var j = 0; j<_root.node[i_temp-1].childNodes.length; j++) {
target_temp="_root.menuchild" add i_temp add j;
setProperty(target_temp,_x,140);
setProperty(target_temp,_y,(10+(i_temp*28)+j*28));
setProperty(target_temp,_visible,true);
}
_root.selected_menu.bg_child._height=j*28;
_root.selected_menu._y=10+(i_temp*28);
}
}
function clear_child(inview){
for (var j = 0; j<_root.node[inview-1].childNodes.length; j++) {
setProperty("_root.menuchild" add inview add j,_visible,false);
}
}
function menuchild_init(i,j,label, action) {
item=menuchild.duplicateMovieClip("menuchild" add i add j,i add j);
item.label=label;
item._visible=false;
_root.item.button.onRelease = function() {
if (action.lastIndexOf("http://")>-1 or action.lastIndexOf("mailto")>-1) {
getURL(action,"_blank","post");
} else {
loadMovie(action, "load");
}
}
}
menu_xml = new XML();
menu_xml.ignoreWhite = true;
menu_xml.load("menu_structure.xml");
menu_xml.onLoad = function(success) {
if (success) {
_root.root = menu_xml.firstChild;
_root.node = _root.root.childNodes;
for (var i = 1; i <= _root.node.length; i++) {
menuitem_init(i,_root.node[i-1].attributes.name, _root.node[i-1].attributes.action);
for (var j = 0; j<_root.node[i-1].childNodes.length; j++) {
menuchild_init(i,j,_root.node[i-1].childNodes[j].attributes.name, _root.node[i-1].childNodes[j].attributes.action);
}
}
}
}
Rollover Event Issue
I have two movieclips. Let's call them mc_1 and mc_2.
In the timeline, mc_2 has a higher depth value than mc_1, meaning that mc_2 covers part of mc_1.
mc_1 has onRollOver defined for it. It animates when the mouse rolls over it. mc_2 has an alpha value of less than 100, making it semi transparent. My problem is when I roll the mouse cursor over mc_2, I trigger mc_1.onRollOver and can see the animation through the semi-transparency of mc_2.
Is there a way to prevent mc_1.onRollOver from receiving an event when there is a movieclip object that has a higher depth value blocking it?
Rollover Speed Issue..
Hey,
I'm making a menu where if I rollover a button, an object moves along the x co-ordinate.
Here's what I got so far..
Quote:
on (rollOver) {
myMovieX = getProperty(_root.chair, _x);
speed = 4;
chair._x += speed;
if (chair._x > 570) chair._x=-82;
}
Everything seems to work, except the fact that the object only moves once when I rollover. To move it a great distance I have to keep rolling over the button.
What do I need to do to my code to make the object move continuously when i rollover the button?
Thanks,
Tom
Rollover Event Issue
I have two movieclips. Let's call them mc_1 and mc_2.
In the timeline, mc_2 has a higher depth value than mc_1, meaning that mc_2 covers part of mc_1.
mc_1 has onRollOver defined for it. It animates when the mouse rolls over it. mc_2 has an alpha value of less than 100, making it semi transparent. My problem is when I roll the mouse cursor over mc_2, I trigger mc_1.onRollOver and can see the animation through the semi-transparency of mc_2.
Is there a way to prevent mc_1.onRollOver from receiving an event when there is a movieclip object that has a higher depth value blocking it?
Rollover Issue - Count Variable?
my problem is this: i have a rollover sound on a button. pressing that button takes you to another scene. when you get to that new scene, the mouse is detected in the 'over' position again and the sound plays a second time. i dont want the second sound to happen. i saw a response posted earlier to this but i couldnt open the file that was posted as an example. there was mention of a count variable. PUHLEASE. any pointers would help as this is really blocking my project.
m
Dynamic Textfields & Rollover Issue
Hi All!
I am generating several textfields using the createTextField command.
Then I can set the properties of the textfields using the myTextFormat.property = value;
But what I need to do is be able to trigger events on Rollover and Rollout on the textfields.
Can anyone help!
Thnak you...
Rollover/Rollout Menu Issue
I've read similar threads but nothing exactly like this. I'm creating a simple rollover menu: when a menu heading is rolled over, a submenu appears, and each submenu item is a button. Conversely, I *want* to the submenu to disappear when it is rolled off - as seen in Macromedia's main navigation menu. However, I have been unable to get this to happen.
I have set this up (as seen in the attached file) thusly: the main timeline is just one frame, which contains a movieclip of the Rollover Menu, which has three menu headings. The Rollover Menu movie clip has four sections: one with all of the submenus closed, and one of each submenu open. When any of the menu headings is rolled over, I gotoAndPlay the corresponding "submenu open" section.
I made the submenus movieclips of their own, in the hopes that they would respond as a group to the "rollOff" command (by going to the "menus closed" section). However, I've since learned on this forum that movieclips containing buttons will not take button behaviors. I do not want to use the cheap trick of creating a large invisible button and using "rollOver" to go to the "menus closed" section. I have looked at two examples posted on this site that use the "hitTest" command to determine whether a movieclip is being rolled over, but I have not been successful at applying hitTest to my file.
I'm new to actionscript, but I'm not afraid of a little coding, as long as I can comprehend what's being done. The code in the examples seemed to be more complex than what I need. If anyone can take me to this next step, I'd be much obliged.
Flash Movie Rollover Issue
Hello,
I'm designing and creating my website these days, and I've come up with a concept where on the index page of the site, I'll have three 3D boxes which, on click, will redirect you to the respective pages of my site.
However, these 3D boxes are made and rendered to AVI in 3dsmax, then converted to .mpg in Sony Vegas and imported into Flash CS3 (and obviously converted). My goal is to have the animation (or movie if you want) to be paused on the first frame as the page loads, but start when the mouse in hovered over the flash movie.
I've read a few things about an invisible button, and I've followed a tutorial on that, but when I test the Flash Movie, it comes back with an error (shown below). I'm using AS2.0 and my button instance name is "Rollover1" and the layer I've put it in is named "ActionButton".
Can anyone please give me some help on how to solve this issue. All I really need is the code for the movie to play on(rollover) and stop on(rollout). It would be great if the movie stoped as if paused (since the boxes are rotating 360 degrees it would be great if they stopped and stayed in their current position when the mouse if rolled off the movie.
My newbie code:
on (release) {
Rollover1.onRollOver = function(play) {
};
}
on (release) {
Rollover1.onRollOut = function(stop) {
};
}
I hope I portrayed my issues clearly and that someone has some good advice! Thank you in advance :)
Help In Solving Issue With Rollover Sticking
Hello,
I am working on my online portfolio and would like to have an animated menu that works similarly to Metadesign's old site. Simply put, there are three items on the stage, and as one rolls over an item the other items move to create space in which details about the item that has been rolled over are revealed. My problem is that if a viewer to the site moves his/her mouse over one of the items a little quickly, the menu sticks on the "rollover" part.
I have looked for solutions to this problem for a couple of years, and have changed designs on previous projects as my knowledge of Flash Actionscript is not that advanced, but I have finally decided that I would like to overcome this issue. I have found a number of different possible solution here and elsewhere, but they seemed pretty advanced and I couldn't figure out how to implement them into my own project.
Therefore, it is my hope that some kind soul here could guide me in the direction I need to go, or be generous enough to even help me out with my .fla, which I have included below.
Thanks,
Bill
RollOver Hover Timing Issue
I have 9 buttons on a Flash animation and when I hover over one of the buttons, a graphic is displayed. As I move the mouse off the button, the graphic is removed. I am using the following script to make the graphic display:
service_desk.onRollOver = function () {
service_desk.gotoAndPlay("_over");
}
service_desk.onRollOut = function () {
service_desk.gotoAndPlay("_out");
}
monitoring.onRollOver = function () {
monitoring.gotoAndPlay("_over");
}
monitoring.onRollOut = function () {
monitoring.gotoAndPlay("_out");
}
The issue I am having is that if I move my mouse from one button to another too quickly, the first button does not perform the “_out” so I have to mouse back over the button to have the monitoring.gotoAndPlay("_out"); work. If I move my mouse slowly from button to button, everything seems to work just fine.
Can someone please suggest a way to fix this? I am willing to use a different technique; I just need to get this working.
A Question About Some RollOver/RollOut Issue
I´m trying to do a menu that opens when I RollOver it and closes when I RollOut of it. Like the menu on this site. But it menu_mc.onRollOver = function() {
menu_mc.gotoAndPlay(1);
}
menu_mc.onRollOut = function() {
What will I write here???? I´ve tried gotoandStop but it stills
}
Thanks i advance..
Mc_ Depth Issue. RollOver Failing When Under Another Mc_
I have a set of movie clips generated and layered out next to each other via an array (buttons).
Above this and contained within an onEnterFrame function I have automatically created another Movie Clip that spans the depth and width of the array. ("container")
I am using this to register mouse over events that occur within my array area.
I have also created another Movie clip ("mc")
This mc uses the drawingAPI to create a box with the lower edge set as a bezier curve.
'mc' is set as a mask
I have set an onRollOver function to the 'container' that switches the bezier curves x and y coordinates of 'mc' to the mouse position.
The effect of all this creates a liquid mask that is dependant on the mouse position on rollover.
When the container is not rolled over the mask or 'mc' position is controlled via a tween.
This all works fine and looks nice.
However..
I want the buttons generated by the array to each have a rolled over effect. I cannot achieve this due their depths being beneath the container.
If i set the container depth to a lower value each buttons roll over then works but then of course the 'containers' roll over fails to work.
here is the .as
Code:
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Fuse, Shortcuts, PennerEasing);
var mover = this.attachMovie("mover","mover",100);
mover._x = 0;
mover._y = 25;
mover._visible = false;
var m_over:Boolean = false;
var home:MovieClip = this;
var buttons:Array = new Array("home","help","links","otherStuf","guuf","whatever","yep");
numOfItems = buttons.length;
for(var i:Number =0;i<numOfItems;i++)
{
var t = home.attachMovie("MainNav","MainNav"+i,i+1);
t._x = 80*i;
t.onRollOver = over;
t.onRollOut = out;
//create an area for the mouse over effect on the mask
var cont = createEmptyMovieClip("container",1000);
cont.moveTo(0,0);
cont.lineStyle(2,0xffffff,0);
cont.beginFill(0x0000ff,0);
cont.lineTo(80*i+60,0);
cont.lineTo(80*i+60,60);
cont.lineTo(0,60);
cont.lineTo(0,0);
cont.endFill();
this.onEnterFrame = function()
{
if(m_over == true)
{
mover._x = home._xmouse;
mover._y = (home._ymouse) +20;
Xpos = mover._x;
Ypos = mover._y;
}
else
{
Xpos = mover._x;
Ypos = mover._y;
}
var mc = createEmptyMovieClip("mc",0);
mc.moveTo(0*i,0);
mc.lineStyle(2,0xffffff,0);
mc.beginFill(0x000000,25);
mc.lineTo(80*i,0);
mc.lineTo(80*i,25);
mc.curveTo(Xpos,Ypos,0*i,25);
mc.lineTo(0*i,0);
mc.endFill();
home.setMask(mc);
}
//end enter frame
}
// set up the timed wobble
var moveA:Fuse = new Fuse();
moveA.push({target:mover, x:80*i + 60 , y:25, controlX:80*i + 10 , controlY:80, time:2/3, ease:"easeInBack"});
moveA.push({target:mover, x:0, y:25, controlX:-10, controlY:-80, time:2/3, ease:"easeOutBack"});
moveA.push({target:mover, x:80*i + 60, y:25, controlX:80*i - 60, controlY:60, time:1, ease:"easeInSine"});
moveA.push({target:mover, x:0, y:25, controlX:20, controlY:40, time:1, ease:"easeOutSine"});
moveA.push({target:mover, x:0, y:25, time:5, ease:"easeOutBack"});
moveA.push({func:function(){moveA.start();}});
moveA.start();
cont.onRollOver = function()
{
var theX = home._xmouse;
var theY = home._ymouse;
if(theX <(80*i+60)/2)
{
var Ycon:Number = theY +80;
var Xcon:Number = 80*i+40;
mover._x = 80*i+60;
}
else
{
var Ycon:Number = theY +80;
var Xcon:Number = 20;
mover._x = 0;
}
moveA.stop();
var bounceOut:Fuse = new Fuse();
bounceOut.push({target:mover, x:theX , y:theY , controlY:Ycon, controlX:Xcon, time:1, ease:"easeOutSine"});
bounceOut.push({func:function(){m_over = true;}});
bounceOut.start();
}
cont.onRollOut = function()
{
theX = _root._xmouse;
theY = _root._ymouse;
var bounceOut:Fuse = new Fuse();
bounceOut.push({target:mover, x:theX , y:10 , time:1/8, ease:"easeOutSine"});
bounceOut.push({target:mover, x:theX , y:50 , time:1/8, ease:"easeOutSine"});
bounceOut.push({target:mover, x:theX , y:20 , time:1/8, ease:"easeOutSine"});
bounceOut.push({target:mover, x:theX , y:40 , time:1/8, ease:"easeOutSine"});
bounceOut.push({func:function(){moveA.start();}});
bounceOut.start();
m_over = false;
}
//item roll overs
function over():Void
{
//trace("over");
var over:Fuse = new Fuse();
over.push({target:this, scale:120, alpha:75, time:1/4, ease:"easeInQuad"});
over.start();
}
function out():Void
{
//trace("out");
var out:Fuse = new Fuse();
out.push({target:this, scale:100, alpha:100, time:1/4, ease:"easeInQuad"});
out.start();
}
But it would likely be better if you had the fla to look at (Fuse Kit needed)
http://www.slashdash.co.uk/allsorts/flash/bounce_menu.fla
Try switching the containers depth between 1000 and 0 to see what I mean.
Is there a way around this ?
Cheers
Crowds
[f8] Button RollOver Show's Movie. How To Unshow Movie On RollOver Other Button
I've made a productoverview in flash.
There are 4 productphoto's (buttons with just a rollOver-function, no clicks).
Behind every productphoto there is a detailed product-specification (movie) that shows up when rollOver on the productphoto's.
So I want the product-specification movie to appear when theres a rollOver on the productphoto. The movie has to show on rollOver and has to stay visible on rollOut. But when u move to the next productphoto (rollOver) the previous product-specification movie has to disappear and the new one has to show.
I don't know what to do. so far i have this:
on (rollOver) {
tellTarget ("sony-1-1") {
gotoAndPlay (2);
}
Rollover Issue's Must Resolve By 3:00pm Today
Hey guys I am currently designing a flash site for a landscaping company and Im having some issues with my click and rollovers. First let me explain what im trying to achieve. On the main buttons I have a rollover where the buttons get larger and on the rollout slowly transition to their original size I have done this using movie clips with the rollover, rollout actions inside. Now this would work fine if thats all I wanted but on the click I want the buttons to play an animation I have specified on the main timeline. I have tried to put the actions for this on the movie clips with a
on (press) {gotoAndPlay("aboutclick");
}
Anyway with this code implemented neither one will work it wont play the framelabel aboutclick or do the rollover effect and for the life of me I cant figure out what to do.
Ah so if anybody could help me I would be so very appreciative since Im out of options I have included the flash file so you guys can see what I mean.
Thanks so much in advance.
Rollover Issue's Must Resolve By 3:00pm Today
Hey guys I am currently designing a flash site for a landscaping company and Im having some issues with my click and rollovers. First let me explain what im trying to achieve. On the main buttons I have a rollover where the buttons get larger and on the rollout slowly transition to their original size I have done this using movie clips with the rollover, rollout actions inside. Now this would work fine if thats all I wanted but on the click I want the buttons to play an animation I have specified on the main timeline. I have tried to put the actions for this on the movie clips with a
on (press) {gotoAndPlay("aboutclick");
}
Anyway with this code implemented neither one will work it wont play the framelabel aboutclick or do the rollover effect and for the life of me I cant figure out what to do.
Ah so if anybody could help me I would be so very appreciative since Im out of options I have included the flash file so you guys can see what I mean.
Thanks so much in advance.
Background Rollover With Button Rollover
I'd like for my background behind my buttons to rollover, but remain rolled while I touch the buttons and make those rollover. Here's an example:
http://www.zymocreations.com/index_f.htm
I can get both of my rollovers going, but I can't get the background to stay rolled when I move to the buttons.
Any suggestions? Thanks ahead of time!
Button Rollover Disabled Due To MC Rollover
i have used this nifty code from this .fla (http://www.actionscript.org/forums/a...chmentid=12251, 6.4kb) and it works perfectly. it's a rollover effect that plays or reverses an MC on rollover, i have just one extra thing i'd like to ask that maybe someone could help me with.
in my example, i have a curtain that goes up and down when rolled over and out. this works fine, but what i want is to have my menu behind the curtain, so when the user rolls over the curtain, it goes up, revealing the menu. i've done this, but for some reason my basic menu's rollover actions are disabled. can't anyone help me to get them to work?
here's the code from devonair's example:code: stop();
curtain.onRollOver = function() {
this.onEnterFrame = function() {
this._currentframe == this._totalframes ? delete this.onEnterFrame : this.nextFrame();
};
};
curtain.onRollOut = curtain.onDragOut = function () {
this.onEnterFrame = function() {
this._currentframe == 1 ? delete this.onEnterFrame : this.prevFrame();
};
};and here are the actions on my basic menu that is within the 'curtain' MCcode: on (rollOver) {MC1.gotoAndPlay("over");}
on (rollOut) {MC1.gotoAndPlay("out");}
on (release) {getURL("home.htm", "iframe");}many thanx in advance for any help given...
Button Issue In Flash - Program Issue
all of a sudden when i create a button and place it on stage i cant click it to drag it, scale or whatever...instead when i hover over it it behaves as in a compiled swf file (cursor changes into a hand,...).
How can i change that to the way it was? Anyone had this problem before? It is becoming really irritating.
Rollover/off Anim Control Button, Problem Adding Button Functionality
Hi, I'm really new to flash, so forgive me for sounding like an simpleton.
I'm trying to create a button that when you roll over, it grows in size and some text animates onto it. When you roll off, the anim is supposed to reverse and go back to the rest state. I've managed to get the animation to work okay, so it grows and shrinks accordinly. My problem now is, I want to make this into a functional button, ie to add a mailto: link, or a link to another frame.
Whats the best way to achieve this? I've tried to convert to a button and have the anim in all button states, but this didn't work. And a get an error when trying to add the mailto action script to the button, saying 'on release' should only be used on instanced buttons. I tried making an invisible button behind the animated on, but I loose the animation playback when rolling over the invisible button. It seems I can't do both for some reason.
I'm using this script on the first frame to control the playback of the movie. And stop on the last frame.
stop();
this.onRollOver = function() {
rewind = false;
this.play();
};
this.onRollOut = function() {
rewind = true;
};
this.onEnterFrame = function() {
if (rewind == true) {
prevFrame();
}
};
Any help would be appreciated, I've tried so many times with different approaches to no avail.
Mute Button Not Working For Button Rollover Sounds
I got my code for a mute button from the flashkit FAQ on sound,
and it seems to be muting everything but my rollovers. Anyone have any ideas?
it mutes the sound in all levels except for the buttons in _level0
and the button itself is in _level0 ?
code: // on main timeline
globalvolume = new Sound(); // no associated movie clip.
//button to mute sound and change toggle mc frames
on(release){
if(_root.globalvolume.getVolume() > 0){
_root.globalvolume.setVolume(0); // mutes all sound
play(); //switch to mute frame
} else {
_root.globalvolume.setVolume(100); // unmutes all sound
play(); //switch to unmute frame
}
}
thanks in advance for any input
Button States - How To Keep Button On Rollover State When Clicked.
on (rollOver) {
this.btn_about.gotoAndPlay("mouseover");
setProperty(this.btn_about, _x, 25);
setProperty(this.btn_about, _y, 29);
}
on (rollOut) {
this.btn_about.gotoAndPlay("mouseout");
}
on(release){
_parent.gotoAndStop("about");
}
There's my button code. Now a rundown on my delima.
I have a movie "company.swf" that is loaded into an empty MC "content" that is located within my main movie "main.swf". My buttons are all located inside an MC "subnav" inside of company.swf. I have seperate MC's for each button with an actual button with just a "hit" area. I would like each button to stay in the rollover state when clicked so a user knows where they are in each section. I hope I'm being clear here. My rollover and rollout works fine.
Please help!! Thanks
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!
Navigation Trouble, Using Button Rollover, Rollout And Button Down
Hello all
Take a look at the following sites; and notice their menus. Both have a rollover and rollout on their buttons, and when the button is hit the button stays down until another button is pressed. In the scissor sisters site, the neon bar still fades out after another has been pressed.
Franz Ferdinand
Scissor Sisters
I am trying to achieve this myself with my own site, which you can view in progess here:
My Site
I have mastered the button rollOver and rollOut effect, in which i gathered the code from a kirupa tutorial. My problem is, getting the neon bar to stay underneath teh last button that has been pressed.
The main movie is located on the main timeline in frame 2, because frame 1 contains the pre loader.
The actions for frame 2 of the main timeline are:
Code:
stop();
movieLoader.loadMovie("news.swf");
total = movieLoader.getBytesTotal();
loads = movieLoader.getBytesLoaded();
percent1 = Math.round(loads/total*100);
movieLoadText.text = "Loading news "+percent1+"%";
if (loads != total) {
} else {
movieLoadText._visible = false;
}
Now the buttons are not buttons, they are movieclips, which are located on the stage, and have instance names of b1 for news, b2 for biography etc etc
Inside the movieclip, the animation of the neon bar fading in takes 25 frames, and this has a stop action on the end.
This code is placed on the first frame:
Code:
stop();
news.onEnterFrame = function(){
if(rewind == true)
{
prevFrame();
}
}
news.onRollOver = function(){
rewind = false;
gotoAndPlay(25);
}
news.onRollOut = function(){
rewind = true;
}
news.onRelease = function(){
_root.logo.gotoAndPlay("buzz");
_root.movieLoader.loadMovie("news.swf");
}
As you have probably noticed this is the same as the kirupa tutorial.
So now my problem is to make sure that the last button clicked leaves the underline bar down until the next button is pressed.
Whoever can solve this for me is a life saviour!
Thanks
Williby
Button Inside Complex Button RollOut/RollOver
I created a movieclip from the tutorial "Complex Button RollOut/RollOver Effects" which I want to use as a menu. Is it possible to add buttons inside this movieclip??? I try and try but the buttons are never recognized, only the movieclip can be pressed.
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!
Rollerover Button Ontop Of Rollover Button
Hi, Im trying to create a flash file that has 2 layers of rollover buttons ontop of each other. one layer consist of lets say 10 horizontal rect buttons that control volume lvl, the layer ontop of that consists of 10 vertical rect buttons that control the pan, at the moment only the top layer is working, dose anyone know of a way to have both layers active? in other words have 2 layers of buttons on top of each other working at the same time.
sorry about the confusing post, my mind has melted trying to figure out how to use AS3.
PS: i found an old post from 2005 that stated IMS had an answer,
and i quote.
"I made this for someone else, not sure if it is what you are looking for
but take a look. its rollovers with buttons on buttons.. you might be able to tweek it... It's in 2004MXPRO
IMS"
thats all the message said, and i couldn't find anything attached.
thanking you in advance, Buklen
Help ROllOVer On Button Activated Another MC, But Only With Every OTHER Button....
Hi, just as it says in the topic title, I have a menu and it only activated every other button in the middle movie clip. I dont know anything about actionscript or how to set up a flash but Im trying very hard
if anyone can help me I'll really appreciate it.
why is it not doing it for every button?
does anyone know actionscript to fix this?
i have the file attatched below for the swf just so you get an idea
might take a second to load and no preloader...
http://www.artic.edu/~sdodso1/fightplay2.swf
http://www.artic.edu/~sdodso1/fightplay2.fla
|