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




Specifying _parent



Hi -

I am having trouble specifying which level a button is talking with. I have a movie named "one.swf" that is loading "two.swf" into a blank clip. My trouble occurs when I publish the buttons inside of "two.swf" generate an error.

I'm sure this is because they are talking to the root and not to "two.swf". Do I need to specify this in the tellTarget section of my code? If so what is the correct syntax?

on (rollOver) {
tellTarget ("/scrollingtext") {
nextFrame();
}
gotoAndPlay("down1");
}


Thanks for your help. And sorry for my incompetence.

J



FlashKit > Flash Help > Flash ActionScript
Posted on: 03-08-2004, 05:37 PM


View Complete Forum Thread with Replies

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

[F8] Flash Popup In _parent Or _parent._parent
Hi,

I'll explain what I'm trying to do first and then say how my fevered mind is trying to do it.

I want a page that has loadable dynamic text (whic I can do).

Within that text I want to be able to link (in anyway at all) to a flash (not javascript etc) popup. And I want to load dynamic text into that flash popup based on at least one variable that can be passed to it.

Right, this is the twisted route I've taken so far.

Set up a web page for my sister, this has pages for biography and news etc.
Within those pages I created a javascript popup, which was nice.
Then someone at work showed me Flash and the past two weeks have been spent trying to recreate the web page in Flash.

