Button Inside Movieclip Error
Hi i have designed a site where the user can move elements around the stage, and within some of these elements(movieclips) there are buttons insde them that link to various frame labels that are located on the main movieclips time line. The action to control the button is on the main movieclip time line and not within the element itself. These code used is:
Code:
paper2.webBttn.addEventListener(MouseEvent.CLICK, webButton);
function webButton(e:MouseEvent):void
{
gotoAndPlay("web");
}
the error i keep getting is:
Code:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/setChildIndex()
at FlashAS3Portfolio2_fla::holder_14/doDrag()
KirupaForum > Flash > ActionScript 3.0
Posted on: 09-16-2008, 10:57 AM
View Complete Forum Thread with Replies
Sponsored Links:
Button Inside Movieclip Error
Hi i have designed a site where the user can move elements around the stage, and within some of these elements(movieclips) there are buttons insde them that link to various frame labels that are located on the main movieclips time line. The action to control the button is on the main movieclip time line and not within the element itself. These code used is:
Code:
paper2.webBttn.addEventListener(MouseEvent.CLICK, webButton);
function webButton(e:MouseEvent):void
{
gotoAndPlay("web");
}
the error i keep getting is:
Code:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/setChildIndex()
at FlashAS3Portfolio2_fla::holder_14/doDrag()
View Replies !
View Related
#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.
var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);
It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.
Would love some help on this.
Cheers
View Replies !
View Related
#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.
var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);
It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.
Would love some help on this.
Cheers,
Sarge
View Replies !
View Related
#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.
var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);
It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.
Would love some help on this.
Cheers,
View Replies !
View Related
Rotating Movieclip Inside A Button, Inside A Scrolling Menu Bar
Hi all,
I'm pretty new to actionscript, and I'm kinda moving along; up until now.
I've used the the infinite scrolling menu tute at kirupa.com, created my own button graphics, and have a nice scrolling menu. On the buttons, I'm adding an image (which seems to need to be a movie clip to work), so when you rollover the button, the image will spin.
The code for the spinning works. I've tested it on the root frame of a new movie, and in the button of the infinite scrolling menu movie. I've added the code to spin the image on the "over" frame of the button timeline. With the button scene open, I run "test scene", stop it, and move between the frames. When I advance to the rolloever frame, the image spins like a top, but when I test it from the root of the movie, the image does not spin. I've also added a color change "that works" from the root when you rollover the button, but the not the spinning image.
I've added the image by editing the button from the library. I select the image, and add the code inside an onClipEvent(enterFrame) action.
I've also tried adding the code to the keyframe of the root scene in layer 1, and tried calling the image by the full path (_root.one_button.buttons.button1.spin1._rotation= blah) thinking it needs to know exacty where the image(movie clip) is at in the heirarchy to no avail. I've even went back and gave everything an instance name up unto the button I'm trying all this on.
Any help would be appreciated, since I'm about ready to shed tears over this.
Thanks!
-Sam
View Replies !
View Related
Rotating Movieclip Inside A Button, Inside A Scrolling Menu Bar
Hi all,
This question is going ignored in some other boards, so I thought I'd try here....
I'm pretty new to actionscript, and I'm kinda moving along; up until now.
I've used the the infinite scrolling menu tute at kirupa.com, created my own button graphics, and have a nice scrolling menu. On the buttons, I'm adding an image (which seems to need to be a movie clip to work), so when you rollover the button, the image will spin.
The code for the spinning works. I've tested it on the root frame of a new movie, and in the button of the infinite scrolling menu movie. I've added the code to spin the image on the "over" frame of the button timeline. With the button scene open, I run "test scene", stop it, and move between the frames. When I advance to the rolloever frame, the image spins like a top, but when I test it from the root of the movie, the image does not spin. I've also added a color change "that works" from the root when you rollover the button, but the not the spinning image.
I've added the image by editing the button from the library. I select the image, and add the code inside an onClipEvent(enterFrame) action.
I've also tried adding the code to the keyframe of the root scene in layer 1, and tried calling the image by the full path (_root.one_button.buttons.button1.spin1._rotation= blah) thinking it needs to know exacty where the image(movie clip) is at in the heirarchy to no avail. I've even went back and gave everything an instance name up unto the button I'm trying all this on.
Any help would be appreciated, since I'm about ready to shed tears over this.
Attached is the zipped fla file
Thanks!
-Sam
View Replies !
View Related
Control A Nested MovieClip From A Button Component Inside A Seperate MovieClip.
I am a beginner in using Flash and Action Scripting.
This is the Scenerio:
I want to control a movieclip that is inside of another movie clip.
I control it from a button component that is inside of a seperate movie clip.
test = button component instance name
test1 = function
test2 = Movieclip instance name
test3 = Movieclip instance name
testbutton = movieclip name where button component is located
I am able to control a movieclip on the main timeline with the following AS 3.0:
test.addEventListener (MouseEvent.CLICK, test1);
function test1(event:MouseEvent):void
{
event.target.root.test2.gotoAndPlay(2);
}
I want to control a movieclip inside MovieClip1.
I tried this:
test.addEventListener (MouseEvent.CLICK, test1);
function test1(event:MouseEvent):void
{
event.target.root.test2.test3.gotoAndPlay(2);
}
The movie loaded fine when I tested but got this error when I pressed the button:
TypeError: Error #1010: A term is undefined and has no properties.
at Untitled_fla::testbutton_26/test1().
Please help!!!!!!!!!
View Replies !
View Related
[F8] Control Movieclip From Button Inside Another Movieclip
ok. I have the Main Timeline..on the stage i have "side_menu_mc" inside that i have "menu_menu_mc"."slider" is menu_menu_mc's Instance name.
Inside "menu_menu_mc" i have a button (services_btn)."button_1" is its instance name. Upon clickin on this button, i want a frame labelled "services" (frame 18) in "side_menu_mc"'s timeline to display.
i attempted this.after some googling.but it does sweet nothing.
Quote:
Originally Posted by my shizer code
menu_menu_mc.services_btn.onRelease = function() {
trace("button pressed");
_root.gotoAndStop("services");
}
View Replies !
View Related
1087 Error From Trying To Access A Button Inside A Symbol
Hey All,
I've been getting a 1087 error with regards to my attempts to access a button inside a symbol which is being referenced by a ScrollPane Component.
The basic idea is for the user to click a button in the symbol scrollable symbol, that in turn affects a movie clip outside the symbol and ScrollPane. The code I am using is as follows.
Code:
// infoPaneMC is the movie clip outside the ScrollPane that I am trying
// to activate. In a perfect world, pressing the button below would
// cause it to slide into frame (or halfway through its timeline)
infoPaneMC.stop();
// scrolltest is the movie clip symbol referenced by the ScrollPane
// 1800_R_Button is the button inside scrolltest
scrollTest.1800_R_Button.addEventListener (MouseEvent.MOUSE_UP,startClip);
function startClip(e:MouseEvent) {
infoPaneMC.play();
}
// This code is what I am using to close infoPaneMC by playing it
// out from its halfway mark
infoPaneMC.addEventListener (MouseEvent.MOUSE_UP,startClip2);
function startClip2(e:MouseEvent) {
infoPaneMC.gotoAndPlay("infoPanePause");
}
However I keep getting the following error:
1087: Syntax error: extra characters found after end of program.
The line it refers me back to is:
Code:
scrollTest.1800_R_Button.addEventListener (MouseEvent.MOUSE_UP,startClip);
Any ideas?
Thanks!
Boz
View Replies !
View Related
Help With Button Inside Of MovieClip
I have a number of buttons inside a movie clip on Scene1(Drop down menu)in my movie. I want the movie to play Scene2 when the button is released. I have tried several different variations, Here is an example of some of the code that I have tried: What am I doing wrong? HELP! Thank you in advance!
on (release) {
_root.gotoAndPlay("Scene2", 1);
}
View Replies !
View Related
Button Inside Movieclip
I've just recently started working with Flash and I already bumped into a problem I can't figure out...
I have several movieclips inside my 'main movie'. I tried to make an e-mail button in one of the movieclips using actionscript, but nothing happens when I click the button. The script (getURL ("mailto:...) does work when it's in my 'main movie', so I suspect it has something to do with the fact that the button is inside a movie clip. I already did some searching, but didn't find an answer. Does anybody know how to make this e-mail button work?
View Replies !
View Related
Button Inside A Movieclip?
when i make a movie clip, then i go in the layer inside a movie clip and then make the movie clip a button, then i make the button's colors different for over, hit, etc, it doesnt make the colors changewhen i play the movie. why?
View Replies !
View Related
Button Inside Movieclip
I haven't been able to get buttons to access the main timeline when placed inside of a movie clip, is this the way that they are supposed to function, or could there be some other kind of error?
View Replies !
View Related
Button Inside A Movieclip
Hi
i have a presentation with 30 scenes
i made a movieclip that work like a menu - if you rollover it its open and you can see 6 buttons, every button should take you to a different scene.
this is the code i put on the buttons:
on (release) {
with (_root) {
gotoAndPlay("Scene 17", "c5");
}
gotoAndStop(1);
}
it needs to jump to scene 17, and in the movie clip to go back to frame 1 (where you see the menu closed)
But it is not working! i can't jump to another scene in the main stage! why?
Help
View Replies !
View Related
Button Inside MovieClip
I have a MovieClip that acts as a button, i.e. it starts playing itself when u click it. I want to have a button in it to open a browser window. I have tried to put a regular button on a layer over the Movieclip, but I don´t want people to click the button BEFORE they click the MovieClip...how to do that?
plz help, Zelda Zonk
View Replies !
View Related
Button Inside A Movieclip
Im working with some navigation. and have made a button inside a movieclip.
The action should be, goto another sceen, frame 1.
But somehow it dosent work.
this is the code that I´v written.
on(release) {
gotoAndPlay("2003",1);
}
but it does´nt get me where I want.
View Replies !
View Related
Button Inside MovieClip
I have placed bunch of buttons inside a MC and I want them to do things on the main timeline. so I have attached this code to the buttons:
on (release) {
_root.gotoAndPlay("Scene 3, 1");
}
it doesn't work...once I delete the Scene parameter it works.like below: But I need it to go to different scenes? like the first samples...any idea
on (release) {
_root.gotoAndPlay(10);
}
View Replies !
View Related
Button Inside A Movieclip?
I have a button inside a movie clip. It lets you hover over the button and click on the button but it doesnt send its action. (in this case, a url).
it can be viewed here:
http://jmcivor.com/portal (its at the top, large banner with sky, and a hangman type thing, the sign is the button.)
How can I make this work?
View Replies !
View Related
Button Inside A Movieclip?
I have a button inside a movie clip. It lets you hover over the button and click on the button but it doesnt send its action. (in this case, a url).
it can be viewed here:
http://jmcivor.com/portal (its at the top, large banner with sky, and a hangman type thing, the sign is the button.)
How can I make this work?
View Replies !
View Related
Button Inside A Movieclip
Hi everybody,
I have a button inside a movieclip, with which I am using a onRollOver, onRollOut and onRelease. I want to be able to access the button inside the movieclip, and have actions to occur when the events rollOver, rollOut and onRelease happen to the button inside the MC. Right now it is just ignoring the events on the button.
Can anyone please tell me how I could do this?
Thanks a lot
View Replies !
View Related
Button Inside Of A Movieclip
Ok, I have to make a flash presentation, and it's my first time really using actionscript. I have the basics of stop, and next scene and whatnot, but ive come accross a problem...
At the start of the show, there is a movieclip that contains 3 buttons that slide in. This was necissary to do because i needed the presentation to be on "stop" on the first frame. Now, when i put any actions into the buttons, it only affects the movie clip. Is there any way to get a button within the movieclip to affect the master timeline?
(ps, what I'm trying to achieve is to make the button "gotoAndplay" frame 4 on the master timeline.)
due friday
View Replies !
View Related
Button Inside Movieclip AS3
Hi I'm new at AS3 and I'm trying to place an action for a button inside a mc to play a frame label (beneficios) from the main timeline, i know i'm missing somekind of _root... can anyone please help me?
this is my script
beneficios2.addEventListener(
MouseEvent.MOUSE_UP,
function(evt:MouseEvent)
{gotoAndPlay("beneficios");
}
);
Thanks!
View Replies !
View Related
Button Inside Movieclip Cs3
After countless hours I still cannot figure out why I can't get a button within a movieclip to work.
I have made a sample fla file (link is at the bottom of post) of what I am trying to do. I have a movieclip(Box_Mc) and a scrollable movieclip(Inside_box_mc). Inside_box_mc is where the button I am trying to fix is at.
It goes like this.
Main Timeline
Box_Mc
Inside_box_mc(Where the button is at.)
What I am trying to do is to make the button move to a frame label on the Box_mc timeline.
The code I am using is:
Code:
function onCBtnClicked(evt:MouseEvent):void {
gotoAndStop("C");
}
C_btn.addEventListener(MouseEvent.CLICK,onCBtnClicked);
I believe I need to use a _root, or a movieclip.parent.gotoAndStop but after many combinations I could'nt get it to work.
Hopefully this fla file will let you understand my problem.
http://files-upload.com/files/598808/AB Example.fla
As well I hope we can eliminate this question with this thread because I have seen it has been posted quite often for Flash 8 and other flash versions.
Thanks for the help.
View Replies !
View Related
Button To Inside Movieclip?
So I have a movie clip called pages_mc and inside it I have a timeline with different labels in actions ex. "frame 1 = "home" , frame 10 = "bio".
On the main page I created a button (ex. home) and I want it to link to the "home" inside the "pages_mc" movie clip. How would I do this?
So far I have
home_btn.onRelease = function () {
home_btn.gotoAndPlay("home");
}
but it isnt working.
View Replies !
View Related
Movieclip Inside Button
i have the stupidest and probably most repeated question:
why cant i control my movieclip that is located in a button...
what i want to do is go to a specific frame inside the MC when the button is pressed...
this is what i have so far:
Code:
on (press) {
_root.my_mc.my_btn.gotoAndStop(1);
}
doesnt work....
thanks!
TVWeb
View Replies !
View Related
Set MovieClip Inside Button
I tried to set visible to false of MC inside Button, but result nothing and I try to trace the movieclip it's result undefined
ActionScript Code:
_root.my_btn.my_mc._visible = false;
Anybody know how to solve this problem?
View Replies !
View Related
MovieClip Inside A Button
Hey guys, im trying to work out how to put a movieclip inside a button.
For instance, i want a wire that when you shoot it breaks. I know i could just put a broke wire inside the "DOWN" part of the button. I was just wondering is there a way to put a movie clip of the wire breaking and sparks and stuff on the "DOWN" part of the button?
So basically you will shoot the wire, and it will break in half and spark and stuff. But i would like to put the movie clip of it breaking inside the button.
Any help would be lovely, thanks in advance.
-Dan
View Replies !
View Related
Button Inside Movieclip
hi all,
i m having button inside a movieclip. I have code on Movieclip (on (release))and as well as on button (on(press)). Now my problem is... if click on button also movie clip coding is working... button is not working..
can anyone give me solution for this..
thnx,
shree
View Replies !
View Related
Button Inside Movieclip
Hello ,
i have a problem with a button inside a movieclip.
This is the action :
my_mc.onRollOver = function() {
target_mc.loadMovie("movie.swf");
my_mc._alpha = 0;
};
my_mc.onRollOut = function() {
target_mc.unloadMovie("movie.swf");
my_mc._alpha = 100;
};
Inside movie.swf i have a button and when my mouse goes over it the _root timeline restart.... ( so if i keep still over the button it goes a loop)(
Who knows the why ? or
How do i can the button works fine?
View Replies !
View Related
Button Inside Of MovieClip
Hello,
I am using flashMX. Its been a good 4 years since I have used Flash and I am having a problem. I have created a Navigation Movie Clip with Buttons inside of it. I have attached an actionscript (On release goto and stop in Scene 1 frame Label - label name). This deosn't seem to work? I am not sure. I want the button which is inside the Moviclip which is on the stage in Scene 1 to jump the timeline forward and stop at a frame label? Any reason why this isnt working?
View Replies !
View Related
Button Inside Movieclip
I have a button inside an mc with the script:
on (release) {
gotoAndPlay("Out");
}
but it doesn't work. I've also tried
on (release) {
root.gotoAndPlay("Out");
}
but that doesn't work either. how do I get out of the mc?
View Replies !
View Related
Button Inside A Movieclip
Hi everybody,
I have a button inside a movieclip, with which I am using a onRollOver, onRollOut and onRelease. I want to be able to access the button inside the movieclip, after I have used the onRollover for the mc. Right now it is just ignoring the onRollOver of the button.
Can anyone please tell me how I could do this?
Thanks a lot
View Replies !
View Related
Button Inside MovieClip
hello people, my problem is this:
i created a button inside a movie clip symbol. i need the button to GoTo a specific frame label in the main timeline. by just telling it to go on release to the frame label the button does not work. how would i go about that?
thanks so much partners!
View Replies !
View Related
Button Inside A Movieclip
Im in the process of greating a shooting game, and one of the steps involved is having a button inside of movieclip. However, when I do this I get the error
**Error** Symbol=enemy, layer=hit, frame=60:Line 1: Mouse events are permitted only for button instances
on(release) { score=score+1; }
any ideas on how to fix this
View Replies !
View Related
Button Inside Movieclip
I have a button inside an mc with the script:
on (release) {
gotoAndPlay("Out");
}
but it doesn't work. I've also tried
on (release) {
root.gotoAndPlay("Out");
}
but that doesn't work either. how do I get out of the mc?
View Replies !
View Related
Button Inside Movieclip
i need some help with my menu. i have a button thats inside a movie clip, with geturl attatched to it. when i click on the button which is inside the movieclip, it wont open the website (or the browser period)
here is my script that's attatched to the button:
on (release) {
getURL("http://www.removedurl.com", "_self");
}
is a button inside a movieclip just not allowed?
View Replies !
View Related
HELP Button Inside A MovieClip
Hello everyone,
I have created a movieclip and inside the movieclip I have created a button.
The script I have put on the button is the typical on release get URL.... For some reason the button does not work??
Please Help!!!!
Thanks in advance.
View Replies !
View Related
Button Inside Button Inside Movieclip
Now that I've got your attention with the hideous thread name, here is my problem.
I have a button inside another button which is inside a movieclip. *whew*
I have it so that when you click on the movieclip, a dialog box pops up. I have two buttons on the dialog box, but for some reason you can't click on them and when you do, the dialog box just disappears. Here's a picture of what I'm talking about, so how do i get the "YES/NO" buttons to work? Oh, the buttons are not included in that Graphic
View Replies !
View Related
Button Inside Button Inside Movieclip
Now that I've got your attention with the hideous thread name, here is my problem.
I have a button inside another button which is inside a movieclip. *whew*
I have it so that when you click on the movieclip, a dialog box pops up. I have two buttons on the dialog box, but for some reason you can't click on them and when you do, the dialog box just disappears. Here's a picture of what I'm talking about, so how do i get the "YES/NO" buttons to work? Oh, the buttons are not included in that Graphic
View Replies !
View Related
Replacing A Button Inside A MovieClip
Ok this should be easy, but i can't seem to get it working.
I have a movie Clip With a Button inside of it. I need to either change the image on that button or replace the button completely. I can't seem to delete it with removeMovieClip or delete.
How the Hell do you remove a button? or a movieclip that wasn't added via attachMovie.
Any Ideas?
View Replies !
View Related
Reference Movieclip Inside Button
Hi.
Can anyone tell me how to reference a movieclip that I have attached to the rollover frame of a button?
I have a button named 'info' on the main timeline.
On the rollover frame of the button, I have attached a movieclip. The movieclip is named 'infomovie'.
When you play the movie and position the cursor over the button, the movieclip plays as expected.
I now need to reference the moviclip, but don't know how to.
I thought _root.info.infomovie would be the path, but when I try..
trace(_root.info.infomovie,_name);
..I get 'undefined' in the output window instead of the movieclip name.
Can anyone tell me how to reference the movieclip?
Thanks in advance for any help.
Damian
View Replies !
View Related
Access Button Inside Movieclip
Hey Everyone,
I am not that familiar with Flash yet, so I have trouble accessing a button inside a Movieclip that I have loaded by using the loadMovie command.
code:
createEmptyMovieClip("menu",1);
menu.loadMovie("menu1.swf",1);
menu.button.onPress = function(){
trace("works");
}
My movie loads fine and my button has the instance name button. So that should not be the problem.
Thanks for any help,
Andy
View Replies !
View Related
Button Nested Inside Movieclip(s)
Hi i have button nested inside a movie clip (which acts as the menu). I have tried lots of different actionscript so that when the button is pressed it will go to "Scene 2", but i cant get it to work
i initially put the code on the button so it was:
on (release){
_root.gotoAndPlay("Scene 2", 1);
}
but it was having none of it, so now ive tried doing it on the movie clip...but it still is not working (see attached).
All help will be greatly appreciated
Merry xmas to all!!!
Nav
View Replies !
View Related
Button Not Working Inside Movieclip
I have a button on my stage that opens a separate movieclip. Inside that movieclip i have a button. When I rollOver that button, then I rollOut the moive that it is contained in closes. Why?
Here is an example of the buton code i am using, not to complecated here:
Code:
stage_btn.onRollOver = function() {
container_mc.gotoAndPlay("over");
};
View Replies !
View Related
|