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




Rollover Button Screws Up Movie



I have a movie attached to a button. The movie is split in half with a Stop action at the beginning and the middle. On rollover it plays the first part and on rollout it plays the second part. For some reason when passing over the button quickly the movie plays and stops halfway with out the rollout part of the movie playing. Then the next time you rollover the button it plays the second part of the movie instead of the first. How can I fix it so that it does not keep doing this.

Thanks



FlashKit > Flash Help > Flash ActionScript
Posted on: 08-28-2002, 01:41 AM


View Complete Forum Thread with Replies

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

[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);
}

Adding A New Button Script Screws Everything WTF ?
helou helou flashers
I am using flash mx pro 2004
so for my menu i have an arrow follower for the overstate

everything cool

BUT !
when i add a new script to the button to play MC
( that is a reason why i have the buttons no ? )

the arrow doesn't follow anymore the button that i just added the script on
and it deosnt matter what script I use, the arrow simply doeasn't want to follow it anymore ( i think has following sickness)


This is my script for the arrow follower

var current = "bi";
function easeTo(clip,position){
clip.onEnterFrame = function(){
clip._x += (position - clip._x)/2;
}
}
for(i = 1; i <= 6; i++){
this["b"+i].onRollOver = function(){
easeTo(box,this._x);
}
}

as you can see in the example the arrow doesn;t go under the "Main" button

Thank you in advance for your interest
Peace

Nested Mc On Button Screws With Hit Area...Help
hello all! i feel like this might be a dumb question but I can't seem to figure it out.

What I need is a button that has text on it, where the text moves up with a tween when you roll over the button and moves back down when you roll out, and for the btn to take the user to another page with an onRelease function.

As of now I have a sqaure shaped button with a movie clip on top of it that holds the animation of the text. When published, the mc's animation plays (the text moves up and down on rollover/rollout) but doesnt allow the code on the btn to work, (which would take the user to the desired page), because the mc blocks the hit area of the button.

To test it, i took the movie clip off of the btn and the onRelease function worked correctly. I need to get them to work together, or maybe is there another better way to accomplish this???

I've tried a couple different ways and can't seem to find the right approach. Any suggestions would be greatly appreciated!!!

Preloading Screws Up My Movie
Alright, I've spent 4 hours trying to figure out why this is screwing up my movie. Basically, I'm using a getByesLoaded preloader, and it works fine. Then, I get to my movie, I click on a state, and it enlarges then disappears (it should enlarge, then shrink to the corner and load text). I've uploaded the movie to http://www.joltdesign.net/states/states.fla for you to look at, as I don't want to explain the whole movie =) Don't worry about the missing text files, they won't help you.

Oh, one last thing... the movie works fine without the preload scene, but once you place it back in the lineup it ruins it.

Help!

Trevor Smith

Movie Clip Screws It Up
i am attacing 2 simple movies . they are a simple drag and drop mc. the first one (drop test) has the object and its target as 2 seperate mcs on the main timeline...the 2nd one (drop test2) has them together in a sinbgle MC instead of on the main timeline. the first one works but the second one does not - can someone please take a look and let me know what's wrong with it. i tried changing the targets and paths but couldnt get it to work - please help!

thansk,
gary

Flash Detector Pages Screws Up Back Button
My site www.divadesignworld.com has a flash detector such that if the visitor has flash it forwards to the flash site. If the visitor doesn't have flash it forwards to the html site. The problem is that the way it is coded the backbutton doesn't work on the flash site, which get's my flash site banned from google. Can someone help me fix this.

code from index page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="refresh" content="3;url=html_index.html" />
<title>diva-design-world</title>
</head>
<body>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" width="80" height="80">
<param name="movie" value="flash_detection.swf?flashContentURL=diva-design-world.html&altContentURL=html_index.html&contentVe rsion=7&contentMajorRevision=0&contentMinorRevisio n=0&allowFlashAutoInstall=false" />
<param name="quality" value="low" />
<embed src="flash_detection.swf?flashContentURL=diva-design-world.html&altContentURL=html_index.html&contentVe rsion=7&contentMajorRevision=0&contentMinorRevisio n=0&allowFlashAutoInstall=false" quality="low" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="80" height="80" />
</object>
</body>
</html>