I got lots of tutorials that showed me how to load text dynamically (which my sister will be able to handle, as shes not a techie, that isn't a slur in the highly unlikely event she reads this:) ).

Then I saw some templates which had some fancy Flash popup with transparency. They really fit in with the look of the web site I'm setting up. Great, i thought, I'll do that.

But how to link a popup? Well I'd already seen someone putting a swf file in the dynamic text so I created a button in it's own swf file that when clicked attached a movie file with the popup in it (I followed askthegeezer 's post on setting up a transparent dragable popup).

It looked good but there are some problems with it...

The popup only appears in the dynamic text field not across the whole page, I guess this is because the dynamic text field is the parent of the swf that holds the button and the popup.

Also it appears to resize the popup based on the dynamic text field.

And I'm having problems getting each popup to appear in a reasonable place.

Finally I'm having to create a new swf for each link I want. Not a problem at the moment as it's only got three links.

Any help will be greatly appreciated.

Not sure how relevent the code is as I could be doing this completely wrong but I'll upload them anyway

Firing Function In _parent._parent
I have 1 main mc that holds three seperate mcs. I'm trying to fire a function on the nav of one of the mcs from a "content" mc, passing in the button name/id from this content mc. I can trace to parent but the trace of the function within _parent._parent is undefined.

Anyone have any suggestions, code chunk is below?


Code:
//code on button within a content mc trying to trigger the code in the nav mc.
this._parent._parent.productNavHolder.navRel(this._parent._parent.productNavHolder.btn3);

// trace comes back undefined
trace(this._parent._parent.productNavHolder.navRel);

Is There Such A Thing Like _parent._parent?
Is there code that lets you drill out more than one movie at a time? For example, _parent backs you out one level, where _root takes you all the way out no matter how far into movie clips you are. Is there something I can say that basically says _parent._parent instead of going all the way to _root and then drilling all that back in just to get to a movie? Thanks

_parent._parent ?
Hi all,

Looking for a quick answer...would really appreciate any help...


How do I call the parent clip of a parent clip in dot syntax?

Ie: How do I reference two mc's 'up' the chain?

Thanks all.

J

_parent
HELP!! I just put in what should be a simple preloader but it wont move on after it reaches a hundred percent...

perc = Math.round((_parent.getBytesLoaded()/_parent.getBytesTotal())*100);
xperc = perc/100;
barlength = 200;
if ((perc == 100) and (bar._width == barlength)) {
_parent.gotoAndPlay(2);
} else {
nperc = perc+"%";
bar._width = barlength*xperc;
bar._x = -100+(bar._width/2);
}


The actionscript dictionary says the _parent command is only available on flash4 (that cant be true). I am sure it is something simple...

_parent
hi,

i'm trying to make a button inside a mclip take me to a frame on the main timeline. i know i should use the _parent thing but i don't really know how...

please help!

thanx

This._parent
I am reading the book, Actionscript for FLash MX- Definitive Guide by Colin Moock and I just finished making a quiz. Here is the code some of the code I used, and where my question is.

choice1_btn.onRelease = function () {
q2answer = 1;
gotoAndStop("quizEnd");
};

//Code executed when button 2 is pressed.
choice2_btn.onRelease = function () {
q2answer = 2;
gotoAndStop("quizEnd");
};

//Code executed when button 3 is pressed.
choice3_btn.onRelease = function () {
q2answer = 3;
gotoAndStop("quizEnd");
};

The quiz works fine with this code. In the book though it tells me to put

choice3_btn.onRelease = function () {
this._parent.q2answer = 3;
this._parent.gotoAndStop("quizEnd");
};

but with this code, when I press the buttons, they don't move to the next part. Can anyone tell me why this is and maybe explain to me what the "this._parent" does.

Need _parent Help,,,PLEASE
Hi, thanks for reading this..
l have a main movie which l have called core.swf
then l have a second movie which is called section1.swf.

In the section1.swf is a thumbnail viewer made in a seperate movie clip which loads a new image on the main timeline once selected in section1.swf. l'm using frame labels on the main timeline e.g "one" "two" "three"
The following code works when i test the move seperatley.

the code for each thumbnail is..

//Thumbnail MC Actionsript//
on (rollOver)
{
gotoAndPlay("on");
}
on (press)
{
gotoAndStop("press");
}
on (release)
{
gotoAndStop("release");
_root.gotoAndPlay("one");
}
on (rollOut, dragOut)
{
gotoAndPlay("off");
}

Now when l load the section1.swf into a container clip on the core movie the thumbnails selector doesn't work, the thumbs are wiewable but when you click a thumbnail the corresponding image wont load into the section1.swf.....Is this a _root problem? l have tried _parent in the above code, but it still doesn't work......Pulling my hair out now....Going bald
Hoping someone can help me...

_parent._parent._parent._parent._parent.
I've got a swf file that contains a movieclip (let's call this movieclip 'Jefferson'). inside this movieclip, at the last frame, it has a code to go to a different frame in another movieclip. Let's call this second movie clip Jackson.
Now Jackson is located in a different swf file that loads the Jefferson movie clip.

So my problem lies in the code in jefferson that tells jackson to play. it works fine if i put _root.jackson.gotoandplay.... but i can't do that, because the swf file that contains jackson is loaded into another swf file. that's 3 swf files total. how many parents do i put? or is there a better way? i've tried up to _parent._parent._parent._parent and it still doesnt play. I hate this parent and root business flash does.

_parent._parent?
I'm trying to make text appear 2 levels above a MC.
This is the code I'm using, but it's not working. Is this an incorrect use of _parent?

on (release) {
with (_parent._parent) {
gotoAndPlay("conference page");
}
}

[F8] As2 _parent >>> As3 ?
I have a as2 to as3 migration issue. I get an error when using

_parent.prevFrame();


in as3. _parent function is no longer supported, so how can I make the same function work in as3.

Help appreciated.

Bets wishes

theredtitan

[F8] _parent Help
What Im trying to do is "remotely get the parent" of a variable. What I mean is this.
I have a mc, with an unknown instance. I know that you can just add this code directly to the movieclip.

PHP Code:



on (release) {
    trace(hi._parent);
}




But what if I want to add it to another movieclip/button, not the actual movieclip/button with the parent variable I am trying to find. So like have a button that traces the parent of ANOTHER movieclip?

_parent.
Lets say i have a "main.swf" and i load a movie clip "BIO" on lvl 3 and from MC "BIO" i want to make a button that tells the "main.swf" to "gotoAndPaly(27)" is this possible.. maybe by using "_parent." ??

Using This._parent
I'm trying to fit this game i'm making into one movieclip so it's easier to insert into a flash based website. The script i have so far for the main character is as follows. (The big movieclip i'm fitting evertyhing into is called "main" and with the current script, if the main character touches the "win" or the "wall" mc, nothing happens)








