Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




How Do I Use A Button Within A Movieclip To Go To The Root?



Hi there, I am new to flash and AS3 and need some help getting my buttons to work.I made a script for the file that i am working with that has buttons located within 2 movieclips. I want that button to load and image into a UILoader (problemLoader_mc) that I placed on the stage on the main timeline (the timeline that contains WeekBar_mc). The problem is that I don't know how to get to the root of the file to start a new directory to tell my function to load the image i want. I have tried multiple approaches including:MovieClip(root).problemLoader_mc.source = problemArray[0]MovieClip(parent).problemLoader_mc.source = problemArray[0]root.problemLoader_mc.source = problemArray[0]parent.problemLoader_mc.source = problemArray[0](root as MovieClip).problemLoader_mc.source = problemArray[0]If anyone can help me out with this, I would greatly appreciate it, I am banging my head against a wall at the moment. (Also, please excuse my vague descriptions, I am still learning the official terms.)Here is the code that I have written that pertains to this problem:Attach Codevar problemArray:Array = ["Problem01.png"]WeekBar_mc.WEEKS_mc.WEEK1_btn.addEventListener(MouseEvent.CLICK, pload1)function pload1(event:Event){problemLoader_mc.source = problemArray[0]}Edited: 12/04/2008 at 02:25:30 PM by Lone Star Learning



Adobe > ActionScript 3
Posted on: 12/04/2008 02:22:50 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Movieclip On Root Timeline Functioning As Button
I have a movie clip on my main timeline that is functioning as an invisible button. For some reason the actionscript that I have on the clip doesn't want to control the main timeline. Here's the code:

onClipEvent (load){
this._alpha = 0
}
onClipEvent (enterFrame) {
if (this.hitTest (_root._xmouse, _root._ymouse, true)) {
_root.gotoAndPlay (2);
}else {
_root.gotoAndStop (1);
}
}

[HELP] DuplicateMovie / AttachMovie Movieclip Located Inside A MovieClip To Root
As title.

Example:
I have a movieclip(innerClip) inside a movieclip(mainclip).
Is there anyway if I duplicate / attach my innerclip to my root stage? So I can access it like _root.innerclip2, instead of normal duplication that make to _root.mainclip.innerclip2

Thanks in advance.

MovieClip(root)
Hey guys,

The framework for my current structure has a base class thats instantiates a bunch of other classes, for example:

Code:
public var tween:tweenClass = new tweenClass; // handles tween events
Say later, from within another class / movieclip, I wanted to tween an object, I have been typing:


Code:
MovieClip(root).tween.doTween(blahblah);
I was just wondering if this was the correct way to do things? It seems casting root as a MovieClip each time is bad practice and I was wondering if there is another way I can call the tween class from outside of the base class.

Cheers

Play Movieclip From Root
I did some tests for a school work and I don't know why this one is'nt not working.

I want to say to the movie clip to go to frame 2 from the main page of the file.

Thanks

MaX_BoY

How To See Whats Going On In Movieclip In Root
Hi.
Im not so much of a noobie as I haven't been doing anything with flash for years for now.
As I'm working on an animation now I'd like to now if the following would be anyhow possible and with which version of flash.
I have an animation inside a movieclip and some animation in root aswell. Now I need to synchronize these two so it would be necessary to see animation progressing inside movieclip in root timeline also. I know back then I somehow accidentally managed to do it few times. Animated inside Graphic instead of a movieclip or something. But it doesn't seem to work anymore.
Anybody have an idea?

Thanks.

Help W/controlling Movieclip From Root Timeline
I would appreciate any help on the following:

I am trying to control the animation of a movieclip from the root timeline but not getting the expected results.

Root timeline has single frame and two layers.
First layer is for the actions and the second layer for the movieclip (instance name is baller) itself. Root timeline has the following code:

stop()
baller.gotoAndPlay (2)


The movieclip (baller) has 30 frames and 2 layers. First layer is for actions and the second layer has a simple animation which moves an object from point a to b.
Animation starts on the second frame and continues to the 3oth frame.