code from html page that holds the flash
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Diva Design World</title>
<style type="text/css">
<!--
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
a:link {
color: #990000;
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
color: #CC0000;
}
a:active {
text-decoration: none;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
subscribeURL="http://divadesignworld.com/news/?p=subscribe&id=3"

function getDigest(){
reWin=window.open(subscribeURL,'hell','toolbar=no, location=no,directories=no,s tatus=no,menubar=no,scrollbars=no,resizable=no,wid th=860,height=540,top=100,le ft=100')
}

mapURL="http://maps.google.com/maps?q=9999%20SW%20Wilshire%20Portland%20OR&spn=0. 023071%2C0.039312"

function openMap(){
reWin=window.open(mapURL,'hell','toolbar=no,locati on=no,directories=no,status= no,menubar=no,scrollbars=yes,resizable=no,width=82 0,height=540,top=100,left=10 0')
}

function openWindow( strUrl, strFeatures ){
if( strFeatures == null ){
strFeatures = "width=600,height=600"; // add any other features you need. i.e. toolbars, scrollbars, etc.
}
window.open( strUrl, '', strFeatures );
}

contactForm="contact.html"

function openForm(){
reWin=window.open(contactForm,'hell','toolbar=no,l ocation=no,directories=no,st atus=no,menubar=no,scrollbars=yes,resizable=no,wid th=430,height=560,top=100,le ft=100')
}

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//-->
</script>
</head>
<body bgcolor="#ffffff" onload="MM_preloadImages('view-html-button-over.gif')">
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
LOADING SOUND
0%
-->
<p class="style1">&nbsp;</p>
<table width="100%" height="100%" border="0" align="center">
<tr>
<td rowspan="2">&nbsp;</td>
<td align="left" valign="top"><span class="style1"><a href="http://www.divadesignworld.com/html_index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('View HTML Button','','view-html-button-over.gif',1)"><img src="view-html-button.gif" alt="View HTML Version" name="View HTML Button" width="110" height="31" border="0" id="View HTML Button" /></a></span></td>
<td rowspan="2">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="710" height="525" id="diva-design-world_v1" align="top">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="diva-design-world.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="SCALE" value="exactfit" />
<embed src="diva-design-world.swf" width="710" height="525" align="top" quality="high" bgcolor="#ffffff" name="diva-design-world_v1" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="exactfit" /></embed>
</object></td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>

Rollover / Button / Movie ?
I'm new to flash and I'm having some trouble with a button/rollover effect that I want to use. Go to the following URL, http://www.sdposters.com/
click on gallery at the top and rollover the different names that appear. As you can see an image appears on the right hand side, thats the effect I want to produce! Can someone help!!!! Either post here or email me. Thanks!!!

Rollover Button Movie Clips
i was wondering if it's possible to have a movie clip in a button over state that will continue to play after the mouse is no longer over the hit state-
i know how to put the movie clip in the over state of the button- but as soon as the mouse is off the button it immediately stops playing the movie clip- for example if i have a button that when you roll over it turns white then fades to a 25 percent opacity but it only works if you keep the mouse on top of the button--i would like to make it continue the fade after the mouse is no longer over the button
so i guess my question is.....can it be done
thanks

Having Movie Load On Rollover Of Button
hello all. I have a panel which acts as a button and on it's rollover, plays a movie. When the user initiates the rollover, two links appear (which is the movie). However, when the user tries to click on the link, the rollover for the panel is not engaged hence the movie will not play! See for yourself

If somehow there was a way to make the overlaying movie transparent or something. Or an alternative that will produce the same effect.
Thankkkkkkkkkkksssssss all!

Movie Inside Button On Rollover?
http://www.bumpthemoon.com

go there and click on her "laboratory work" section....

i have little boxes somewhat like that..and i want a series of images to scroll just inside the box when moused over...but i want the box to stay the same size..not enlarge (like on that website)...please help me....i haven't worked that much with flash in over 6 months...so i'm a little rusty, thanks

Button- Changes Flash Movie Like A Rollover?
Hi- I'm sure the answer is too simple, but I just can't wrap my mind around it.

I'm trying to have a series of buttons in plain HTML, Javascript, etc., that when clicked, will change a flash movie that is embedded in the HTML document, according to what url value(pointing to a remote swf file online) that they have.
I do not want the buttons to be the movies, just to change the movie in the a spot on the page. It would essentially act like Javascript rollover buttons that can change a single image on the page, rather than changing themselves. I just don't know how to apply this to embedded swfs rather than images.
I cannot use Flash to do this, as I'm displaying swf's from an outside source that cannot be changed, and I also am not able to use a Flash file as the main page.

Thanks for your help!

RollOver Button Movie Problem
Learning flash and came upon a problem. Let me know what I am doing wrong please.

I have a symbol I put in the action script
on(rollOver) {
gotoAndPlay("polmovie"); //"aboutMe" being the frame label where your content is
}

I then took another symbol and made it into a movie, its basically another image that I want to move from side to side. I animated it and clicked on the symbol and named the instance polmovie.

When publishing it, it doesn't play

Am I missing something?

Button Is Not Playing Movie On Rollover
Hi, this is my first post. I'm new to flash, but have learned alot on my own. I'm useing Flash MX 2004.
Problem: I have a menu with 5 buttons that displays text in a "sign" for each button when the button is rolled over. I added a new button used the same script I used with the other buttons (see below), and added a new frame in the "sign" movie for the text (the text frame has: stop(), but the text does not display in the sign.
Script:
on (rollOver, dragOver) {
tellTarget ("Sign") {
gotoAndPlay("Family");
}
}
I think it may be having trouble finding sign. I've tryed: "_root.sign", "_parent.sign", "_global.sign", "_level0.sign" none are working. I'm stumped. Thanks for the help.

Alpha Movie On Button Rollover
I want users to click on a button in my flash movie which makes everything but the contents of the button go alpha 40%.
When the user rolls off the button the movie comes back full alpha.
Any advice, tutes, or actionscript?

Alpha Movie On Button Rollover
I want users to click on a button in my flash movie which makes everything but the contents of the button go alpha 40%.
When the user rolls off the button the movie comes back full alpha.
Any advice, tutes, or actionscript?
Using Flash MX Pro 2004

Rollover Button / Movie Clip
Hello.

Hope you can help. I have a button that has a controller in order to make it interactive as the user rolls over and out. The button is actually a movie clip, containing a video that simply has a build in and out effect which is triggered by the following:

this.music_bk.onRollOver = function() {
music_bk.gotoAndPlay("_over");
}

this.music_bk.onRollOut = function() {
music_bk.gotoAndPlay("_out");
}

Alpha Movie On Button Rollover
I want users to click on a button in my flash movie which makes everything but the contents of the button go alpha 40%.
When the user rolls off the button the movie comes back full alpha.
Any advice, tutes, or actionscript?
Using Flash MX Pro 2004

Rollover Movie Clip Button
i'm so very new to this whole flash and actionscript thing but i'm teaching myself how to do it but i'm having a small problem. i found a tutorial online http://www.toxiclab.org/tutorial.asp?ID=37 that i have been using and of course the coding doesnt work because i'm using actionscript 3. i was hoping if someone could explain to me how i can get this effect to work properly and where i should place it.

also, could someone refer me to a really good book or site that can help me to learn how to do flash and AS3 properly? thank you so much in advance!

Movie Clip RollOver/Out Button
I used the Complex Button tutorial to create a movieclip with rollover and rollout actionscript. works great, but! I cannot get the this.onRelease to work with the gotoAndPlay function. only the getURL function works. what am I doing wrong here?

the actionscript in the movieclip is:

stop();

this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){
gotoAndPlay("Portfolio", 1);
}

Button Rollover Using Movie Clip
I gathered from a couple tutorials that in order to create a button that'll be animated onMouseOver, you simply create a movie clip with the animation and insert it in the over frame of the button. Only problem is when I drag the movie clip into the over frame screen, I get a message that you cannot place a symbol inside a symbol or something like that. So how do you get the movie clip into the over frame?
Thank you.

On (rollOver)... But For Movie Clip, Not Button
hi,

i'm making an advertising banner that scrolls info, and when the mouse goes over the Flash object the contents completely change...  so right now i do this using a button the size of the stage - where in the 'up' frame there is the scrolling Movie Clip, and in the 'over' frame there is the other moie clip.  this works perfectly well but i do not want the mouse to change to the 'hand-pointer-thingy'; i'd like it to stay as an arrow.

please advise....

thanks!

Button Rollover & Movie Clip Description
i'd like to have a movie clip of a tv animation i have display the description of the button i rollover. how would this be done?
there's an example of what i want here:
http://biorust.com/index.php?page=ga...id=24&pageno=1

Movie Clip Move To Button On Rollover
i am trying to get an effect like the buttons on http://www.blitzds.com/relaunch.html after you enter the site.

where a box will out line the button that was last roll overed.

my code should work and does to some extent but is not smooth or dependable the movie clip does not move all the time

is there a different approch to this.

my code is this on each button:
mBox is the movieClip that moves to the button.

on(rollOver){
topic_txt.text = "information";

/* i will move this function to the main time line and call it from the button when i get it working
*/
function moveBox(xpos){

if(mBox._x < xpos){
mBox._x += 3;
}
if(mBox._x > xpos){
mBox._x -= 3;
}
}
//i pass the button _x position to the function to move the clip
var theX:Number = setInterval(moveBox,1,55);

}
on(rollOut){
topic_txt.text = "";

}

i have attached a mx 2004 file that uses setInterval

Button Problems W/in Rollover Movie Clip
I have a site in the works, and I am running into a problem that I shouldn't have...

I have a movie clip setup so that when the user rolls over the clip with the mouse, it toggles the movie to play a certain label within the movie clip using this common code:

on (rollOver) {
_root.hover.useHandCursor = false;
_root.hover.gotoAndPlay("on");
}
on (rollOut) {
_root.hover.useHandCursor = false;
_root.hover.gotoAndPlay("off");
}

As this works fine, I would like a button to appear at a certain part of the rollover animation within the "hover" movieClip, but it seems as though whenever I place a button (rectangle -> convert to button) on the frames where I would like it to show, it doesn't register as a button, thus being unable to be clicked...

What's the deal with this...? I've never had this trouble before...

[F8] Help With Rollover And Rollout On Button Movie Clip
hello,

i only know the very basic actions with flash just so you know.

i have a movie clip on the "over" frame of my button and this works fine, when i rollover the mc plays.

what i need (i think) is some script so that on rollout the movieclip reverses.

please help ive looked everywhere and i can only find old script that doesnt work, im presuming they are for older versions.

thanks

Rollover Button Movie Clip Trigger
This shouldnt be hard to figure out but im a beginner when it comes to actionscript. What is the easiest way to have a button that when you rollover it triggers an animation maybe it (bounces or scales or somehting) for that SAME button. I assume youd have to have a movie clip animated and then have to reference that somehow with some sort of gotoandplay command.

for example: say there is an button and when your mouse rolled over it would squash down and remain that way until the mouse moved off the button and then it would bounce back up! Take a look at the cartoon network site at the top with the boxes. This is the effect that i want to know how to do.

www.cartoonnetwork.com

an help would be appreciated!

Thanks

Trigger Movie Clip Via Button Rollover
Hi,

I'm new to Flash and currently using Flash 5. I'm trying to get a movie clip to play on a button rolloever. I'm using:

on (rollOver)
tellTarget("Beach")
play()

The button and the clip are on the same layer and thus far I can't make it work. Any help would be appreciated.

Thanks,
Strobelight

How To Make A Movie Play On The Rollover Of A Button
Well it's sounds easy, but I want to play a movie when the rollover on a certain button is triggered, their must be some sort of script that can do this.

Help!

Button Inside Movie Won't React To RollOver
Hi there,
I am developing a sort of panorama movie where the image scrolls around. That is working but when I try to set some hotspots on it by adding buttons in the movieClip I can't get them to react to rollOver action since (onRelease and onPress) it is already used by the main movieClip.
Any idea on a work around?
I have been reading for 4 hours and can't find a good solution.

Flash Movie And Rollover Button Issues
Hello,

1)
I'm working on a website, and on the main page I'm going to have three seperate boxes that rotate 360 degrees when you hover your mouse over them. These three are then links to their own respective pages. I've rendered the three animations from 3D Studio Max as seperate movie clips (.avi files) and made three seperate .fla files in Flash for each movie clip. I've inserted a button-symbol and made an invisible button that I've applied the following AS 2.0 script-code to:

on (rollOver) {
play();
}

on (rollOut) {
stop();
}

on (release) {
//what to do when the button is clicked goes here
}

Only problem is, it doesn't work... If it's any help, here is the .fla file for my first movie clip:
.fla file
Here is the link to my page:
MyPage

2)
Secondly, I've got a problem with .swf movies in general on my website.
When I insert my files into DreamWeaver CS3, they won't play in browser (and, yes, I've got Flash installed for FF).
In Flash and on my desktop the file works fine though...
I've rendered and .avi from MAX, done some touch-up in Sony Vegas and imported it into Flash using Progressive Download method (due to size). I've properly sized it and everything, and exported the .swf file... Why doesn't this work? Is there something wrong with how I'm doing it, or a script on my page that's missing or something?

Thank you very much for any help you may provide :) I really need it right now!

Best Regards - Alec

Load Movie On Button Rollover [renamed]
hi guys.

well i need your help.

i have a button and i want that when i rollover this button remove an external MovieClip (111.swf) and load a new one.

and when i click the button open index2.html (_blank)

i have the code for load external swf.


ActionScript Code:
onEnterFrame(); {
<p>_root.createEmptyMovieClip("yourmovieclip", 1);
<p>yourmovieclip._x = 0;
<p>yourmovieclip._y = 0;
<p>yourmovieclip.loadMovie("111.swf");
<p>}