Attach Code

onClipEvent (load) {
power = .35;
radius = 7.5;
yspeed = 0;
xspeed = 0;
friction = 0.95;
gravity = 0.1;
thrust = 0.75;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
if (!_root.main.wall.hitTest(_x-9, _y, true)) {
xspeed -= power*thrust;
}
}
if (Key.isDown(Key.RIGHT)) {
if (!_root.main.wall.hitTest(_x+9, _y, true)) {
xspeed += power*thrust;
}
}
if (Key.isDown(Key.UP)) {
if (!_root.main.wall.hitTest(_x, _y-9, true)) {
yspeed -= power;
}
}
if (Key.isDown(Key.DOWN)) {
if (!_root.main.wall.hitTest(_x, _y+9, true)) {
yspeed += power;
}
}
if ((_root.main.wall.hitTest(_x, _y+9, true)) or (_root.main.wall.hitTest(_x, _y-9, true)) or (_root.main.wall.hitTest(_x+9, _y, true)) or (_root.main.wall.hitTest(_x-9, _y, true))) {
_root.main.play();
}
if ((_root.main.win.hitTest(_x, _y+9, true)) or (_root.main.win.hitTest(_x, _y-9, true)) or (_root.main.win.hitTest(_x+9, _y, true)) or (_root.main.win.hitTest(_x-9, _y, true))) {
_root.main.gotoAndPlay(13);
}
xspeed += gravity;
yspeed *= friction;
_y += yspeed;
_x += xspeed;
}

_parent. Help
hi, im a bit confused with the ._parent function...i sort of know how to use it, yet i dont. the thing is..in the AS dictionary it says:





quote:


Example
In the following example, the movie clip desk is a child of the movie clip classroom. When the following script executes inside the movie clip desk, the playhead will jump to Frame 10 in the Timeline of the movie clip classroom.

_parent.gotoAndStop(10);




well in my case, the external swf is a child of my main MC right?
so when i put the AS code "_parent.gotoAndPlay(2);" into my external (child) MC, it should go on and play the second frame in my mainMC, the parent...right? but it does the opposite, it plays frame 2 in the child......have got this all wrong?


the code on my preloader in the external swf i think i have done it right so that it _parent.gotoAndplay(2)...well here is the code:






Code:
onClipEvent (load)

{
total = _parent.getBytesTotal();
}
onClipEvent (enterFrame)
{
loaded = _parent.getBytesLoaded();
percent = int(loaded/total*100);
text = percent+"%";
gotoAndStop(percent);
if (loaded == total)
{
_parent.gotoAndPlay(2);
}
}

Code:






the button code is:





Code:

on(release)
{
loadMovie("pic.swf", _parent.container);
}




the website is @ : http://www.medisan.remikstudios.com/


COMMENTS ON THE SITE WOULD BE NICE TOO...CRITIQUES

Help With _parent
Hi,

this is my first post, most of the other problems i have had have been already answered so thanks for that! This is my first proper flash site so excuse my bad coding!

Here's my problem, i have a movie which has other submovies contained within it. One of these movies is a menu movie containing buttons, i want these buttons to control the content in the main movie.

I tried using:


Code:
on(release)
{
_parent.photos._xscale="50";
}
in order to reduce the width of the movie 'photos' but to no avail.

Here is a link to the .fla as it's starting to even confuse me now!

Totally appreciate any help that anyone can give me

thanks, foofighter