First frame of the actions layer of the movieclip has the following code

this.stop()

and the last frame has

this.gotoAndPlay (2)

What I was expecting was that the root should start the movieclips animation from frame 2 and continue to play.

What happens is that movieclips timeline advances to frame 2 and just stops. I also made sure that action layer's frames between 1 and 30 are empty key frames.

I realize that there are other ways of doing this but I need to use this approach for more complex animation if it works.

Thanks in advance for anyone offering some ideas.

How To Call Variables From The Root Into A Movieclip
How can I call variables wich are standing in the root into a movieclip where I can check them.

For example variable name "hello" is standing in the .root. I click a button and the variable changes into name="goodbye". The same time I see to a target movieclip go to and play. On the end of the timeline I say. If name=="hello" go to elseif "goodbye" go to blablabla. You know what I mean. But how can I call the variable into the movieclip. Or is there an other way.

thanks

Controlling Root Timeline With MovieClip
I load an external movieClip into a blank movieClip and then I also have a stop on the root timeline. After the loaded movieClip is finished playing I want to move to the next frame on the root timeline.

I've tried _root.play(); and play(); on the last frame of my loaded movieClip but the root timeline wont advance.

I've also tried _root.gotoAndPlay as well as gotoAndPlay.

Can anyone direct me to a tutorial that explains controlling the root timeline with ActionScript from within a loaded movieClip?

I have no trouble using a loaded movieClip to load other movieClips on to the root timeline but I can't get it to stop and go. HELP!!!

Accessing Variables From Movieclip To Root?
Hello!

I've got a simple question.
I have a movie that loads a global variable in the first frame in level0 (root),
I've also have a movieclip loaded on the stage that holds 3 buttons
i want to access the global variable from within the movieclip and change it.
How do i do that?

Targeting Root Timeline From A Movieclip
I have a seemingly very simple question but cant get things to work.

I have a simple movie with 2 scenes;
Scene 1
Scene 2

I have a movieclip on scene 1. Inside the mc is a button. On the button I have the following action;

on (release) {
_root.gotoAndPlay("Scene 2", 1);
}


I expect the button to control the root timeline and goto scene 2.

Any idea why this is not working for me?

thanks,
ab

Accessing A Text Box In A Movieclip From Root
Hey,

I'm trying to change the text on a textbox called "text1" that is part of a movieclip called "menulist" using actionscript. How can I access text1 with actionscript?

Here is what I have so far:


Code:
menulist = attachMovie("menu","menulist",10);
menulist._x = 300;
menulist._y = 50;
menulist.mc.text1.text = "blah blah blah";

Accessing Movieclip At Root From Class ?
I cannot access any movieclip(or anything else) on the stage/root from inside class codes :


ActionScript Code:
package mypack {
    import flash.display.MovieClip;
   
    public class MyClass extends MovieClip {
        public function MyClass () {
            trace(root.myMC); // COMPILE ERROR = 1119: Access of possibly undefined property myMC through a reference with static type flash.display:DisplayObject.
        }
    }
}

Why is that ?

How Do I Call A Function On My Root, From Another Movieclip?
lets say on my root timeline i have a function like so:


ActionScript Code:
function eatMe() {
   trace('eaten.');
}

and then i have a movieclip called Bob loaded into my scene. the code inside of Bob says


ActionScript Code:
root.eatMe();

but i get an error saying eatMe is a possible undefined method of DisplayObject.

so it's not working.

how the heck can i call functions i coded on my root from other movieclips? it's very important that i do this.

Buttons In Movieclip That Need To Have 2 Functions In The Root
Hello Flash-people,

Even though i know not much of actionscripting, i like to make sites that are flash-based, so i keep on challanging myself with that. But now i stumbled into something, and i just cant find a solition!

here is my problem:

I have made dropdownmenu's in a movieclip and the mc works with hittest like this:

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}

Movieclip Three Deep Trying To Play On Root.
I have a mc that is three mc's deep. And it has an action on it.