i need a code for UNLoad or remove the external swf (111.swf) and load a new one swf file when i rollover the new button. and when i click the button open index2.html (_blank)

thanks,
regards

I Want My Movie Clip To Dissappear On Button Rollover
I have a problem, i have a movie clip at the side of the screen, and i want it to disappear when the user rolls their mouse over a button, how would i go about doing this? I've tried nothing and I'm all out of ideas does anybody know?

PLAYING A MOVIE CLIP With A Button Rollover
hi..
can u guys explain
i have flash anim in that a logo which i made its as button symbol and the company name as movie clip and its an animated one
all i wanted is when i rollover on the logo(a button) i need the MOVIE CLIP to play....

any idea
venky
ramvenkat@lmedubai.com

Want Color Change In Movie Clip On Button Rollover
I want a movie clip to change color on a mouse event, but I am having a hard time finding anything out there that relates to my situation.

Interactions Btwn Button Rollover + Movie Clip
Idea is simple, but I am lacking the technical approach to the actual execution of the idea. Building site 100% Flash, no html. Have a few buttons and one movie clip. The movie clip has a script that makes it run in a loop across the stage. (if (this._x <=750) {this._x = _x + 50} else {this._x == 0})

On a rollover of any button, I want the clip to glide to the button and stay at the button's position, until the rollOut state. On rollOut the clip should continue to loop moving from its static position of the button.