Getting Around _parent
so i am learning AS3.0 but lack of global stuff is giving me headache.

I have a bitmapdata that is part of the main class (the one that is the flash movie) and i want a subclass to draw to it.


Code:
package{
import grassBlade;

public class grass extends Sprite{

private var canvas:BitmapData;

public function grass(){
canvas = new BitmapData(stage.stageWidth,stage.stageHeight,true,0x00000000);
var bmp:Bitmap = new Bitmap(canvas);
addChild(bmp);
....

blades[i]=new grassBlade(col,amp,lenght,period);
....
}
...
}}
and the other class glassBlade

Code:
package {

class grassBlade extends Sprite{
....
public function grassBlade(c:uint,a:Number,l:Number,p:Number)
{
...

private function onTimer(e:TimerEvent):void{
var circle:Sprite = new Sprite();
.....
(..... some how i want to draw circle into canvas via canvas.draw(circle))
}
}

Instead Of ._parent?
I'm in flash 8 -

This is probably a super noob question, but I can't figure it out...

I have a button that is calling an action up in the parent of my movie.

It works fine, but here is my code

_parent._parent._parent._parent.gotoAndPlay("11b") ;

I know there has got to be a way to do this instead of

_parent._parent._parent._parent.

I've tried giving the movie it is referring to an instance name - such as

_noob.gotoAndPlay("11b");

but no luck

I looked for an answer in the forums, but no luck. If someone could point me to a tutorial, or shoot me an answer I would GREATLY appreciate it!

Thanks!!!

_parent
Ok I am totally confused on how to use parent. I have code inside of a movieclip and I want to access another movieclip 1 level up

I tried parent.speaker, speaker(parent) ..nothings working

_parent. Help
hi, im a bit confused with the ._parent function...i sort of know how to use it, yet i dont. the thing is..in the AS dictionary it says:





quote:


Example
In the following example, the movie clip desk is a child of the movie clip classroom. When the following script executes inside the movie clip desk, the playhead will jump to Frame 10 in the Timeline of the movie clip classroom.

_parent.gotoAndStop(10);




well in my case, the external swf is a child of my main MC right?
so when i put the AS code "_parent.gotoAndPlay(2);" into my external (child) MC, it should go on and play the second frame in my mainMC, the parent...right? but it does the opposite, it plays frame 2 in the child......have got this all wrong?


the code on my preloader in the external swf i think i have done it right so that it _parent.gotoAndplay(2)...well here is the code:






Code:
onClipEvent (load)

{
total = _parent.getBytesTotal();
}
onClipEvent (enterFrame)
{
loaded = _parent.getBytesLoaded();
percent = int(loaded/total*100);
text = percent+"%";
gotoAndStop(percent);
if (loaded == total)
{
_parent.gotoAndPlay(2);
}
}

Code:






the button code is:





Code:

on(release)
{
loadMovie("pic.swf", _parent.container);
}




the website is @ : http://www.medisan.remikstudios.com/


COMMENTS ON THE SITE WOULD BE NICE TOO...CRITIQUES

_Parent
_parent what is it?
What do you use it for?
How do you use?

basically this thread is all about _parent

I hope someOne can help me with common knowledge

_parent.?
i have a button which is to load a scrollPane content into the scrollpane...

it has AS like this

on (release) {
scrollPane.loadScrollContent("whatever.swf");
}

and it all works...but when i out the button withing a movieclip and within within a movieclip it dont work so ive tried using the
_parent. to make it work but im not sure where to piut or how many times to put it....

the button is sorta like this on da thingymajobby

scene1>>menu>>Tween1 and the button is in da Tween1

AS2 _parent >>> AS3 ?
Hi!

I have a as2 to as3 migration issue. I get an error when using

Code:

_parent.prevFrame();

in as3. _parent function is no longer supported, so how can I make the same function work in as3.

Help appreciated.

Bets wishes

theredtitan

My '_parent' Won't Listen To Me
I'm stumped. I have a flash file that loads another SWF into itself in the first scene.

At the end of the loaded SWF file, I have:

stop ();
_parent.gotoAndPlay ("fadein");

Which is supposed to trigger the main file (the parent) to go to the frame 'fadein'.

But it doesn't work.

It looks like it should, but I must be missing something obvious.

Any ideas?
[Edited by aluminumcan on 06-22-2001 at 05:15 PM]

_parent From A Button...
I've got a bunch of buttons inside movieClips, and I'm having some double-hardcore (?!) problems trying to reference the movieclips from the buttons.

I want to have an on release command that changes the movieclip to a different frame, but for some reason the _parent function isn't working. I don't really want to use the absolute address, as I'm planning on having the command from a function set in the root.


Any ideas? Has anybody else come across this, and if so, how did they deal with it?!

thanks in advance,
p

p.s. I also posted this in the newbies forum just in case it's a really obvious one!

::_parent.actioncommand::
In a book i have, in order to have a movie play backwards, you add a _parent.prevFrame (); he said this was relative command, is there a way to do this in absolute command? Maybe im just reading this wrong. I know that means it will effect the time line above it, but is there a nother way to do that (i know im repetative)

thanks
n.

Tell Target (_parent)
Hi, I have this stupid problem. The loaderbar should tell its parent to go to a different frame called "button", when level10 is fully loaded. In frame state "button" the loaderbar is not present anymore. When I play the movie, the loaderbar works fine, but after level10 is loaded, it just stays there, so the parent movie clip doesn't go the frame "button" Can this be done? I would appreciate your help.

onClipEvent (enterFrame) {
loaded = int(_level10.getBytesLoaded());
total = int(_level10.getBytesTotal());
if (loaded >= total) {
tellTarget (_parent) {
gotoAndStop ("button");
}
} else {
setProperty (this, _xscale, (loaded/total)*100);
}
}

[Edited by torp on 12-14-2001 at 07:17 PM]

DuplicateMC Above _parent (elsewhere) ?
I would like to duplicate a clip from my source (eg _root.lib.sourceclip ) into another clip above the _parent(eg _root.otherclip)
but as far as I can tell this can't be done.

I can't use attachmovie, although I would love to, as 'sourceclip' is an external swf loaded into the lib clip. and you cant use attach movie outside the loaded movie.

any Ideas?

TIA

_parent And Telltarget
Can't figure this one out...

I have a movie named "clock". Inside that is another movie "hand".
I am trying to put a script in the "hand" timeline, telling the "clock" timeline to play using _parent.

Sounds simple but won't work for the life of me.
Here's my code

---------------------------

on (release) {
tellTarget ("_parent") {
play ();
}
}
---------------------------

This works fine using an absolute path, but that's not what I need.
My movie is a projector if that matters. Also, I tried making _parent an expression but that didn't work either.

Thanks in advance for any insight

_root And _parent ...
Could anyone please explain those script commands in a simple way to me?

I'm not sure if i got everything right there.

I'd appreciate any help

_root _parent
did they change something in MX? I'm trying to assign an action to a button (which is inside an mc) using _root and/or _parent command, which I know works fine in 5, but it doesn't do anything in MX. am i missing something?

_parent. Ques
im trying to load an external jpg. and the file name of this jpg is the name of the mc 2 levels above the command.
if u dont understand this is thi code im trying to use

Code:
x = _parent._parent._name;
loadMovieNum("x".jpg, 1);

i also tried putting th eparent crap in the load move itself like this

Code:
loadMovieNum("_parent._parent._name".jpg, 1);

and its still not working. any one able to give some advice

_parent..._root..and This
hi,
any tutorials on using _ parent.._root..global...
Could you please tell me somethin about these terms?
thanks

Problem With _parent...
question involving "_parent"

Probably a very simple question for you guys...

i've been working on a module that has movieclips in movieclips. I thought it would be self contained, so to target timelines and variables, i've been using the:

_root.instancename1.instancename2.etc....

now it is being loaded into a level by a master swf, so my code is pretty screwy. I've been trying to use the _parent to make the code work as a loevel loaded swf.

For example, lets say I have the following MC structure:

_root.a.b.c.d.e
//also, _root.a.b.c has 2 MCs in it. It branches to
_root.a.b.c.d, and _root.a.b.c.d2

If I am putting some code on level _root.a.b.c.d.e that needs to communicate with
_root.a.b.c.d2, would the code work like this:

-------------------------------
_parent._parent.d2.gotoAndPlay ("****ingWorkPlease")
-------------------------------

How else can I target the d2 timeline? _parent in itself works, but if I try to add instance names after a couple _parent commands, it flips out. Any way around this? I really don't want to use telltarget...

thanks

thanks yall!
-azn

_root Or _parent Or Something Help
Please help.... Anyone

I have a movie clip on the main timeline - inside the movie clip I have an input text box to input the variable "phone" - when I try to assign the value of "phone" to another variable on the main timeline I get nothing - or it is undefined

the book I have says that you can reach any variable from any timeline with the _root property but I can't seem to reach anything!

the code on the main timeline trying to reach the variable inside the movie clip looks like this:

phoneNew = _root.movieclip.phone;

Thank you so much
Crystal

Getting _parent After A Duplicatemovieclip
Hi, i have and mc, with a button in it.
i have duplicatemovieclip'd the mc 3 times, each with a different name, these are in the _root.
when i use trace(_parent.name) in the button click code, no matter which button i click, _parent.name is always the name of the last duplicated mc.

what do i need to do to have a different name returned when i click each button?


cheers

Andrew

Set ._parent._alpha MC ?
Hi,

I've made a swf with a loadMovie swf embedded. Let's call them target.swf and source.swf.

In the taget.swf I load the source.swf with the loadovie("URL","target") action. This works fine. The source file has a tween that enlarges the mask and as a result of that the source.swf on the target.swf. The tween is activated bij a button, on(release){gotAndPlay("scene",frame);}

this what I want to do;
when the button is released i want the next scene to play (got that working) AND I want a MC in the target.swf to fade (with alpha for example)

this what I have tried;
on(release){
gotoAndPlay("Scene2", 1);
}

on(release){
_parent._alpha=10;
}

The only problem is that my intire target.swf is set to alpha10! But I just want to have a MC on the parent set to alpha10.


Does anyone know how to do this?? Can I make it work bij loading my source.swf on a different level and than set alpha for _root (all MC's on target.swf are on level0)

Thanks in advance!!!

_parent.play();
Hi

I am making flash presentation, and I have many movie clips in it. I use
_parent.Play();

command to go up level what shall I do if I want to go beyond that level?

Thanks

Getting _parent Instance Name
Is it possible to get the instance name of a parent clip?

For example, I have a movie clip with a button inside. When the button is pressed i would like to get the instance name of the movie clip holding the button.

thanks.

Slobby

_parent Did Not Work ?
hi all~

this is part description of _parent from Flash help:
specifies or returns a reference to the movie clip or object that contains the current movie clip or object.

it said mc or object yes ? and this is my code:

Code:
var a = new Object();
a.b = new Object();
a.b.c = new Object();
a.b.c.func = function()
{
trace(_parent);
}
a.b.c.func();


to my surprise the output is: undefined !!! what's on earth happening and how can i get parent object within that function ???

_root Vs. _parent
i am a little confused about these two terms. i know that _parent is the main movie but what is _root...i just need a lil help on destiguishing the two...xxxjosh

If (_parent._x == 30){ This._alpha - 100;
ok why wont this work?

the movieclip with the instance name of move is on the main (_root) timeline and the this code is on a moviclip inside the movieclip called move.

what i want it to do is when the movieclip name move gets to its x position of 30 i want the alpha of the movieclip inside to become 100 meaning that it then becomes visiable.

code:
onClipEvent (load){
if (_parent._x == 30){
this._alpha = 100;
}else{
this._alpha = 0;
}
}


hope u can help

_parent/_root
Hi

If I have a button inside an "Graphic", that "Graphic" is inside an mc, and that mc is inside another mc.

On the top mc I have a "picHolder".

I want to tell the button to "loadMovie ("products_02.jpg", "picHolder");


I tried _parent.loadMovie etc. but it will not work.

Thanks

_parent. Vs _root.
I am sorry because this question has probably been asked a million times by now.
What is the difference between _root and _parent because I have seen them both and they (in some cases) can be traded.
This is simply for curiosity.

_parent Issues :(
hi, im a bit confused with the ._parent function...i sort of know how to use it, yet i dont. the thing is..in the AS dictionary it says:




Quote:





Example
In the following example, the movie clip desk is a child of the movie clip classroom. When the following script executes inside the movie clip desk, the playhead will jump to Frame 10 in the Timeline of the movie clip classroom.

_parent.gotoAndStop(10);







well in my case, the external swf is a child of my main MC right?
so when i put the AS code "_parent.gotoAndPlay(2);" into my external (child) MC, it should go on and play the second frame in my mainMC, the parent...right? but it does the opposite, it plays frame 2 in the child......have got this all wrong?


the code on my preloader in the external swf i think i have done it right so that it _parent.gotoAndplay(2)...well here is the code:







Code:
onClipEvent (load)

{
total = _parent.getBytesTotal();
}
onClipEvent (enterFrame)
{
loaded = _parent.getBytesLoaded();
percent = int(loaded/total*100);
text = percent+"%";
gotoAndStop(percent);
if (loaded == total)
{
_parent.gotoAndPlay(2);
}
}
the button code is:






Code:

on(release)
{
loadMovie("pic.swf", _parent.container);
}



the website is @ : http://www.medisan.remikstudios.com/


COMMENTS ON THE SITE WOULD BE NICE TOO...CRITIQUES

_root, _parent, This ? Please Help
I am having a timeline issue! I have a parent movie that is calling in an external swf. Within the external swf I have a movie on the main timeline and a stop action. At the end of that movie's timeline I want it to go up to the main timeline and play the next frame. Here is the code that I have:

Stop();
_root.gotoAndPlay('241');


Unfortunately this is taking me all the way back to the parent movie and playing frame 241.

What am I doing wrong?

THANKS!

_root Vs. _parent
I have a movie clip that I need to drag with functional buttons, so I burried a small movie clip inside the larger one and added drag code to the internal movie so that the external larger movie will drag and function with buttons. This works well. I can drag the movie and use the buttons with no problem when the mc starts out on the stage.

But when I call the movie clip into a third larger movie clip using attachMovie - I can use the buttons, but I can no longer drag the clip with buttons.

Is this because the instance called in by attachMovie is placed with the id name? so _root.movie.startDrag("") will be looking for "movie" and not fiding it? or does this have to do with _root / _parent?

_parent Is Undefined?
I was having trouble referencing the parent of a loaded SWF. I put a trace(_parent) command in my script, and the Output window said that _parent was undefined. I tried this with a simpler case and it correctly traced _parent as _level0. What could cause a loaded SWF to forget its parent?

(heh heh... there's a joke in there somewhere)

_parent _root
hello. im pretty new to action script. im building a ad for a site. when you roll over the main stages animation (not in a movie clip, the animation is on the main stage} it takes you to another animation in a movie clip in the OVER state of the button. What im trying to do is use a goToAndPlay to get back to the main stage. i tried goToAndPlay{_root); and that just takes me back to the button stage, starting the animation im in over again. i also tried _root_root and that didnt work. isnt there some code i can put into the goTOAndPlay to get home? any ideas? Thanks in advance!

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