Code:
picture.onRelease = function() {
large_pic.loadMovie(link[p], 2);
};
large_pic is a mc on the root of the movie. but i can't use _root because this swf gets loaded into another swf.

I've tried this and _root is there any other way that i can do this?

Effecting The Root From Inside A Movieclip
HI Guys,

Hopefully this is an easy one.

I want to goto the next frame on my scene (the root level) when I get to a certain frame within a movieclip (which is sitting on the root scene).


I hope that makes sense.

I tried a couple of things already that didn't work.

One idea was:

gotoAndPlay(_root.nextFrame());

this was within the MC at the point I wanted the scene to jump.

Maybe I'm missing something.

SchoolBoy Error: Root Of MovieClip
Hi,

I’ve got myself into a bit of a pickle with Movie Clips and Levels.  I have written a scenario to simplify my problem; I hope it is clear enough.


I have two swf movies.

SWF 1 – Snapshot.swf

This has a movie clip called LoadedContent.


SWF 2 – Content.swf -this is loaded into movie clip LoadedContent

This has a movie clip called Figure1.
This has a button called Button1 (Acting as MovieClip)


When Button1 is pressed I am trying to make a specific part of the movie clip Figure1 play.  To make this work I used this.
Figure1.gotoAndPlay("FadeOut");

This did not work so I added ‘_root’

_root.ManFigureFade.gotoAndPlay("FadeOut");


This worked great locally, but when I ran the site through the main swf ‘Snapshot.swf’ the button could manage the movie clips, this is clearly due to the _root value which I have set.  I have tried many combinations to set the root of the movie clip ‘Figure1’ but I can not seem to do so.


Could someone please advise me how to set the root of the movie clip Figure1 when running it through Snapshot.swf?

Thank you in advance for your help.

Tosh

Calling A Method In A Movieclip From The Root.
Hi,

I'm new to flash and actionscript and need a bit of help.

I created a movieclip and placed it on the stage. The movieclip is called markLoader_mc. In the markLoader_mc I created a function on frame one of the timeline. Here's all the code in frame one:

Code:

stop();

function LoadPic(pic:String){
   loader_mc.loadMovie(pic);
   gotoAndPlay(2);
   trace(pic);
}

loader_mc is a movieclip that is just there to show jpg files.

The rest of the timeline for markLoader_mc updates a status message "xx% loaded" and a progress bar (frame 2 and 3). Frame 4 turns of the progress bar and text message. It's just a simple movieclip I want to use as a holder for jpg files that has a built in progress bar.

The idea is to call the "LoadPic()" method from the root timeline and the markLoader_mc will show the progress and load in the jpg.

If I hardcode:

Code:

loader_mc.loadMovie("test.jpg");

in frame one of markLoader_mc (instead of executing the function) everthing works perfectly. But when I try to call the function from the root timeline it is never executed.

Here's how I'm trying to call the function. This is from the root timeline:

Code:

_root.markLoader_mc.LoadPic("test.jpg");

I've tried all types of dot syntax to try to get to the function but nothing seems to work. What am I doing wrong??

I've tried

this.markLoader_mc.LoadPic("test.jpg");
markLoader_mc.LoadPic("test.jpg");

I even tried using the with statement:

Code:

with(this.markLoader_mc){
   LoadPic("test.jpg")
}

help!

Error 1119: MovieClip Interacting With Root
I have a URLLoader on the main stage's AS named loader., first frame.
I have a movie clip that has AS inside it.
I need to be able to interact with loader from within this movie clip.
stage.loader and root.loader report error 1119.

Dragging A Movieclip Attached To The Root Timeline
Can anyone help? I used _root.attachMovie to attach a movie clip to the root timeline, but I can't seem to get the attached movie clip to be draggable. Here's what I did (the movieclip - called myMC - has a linkage identifier called "myMC"):

_root.attachMovie("myMC", "myMCattached",getNextHighestDepth());

myMCattached.onPress = function(){
this.startDrag();
}
myMCattached.onRelease = function(){
this.stopDrag();
}

