A Button Inside A Movie Clip To Move Another Movie Clip
I'm building a web page and I have a button that I need to make two movie clips play. The button is inside one movie clip and in addition to it playing I want it to make another movie clip play. It doesn't seem to recognize the movie clip target names. Any help as to how this can be done would be much appriciated.
Thanx
FlashKit > Flash Help > Flash ActionScript
Posted on: 03-07-2002, 06:42 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Having A Button Inside A Movie Clip To Move The Root Movie To Another Frame?
i dont know much about actionscripting so explain to me in simple terms...
i have buttons inside a single movie clip and i want to have each button (when clicked or rollover-ed) move the frame header of the main (root) movie to another position. what actionscript does this require? and will each button actually be "clickable" since they're all encapsulated in ONE movie clip??
thanks
A Button Inside A Movie Clip, Within A Movie Clip, Calling Another Scene:
Is it even possible?
I have been trying to do it for the last few days for a site I am working on.
I have done searches in many forums and it's foolish looking for an answer that way, because quite frankly every thread I opened was something to do with LoadMovie or GetURL, etc.
What I have right now is on the button in my Menu Bar Movie Clip:
on (release) {
gotoAndPlay(285);
}
Which plays a fancy little animation in the movie clip and then on the last frame of that movie clip I had:
gotoAndPlay("Contact", 1);
Which is the Scene for the "Contact Us" Scene named "Contact"
One would think that it would load up the scene and play at frame 1, however all that happens is it reloads the movie clip of the "Menu Bar" at frame 1 and starts over, not even realizing what I asked.
Anyways, I figured there's a script or something that tells it to look outside of the movie clip or to the _Root, or whatever.
If someone has a solution, it would be greatly appreciated.
Sorry I have no example to show, since I have yet to upload it. (It's my company's web site, and I don't think customers would want to see some half-arsed web site that's not complete.
Thanks in advance.
Control Movie Clip In Container From Button Inside Other Movie Clip
There are three movie clips involved in this question.
1. A main movie clip that has a target empty movie clip where an external swf loads.
2. A menu movie clip that is built from button symbols and has its own timeline.
3. The external movie.
When a user clicks on the menu, the external swf loads into the empty movie clip target. This part works fine. Here's the code:
on (release) {
loadMovie ("Lesson1.swf", "_root.container");
}
I want to use one external swf for all lesson, versus 20 external swfs. The problem I'm having is controling at what frame the external swf loads. I've tried adding --gotoAndStop (15) -- for example. I've also tried adding, gotoAndStop "_root.container" (15), but that doesn't work either. The gotoAndStop action ends up controlling the menu movie clip timeline instead of the movie loaded into the container. I figure this is because the menu mc has "embedded" buttons and it's own timeline.
Any help you can offer will be much appreciated.
Thanks
Sheila
Creating A Button To Open A Movie Clip From Inside A Movie Clip?
I'm using a hexagon menu to display some images. One image is placed on each slide of the hexagon menu (which can then be rotated left and right to see other "slides").
What I want to do now is to be able to click on the object (image) as a button and for it to go to another scene which shows the image blown up and some description next to it (which is another movie)
I have tried the following which doesn't seem to work:
Created an invisible button (or choosing the image as a button) and having
on(release) {
gotoAndPlay("scene 5", 1);
}
this doesn't work when I use it over the hexagonal menu, but when I move the button to somewhere else on the screen (not over the movie) it works.
Please can someone help with this - Ive been working on it flat out over the weekend and desperately want to make it work. any ideas would be appreciated!! thank you
Loading External Movie Clip With A Button Inside Another Movie Clip Help
Hi,
I am working on a scrolling thumbnail movie clip, that when you click on the thumbnail button inside the movie clip it will load an external movie clip. I have an empty movie clip on the main stage, and have been trying all sorts of code, but for some reason it doesn't like that I am inside a movie clip using buttons. It can't seem to find the external swf.
I have tried:
on (release) {
loadMovie (ithink.swf, "loader");
and
on (release) }
if (firstTime == true) {
loadMovie("ithink.swf", _root.loader);
firstTime = false;
} else {
_root.clicked = "ithink.swf";
_root.loader.gotoAndPlay("goback");
}
}
and so far nothing, for some reaosn when I click on a button outside of the movie clip with the above code it loads... and than the other works too, but if I click on the buttons inside the scolling movie clip first they won't work.
Any suggests or ideas!!?
I would really appreciate it... I am beyond frusterated!!
Movie Clip Button Inside Movie Clip Button Is Driving Me Nuts
hellllllo everyone, this thing has been bothering me for weeks, i've been hiding from it for days but it always seems to come back and bug me..
this is the problem..
on my main timeline i have a movie clip button that plays over/out state within this clip and on the over state it also opens 8 other movie clip in this movieclip that i am hoping to make them clipable, i only made an over state for the first movieclip out of the eight, but it just wont do the rollover effect..
i think there is a better way to do this..if i need to start over..let me know..thanks!!!
i will attach the file please help me out! i am tired of hiding!
thank you again!!!!!
Controlling A Movie Clip From A Button Inside Another Movie Clip.
I'm confusing myself just typing this.
I'm working on an interactive map. The map itself is a MC inside a container, but also contains all the buttons as well. On my main stage(scene 1 and menu) is a window(MC) that will show info and photo of building. Now if I create a button on the main stage I can control the movieclip(images) easily. But when I use a button from inside map(MC) it doesn't seem to recognize the (images.gotoAndStop(frame))command.
I'm just not sure what to put in order to be able to control the MC's timeline from within that map movieclip.
Sorry if this is confusing. Of course at the same time it might be a simple solution for most people here as well. At least that is what I'm hoping anyways.
Place Movie Clip Button Inside Movie Clip
Hi, I have searched the forum but cannot find exactly what I am looking for.
I have a movie clip of a map that I can zoom and drag and what I would like to do if possible is to have several other movie clips inside the first movie clip which when clicked go to and play at a given frame number on the timeline where a photo is displayed.
The 'several' movie clips will be small flashing red circles. Each one represents a place of interest and when clicked will display a photo of the place of interest.
Move Movie Clip On Button Clip
This is a script that causes a movie clip to move down to a new location when a button nested inside the movie clip is released. can anyone tell me how to write the code so that when a different button is pressed the movie clip will move back to its original position. I am trying to learn actionscript 2.0 by taking the posted files apart and so on, I have a ton o books none of which are too helpful so I could really use some help. What the heck is "ty". I decided to join the forum because books were not cutting it! LOL
here is the code thanks.
ActionScript Code:
// this is the main button to start the slide show
collButtHolder.slide1.onRelease = function() {
//move the to menu down to reveal the slide show components
slide(collButtHolder,324);
// call the function to set up slide show or reset it you had other buttons
// this is where you set your path to the photos and how many photos are in that folder.
resetSlideShow("images/slide1/", 15);
collectionMenu.bName.text = "slide1";
};
function slide(mc, ty) {
mc.onEnterFrame = function() {
mc._y += (ty-mc._y)/5;
if (Math.abs(ty-mc._y)<0.4) {
this._y = ty;
delete mc.onEnterFrame;
}
};
}
Button(movie Clip) Inside A Movie Clip
Hey guys,
I had 3 buttons in the main movie which was working fine.
an external actionscript file was responsible for the buttons' functions
playPause is the instance name of the button(made as a movie clip)
ActionScript Code:
playPause.onRollOver = function()
{
if(this._currentframe == 1) this.gotoAndStop("pauseOver");
else this.gotoAndStop("playOver")
}
What I wanted to do is create another button(instance name speaker) on the main movie that when a user rolls over with a mouse, it'll show the 3 buttons. Basically, a button(movie clip) in a button(movie clip).
I have this movie clip working fine but none of the action script on the original buttons are working (of course because target changed).
I have tried the following and it will not work (in external .as file)-
ActionScript Code:
speaker.playPause.onRollOver = function()
{
if(this._currentframe == 1) this.gotoAndStop("pauseOver");
else this.gotoAndStop("playOver")
}
any suggestions? thanks in advance
Button(movie Clip) Inside A Movie Clip
hey everyone, using flash 8 here,
here is my problem.
on frame 1 line 2 i have a button ( bt1_btn ) and added this code on frame 1, line 1
Code:
stop();
bt1_btn.onRollOver = function() {
_root.gotoAndPlay("animation"); // frame 2
};
which works fine,
on frame 2 line 2 i have this movie clip ( bt2_btn ) that contains animation and 2 movie clips ( buttons - capsules_btn, and cahier_btn)
i added this code which works also...
Code:
bt2_btn.onRollOut= function() {
_root.gotoAndPlay("home"); // frame 1
};
but, i can't seem to make capsules_btn, and cahier_btn to work.
i tried the obvious
Code:
on (press) {
trace("on press");
}
which resulted to nothing.
i tried using this code at the main level on line 1
Code:
bt2_btn.cahier_btn.onRelease = function() {
trace("button clicked");
};
and got nothing
i then tried this code on frame 1 line 1 of the movieclip bt2_btn
Code:
_root.bt2_btn.cahier_btn.onPress= function() {
trace("button clicked");
};
nothing also
wondered what am i missing, or what i aint doing right, either way, can anyone help me out here?
attached file included
thanks
Movie Clip Button Inside Movie Clip.
hey ive got a slider menu which opens when clicked. however the buttons (also mc instanced) inside the slider mc wont work... here is the code:
//Menu Slider Background
_root.menuSlider_MC.onRollOver = function() {
new Tween(_root.menuSlider_MC, "_x", Bounce.easeOut, _root.menuSlider_MC._x,-250, 20);s
}
_root.menuSlider_MC.onRollOut = function() {
new Tween(_root.menuSlider_MC, "_x", Bounce.easeOut, _root.menuSlider_MC._x,-305, 20);s
}
_root.menuSlider_MC.onPress = function() {
new Tween(_root.menuSlider_MC, "_x", Bounce.easeOut, _root.menuSlider_MC._x,50, 20);s
}
//Menu Buttons
_root.menuSlider_MC.web_MC.onRollOver = function() {
trace("yes");
}
the slider mc works however i cant seem to get the 'web_MC' to respond..
how can i fix this? cheers.
Using A Movie Clip Inside A Movie Clip To Start A Frame Of An MC Inside A Movie Clip
Situation:
I have a movie clip inside a movie clip with a button inside of it.
This button on release goes to a different movie clip(svideo) in a different frame on the maintime. This movie clip has a movie clip(portfolio) inside of it.
Okay: I use an absolute path on the aforementioned button
on release
_root.svideo.portfolio.gotoAndPlay(60);
But, for some reason Flash won't go to frame 60 of the portfolio movie clip that is inside of the svideo.
I have tried numerous variations on reaching frame 60 of portfolio. Like going to the maintime line and going to the portfolio MC. Also, portfolio and svideo are the instance names and not the name of the actual movie clip.
If anybody could help, I would appreciate it. Thanks.
Movie Clip Buttons Nested Inside Movie Clip Dont Work
Hi people!
im having a problem here.
in my first frame i have a movie clip named "menu_mc".
i have this AS for this movie:
Code:
this.menu_mc.onRollOver = function() {
menu_mc.gotoAndPlay(8);
}
this.menu_mc.onRollOut = function() {
menu_mc.gotoAndStop(7);
}
thats working ok, the menu_mc plays on rollover from frame 8 till frame 12 where stops.
On frame 12 (this is inside the menu_mc movie clip) i have another movie clip, named button1_mc.
and also i have AS controling that MC:
Code:
this.button1_mc.onRelease = function() {
getURL("index.htm", "_self");
}
The problem is that when i rollOver on menu_mc it work fine and the button1 appears, the problem is when i try to click button1...
doesnt work.
the swf you can see it on www.wt.com.mx/menu.swf
can anybody help me please?
what im doing wrong?
or what other ideas can you give me so i can make that work.
thanks!
Movie Clip Inside A Sub Movie _ Button Wont Work
Hi,
my problem is i have a main movie, a sub movie and a button in the sub movie. everything is working fine until i press the button in the submovie to go to another page in the submovie, but the button wont work. i have tried frame numbers and labels with no luck.
I have posted the flas (main movie and submovie) at www.guntherrohn.com/team.fla and www.guntherrohn.com/guntssite.fla
once on the homepage go to team page. the buttons i am talking about are on the seperate pages within team.
Thanks again for ur help
Regards
Move Movie Clip With Button
Hi.. i woould like the script for a button that moves a movie clip say 5 pixels across each time its hit.
any ideas?
Playing Movie With A Button Inside A Movie Clip
OK LETS START FROM THE VERY BEGINING HERE...
I HAVE A BUTTON THAT IS IN A MOVIE CLIP, WHEN I TELL IT TO GOTO AND PLAY THE FIRST SCENE FRAME 2, IT PLAYS THE ANIMATION IN THE MOVIE CLIP AND NOT THE SCENE. WHAT SCRIPT DO I USE TO TELL THE BUTTON TO PLAY THE MOTION TWEEN IN THE FIRST SCENE ON THE SECOND FRAME.
Movie Clip Move To Button On Rollover
i am trying to get an effect like the buttons on http://www.blitzds.com/relaunch.html after you enter the site.
where a box will out line the button that was last roll overed.
my code should work and does to some extent but is not smooth or dependable the movie clip does not move all the time
is there a different approch to this.
my code is this on each button:
mBox is the movieClip that moves to the button.
on(rollOver){
topic_txt.text = "information";
/* i will move this function to the main time line and call it from the button when i get it working
*/
function moveBox(xpos){
if(mBox._x < xpos){
mBox._x += 3;
}
if(mBox._x > xpos){
mBox._x -= 3;
}
}
//i pass the button _x position to the function to move the clip
var theX:Number = setInterval(moveBox,1,55);
}
on(rollOut){
topic_txt.text = "";
}
i have attached a mx 2004 file that uses setInterval
Create An Empty Movie Clip Inside An Existing Movie Clip?
I'm making sort of a tabbed navigation scheme by reading the data for each tab in from an XML file. What I'm wondering is if it's possible to use createEmptyMovieClip() to make a new empty movie clip inside a movie clip that already exists on the stage.
Using
ActionScript Code:
m_anchor.loadMovie(bg_image);
works as I would expect. bg_image is just the relative path to an image file, and m_anchor is a movieclip already on the stage. However, doing a similar thing:
ActionScript Code:
m_anchor.createEmptyMovieClip("textbox", this.getNextHighestDepth());
and then drawing a shape (a rounded rectangle, which I then want to put text on top of) doesn't work. It works if I just say "this.createEmptyMovieClip" instead of attempting to create it inside the m_anchor clip, but if I do that, the "textbox" is created at the root level and I can't unload it along with everything else in the "m_anchor" clip. Is it possible to create a new empty movie clip inside of one that is already on the stage?
Thanks!
Problem Getting Movie Clip Inside Of Movie Clip To Face Mouse
I used the code below to make a movie clip face the mouse, it works when I use it on a movie clip that's not embedded in another movie clip, but when I used it on an embedded movie clip, it's axis seems to change.
Attach Code
var stickGun:MovieClip = this.stick_holder.stickGun_mc;
//stick_holder.stick_mc.stickGun_mc
stage.addEventListener(Event.ENTER_FRAME, onMove);
//stick_holder.stick_mc.stickGun_mc.addEventListener(MouseEvent.MOUSE_MOVE, onMove);
function onMove(event:Event):void {
// get the radian value of the angle between the clip and the mouse...
var myRadians:Number = Math.atan2(mouseY - stickGun.y, mouseX - stickGun.x);
// convert it to degrees...
var myDegrees:Number = Math.round((myRadians * 180 / Math.PI));
// get the horizontal and vertical distance between the clip and the mouse...
// rotate the clip toward the mouse...
stickGun.rotation = myDegrees;
}
Placing Actionscript Movie Clip Inside A Movie Clip Symbol
I'm loading an external image into an empty actionscript movie clip (holder1) using MovieClipLoader(); on frame one of my movie and is invisible. Then when the movie plays, there is an empty movie clip symbol (image1_mc) that is placed manually on the stage within another movie clip symbol (flash_mc), and is also on a bottom layer of a mask layer which is animated. Is it possible to place "holder1" inside of "image1_mc" so that I can treat it as if it were an embedded image? In other words, have the image in "holder1" inside of the manually placed movie clip symbol "image1_mc" so that I can use it like a regular symbol on the stage?
Button Inside Movie Clip Inside Scrollpane Doesn't Work In Xml
This is sorta odd but I'm hoping somewhat easy to fix. This is in AS2 and is the last problem I have in a very small project of mine.
I have button called button01 inside a movieclip called movieclip01 which is the contentPath for a scrollpane called scrollpane01. I'd like the button to work, and depending on the code it will work in the normal .swf but won't when I embed my movie into xml.
If I put the code inside movieclip01
button01.onRelease=function(){
_root.gotoAndPlay("Frame Name");
}
It will work when I test it but not in the XML. So what I want to do is go to the main timeline where the scrollpane is and write the code there. That is where I'm stuck.
I've tried scrollpane01.movieclip01.button01 and tried movieclip01.button01 and also tried scrollpane01.button01. Just for giggles I also tried scrollpane01.movieclip01 but none of that works
Last night I had a similar problem with buttons inside a movieclip that was on the root stage. They worked in the swf but not when I embedded the file - so I found this which worked (typed in the root stage)
movieclip01.button01.onRelease=function(){
Behavior On Buttons Inside A Movie Clip Inside A Button.
I would like t create an animated button with menu inside, how do i do it.
something like on here http://www.demarchelier.net
hidden menu on left side (contents) but on flash. I have flash 8. any tutorial that explain how to do that ?
Movie Clip Button Inside A Movie Clip Button
Ok so I'm going crazy with creating a movie clip button inside a movie clip.
I have it working well for onRollover, but onRollout the Header_mc looks like it is not looking at the code. It is driving me crazy. Here is my Action Script code to control the two movieclip buttons.
I basicly want the Header_mc to stop when over the B_photo and on Rollout of the B_photo. I don't know why it is not working. I have attached screenshots of my Header_mc and the SWF so you can see what frame I'm calling.
/*--------------Photographers Button------------*/
this.B_photo.onRollOver = function() {
Header_mc.gotoAndPlay("_stop");
B_photo.gotoAndPlay("_over");
}
this.B_photo.onRollOut = function() {
Header_mc.stop("_stop");
B_photo.gotoAndPlay("_out");
}
this.B_photo.onRelease = function() {
B_photo.getURL("http://www.macromedia.com", "_parent");
}
/*--------------Main Header---------------------*/
this.Header_mc.onRollOver = function() {
Header_mc.gotoAndPlay("_over");
}
this.Header_mc.onRollOut = function() {
Header_mc.gotoAndPlay("_out");
}
this.Header_mc.onRelease = function() {
Header_mc.gotoAndStop("_out");
}
Tween Inside A Button Inside A Movie Clip
Say I have 3 squares, from left to right, blue, red, yellow. The 3 squares together are a MC that move from off the stage on right, across the stage to line up on the left. Now say I want to make the left blue square a button so that when you roll over it, it has a orange frame and then when you press down on it it dims, and a larger version of it shows up above it. how would I do this? What i've done so far is made a button inside the MC, then on the down state of the button made a graphic button for the blue square, but it doesn't stay dimmed, and I don't even know how to make the larger blue square appear.
Is this too confusing?
please help.
thanks
[CS3] Movie Clip Acting As Button Needs To Move The Play Head.
Ok so every one on the forum told me to make my buttons with movie clips. And I did it. But no I have another problem I've movie clips that are acting like buttons but they can't move the play head any where. How do you get a movieclip(acting like a button) to control timeline behavior.
Using AS Ver. 2 Thx for the help
[CS3] Movie Clip Acting As Button Needs To Move The Play Head.
Ok so every one on the forum told me to make my buttons with movie clips. And I did it. But no I have another problem I've movie clips that are acting like buttons but they can't move the play head any where. How do you get a movieclip (acting like a button) to control timeline behavior.
Using AS Ver. 2 Thx for the help
[CS3] Movie Clip Acting As Button Needs To Move The Play Head.
Ok so every one on the forum told me to make my buttons with movie clips. And I did it. But no I have another problem I've movie clips that are acting like buttons but they can't move the play head any where. How do you get a movieclip (acting like a button) to control timeline behavior.
Using AS Ver. 2 Thx for the help
Button Inside A Movie Clip
I've got a problem with a movie clip. This movie clip is included inside a scene, and it has a button with rollover, rollout and release actions. The rollover and the rollout ones work fine, and do right what they are supposed to do. But the release action ("sceneName.gotoAndPlay(1)"), instead of sending the scene called "sceneName" to the frame 1, it sends itself to the frame 1. What can I do?
Thanks.
Get Url From A Button Inside A Movie Clip?
I have a button inside a movie clip, when clicked needs to open a .gif in a new window. I am use to using get url on buttons not in movie clips, but this button is having trouble finding its way out of the movie clip to find the .gif in the same folder. Any help would be greatly appreciated!!
Movie Clip, Inside A Button?
Hey!
I have created a button with a movie clip inside it which plays when the mouse goes over the button.What i want to know is, how can i get the movie to play the whole clip, instaed of the clip totally stopping and dissappearing when i move my mouse away.I want to be able to let the movie clip to continue to play until the end,even if the person puts the cursor over the button for a split seconds and moves it away.
Can Anyone help me here?
If You need to me refrase the question let me know
Thanks in Advance.
Blue Dragon
Button Inside Movie Clip?
is there a way to make a button inside a movie clip that links to a different scene? I have a button in a movie clip and I wrote action to it to link to another scene and it is not going there. It stays in the movie clip it doesn't go to the scene we told it to. We are working in flash 5.
Help???
thanx
Button Inside A Movie Clip
Movie "B" has a movie clip with a button inside it. Movie "B" is loaded into a blank movie clip "holder" in my main movie "A". How can I tell the button to go to a frame in Movie "A" and to load a new movie into "holder"?
Button Inside Movie Clip
I'm having a problem getting a button to work. I have a movie clip, which has several layers inside it. When you roll over the movie clip, actionscript makes it play and "open." It stops in the middle to reveal a button. The button is keyframed into one of the layers inside the movie clip. My problem is that you can't press that button! Even though the button is the top layer, it can't be clicked. Why not? How can I make this button usable?
In simpler terms, I have a piano lid movie clip, the lid opens when you roll over it, revealing a key underneath. But You can't press the key. Why not?
Movie Clip Inside A Button
another question i was interested in was if a movie clip can be placed inside a buttons "over" frame or something like that. what i'm looking to do is basically have text fade in from alhpa 0 to 50% on roll over, and down to 0% on roll out. I'd imagine i could do it simply with actionscript, but that wouldn't be tweening. is there a way to do this, or even do it like gradually with AS? thanks again for helping out, anybody who can. i really appreciate it.
Button Inside Movie Clip
Hi,
I have a button inside a movie clip. The button opens an external swf.
It works when its not inside the movie clip. But i need it inside the movie clip and it doesn't work. Anyone got any ideas?
Cheers.
Button Inside Movie Clip?
Having a big problem with my flash. I have a number of different movie clips inside a movie clip which is in scene 1. I have attached a button to eah of these movie clips. The idea is that when u click on one of these buttons it will take you to keyframe 2 of the first scene.
This is the actionscript I was using to do this:
on (release) {
gotoAndStop("_root.closet", 2);
}
The scene is called closet
The big movie clip is called imgMC which has an another movie clip called silvershirt_mc where the button is
When I tested the movie it is recognising it is a button - however it is simply going to keyframe 2 of the silvershirt_mc movie clip.
Hope there is a way for me to do this - to tell the button t go to the main stage and not within the movie clips.
Hope someone has the answer to my problems???
Button Inside Movie Clip
Inside a movie clip there are two items, a picture and a frame. I have a zoom function which is outside the movie clip that enlarges the picture but not the frame, they are inside the same movie clip becouse it's possible to move both the frame and the picture around.
My problem is that i need to create a button which changes the picture inside the frame. When i place the button inside the movie clip it doesnt work, but if I "test scene" while im working inside the movie clip, it works.
How do I get a button to change something inside a movie clip, while the button is outside?
Button Help Inside Movie Clip
I have a series of about 18 buttons inside a movie clip. They are located starting on frame 20. In that movie clip, I have a mask showing up from frames 1-20. The buttons come in from 20-38 (they increase on the timeline). On frame 38 I have a stop action, then I have a function that is called when button one is pressed like this button1_btn.onRelease=function() {do something}. The funny thing is, the function will not work unless I put code on the actual button that says on (release) {do something}.
Why can't I just call the function?
Thank you.
[CS3] Movie Clip Inside A Button
I'm using ActionScript 2.0 for a project and I'm having some difficulties doing something.
I have a movie clip where something is doing a small animation and I've converted that movie clip to a button. When I play the swf, the movie clip loops and I don't want it to; I want the movie clip to be a static image. I've tried going into the various states of the button and adding a stop command, but it won't let me type anything. Any ideas?
[CS3] Button Inside Movie Clip
Hello!
Ok I'll try to explain my problem as good as I can.
I got my layout on frame 5, on frame 5 I got a button that opens a animated movie clip. When the movie clip has played, it comes to a stop, inside the movie clip I got a button called CLOSE. The problem I am having is that I've tried a lot of different ways but I cant find the right code for the button that it would close the movie clip and return to the layout page.
I hope this is enough info or if you need more, I'll be sitting on this computer the whole night. I'm using CS3.
Thanks heaps.
Button Inside Of A Movie Clip
I want to get a button, located inside of a movie clip, to change the main timeline, via use of "Gotoandplay". What code would I use to do this?
Button Inside A Movie Clip
Hi
Ok, so i have a button inside a movie clip.
I want the button, when i click it, to go to a web page in a new window.
I have put my script on the top layer of the main timeline, in a layer called 'controls'
Here is the script:
Code:
function openPhotomore(yourEvent:MouseEvent):void {
navigateToURL(new URLRequest("http://anarkiuk.deviantart.com/gallery/#Photograph"),"_blank");
};
photomore_btn.addEventListener(MouseEvent.CLICK, openPhotomore);
I have given the button an instance name of 'photomore_btn', but it seems to be inside a tween aswell?
When running the swf i get the error:
1120: Access of undefined property photomore_btn.
I'm new to flash / im confused.
How come it cant find the photomore_btn?
Any help is greatly appreciated, thanks!
Button Inside Movie Clip HELP
so i have a movie clip named mc1, and a button called btn1 inside of mc1
i know that if i wanted to make the button do something, i would make a layer on main stage called actions and type
ActionScript Code:
stop();
_level0.mc1.btn1.onRelease = function() {
gotoAndPlay("start");
}
this works fine when its just a simple movie clip
but I have a movie clip with lots of animation, and my button appears only at the end of the animation.
using this code doesnt work, it doesnt recognize the button, so what do i have to change to make it know that the button doesnt appear until frame 10 in mc1??? how can i target the end of the movie clips timeline??
|