How should I be approaching this?
thanks,

xira

Change A Dynamic Text Box On Movie Or Button Rollover?
Another new task, This learning is infinate!

I would like to put a dynamic text box in my mc which will display different text depending on which button or mc you roll the mouse over.
I want to try and do this myself as much as possible (so i learn more)
I understand paths now but would like, pleeeease, someone to tell me which action/method to use?
I have named a dynamic text box 'content_text' and given it variable content.
I have buttons which are inside movieclips (they form part of a scrolling navigation)
My thoughts were to use onRollover action and
do i use setProperty?

also does onRollover have to be used on a button or can you use it on an mc?

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.

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?

RollOver Movie Button - Can You Make Part Not Active?
Hey Everyone....

I have a movie clip that has a thumb nail and the thumb nails larger image. I have my AS set so when you roll over the thumbnail it plays the frames within the movie clip so the larger pic shows up.

My problem is that if you roll over where the larger picture is suppose to pop up, it plays the same way as if you were rolling over the thumb nail.

How do i stop this from happening? Preferably without redoing the whole set up.

Heres what it looks like now: http://www.braytongraphics.com/StCroixTanRollOver.swf

Click on Amsterdam, Clifton Park or Delmar to see what i am talking about

If anyone would like to see the FLA file thats here: http://www.braytongraphics.com/StCroixTanRollOver.fla