It doesn't work. Any help is much appreciated!

Michael

Controlling The Root Timeline From Inside A MovieClip
[preface] I'll apologize in advance. I'm a designer, not a developer. I know very little about actionscript so if you can help me out, please pretend like I know nothing.
[/ preface]

I just need actionscript to check the value of a variable when the end of a movie clip is reached and then call an action.

Here's what I've got and it doesn't work. Please don't laugh.

if (p == 1){
tellTarget (_root) {
play();
}
}
else if (p == 0){
stop();
}

(the "stop" on the "else if" is referring to the movie clip's timeline, not the root timeline... in case you're wondering)

Any help would be greatly appreciated. Thanks!

Calling Root Functions From A Nested Movieclip
So i'm having a tiny bit of trouble adjusting to as3. i cant seem to call functions written on the root timeline from any nested movie clips.

for example:

on frame1 of the root timeline i write a simple function:

function greet(){
trace("hello");
}

i then create a movie clip and put it on the stage. on its first frame i call the previous function like so:

root.greet()

but instead of getting traced "hello" i get this compile error:

1061: Call to a possibly undefined method changeActiveFrame through a reference with static type flash.display: DisplayObject.

now, i somewhat understand whats going on, but i have no idea how to fix it. searching for this specific error yields a bunch of unrelated flex problems.

any help would be wonderful, thanks!

Dyn. Text In Movieclip, Accessing The Variable On Root Buttons
I have 9 buttons on the main timeline of a movie, and when mousing over, they all play the same graphical movieclip called overPanel, in which are two dynamic textfields called 'services' and 'products'.

OnMouseover, I want each button to add it's own words for the two fields, but I can't access them because they're not on the main timeline. I know MX can do this, I just don't know how to target them (I suck at targetting in general).

I can get it to work fine if I put textfield with the var name 'service'into the main timeline using the following basic code in the button, but I can't figure out how to target a textfield named 'service' on the main timeline buttons when it's in my overPanel Movie:

on (rollOver){
service="FORUMS"
}

on (rollOut){
service=""
}

works when the textfield is on the main timeline with the button.

I've tried:
_root.overPanel.service="blah"
_root.overPanel.servicetext.service="blah" (servicetext is the instance name of the textfield in overPanel mc)
_service="blah"
_overPanel.service="blah"
_overPanel.servicetext.service="blah"

in place of the 'service="etc."' in the line that works when it's on the main timeline.

None work.

Yucki phoo phoo.

Obviously missing something basic here...

Shawn

Loaded XML Data As A Root Variable - Inside A Movieclip?
Hi,
I'm trying to do a message viewer animation which will get some sample messages from a xml an load the data in a root variable. I've created the animation in separate movieclip which is having a textfield inside to hold the messages. when I try to load the data and trace it in the root it's working perfectly. but if I call this root variable inside the particular movieclip, it's not loading and even not tracing the root variable. can anybody help me how to do this? I've checked with the xml loading it's working (otherwise it won't trace in the root I hope) and I tried creating a dummy variable outside the function and called inside the movieclip and it's also working. I hope somebody would guide me in this. Thanks in advance.

The root code

Code:
var testVar:String = "This is a test text"; // if I call this variable inside the movieclip it works

var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("msg.xml"));

function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);

ParseMsg(xmlData);

}
function ParseMsg(msgInput:XML):void {

var msgListGroup:XMLList = msgInput.cat.(@ID == id).m;

trace (msgListGroup); // this trace works and print the messages stored in the xml

}
This is the code I'm using inside the movieclip

Code:
trace(MovieClip(root).msgListGroup); // this is where I refer the root variable but it traces 'undefine'
trace(MovieClip(root).testVar); // this one traces well (the dummy variable)

Trying To Access A MovieClip From Scrollpane Component, On The Root Timeline
Hi
I have a movieClip on the stage, I need to target that movieClip from a movieClip in the scrollpane component (movieClip is attached dynamically to the component), tried almost everything with no luck
help please
thanks in advance

