473,748 Members | 2,276 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

rollOver rollOut and movement animation

1 New Member
hi this proberly quite an easy proberlm but cant find any help so ill try this forum.
i have a simple button wihch fades in and out of colour with rollOver and rollOut.
im trying to make button move with on(release) but when ever it moves it comes back due to rollOut taking control.

on(rollOver){
gotoAndPlay("go 2")
}
on(rollOut){
gotoAndPlay("go 3")
}
on (release) {
gotoAndPlay("go 1");
}

so what i think is if "go1" playing it needs to stop "go3" from playing
any help would be awsome
Nov 23 '07 #1
1 3479
rsdev
149 New Member
hi this proberly quite an easy proberlm but cant find any help so ill try this forum.
i have a simple button wihch fades in and out of colour with rollOver and rollOut.
im trying to make button move with on(release) but when ever it moves it comes back due to rollOut taking control.

on(rollOver){
gotoAndPlay("go 2")
}
on(rollOut){
gotoAndPlay("go 3")
}
on (release) {
gotoAndPlay("go 1");
}

so what i think is if "go1" playing it needs to stop "go3" from playing
any help would be awsome
It was difficult to understand your question.

I think you're saying that when you release and then rollout you don't want to go3?!

So;

Expand|Select|Wrap|Line Numbers
  1. this.selected = false;
  2. on(rollOver){
  3. if(!this.selected)
  4. gotoAndPlay("go2")
  5. }
  6. on(rollOut){
  7. if(!this.selected)
  8. gotoAndPlay("go3")
  9. }
  10. on (release) {
  11. this.selected = true;
  12. gotoAndPlay("go1");
  13. }
  14.  
Nov 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
3449
by: Brian Angliss | last post by:
I'm relatively new to scripting in JavaScript, so I'm not too surprised I'm having difficulty scripting up an animation effect for my personal site. What I'm trying to do is the following: When I go onMouseOver on a button in a nav bar, I want that button to switch to a different image while at the same time another blank image changes as an animation to an associated image. When I go onMouseOut, the bar image reverts back to the...
4
1270
by: Steve R. Burrus | last post by:
How do you go about getting a basic image "rollover" achieved in Javascript anyway, i.e., get a changing image???!!! I used to do a rotating ad banner some time ago, so I wanna do basically the same thing right now, with as little effort on my part as possible. I can almost recall the code to use to do this, but not quite, so can someone please help me out?
47
7624
by: Lauren Quantrell | last post by:
I have constructed the following code that simulates the common rollover effect when moving the mouse over a label (this example makes the label bold.) I'm wondering if anyone has come up with a better solution. lq 'start code:
3
2301
by: Mark Szlazak | last post by:
The following page simulates a pool cue and cue ball: http://members.aol.com/myscript/cue.html Mouse cursor position around the cue ball determines where a roll-over of 179 pool cue images is placed around the ball and which one of those images is displayed. Each pool cue image is in a slightly different orientation and the correct one is chosen to match the orientation of the cursor around the ball. Holding down the left mouse button...
3
1471
by: Rob R. Ainscough | last post by:
Just curious why a VERY commonly used affect of rollover was NOT implemented in .NET 2.0 for web controls? Does anyone have a link to VB code that will show me how to build my own UserControl that will support a rollover? thanks, Rob.
4
5415
by: somnamblst | last post by:
I am asking this in javascript and not actionscript because I think the js portion more crucial. I have a viewable area in a SWFcalled box_mc on frame1 that is 300x100 until a rollOver event when it appears to become 300x274 because it has advanced to frame2 I want my actionscript to instruct a div that is 300x100pixels with overflow hidden to expand to a div that is 300x274 in response to the rollOver event. On rollOut I want my div to snap...
4
17139
by: winterdream28 | last post by:
i am new to action script 3.0, i am somewhat familiar with 2.0 and can not for the life of me piece together the coding to make a roll/over and then a roll out animation on a button. I see it quite often i know its possible, but i cant seem to figure it out and its holding me back now in a project that im working on. i want on the up state for it to just look like asimple button/circl a simple shape. when the user goes over the shape i want...
1
2293
by: Jim in Arizona | last post by:
using ASP.NET/VB.NET 2.0 I can change the text color of an ASP Button object on mouse rollover/rollout by doing this (in page_load) btnMyButton.Attributes.Add("onmouseover", "this.style.color='Yellow'") btnMyButton.Attributes.Add("onmouseout", "this.style.color='White'") But how can I change the text on rollover? I don't understand the javascript DOM enough to know what to do. I did try:
2
2051
by: blackplague68 | last post by:
I've been searching for a while now, and I really can't find how to do this anywhere. I'm making a game, where the player controlled character moves right and left only, but has a separate movement animation from the standing one (I'm using sprites). I have a movie clip with the character using the standing animation from frames 1-20, then moving right from 21-23, then left from 24-26. If I could get any help with this it would be awesome.
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9558
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9331
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9253
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2216
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.