Solved

actionscript for buttons

Posted on 2007-03-26
4
193 Views
Last Modified: 2010-04-03
I'm creating a web site in flash and I have a layer called buttons that has a 'buttons' movie clip on it. Inside the 'buttons' movie clip I have 6 buttons each on a separate layer. I want the action on the buttons to effect the instance of another movie clip on my main timeline called 'tail'. So the action script I have used is:
on(rollOver) {
   with (tail) {
   gotoAndStop ("right");
}
}
('right' being a frame label in my tail movie clip)
I originally had all my buttons on the maintime line, but in trying to tidy it up I've broken it! How would I direct the actionscript to effect 'tail' on the main timeline?
0
Comment
Question by:DallySP
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
sibgig earned 63 total points
Comment Utility
assuming 'tail' is on the main timeline, give this a try:

on(rollOver) {
   with (_root.tail) {
   gotoAndStop ("right");
}
}
0
 
LVL 23

Assisted Solution

by:Zeffer
Zeffer earned 62 total points
Comment Utility
on(rollOver) {
   with (_parent.tail) {
   gotoAndStop ("right");
}
}

Z
0
 
LVL 23

Expert Comment

by:Zeffer
Comment Utility
didn't see your post sibqiq.. both will work DallySP

Z
0
 

Author Comment

by:DallySP
Comment Utility
thats brilliant - thanks so much.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now