AS 3.0 Referring A Root Timeline Variable Inside A Movieclip
Hi all,
I'm having a problem of referring a root variable defined in the first frame(as var randomListMsg:String) of the main timeline inside a movieclip. in AS 2.0 I could easily refer it by _root.variableName or _parent.variablename but I'm really confused how it works in AS 3.0.
can anybody help me in this? here is the code I used inside the movieclip. I've tried tracing it in the root timeline before these traces and it worked.

Code:
trace(this.parent[randomListMsg]); //doesn't work
trace(MovieClip(this.root).randomListMsg); //doesn't work
trace(MovieClip(this.parent).randomListMsg); //doesn't work
trace(MovieClip(root).randomListMsg); //doesn't work. returns 'undefined'
Thanks in advance.

Loaded XML Data As A Root Variable - Inside A Movieclip?
Hi,
I'm trying to do a message viewer animation which will get some sample messages from a xml an load the data in a root variable. I've created the animation in separate movieclip which is having a textfield inside to hold the messages. when I try to load the data and trace it in the root it's working perfectly. but if I call this root variable inside the particular movieclip, it's not loading and even not tracing the root variable. can anybody help me how to do this? I've checked with the xml loading it's working (otherwise it won't trace in the root I hope) and I tried creating a dummy variable outside the function and called inside the movieclip and it's also working. I hope somebody with guide me in this. Thanks in advance.

The root code

Code:
var testVar:String = "This is a test text"; // if I call this variable inside the movieclip it works

var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("msg.xml"));

function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);

ParseMsg(xmlData);

}
function ParseMsg(msgInput:XML):void {

var msgListGroup:XMLList = msgInput.cat.(@ID == id).m;

trace (msgListGroup); // this trace works and print the messages stored in the xml

}
This is the code I'm using inside the movieclip

Code:
trace(MovieClip(root).msgListGroup); // this is where I refer the root variable but it traces 'undefine'
trace(MovieClip(root).testVar); // this one traces well (the dummy variable)

Loaded XML Data As A Root Variable - Inside A Movieclip?
Hi,
I'm trying to do a message viewer animation which will get some sample messages from a xml an load the data in a root variable. I've created the animation in separate movieclip which is having a textfield inside to hold the messages. when I try to load the data and trace it in the root it's working perfectly. but if I call this root variable inside the particular movieclip, it's not loading and even not tracing the root variable. can anybody help me how to do this? I've checked with the xml loading it's working (otherwise it won't trace in the root I hope) and I tried creating a dummy variable outside the function and called inside the movieclip and it's also working. I hope somebody would guide me in this. Thanks in advance.

The root code

Code:
var testVar:String = "This is a test text"; // if I call this variable inside the movieclip it works

var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("msg.xml"));

function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);

ParseMsg(xmlData);

}
function ParseMsg(msgInput:XML):void {

var msgListGroup:XMLList = msgInput.cat.(@ID == id).m;

trace (msgListGroup); // this trace works and print the messages stored in the xml

}
This is the code I'm using inside the movieclip

Code:
trace(MovieClip(root).msgListGroup); // this is where I refer the root variable but it traces 'undefine'
trace(MovieClip(root).testVar); // this one traces well (the dummy variable)

Loaded XML Data As A Root Variable - Inside A Movieclip?
Hi,
I'm trying to do a message viewer animation which will get some sample messages from a xml an load the data in a root variable. I've created the animation in separate movieclip which is having a textfield inside to hold the messages. when I try to load the data and trace it in the root it's working perfectly. but if I call this root variable inside the particular movieclip, it's not loading and even not tracing the root variable. can anybody help me how to do this? I've checked with the xml loading it's working (otherwise it won't trace in the root I hope) and I tried creating a dummy variable outside the function and called inside the movieclip and it's also working. I hope somebody with guide me in this. Thanks in advance.

The root code
Code:

var testVar:String = "This is a test text";  // if I call this variable inside the movieclip it works

var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("msg.xml"));

function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);