Any help is appreciated!

Thanxs in advance :)

Movie Clip As A Button And Constantly Checking Rollover Variable?
Hello,

I have a movie clip that I need to use as a button.

I am cuurently using 'on (rollOver)', and it is working, except that I need the movieclip/button to constantly update/read a variable.

My current code:

on (rollOver) {
if ((_currentframe<10) &&
(_root.Playable == true)) {
checkFourH();
}
}


If the mouse is over this movieclip, and the variable 'Playable' changes from 'false' to 'true', it currently can't figure this out, until the mouse is moved away from the movie clip, and then moved over it again.

Is there a way to make the movie clip constantly check this variable, OR make the 'on (rollOver)' code constantly update?

I am guessing that an enterFrame event may be the way to go, but I don't know the command for "If mouse is over me" in an enterFrame event


(I am using Flash MX)

Attachmovie Loads A Movie Clip With A Button That Doesn't Rollover
Hey all:

I am using an attachmovie to load a movie clip. The clip loads but the button inside of it no longer rolls over (with up/over/hit states). The whole movie clip triggers the hand cursors. I tried loading just that button with the attachmovie and it loads it but does not rollover either. I don't know if it's a hit state problem or if I am just missing something stupid here.

When I just place the movieclip on the stage right next to the attachmovie version, it works fine ...

Does anyone have any ideas?


Thank you,
- Garrett

Making A Button Rollover Change A Movie Clip's Frame
Hi again everyone,
I knew how to do this in AS2 but now I am having problems with making a button on the stage goto a frame in a movie clip on the stage.

I've attached a sample of my code below, hopefully you'll see the error and be able to point it out to me?
I have a movie clip on the stage that has different information in different frames. I want to make it so that when someone rolls over the button, the movie clip fades in and goes to the correct frame to display the information.

With this setup the way it is below, I keep getting "Warning: 3590: void used where a Boolean value was expected. The expression will be type coerced to Boolean.

I know where the problem is happening, "function XXX(event:MouseEvent):void {navigateToURL(XXXweb)}"

How can I write this differently and eliminate this problem?

Thanks,
Jeremiah









Attach Code

//Button Rollover effects
function buttonGrow(event:MouseEvent):void
{
TweenLite.to(event.target, .2, {scaleX:2, scaleY:2, tint:0x9933CC});
TweenLite.to(Info_mc, .5, {alpha:1});
}

function buttonShrink(event:MouseEvent):void
{
TweenLite.to(event.target, .2, {scaleX:1, scaleY:1, tint:0xff6600});
TweenLite.to(Info_mc, .5, {alpha:0});
}

