Overlapping buttons within a movie clip
I am using Flash CS3. Within a movie clip, I have a button
symbol on one
layer and an invisible button, which covers the whole canvas,
on another
layer. Regardless of top-down order, the big invisible button
works and the
button symbol (simple text rollover with link) will not work.
If I put the
button on the main timeline it works fine.
What's the solution or what is a good way to have canvas
coverage, plus
individual links?
Thanks for the help.
See, I thought of that. It only works on the main timeline,
not within the
movie clips.
If you look at
http://www.graceweb.us/flash/precepts_090310.swf
and mouse
over the right-hand rectangle you'll see the top "blog" link
is on the main
timeline, the second blog link is two MCs deep, and the
bottom two links are
in the same clip as the invisible button.
The actual FLA is at
http://www.graceweb.us/flash/precepts_090310.fla
Thanks again for the help
"NedWebs" <[email protected]> wrote in
message
news:gpqvok$d45$[email protected]..
> Place all of you individual links/buttons on a layer
above the stage one
Similar Messages
-
Button within a movie clip not working
Hiya,
I have a movie clip within my swf website that is basically
an icon that you roll over to produce the menu. The movie clip has
coding inside it to produce the rollover effect. This is as
follows:
stop();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
this.onRollOver = function(){
rewind = false;
play();
this.onRollOut = function(){
rewind = true;
Whilst this coding works fine for this movie clip, for some
reason the buttons within the movie clip that appear as you
rollover them will not work when pressed. I am trying to get them
to navigate the main timeline, i.e. coding as follows:
on (release) {
_parent.gotoAndPlay("home")
_parent should be correct, I've tried it without and with
_parent._parent however still it has no effect. From what I can see
everything should be working fine.
Is there some reason why buttons will not work within this
sort of roll over effect movie clip?
Thanks for your help.you can't assign mouse handlers to a parent movieclip and
expect a child movieclip to respond to mouse events: the parent
will intercept those events.
to remedy, either assign all your mouse handlers on the child
generation movieclips or use a hitTest() for one of the
generations. -
Problems coding a button within a movie clip to navigate scenes
Hello there! I've got another probably noobish question to ask about CS6.
My goal is very similar to the one mentioned in this previously discussed forum question: http://forums.adobe.com/message/837995#837995 and also in this question http://forums.adobe.com/message/4172919#4172919
I am attempting to make a button inside a movie clip in my first scene go when clicked to the first frame of my second scene. I named the button's instance menu_button_1 and I believe Scene 1 and Scene 2 are the names of the scenes. (If they should have special names or instance names, I did not see where to type them.) Because of the similarities, I attempted to follow the suggestions on those pages. However I probably did some small thing wrong, (Or heck, maybe a huge thing.) which I what I'd like help with to find.
stop();
myButton.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(evt:MouseEvent):void {
gotoAndStop(1, "Scene 1");
This seemed to be what was suggested to enter. I attempted to modify it to work for me as well. This is what I typed for the button's action.
menu_button_1.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(evt:MouseEvent):void {
gotoAndPlay(1, "Scene 2");
(I removed the stop function because I have music looping in the movie clip that I want to play until the mouse is clicked.) (Also, I picked gotoandplay because I wanted scene 2 to start playing immediately when clicked rather than stopping.)
I tried variations, including "2" instead of "scene 2" and whatnot. I also tried linking it to differnet places just to see if that would work. It seems like it could link if I only asked for a frame within the movie clip itself, but it couldn't go to any other frames in scene 1 or scene 2. When I attempt, this message is displayed in the output:
ArgumentError: Error #2108: Scene 2 was not found.
at flash.display::MovieClip/gotoAndPlay()
at interactivestgermant_fla::menu_1/clickHandler()
It seems it cannot find my Scene 2. (It also cannot seem to find Scene 1 when I prompt it to do that.) I'm afraid I'm not sure of what I've entered incorrectly, though I'd imagine it involves how I typed the scene navigation. Should it have an instance name or something? I'd very muchappreciate a push in the right direction. If you need any more info I'll be happy to provide it. Thanks for the help! I very much appreciate it.I bet you're absolutely right. However I am not sure how I am misnaming it, as to my ametuer eyes, it seems to be entered properly into the properties box? It does show up as "menu" written in white over the keyframes and also in the properties slot. I can include some images here to help out in correcting me.
http://girlfoxgirl.deviantart.com/art/Flash-Help-1-395704638 This image shows my movie clip. This seems to be the problem it's having, identifying "menu." Did I do that incorrectly? It looks to be in order.
http://girlfoxgirl.deviantart.com/art/Flash-Help-2-395704633 This is inside of the movie clip named menu. You can see I did the same to name the button menu_button_1.
http://girlfoxgirl.deviantart.com/art/Flash-Help-3-395704627 This shows the action I gave to menu_button_1 in which I attempt to have it naviagte to Scene 1 frame 493.
http://girlfoxgirl.deviantart.com/art/Flash-Help-4-395704623 This shows where I'd like the button to go to. (It is hard to tell if that's frame 493 or 492. I figured that it should be ok either way and if this frame is 492 then it's easily changed once I get the darn thing working in general) (Also, I named the layer "peanuts." I tired entering the name "peanuts" as well but it didn't seem to work either, so I figured "493" is easier since I know that you can go to a specific frame by doing gotoandplay("scene 1" , #) and I'm not sure if it requires any additional stuff to go to a name.
http://girlfoxgirl.deviantart.com/art/Flash-Help-5-395704687 These are the errors I get. I totally agree with you- It seems very much to be an issue of getting it to recognize the "menu." However I am unsure where I named something wrong. Is this enough info to help you perhaps point out where that is? -
Making Button links within a movie clip
I am attempting to learn more Flash in general and
actionscript in particular. I have created a flash piece that
consists of 4 buttons within a movie clip that is being masked by
another movie clip. One movie is the set of 4 buttons. The other
movie is a "spotlight" that moves with the cursor. As the spotlight
shines on each button, the button's text changes color and is "lit
up".The Over state of each button is set to cause the button to
change color. When I put a keyframe in the Down state of each
button in order to add actionscript to create the action that makes
the button clickable to take the viewer to a web page, it tells me
that no actions can be given to this Down state. If I try using
Behaviors to accomplish the same thing, it tells me that Behaviors
are not supported. If I put actionscript into the actions layer of
the timeline, it does not do the required action, i.e. clicking on
the buttons leads nowhere. I have tried moving the actionscript
before, between, and after the setInterval and setMasker
actionscript that controls the interaction between the two movie
clips (which work perfectly). I have tried inserting an actions
layer into the button movie clip--same result--nothing. I have
tried putting the actionscript in the second frame of the actions
layer (both in the main timeline and in the movie clip), all to no
avail. I did give each button an instance name and used them in the
actionscript.
Here is the actionscript I am using for one of the buttons:
book.onPress = function(){
book.getURL("http.//www.bainbridge.wednet.edu");
I do not get an error message with this actionscript. I just
don't get sent to the web page. I am using Flash 8.
What else I should be doing? Is this a problem because the
cursor is already attached to an action? I am sure that this must
be possible, if only I knew more.
Thanks for helping.do you have the actual mc identified as ( book ) on the root
as well as the code i posted above? if so, are the code and the mc
on the same frame? also you should note that the code posted above
is meant to be placed on your root time line, not directly on the
mc identified as ( book ). one more thing: you must target your mc
( book ) correctly.
target like this:
IF YOU ARE ON THE MAIN TIME LINE ( _root ):
// if ( book ) is setting on the _root already then your
target path is simply book.onRelease.
// if ( book ) is setting inside another movieclip on the
_root, find out what movieclip ( book )
// resides in. that will now be the first part of your target
path.
// next find out if ( book ) resides in yet another
movieclip. if so, that will be the next part of
// your target path.
// continue this until you reach ( book ). the entire path
you took to reach ( book ) is your
// target path.
// you can also click on the target icon in your actionscript
pane to insert a target path for
// your movieclip.
here is an example in which ( book ) resides inside another
movie clip ( yourMovieClip ) on your _root:
yourMovieClip.book.onRelease = function () {
getURL("
http://www.cnn.com/"); -
Simple Button to Control Movie Clip
Hello,
I was relatively comfortable with AS 2.0, but am having a
hard time warming up to 3.0. I feel that this should be something
simple to find help online with, yet I'm finding it difficult to
get a simple answer.
I have a button that is inside a movie clip within another
movie clip:
mainMenu_mc > whoBtn_mc > whoButton
This button appears to work fine controlling a movie clip on
the same timeline. This is the code so far (on an Actions frame in
WhoBtn_mc):
whoButton.addEventListener(
MouseEvent.CLICK,
function(evt:MouseEvent):void {
whoGlow.gotoAndStop("click");
I have another movie clip on the main timeline that I would
like to control with this button:
blackFadeBottom_mc
What would the code look like for this?
Any help is appreciated - Thank you.Thanks, I was able to place the code on the main timeline and
get a trace when I clicked on the movie clip instance itself. I
probably didn't explain what I was trying to do very well, so I
apologize.
What I need to do is to control this movie clip that is
physically placed on the main timeline (fadeBlackBottom) with the
button that is buried under two other movie clips
(mainMenu_mc>whoBtn_mc>whoBtn).
I would like the whoBtn to tell the fadeBlackBottom movie
clip to (what used to be)
_root.fadeBlackBottom.gotoAndPlay("play"); This will drop down a
box that will contain the content of my 'Who' link.
How can I accomplish this?
Thanks again,
Chuck -
Playing a Movie Clip within a Movie Clip on load
Hi,
I'm trying to play a Movie Clip animation that is within a Movie Clip after a button has been pressed in a different Movie Clip.
The issue is that all Movie Clip animations are playing as soon as the SWF is loaded.
I have a separate Main.as file that contains all of the coding except for the animation stops:
package
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class Main extends MovieClip
var title1:Title1;
var scene1:Scene1;
var scene2:Scene2;
var scene3:Scene3;
var scene4:Scene4;
var scene5:Scene5;
var scene6:Scene6;
var scene7:Scene7;
var scene8:Scene8;
var scene9:Scene9;
var scene10:Scene10;
public function Main()
title1 = new Title1();
scene1 = new Scene1();
scene2 = new Scene2();
scene3 = new Scene3();
scene4 = new Scene4();
scene5 = new Scene5();
scene6 = new Scene6();
scene7 = new Scene7();
scene8 = new Scene8();
scene9 = new Scene9();
scene10 = new Scene10();
addChild(title1);
title1.buttonStart.addEventListener(MouseEvent.CLICK,onButtonStartClick);
scene1.buttonWalkOutside.addEventListener(MouseEvent.CLICK,onButtonWalkOutsideC lick);
//title
function onButtonStartClick(event:MouseEvent):void
addChild(scene1);
removeChild(title1);
Scene1(parent).gotoAndPlay("frame1")
//scene1
function onButtonWalkOutsideClick(event:MouseEvent):void
addChild(scene2);
removeChild(scene1);
So right now, I'm getting this error:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@46534041 to Scene1.
at Main/onButtonStartClick()
Any help is greatly appreciated... I've been grinding at this all night.I had been trying a bunch of different methods after searching for clues on Google, so it probably doesn't make sense with the parent.
I replaced the code with what you wrote, and I am given this error now:
Main.as, Line 44
1120: Access of undefined property scene1Text1.
Is there somewhere I have to declare scene1Text1 in Main.as? -
TellTarget to play a movie clip within a movie clip
I currently have two movie clips in my scene with a button
that lies inside one of the movie clips. We will call this movie
clip for the sake of this post "ph." The button inside of ph has a
rollOver/rollOut movie clip called "Buick_rollOut" attached to it
as a parked movie clip through tellTarget. Currently Buick_rollOut
only works if I put the parked movie clip on the same level as ph.
I want Buick_rollOut to be within the movie clip, ph, that contains
the button. I want that button be able to tellTarget the location
of Buick_rollOut within ph. I hope this makes sense. Here is my
code for the button that lies within ph. (this code only works when
Buick_rollOut is located outside of ph on the same level).Is this code running on the button? What's the name of the
button?
Things would be a little clearer if you replaced tellTarget
with dot notation:
Buick_rollOut.gotoAndPlay("rollOver"); -
Controlling the main time line of a movie via a button within a movie on a different level.
Hi there!
I have two movie is two different levels,
Level 5 is my base movie and I am loading another movie on
top of this into level 10.
Once the user clicks onto a button within the movie on level
10, I would like the animation in level 5 to stop (the animation
runs on the main root timeline of level 5).
Once the user clicks on a different button within the movie
on level 10, I would like the animation on the main timeline of the
movie in level 5 to start again from the point where it previously
left off.
Is this possible?
It would be great if someone could help me out with this.
Thanks, midi_iemidi_ie wrote:
> Hi there!
> I have two movie is two different levels,
> Level 5 is my base movie and I am loading another movie
on top of this into
> level 10.
> Once the user clicks onto a button within the movie on
level 10, I would like
> the animation in level 5 to stop (the animation runs on
the main root timeline
> of level 5).
>
> Once the user clicks on a different button within the
movie on level 10, I
> would like the animation on the main timeline of the
movie in level 5 to start
> again from the point where it previously left off.
> Is this possible?
_level5.gotoAndPlay("someLabelframe");
Use your regular action to target timeline or movie clips,
just define the level number at the beginning of the path.
Pretty much it :)
Best Regards
Urami
!!!!!!! Merry Christmas !!!!!!!
Happy New Year
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Trying to connect buttons to a movie clip
Hi all,
I need step by step instruction on how to attech control buttons to a movie clip.
I imported the .MOV clip (a 3D rotation) into the library, and I would like to be able to control where the rotation stops, by use of a slider or clicking a button. Can some one please tell me how to do this in an easy way if possible?
Any help would be greatly appreciated so much.
Many thanks,drag your movieclip to the stage and assign it an instance name, say movMC. create your button and give it an instance name, say btn. you can then use:
btn.onRelease=function(){
movMC.gotoAndStop(your frame label or number here); -
How to remove a function on the main timeline within a movie clip
How do you remove a function that is coded on a frame in the main timeline from within a movie clip? I tried this, but no dice:
infoGraphicDisparity.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene);
function fl_ClickToGoToScene(event:MouseEvent):void
parent.removeEventListener (Event.ENTER_FRAME, parent["enterFrameHandler"]);
MovieClip(this.root).gotoAndPlay("disparity");
this is the event I am trying to remove:
stage.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
any help would be appreciated as always.
Thanks!from any frame (that executes after enterFrameHandler is defined) in any display object in the display list
stage.removeEventListener(Event.ENTER_FRAME, MovieClip(root).enterFrameHandler); -
Problems with button inside draggable movie clip
I am building a click through presentation that has some small text in it. To maintain the design and allow for readability, I have added a zoom feature.
Here is the structure of the movie,
Stage - contains pages movie clip and forward/reverse click buttons for changing pages
pages_mc - contains 24 frames, one page per frame and buttons
There is a button at the _root level that uses a tweener to scale the pages_mc up to 170%. When this is clicked, it allows the pages to be dragged around the screen so you can look at different sections. When you click the button again, it returns the pages back to their original size stops drag.
My problem is, on the pages, there are buttons with links to external sites. Once startDrag has been invoked, I cannot touch the buttons inside the movie clip. Is there a way to make these buttons work?
I need the finished quickly so any assistance is welcome.
Code below
magUp_btn.onRelease = function() {
this._visible = false;
TweenLite.to(pages_mc, .25, {_x:-250, _y:-193, _xscale:170, _yscale:170});
TweenLite.to(magUp_mc, .75, {_alpha:0});
TweenLite.to(magDown_mc, .75, {_alpha:25});
magDown_btn._visible = true;
pages_mc.onPress = function(){
this.startDrag();
pages_mc.onRelease = function(){
this.stopDrag();
pages_mc.onReleaseOutside = function(){
this.stopDrag();
pages_mc.useHandCursor = false;
TweenLite.to(instr_mc, 1, {_alpha:100});
magDown_btn.onRelease = function() {
TweenLite.to(pages_mc, .25, {_x:0, _y:0, _xscale:100, _yscale:100});
TweenLite.to(magUp_mc, .75, {_alpha:25});
TweenLite.to(magDown_mc, .75, {_alpha:0});
this._visible = false;
magUp_btn._visible = true;
pages_mc.onPress = function(){
this.stopDrag();
TweenLite.to(instr_mc, 1, {_alpha:0});
I don't know how to turn drag off when I zoom out without using the onPress command, but I know that this is probably what is getting in the way of the button working?
Thanks!One option is to make the background of the pages be the draggable parts rather than the movieclips that contain the pages and buttons. That way, the buttons could be atop the background and not have their access blocked.
Instead of coding the pages_mc, you would essentially have the background coded for the drag...
pages_mc.bkgnd.onPress = function(){
startDrag(this._parent); -
Movie Clip Button not working within an Movie Clip
Hi,
I'm trying to create a movie clip on my my main timeline that has a movie clip button within it that pops up a box in the middle of the site that contains text and links. On Frame 1 I have the Up state, frame 2 the roll over state, and frame 3 my Down State (where Box appears).
on (rollOut) {
this.gotoAndStop("1");
on (rollOver) {
this.gotoAndStop("2");
on (release) {
this.gotoAndStop("3");
I have stop(); on each of the 3 keyframes
The problem is that on the main time line, the button is clickable but doesnt do anything
Any suggestions, what am i missing?
CheersOk, i have this assigned to a movieclip, is this wrong? Especially for MovieClip Buttons. Anyway, just tried this and it works!
on (rollOut) {
this._parent.gotoAndPlay(1);
on (rollOver) {
this._parent.gotoAndPlay(2);
on (release) {
this._parent.gotoAndPlay(3); -
Can't get Simple button to Load Movie Clip
Hi I've looked around for the answer to my question on this
forum
but havent found it so here it goes. I am working on this
company's
Flash site that was built by an outside studio. I am using
CS3.
The url to the site is
http://www.bubbakeg.com.
(this link will take you to the main page click the shadow
graphic
on the left under Bubba and this will take you to the site I
am speaking
of. The site is basically 5 different pages or movie clip.
What I am
trying to do is basically change the "Spring Break" middle
graphic
(which is a Movie Clip) on the HOME page and add a simple
button
that will direct the user to a new page. When I replaced the
graphic
with a new Movie clip there was no problem but I have added
a
button to load a new page (movie clip) and nothing happens.
This
button is in the movie clip of the new graphic which is
called up
when the page loads. If i take this button and just put it
on the
Main Stage in Scene 1 by itself it works and loads the page
(movie clip). It does not however when it is embeded in the
Movie
Clip. The Flash site is basically 5 different Movie Clips
loaded into
an "Empty Clip". This empty clip has a timeline with each of
the
clips labeled and with their respective sized placeholders.
And
when you click on either the links on the Nav bar or the
graphic
for each page it loads that movie clip on the main page. It
seems
like the button only wants to work on the main timeline. I
have
even replaced the code for the "Contact" button with the code
for the new button and it worked (opening new page). Here is
the
code for the new button that does not work:
on (release) {
_root.contentHolder.myHeight = 307;
_root.contentHolder.newLoc = 9;
heightAnimation();
I know the location and height from the above code are
referring to the placement and sizing of each movie clip
in the "Empty Clip". As i said before this heightAnimation
and the resizing of the new clip works fine when the
button resides in Scene 1 on the Main Timeline but not
within the new movie clip (graphic Ive created.)
I will upload the main chunk of the code that resides
in Scene 1 on the first frame of the "Actions" layer.
If anyone has any ideas I would appreciate it very much!
Please let me know if I can provide anymore info.
Thanks!
Gregchange:
function newLayerBT_CLICK(MouseEvent):void{
to:
function newLayerBT_CLICK(e:MouseEvent):void{ -
I have been tring to have a button in a nested movie clip move the timeline along using a class script attached to the nested movie. I can get the buttons to work on the main timeline with another similar class script, but when I have a button within a nested movie and attach similar code to the movie, it doesn't seem to want to work. This is the class code attached to the nested clip.... I guess can an active listener be called if the button isn't yet being visible yet, and should this be done on the Main class script page for the main timeline? Any help would be great!! Thanks
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class Animation extends MovieClip {
public function Animation() {
gotoAndStop(1);
negBackground_btn.addEventListener(MouseEvent.MOUSE_UP, buttonPressedNegBackground);
private function buttonPressedNegBackground(e:MouseEvent):void {
negBackground_btn.visible = false;
gotoAndStop("negChar");Hi,
Your question is bit confusing, try to explain it. According to what I unsrestand you should use the particular movieClip name with the code to make it happen properly.
Like :
(movieClip_Instance).gotoAndStop("negChar"); -
Referencing HTML page from within a movie clip
Hi
Hope someone can help with this.
I have a simple horizontal scrolling gallery of 24 thumbnails
in Flash, the thumbnail images are loaded into the boxes using
actionscript. I would like each thumbnail to link to a html page of
my choice. There is a movie clip instance called panel with the 24
buttons inside it and on the first button as a test I've placed the
following action script:
on (release) {
getURL("team.html","_self");
When testing this movie from within Flash (CTRL, ENT) the
button links to the html file (which is in the same folder as the
SWF) with no problem. The problem is when I preview the page in a
browser and try to click on the first button nothing is happening.
I've tried it in both IE7 and Firefox with the same result.
The flash thumbnail clip is placed as a flash object into a
html page using dreamweaver.
I'm sure this is something simple such as navigating the
timeline but I've tried a few things like _root. but still no joy.
Hope someone can help.
Thanks, JoTry
on (release) {
getURL("
http://site.com/team.html","_self");
}
Maybe you are looking for
-
Disallowing a user to checkin to a profile after a specific date
Hi All, I have created a profile and I want that profile to be active for a specific time period. Like say, all department heads are allowed to checkin into 'New Idea Generation' profile from 1st March to 31st March. After 31st March, they shouldnt b
-
Troubles with the Safari 4.1 update
I just downloaded the Safari update and it doesn't launch at all. No window at all. I have to use Firefox if I want to use the Internet. Anyone know what's wrong. I'm afraid to update from now on because it turns out to be worse.
-
Help me about built-in functions like regexp_substr,regexp_replace
Hi everybody Can anyone help me to understand these functions like regexp_substr,regexp_replace ... Will be better if documantation include examples with different situations or it may be links Thx
-
Hi Experts, I have a requirement for ALV done through OOPS. I have a display of ALV with check box with some reocrds. When I select a set of records and navigate further to other screen and come back to the initial ALV output, how do we remain the se
-
problem is when viewing my webmail with Firefox there is nothing in the inbox, but all other folders are fine.