ParseMsg(xmlData);

}
function ParseMsg(msgInput:XML):void {

var msgListGroup:XMLList = msgInput.cat.(@ID == id).m;

trace (msgListGroup);  // this trace works and print the messages stored in the xml

}


This is the code I'm using inside the movieclip
Code:

trace(MovieClip(root).msgListGroup); // this is where I refer the root variable but it traces 'undefine'
trace(MovieClip(root).testVar);  // this one traces well (the dummy variable)

(mx) Button Within MC Won't Affect MC At Root..
hi,

i want to have a button within an MC which will duplicate an MC from the root


Code:
textboxMC

secondMC
button
on (release) {
duplicateMovieClip (_root.textboxMC, "mc"+i, i);
setProperty ("mc"+i, _x, random(275));
setProperty ("mc"+i, _y, random(275));
i++;
}
clicking on the button will create a textbox in a random place.

This code works fine if the button is in the root of the scene, but if i put it within another MC it doesn't.

why is this?
what am i doing wrong? i guess it is something to do with _root.textboxMC within the duplicateMovieClip code but i thought that was absolute..

any help greatly appreciated,

jeff

ClickTag Button Not In Root
In my Flash file in root, I have 1 frame & in there I load a MC with some animations & inside the MC,
I have a button with this clickTag on it:

on (release) {
getURL (_root.clickTag, "_blank");
}


How would I write this code for this button (AS 2.0) in the root instead of putting it on the button? If I enabled the "Export for Actionscript/Export first frame" for the button.

Assuming:
movie clip name ="my_mc"
button name = "btn1"
linkage identifier = "btn1"


thanks very much





























Edited: 09/18/2007 at 12:10:54 AM by adobeuser999

How To Play Root Timeline From Button.
sorry..simple question..waiting for my new MX books to come.

How do I play a the .root movie from a button deep inside two movie clips.

i have a hidden button on a graphic..and i want to do the on mouse click. play . root movie.

any flash MX tutorials links on this would be great.

also what is up with the with tag is that the new way to reference a movie clip on stage.

Can you not use the alt + F3 movie explorer to choose which movie clip you want to target when doing a button actionscripting properties..

thanks for your time and energy.
Ryan

Duplicate Button For Each Folder In The Root Dir
ok the question:

is it possible to duplicate a button for each dir inside of the root dir the movie resides in like,

root>jan1(dir)
>jan2(dir)
>jan3(dir)
>main.swf(main movie with placeholder to load other movies)
>jan1.swf(galery of jan1 images)
>jan2.swf(galery of jan2 images)
>jan3.swf(galery of jan3 images)

i ask cause i think it would look alot easier in the long run cause it would dynamically make the buttons for you and you dont have to complie the main movie again

Button Doesnt Go Back To Mc In Root
I have a little problem with my website. i have an mc that plays when "portfolio" is clicked then it goes into 4 buttons. then another mc plays when one of those buttons is clicked. I cant get the user to be able to return to the portfolio mc. I am getting something wrong in my as. Plz help i have tried many things and it wont work.

It is in mx 2004.
If you need it in mx just tell me.
oh the as im using for the button is:



Code:
on(release){
_root.gotoAndPlay("a1port");

}

Button Within Movie Clip - Root
Ok, I've been searching for this answer for hours and I keep only finding way too complicated explainations or info for AS2.

