473,465 Members | 2,123 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

movieclip.gotoAndPlay

chunk1978
224 New Member
ok... i've been trying to make this work for 2 days:

i have a scene with a button and a movie clip. the movie clip is called "MovieClip1". within the movie clip i've labeled a frame late in the clip called "Near End". i want my button to make the playhead goto that labeled frame within the movie clip but it does not.

the button has the following actionscript 2.0:

Expand|Select|Wrap|Line Numbers
  1. on (release) {
  2.     _root.MovieClip1.gotoAndPlay("Near End");
  3.     }
  4.  
what am i doing wrong?
Feb 7 '08 #1
7 28705
nomad
664 Recognized Expert Contributor
ok... i've been trying to make this work for 2 days:

i have a scene with a button and a movie clip. the movie clip is called "MovieClip1". within the movie clip i've labeled a frame late in the clip called "Near End". i want my button to make the playhead goto that labeled frame within the movie clip but it does not.

the button has the following actionscript 2.0:

Expand|Select|Wrap|Line Numbers
  1. on (release) {
  2.     _root.MovieClip1.gotoAndPlay("Near End");
  3.     }
  4.  
what am i doing wrong?

try this instead
on (release) {
this.gotoAndPlay("Near End");
}

nomad
Feb 7 '08 #2
chunk1978
224 New Member
try this instead
on (release) {
this.gotoAndPlay("Near End");
}

nomad
nope, doesn't work... i've tried this. _root.this.gotoAndPlay("Near End"); _root.MovieClip1.gotoAndPlay("Near End");... nothing works... i'm wondering if i need to somehow change the properties of the MovieClip1 MC, so that actionscript can use it? i've called the MovieClip1 instance onstage "MovieClip1" but it's just not being called.
Feb 7 '08 #3
nomad
664 Recognized Expert Contributor
nope, doesn't work... i've tried this. _root.this.gotoAndPlay("Near End"); _root.MovieClip1.gotoAndPlay("Near End");... nothing works... i'm wondering if i need to somehow change the properties of the MovieClip1 MC, so that actionscript can use it? i've called the MovieClip1 instance onstage "MovieClip1" but it's just not being called.
is the MovieClip1 MC in the same scene?

nomad
Feb 7 '08 #4
chunk1978
224 New Member
is the MovieClip1 MC in the same scene?

nomad
yes, it's in the same scene... i have no idea why something so simple is not working... it's making me crazy
Feb 7 '08 #5
chunk1978
224 New Member
Here is a small FLA file which shows you what i'm trying to do:

essentially there's an if/else statement block on the button, but the main timeline stops at frame 40.

i'm trying to make the button direct the playhead to the "Red" frame label within the MC movie clip, but anyway i try to write it it just isn't working. i know i can do this by not making a MC in the first place and just use the main timeline, but this is a small example of a much larger project, so i have to have it work this way.

so any thoughts of what i'm doing wrong?
Feb 7 '08 #6
chunk1978
224 New Member
it seems my flash install is crazy... i switched my movie properties from AS2 to AS3, and then back again, and now everything works as expected... strange...
Feb 23 '08 #7
Habbau
2 New Member
Hello...Chunk ..

I did notice that you managed your problem, now am wondering if you could be kind enough to help me...

I made a flash photo gallery with( thumbnail,xml). now the problems is that I have to implement zoom in / out buttons on in the gallery. How do I go about?

thanks in advance!!

(am a student, beginner with flash)
Feb 25 '08 #8

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

Similar topics

1
by: veenathi | last post by:
i am trying to write code for coping a certain portion of movieclip into another movieclip. for that i draw big stage movieclip. (stage_mc).Then i draw small rectangle movieclips on the stage...
3
by: endline | last post by:
ok for some odd reason the movie clip I'm using as a button will not gotoandplay the frame label I want. the code is as follows on(release) { trace("did you get here")...
2
by: mrahmed | last post by:
hi i'm new here and also om new in actionscript i'm trying to make a menu with submenu and i want when the mouse over the menu or the submenu make an effect it works when the mouse is over the...
1
by: Joaquin | last post by:
Hi, I'm a newbie on this, I've been hours with this and I can't find where is my problem. The 1st scene in my movie has this script on the last frame: gotoAndPlay("Scene2",1);
2
sumaiya
by: sumaiya | last post by:
I know how to load dynamic images in a movieclip sPhoto.loadMovie('http://localhost/1.jpg'); I have two movieclips "mcMain" and "mcArticle" mcMain ---- mcArticle --- mcPhoto mcPhoto is...
1
by: nagraj | last post by:
hi i have a problem in flash .how to call a movieclip to another movieclip give _root
1
by: molle | last post by:
Hi, this is perhaps a common question, but everywhere I just find how to load external images into a movieclip. I have images in my Library that I want to load into a movieclip, so I used...
1
by: chromis | last post by:
Hi, This should be really simple to do and has really got me stumped. I have a movieclip inside a button, the button is called my_btn and the movieclip is called my_movie. What i want to happen is...
1
thosecars82
by: thosecars82 | last post by:
Hello I am trying to resize the image loaded in a movieclip. The problem is that I am just resizing the movie clip but not the image loaded in the movieclip. The movie clip is smaller than the...
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
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,...
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,...
1
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...
0
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,...
0
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...
0
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 ...

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.