473,699 Members | 2,135 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 3476
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
3446
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
1266
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
7612
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
2297
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
1468
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
5413
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
17135
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
2288
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
2049
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
8700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8623
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
9184
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...
0
9048
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8931
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,...
1
6539
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5878
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3064
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
3
2014
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.