I have a button within a movie clip: (I promise I'll make the file smaller, still working on it)
http://www.southseasspas.com/flash/spas/spas.swf

How do I make that "Back" button go back to the frame labeled "Home"? Button is named "back_btn". Movie is named "530L_mc". Please help, I'm loosing hope.

This works great, but I only want it to go to "Home" when the button is clicked.



Quote:




MovieClip(root).gotoAndStop("Home");






This is not working:



Quote:




function goBack (e:MouseEvent):void{
MovieClip(root).gotoAndStop("Home");
}
back_btn.addEventListener(MouseEvent.CLICK, goBack);





Error: 1120: Access of undefined property back_btn.

But the button is named "back_btn" -so I don't know what's wrong

Accessing Root Timeline Button
Hi,

I think this is a fairly basic thing to do, but I can't seem to figure it out. I have a movie clip(mc1) with a button(btn1) and a movie clip(mc2) in it. The button plays this second embedded movie clip(mc2). In this second movie clip(mc2), I have a button(btn2) that, when clicked, I would like to cause the first button(btn1) (on the root timeline) to disappear. Is this possible, and if so, could you help me figure out how to do so?

Thank you,
Brad

EDIT: Just so its easier to visualize, here's a hierarchy of the relevant elements:
mc1
-------btn1
-------mc2
-------------btn2





























Edited: 10/30/2008 at 09:49:28 AM by bathkbra000

Button On Root Timeline GotoAndPlay An MC Into Another MC
First of all is it possible !!! the button got to play a label frame into the second MC

first movieclip instance is lineart_mc and it got to play the lineartoff label into the ball_mc wich is inside the lineart_mc.......... the button is on the root timeline ...

Thx guy's

Commanding A MC In Root To GotoandPlay From A Button In Another MC
Okay, I've a button in MC1 (MC1 is resting in root) and I want it to take another MC2 (also resting in root) to go to a certain frame..

Supposing, the instance name for MC1 is 'blah1'

How'll i make the button in MC2 to take MC1 to lets say frame#10.. ?

Linking A Button To The Root Folder
hello,

Just wondering what the action script would be to link a button in an movie clip that I have dragged out of the libary into a new file.

I want the button that I have put in an animation that I have saved as a movieclip, to to 'goto and play' to a part that I have called 'jack1' that is in the new file.

any help would be much appreciated

cheers

Button Within Movie Clip - Root
Ok, I've been searching for this answer for hours and I keep only finding way too complicated explainations or info for AS2.

How do I make the "Back" button in the seperate movie clip go back to the frame labeled "Home"? Button is named "back_btn". Movie is named "530L_mc". Please help, I'm loosing hope.

This works great, but I only want it to go to "Home" when the button is clicked.
Quote: MovieClip(root).gotoAndStop("Home");


This is not working:
Quote: function goBack (e:MouseEvent):void{
MovieClip(root).gotoAndStop("Home");
}
back_btn.addEventListener(MouseEvent.CLICK, goBack);

Error: 1120: Access of undefined property back_btn.

But the button is named "back_btn" -so I don't know what's wrong

Mc Calling Hit Test Against Button In Root From 1 Frame Only
hi. when mc1 reaches frame 20, i need it to see if button1 in _root has the mouse over it, and stop if not, or play on if so.

i tried this in frame 20 of mc1, it doesn't work


Code:
stop();
if (_root.button1(hitTest( _root._xmouse, _root._ymouse, false))) {
gotoAndPlay(21);
}

Button Inside An Mc To Control The Root Timeline?
Ok, how do I make a button inside an movieclip on the main timeline successfully gotoAndPlay on the main root timeline that holds rthe ms where the button is contained. I want the button in the mc to play the root timeline of the whole flash movie with a

gotoAndPlay("scene",1);

my_btn._parent is:

level0.myMovieClip

but my_btn._parent.goto...
and my_btn._root.goto...

both do not work?

Any ideas?

Make Button Disappear On Root Timeline?
Hello,

I want to make a skip intro button disappear. This skip intro button is on the root timeline. I have another button that is two Movie Clips in. When the button from the two Movie Clips in is pressed, the Skip Intro button from the root timeline should disappear. So far nothing works.

Here is the code. Any suggestions on fixing the problem?

Thanks for your help.


Code:
on (release) {
this._parent.gotoAndPlay("gotoNextRoom");
__root._parent.skipButton.visible = false;

//_parent._parent.skipbutton._visible = false;
//_parent._visible.skipButton._visible = false;
//_parent._parent.skipButton._visible = false;




}

Making Button Disapear On A The Root Timeline?
Hello again,

How do I make a skip intro button disappear after it's clicked?

I have it on the main timeline. The content movie clip is covered by a mask that does NOT cover the skip into button. When the skip intro button is clicked it plays a movie clip that is two MCs deep in. As a result, after it's clicked and I put the graphic to cover it within the movie clip that is playing, it does not do the trick since it is not on the same timeline.

I hope I made myself clear. Any suggestions? I'd be happy to clarify if I have to.

Thanks

Call Me Stupid, But .. Button In Movie Clip, ... Root?
I cannot find anywhere nor figure out what seems to me should be simple enough.

If i have a button in a movie clip, and want to use it to affect the main timeline, as in advance to scene 2 or something, what is the proper syntax? _root.nextScene() etc not working.
Thanks in advance!

Loading .swf In A Pop Window On A Button Action Within The Root File
newbie here...
have a photo section with say 4-5 thumbnails (each being a button with an instance name). when clicked the button loads an external .swf in a pop up window (eg. button - 'bio_btn' and external .swf - 'bio.swf') and each time a diff button is clicked, a diff .swf appears in that same pop up. also need to design a pop up window in which i can have a 'close window' option.

any help would be greatle appreciated!

am working with mx2004 professional

Control Root Movie Clip With External Button
Hi,

In lay-mans terms i have a main movie (level0 by default). You click on a button to load an external image (level1).

Under neath this now loaded image (mc) (level1) , on level 0 movie has the main site navigation buttons that are still active, which i want to de-activate (as it very easy to click on them by mistake, i can do this part.
But when the user unloads the image in level 1, i want the main buttons to go live again.

So on the main movie level0 my buttons are instanced as 'red' and have
two key frames - "active" buttons (active) on the timeline and "not active" buttons with both these labels.

So my level 1 movie when it unloads itself (via a button)

i have -

on release
tellTarget
("red")
gotoAndstop("active")

this does not work;

How do i tell level1 button to control a clip on _level 0 ??

i remember i used to put _levelx after mc instance year ago, but i have forgot how to implement it, since flash has now changed, and im using old version.


i can email a basic version over if anyone want to take a look.


Im using MX 2002 - don't give me any samples as i have never been able to open anything :( , from you very helpful members.


best,


rai

EDIT;
ok i just got it to work with the levels. But my problem now is this

by previously making the buttons on level0 a symbol (mc), the navigation stops working so i can no longer seem to go to other parts of the movie, instead of going to new labels on the main movie level0 scene 1, its just seems to play the timeline of the button MC within itself - movie clip 'red' and goes to active and not active labels.
Close but so far :(



































Edited: 11/25/2007 at 04:53:51 PM by raigraphixs004

Scripting Root Stage To Disappear When A Button Is Clicked
Here's what I have so far:
http://www.clay.bellmor.com/PFC/

When either "news" or "promotions" is clicked I'd like to make the background fade, or darken, or preferably blur. I tried _root._visible = false etc, but it changes everything.

Also, the two bulletins "news" and "promotions"... notice how the promo is above the news and they're both under the plant (which is good on stage but not when they're clicked)... how can i fix that?

Thanks for any help!

Button On Level_1 Of Attached Swf Link To Mc On Root Of Target Swf
I have a webpage that i am redesigning and have come across a problem.

The page is made up of a "blank" page (main_page.swf) containing empty placeholders into which i am loading previously created SWFs using the loadMovie script.

The problem is that one of the loaded SWFs is a menu (menu.swf). on level_1 (slideBackground_mc) of the menu are a series of buttons (eg. main_btn). I am trying to use the buttons to load other external SWFs (main_text.swf, music.swf etc) into a content placeholder (content_mc) in main_page.swf.

the script i am using is:

main_btn.onRelease = function(){
loadMovie(main_text.swf,_root.content_mc)

I understand why this doesn't work, as it refers to the root of menu.swf. how do i get it to refer to content_mc on the root of main_page.swf.


I hope this is clear enough for someone to understand and explain to me whether it is possible to do.

Many thanks in advance.
jmckerchar

Copyright © 2005-08 www.BigResource.com, All rights reserved