//Links
var XXXweb:URLRequest = new URLRequest("http://www.adobe.com");

//Call to Links
function XXX(event:MouseEvent):void
{
navigateToURL(XXXweb)
}

//Button actions
XXX_mc.addEventListener(MouseEvent.MOUSE_OVER, buttonGrow, Info_mc.gotoAndStop(1));
XXX_mc.addEventListener(MouseEvent.MOUSE_OUT, buttonShrink, Info_mc.gotoAndStop(0));
XXX_mc.addEventListener(MouseEvent.CLICK, XXX);

























Edited: 01/16/2008 at 02:21:30 PM by kaoss8000

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.

Masking Screws Up?
Ello...

Im working with Flash MX, and what I have is a car wheel that uses masking to give the effect that the rims are reflective. Now, this works... to an extent...

The mask, (is in a Movieclip) on the stage, appears to mask the desired object perfectly. But when I watched the movie (in HTML preview), the mask fills areas that shouldnt be masked.

Does anyone know why flash does this? PLEASE HELP!

Thank you for reading. Ill attach my example when I get around to it.

SendToURL Screws Up .Net
Hello all. Through my painful experience in upgrading my ActionScript 2.0 code to 3.0, I'm replacing old XML objects' send() methods with the new flash.net.sendToURL method. In AS2, I called a .aspx page in the send() method. The .aspx page acts on the XML data that was sent via HTTP POST, and does a redirect to another aspx page. Here's an excerpt:

in AS2:
var someData:XML = new XML();
someData.parseXML("<foo/>");
someData.send("Yo.aspx", "POST", "_self");

Yo.aspx sees the "<foo/>" data come through the HTTP POST and executes a Response.Redirect("AnotherPage.aspx");.

When I tried to convert this code to AS3, I noticed that the Response.Redirect stopped working! I first thought that this was a .Net issue, but I'm positive that the same .Net code is running for both the old AS2 and new AS3 code. Here's what I've tried in AS3:

in AS3:
var someData:XMLDocument = new XMLDocument();
someData.parseXML("<foo/>");
var req:URLRequest = new URLRequest("Yo.aspx");
req.data = someData.toString();
req.method = "POST";
sendToURL(req);

In debugging in .Net, I see that the "<foo/>" still comes through fine. In fact, the Response.Redirect works within the .Net debugger, but the screen doesn't update with the newly-requested page. According to Adobe's documentation, sendToURL doesn't accept any data. This should be fine, as I only want to send data and redirect to another page. I don't understand this behavior, but I suspect that sendToURL is executing in some sort of a sandbox that prohibits server-side code from redirecting to another page after the call is made.

Here's one potential workaround that I'd rather not implement.

in AS3:
var req:URLRequest = new URLRequest("test.aspx");
req.data = "Hello";
req.method = "POST";
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, loadComplete);
loader.load(req);

private function loadComplete(event:Event):void {
navigateToURL(new URLRequest(event.currentTarget.data), "_self");
}

in Yo.aspx:
Response.Write("AnotherPage.aspx"); //rather than Response.Redirect("AnotherPage.aspx");


Sorry for the novel of a post, but if anyone has any insights here, I would appreciate your input! Thanks a lot!

Andy

Flash Screws Up Masking?
Check out the image to see what I mean...

How the hell do i fix it?!
Thanks for reading.

Embedded Swf Screws Up When Viewed Again
I have a XML-populated, Papervision 2 driven, image Carousel which I load into a UILoader from a main loading swf.. Everything works perfectly, except if you run the carousel, then run another item, and run carousel again...

What goes wrong is that for some reason it gives a number which is out of range of the # of images.. for example, If I have 8 images and run the swf again, it might try to go to image #34. If I try to use the #of images modulus of the current image, then it's off by 3 .. for example, image 5 instead of image 8.

The weird thing is that I use .unload() before I load the new swf..

Any ideas on how I could load completely fresh? I'd have no problems if flash unloaded fully..

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