473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

rollOver rollOut and movement animation

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("go2")
}
on(rollOut){
gotoAndPlay("go3")
}
on (release) {
gotoAndPlay("go1");
}

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 3460
rsdev
149 100+
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("go2")
}
on(rollOut){
gotoAndPlay("go3")
}
on (release) {
gotoAndPlay("go1");
}

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
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...
4
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...
47
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...
3
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...
3
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...
4
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...
4
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...
1
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",...
2
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...
0
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...

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.