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








Getting Instance Name Of Parent MC?


Hi,

I have several instances of a movie clip with a button in side (amoung other things). I would to tell the function which is called by this button in the MC the instance name or something else that could identify *which* button (insance of the movie clip) has been pressed.

Does anyone know or have any suggestions on how I could do this?

Thanks.




FlashKit > Flash Help > Flash ActionScript
Posted on: 09-08-2003, 03:29 AM


View Complete Forum Thread with Replies

Sponsored Links:

Finding The Instance Name Of The Parent Mc
Hey people,

I was wondering if anyone could tell me how to find out the name of a parent mc using Action script l'm sure it's easy l'm just not sure how to do it. thanks

p.s is it returned as a string?

thanks Clik_

View Replies !    View Related
Parent / Child Instance Names
Hi! I'm creating a variable that uses the instance name of the object upon which it is set. When I set it using:

var test = this._name;
trace (test);

it returns the instance name of the parent clip, not the object's instance name. Is there any way to retrieve the object's instance name? Does anyone know any workarounds?

Thanks!

View Replies !    View Related
How To Execute A Function In Parent Instance?
Thanks for the very good help on my last question, cant really help with the other questions on the board, but I got stuck again my own self :.


So I make a document class, in which I create a instance of another class. Now I want to call to a function in the parent class. Is that possible?


ActionScript Code:
package
{
       public class Main extends MovieClip
       {
             public var Instance001:CustomClass1 = new CustomClass1;
             public var Instance002:CustomClass2 = new CustomClass2;

             public var ArrayVar:Array = new Array();

             public function Main()
             {
                         addChild(Instance001);
                         addChild(Instance002);

                         ArrayVar = Instance001.function();                     
                         //the function gives this array its value.
             }

             public function GetValue(casenumber:int):Array
             {
                  switch(casenumber)
                  {
                            case 1: return ArrayVar;
                  }
             }
       }
}



package classes
{

        public class CustomClass2
        {
               private var ArrayVar:Array = new Array();

                public function CustomClass2()
                {
                       ArrayVar = this.parent.GetValue(1);
                }
        }
}


For the next step I need to be able to get variables inbetween instances, so this help would be appreciated.

Im doing this in a OOP approach to have different functions spread over different classes (in this case, a background is in a different instance from the main class from the player). So it could be im doing it in the wrong OOP way, so any suggestions are welcome.

View Replies !    View Related
Dynamically REMOVING Children From Parent Containers? MovieClip(this.parent.parent...
EDIT: actually, this isn't really dynamic... it should be really simple!

I can get a nested swf to add a movie to the root timeline, but in order to replace it with a new movie, AS3 first requires that I clear the old one. I can't figure it out!

This does not work, though it is the exact same format I use to add a movie to the root successfully:

Code:
MovieClip(this.parent.parent.parent).removeChild(MovieClip(this.parent.parent.parent).loadMovie)
Any idea why this doesn't work?

View Replies !    View Related
Controling An Instance In A Parent Clip From A Child Clip? ANY Help Appreciated.
I'm sure this is simple, but I'm stuck.

I have an swf file called "base.swf", in which is an instance called "nav" which I need to move around _x and _y. "base.swf" loads a child called "navbuttons.swf". I need to use a button in "navbuttons.swf" to reach back to the parent "base.swf" and interact with the "nav" instance.

I tried the following on the button in "navbuttons.swf";


Code:
on(release){
_parent.nav.xpos=670;
_parent.nav.ypos=375;
}
I was thinking that since base.swf loads navbuttons.swf that the _parent part on the button would get me back to the parent, and the .nav part into the instance I want to control... but it's not working. I tried _root instead of parent with no luck.

I'm sure this is simple, can anyone point me in the right direction?

View Replies !    View Related
Using An Instance Of The Parent Movie On A Loaded Movie
How can i use an instance of a mc inside a movie i want to load?
and why wont my dynamic text load when the mc is being loaded into the parent, but does load when i play that flie by itself?

this.loadVariablesNum("text.txt", 0);

Mantis

View Replies !    View Related
Instance Names...changing...or Addressing Txt Field Instance Based On Instance Of Mc
i'm creating a mail form, that has a text effect which displays the type of info to be entered in each input box. To create this effect, i had to assign the variable name txt to the input boxes as well as the instance name txtBox. each of these text fields is contained within a movieclip, each with a unique instance name. what i need to do, is somehow assign a value/variable to each text field to pass to PHP to generate an email. I have always used components for contact forms so i'm not sure how to make the switch, AND.. the script i use for my contact form is an EXTERNAL AS file. (i use a customized version of a contact form from www.actionscript-toolbox.com [which apparently is no longer Flash related site])

ok.. this is hard to explain..... so bear with me....
If my original mail form component instance names were: tiName, tiEmail, tiSubject and taMsg (ti for textInput and ta for textArea)
and my current instance names for the mc's which CONTAIN the input boxes (with txtBox textfield instance inside them) are: name_txt, email_txt, subject_txt & comments_txt...

how would i pass/convert the users input text in each movieclip's txtBox, into the original instance name for my mail form so i can continue to use the form/PHP i have been using??

OR....

how do i take the values input by the user in each txtBox (i.e name_txt.txtBox.insertedTextFromUser or name_txt.txt, email_txt.txtBox.insertedTextFromUser or email_txt.txt) and send them to a new PHP script to send mail??

please keep in mind i am PHP retarded... hence why i re-use the same form over and over..

thanks in advance for any help. it's greatly appreciated...

if you're confused about my problem, please let me know... i'm having a difficult time explaining....

View Replies !    View Related
Referencing Parent Without Adding It To The Parent's DisplayObjectContainer
When using composition, how do I reference the parent object from the child without having added it to the parent's DisplayObjectContainter (addChild) first?

Example:

class A {
var b:B = new B();
}
NOTE: I didn't use addChild on purpose.

class B{
how do I reference A from here the way I would use 'super' to reference a superclass when using inheritance?
}

View Replies !    View Related
Relative Path: Targeting A Parent's Parent?
Does anyone know if it is possible to target a parent's parent in relative paths?

Something like this (but this doesn't work):

_parent._parent.myMovie

Thanks....

View Replies !    View Related
Beginner, Button._alpha = 100 And Identifying 'instance Of And Instance Name' Problem
1)
as Flash beginner
i'd like to have a button contain the feat. alpha = 30.
The following is for MC only:
onClipEvent (load) {
_alpha = 0;
}

What is the onClipEvent part for buttons.

2)
When to use 'instance of' and 'instance name'?, and how to identify them in an AS code such as:
_root.button._alpha = 100;

View Replies !    View Related
Access Property/function Of Instance From Inside Another Instance
Might be something really obvious, but I'm still trying to get my head round as3...

I need to call up a property and function of another instance of the same class, similar as in as2 (called from within "_root.instance_mc1"):

ActionScript Code:
_root.instance_mc2.someNumber = 0;
_root.instance_mc2.someFunction();

Now in AS3 I can access the object (extending sprite) itself (and inherited properties like x) by using:


ActionScript Code:
this.parent.getChildByName("row2").x

but if i try to access public variables/functions from that object (this.parent.getChildByName("row2").someNumber) I get Error 1119: Access of possibly undefined property someNumber through a reference with static type flash.displayisplayObject.

Anyone know how I can get this to work?

View Replies !    View Related
AddChild To This.parent.parent?
Greetings.

I have a movie clip on the main timeline called fullContainer with an instance name of fullCont_mc.

Trying to use the addChild method from a different movie clip to load a jpg into fullCont_mc .

I've traced this.parent.parent from within the 'different' movie clip to confirm it brings me to [Object MainTimeline]

I've used the following code: this.parent.parent.fullCont_mc.addChild(imageLoade r);

I'm getting the following error:
Access of possibly undefined property fullCont_mc through a reference with static type flash.displayisplayObjectContainer.

I'd think AS3 would recognize fullCont_mc by its instance name on the main timeline. What am I missing here?

Ultimately, I'm trying to use fullCont_mc as a mask for the loaded image. Please help.

Thank you for your time.

brookchef

View Replies !    View Related
Code In One Instance Is Referencing The Previous Instance
I have the following code in a button symbol:

on (release) {
gotoAndStop (2);
_root["answer" + this._name.substr(1)] = "true";
}

I also have an instance of the button in 2 consecutive keyframes. The first instance is named "Q5" and the second instance is "Q6".

I expected the code: this._name.substr(1)]
to reference "5" and "6" from the instance names (Q5 and Q6), but instead instance "Q6" is referencing "Q5"!

The *really* strange thing, is that when I insert a blank keyframe between the two original keyframes, the code works perfectly!

Does anyone know what's happening?

View Replies !    View Related
[MX04] Get Instance Name Of Rolled Over Array Instance
Hi
I am willing to do a rollover image gallery which enlarges image on rollover event and shifts the neighbouring ones aside..

Here is the code so far

Code:
_root.bttn.onRelease = function() {
createGallery();
};
function createGallery() {
var row11:Array = new Array("DSCF5659", "DSCF5807q", "DSCF5773q");
for (i in row11) {
_root.createEmptyMovieClip(row11[i], _root.getNextHighestDepth());
_root[row11[i]].loadMovie("segi/"+row11[i]+"small.jpg", [row11[i]]);
_root[row11[i]]._x = i*150;
}
}
_root.onEnterFrame = function() {
function roll() {

var row11:Array = new Array("DSCF5659", "DSCF5807q", "DSCF5773q");
for (i;i<row11.length;i++) {
_root[row11[i]].onRollOver = function() {

this._xscale += 10;
};
}
}
roll();
};
What I would like to do is to:
ask flash which particular movieclip was rolled over , what is its instance name and than perform string operation to get a number (order) of that clip (I am naming all dynamically with image name + number in order)

Can anyone help me please ???

Thanx in advance

View Replies !    View Related
How Do I Copy A Sprite Instance Into A BitmapData Instance?
I apologize if this is covered elsewhere: I just don't even know what terms to search on to find what I'm looking for...

I have a sprite that receives various user-drawn lines on it during runtime. I would like to be able to copy this Sprite into a BitmapData instance, then send the pixels from the BitmapData instance to a PHP script. I think I'll be all right with the PHP end of things, but I just don't know how to copy my Sprite into a BitmapData.

(If there were a way to just use BitmapData and use the moveTo, lineTo, mouseX, mouseY, etc, methods, then I'd do that, but I don't even know if that's possible...Obviously, I'm not as well-versed in AS3 as I'd like to be.)

Thanks in advance for any help!

View Replies !    View Related
Instance On Top / Movie Instance Depth
Hi everyone,
I would like to know how, if possible, i can get the depth of a movie instance. Basically I just want to make the movie instance clicked on on top of all the others. I was going to try to do this using the swapdepths action but if anyone knows of a better way please tell me!
thanks a lot
jordan woolley

View Replies !    View Related
Returning The Instance Name Of A Class From Within The Instance
Hi,
I'm trying to do some error reporting in my actionscript.
I have a class MyData which can be instantiated several times over in each project e.g.
var myData1:MyData = new MyData();
var myData2:MyData = new MyData();

In the error reporting I have put statements like
trace("MyData.loadData reports error.... message...");

However, I'd really like it to return the instantiated name, not the generic class name so that I can trace errors to the particular instance that is failing. Does anyone know how to do this? I've tried
trace(this.toString() + " reports error.... message...");
but I just get a name of [object object] which isn't that helpful!

Many thanks!

View Replies !    View Related
Removing Instance X Inside Instance X
In Flash CS3 in library I have a MovieClip symbol Help (exported for AS).
The function below opens an instance of the symbol when the button is clicked.


ActionScript Code:
function showHelp(e:MouseEvent):void {
    var helpwindow:Help = new Help();
    helpwindow.x = 50;
    helpwindow.y = 50;
    addChild(helpwindow);
}
This works and instance "helpwindow" shows on the screen.
Now inside the symbol Help i have another button which will run a function that would close that instance. How do I get rid of that instance? I was trying with removeChild but errors occurr.


ActionScript Code:
function removeHelp(e:MouseEvent):void {
    removeChild(MovieClip(parent).helpwindow);
}

Quote:




TypeError: Error #2007: Parameter child must be non-null.

View Replies !    View Related
How To Call The Instance Name Inside That Instance?
Ok this is what I want...

I am inside an instance of a movie clip. And I want to access the properties of this movie clip. Now the problem is (if) I don't know the name of the instance of the movie clip (suppose I create the instance of the movie clip on the fly!!!), how do i refer to the name of the instance.
Is there something called this. in actionscript?

Any help would be appriciated!!!

Sushubh

View Replies !    View Related
Dynamic Instance Name Vs Manual Instance Name?
Hello,

I would like to access this object (taken from Debug > List Objects of in flash player)


ActionScript Code:
Target="_level0.promotion0.loader_mc.instance87.promo TXT"




This is what I am trying to access it with:


ActionScript Code:
trace( this.getChildByName("promotion0").loader_mc.getChildByName("instance87").promoTXT.text );





Error:


ActionScript Code:
1119: Access of possibly undefined property loader_mc through a reference with static type flash.displayisplayObject.






what is the correct way to do this?

View Replies !    View Related
How To Get Button's Instance Name On Stage? OR Can A Button Ahve 2 Instance Names?
i have a button the the stage, with an instance name of: "butt1"

the button itself lives inside a movieclip, where it is called thisButton

when flash runs and I click the button I want to output the button's instance name on the stage (i.e. butt1) but i'm only getting the button's instance name in it's own movie

this._name gives me = thisButton

is the name i want stored in a separate property?

edit: sorry - i realise that the problem is that the button code is inside the mc itself, where the button's name is thisButton

View Replies !    View Related
Instance Name Instead Of Instance Number
hey there,

the following code returns strange names for the instance: I get 'instance61' and 'instance55' when clicking the button in the MC named 'tabber'. I would expect to see 'tab' and 'tab2'.

Is there a way to get the instance name instead of the instance number?

cheers!


PHP Code:



package {    import flash.display.MovieClip;    import flash.events.MouseEvent;    import flash.display.SimpleButton;        public class content extends MovieClip    {        public function content()        {            //content.stop();            var tab:tabber = new tabber();            tab.x=118; tab.y=75;            tab.butt.addEventListener(MouseEvent.CLICK, ms2);            addChildAt(tab,1);                        var tab2:tabber = new tabber();            tab2.x=228; tab2.y=75;            tab2.butt.addEventListener(MouseEvent.CLICK, ms2);            addChildAt(tab2,1);        }                function ms(event:MouseEvent):void         {            trace(event.target.parent.name);        }    }} 

View Replies !    View Related
Any Way To For A Class Instance To Ask What Its Instance Name Is?
Hey. I have a class which needs to create a movie clip on the stage. Since each instance of the class will only ever have 1 movie clip on the stage at a time, it seems reasonable that I have the instance create a movie clip with its own name, prefixed with "mc_" or something of the sort.

Here's where I don't know quite what to do... How do I get at this information? For instance, when you a dealing with an XMLNode, you can simply use...

the_answer = xmlNodeInstance.nodeName;

...I know the analogy fails, but hopefully you know what I'm looking for.

Thanks!

View Replies !    View Related
Calling An Instance Within An Instance
Hi,

I've got 3 movieclip buttons with instance name, "btn1", "btn2" and "btn3". Inside these clips is another movieclip named "mousedetect".

How do I use a loop on the "mousedetect" movieclip to initiate an action? Without a loop it will look like this:

btn1.mousedetect.onRelease=functiion(){
btnRelease();
}

I've tried something like:

for (i=1;i<=3;i++){
this["btn"+i].mousedetect.onRelease=function(){
btnRelease();
}
}

but an error shows up, what should be the correct syntax?

Thanks!

View Replies !    View Related
Want Opening Movie Clip Instance To Close Underlying Movie Clip Instance
Just so you all know, I'm one of three people in our company that uses Flash and I'm considered "the expert". However, we don't do more than a few Flash projects a year, so my scripting knowledge is very, very green. Thanks in advance for your patience.

I have 22 buttons that play an assigned movie clip from the library. I suspect I'm building these things the wrong way (probably true), but here is how each button is constructed....

Each instance that I'm calling a button is actually identified as a movie clip intance with a button in it. It sits on its own layer. When I double-click an instance, several layers are displayed, the majority of which belong to the presentation of the movie clip. The clip lasts five frames.

The first frame consists of blank keyframes for each layer except for one layer that has stop() assigned to the frame and another layer with the actual button. The layer with stop() at frame 1 is then blank for the next three frames, and then another stop() on frame 5 (the last frame).

The button layer lasts all five frames. Here's the script for "display1980":

on (rollOver) {
_root.display1981.gotoandstop(1);
_root.display1982.gotoandstop(1);
_root.display1983.gotoandstop(1);
.
.
.
_root.display2003.gotoandstop(1);
_root.display2004.gotoandstop(1);
_root.display2005.gotoandstop(1);}

on (release) {
_root.Play();
play();
}

For each instance, there is no line of script that refers to itself. In this example for display1980, "_root.display1980.gotoandstop(1);" is not used.

As I mentioned earlier, each instance is on the main stage on its own layer. I've done this with only eight of my instances, so there are now eight layers. (There are--in fact--more than eight layers, but those are not part of this issue.)

The script I created does the job of getting rid of any previously displayed movie clip, but I created a new conumdrum: If I rollover any other button, the currently displayed clip closes. I've tried replacing "on (rollOver)" with "on (press)" but that doesn't work.

Like I said, I suspect I'm buildng this wrong. Is what I built a waste of time, or can it be salvaged? Or, is there a much better and efficient way (and I suppose there is) that can be described so that my green experience can absorb to good effect?

View Replies !    View Related
OO... I Want To Be A Parent
Calling all yOOu Gurus

I am just starting to learn how to OOP.
I have an object called Frame and it has a method to draw a frame.
I now want to make a subClass of Frame which also gives me control of the lineStyle variables.
I know I could just add Thickness, RGB and Alpha to the Frame class, but I want to understand how to start a family of methods going.
I have tried the tutorial at www.debreuil.com/docs/ but dont get how to apply it to methods.

Many Thank Yous
Tim.

Code:
function Frame () {}
Frame.prototype.draw = drawFrame;
function drawFrame (x1,x2,y1,y2){
lineStyle (2,0xFF0000,100);
moveTo(x1,y1); lineTo(x1,y2); lineTo(x2,y2); lineTo(x2,y1); lineTo(x1,y1);
}
//Test it../////////
firstFrame = new frame ();
firstFrame.draw(50,350,50,150);

View Replies !    View Related
Parent
how do you call a movieclip that is one movieclip "up".. i can't remember.. i recall you could do it either by the root command or by something like "../"

thanks

View Replies !    View Related
Parent.parent.parent.parent?
Is there a easier way to get back to the main time line for a nested clip?

I have to call to a flex api fuction form a loaded swf thats in a scroll bar (I know.. but thats the way it is) I have to always do a name trace to see where I am and then once I get to the root it wont cal the function? Is there a easy way to do this?

Here is what im doing wrong


Code:
clip1.addEventListener(MouseEvent.MOUSE_UP,clip1Click);

function clip1Click(event:MouseEvent):void {

//trace("click");
trace(event.target.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.name);
trace(event.target.parent.parent.tip1.text);
trace(event.target.parent.parent.title.text);
event.target.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.AddClipping("event.target.parent.parent.title.text",event.target.parent.parent.tip1.text,"");

}
those children arnt lonely with all those parents and flash seems to be giveing instance names on the fly to some clips like instance_284 and stuff. WTF ?

Any help would be cool

View Replies !    View Related
Get Var From Parent
Hey i need to get values from a parent.
But it keeps saying the parent is a static type.
I have not set any static type.

code on DocClass

ActionScript Code:
publice var size:Number = 8

ball:Ball = new Ball();
addChild(ball);

in Ball.as

ActionScript Code:
trace(parent.size)

but i get this error
1119: Access of possibly undefined property size through a reference with static type flash.displayisplayObjectContainer.

View Replies !    View Related
Parent In Cs3 ?
Hi there

in Flash Cs3 i cant get the variables of the parent movieclip??
In flash 8 it was no problem with
_root.variable = ....;
oder parent.variable....

and now in CS3 it doesnt work? Cann anyone say me if there is another way to get the variables of the parent movieclip?

View Replies !    View Related
Parent Of The Parent?..
Root
|---Home
| |------Container
|
|---Movie2
| |------Sub1
| | |------Sub2
| | | |------Button

How do I refer to the "Container" from the "Button"? But not through Root though, I don't want to use "_root.Home.Container".

View Replies !    View Related
Parent Of The Parent?..
Root
|---Home
| |------Container
|
|---Movie2
| |------Sub1
| | |------Sub2
| | | |------Button

How do I refer to the "Container" from the "Button"? But not through Root though, I don't want to use "_root.Home.Container".

View Replies !    View Related
OO... I Want To Be A Parent
Calling all yOOu Gurus

I am just starting to learn how to OOP.
I have an object called Frame and it has a method to draw a frame.
I now want to make a subClass of Frame which also gives me control of the lineStyle variables.
I know I could just add Thickness, RGB and Alpha to the Frame class, but I want to understand how to start a family of methods going.
I have tried the tutorial at www.debreuil.com/docs/ but dont get how to apply it to methods.

Many Thank Yous
Tim.

Code:
function Frame () {}
Frame.prototype.draw = drawFrame;
function drawFrame (x1,x2,y1,y2){
lineStyle (2,0xFF0000,100);
moveTo(x1,y1); lineTo(x1,y2); lineTo(x2,y2); lineTo(x2,y1); lineTo(x1,y1);
}
//Test it../////////
firstFrame = new frame ();
firstFrame.draw(50,350,50,150);

View Replies !    View Related
Accessing Movieclip Instance Within Another Movieclip Instance
Accessing library movieclip instance within another library movieclip instance issues.

I have a movieclip in the Library called menuBar. In the menuBar mc I added two buttons. I want to be able to click on each button to play a video for each corresponding button. When I mouse over the button the pointer turns into the hand, suggesting it recognizes it as a button. But I'm unable to access the button (menuBar.button1 in AS2) in my code, I'm using AS3. Any help would be much appreciated. Thank you for your time.

View Replies !    View Related
Does Anyone Know About The Parent Script?
hey everyone, inside my movie i made another movie which is a jukebox and i was hoping that when you choose a song the movie that the jukebox is in would pause. i have used the parent action script before but how can i pause the origional movie then unpause within the jukebox again? thanks for your help.

View Replies !    View Related
Parent Scripts ?
Hi,
I'm trying to use action script to design a piece that has multiple accessibility options(e.g different languages, visually/aurally-impaired friendly etc)

So the template is the same but each mode calls on different variables(txt,img) to give you that mode(eg irish version-whatever)

I'm thinking parent scripts is the way forward- but I'm not an actionscript whizz like you guys.
If there's easier ways or better still- examples I could use, it would mean a lot.

Cheers.

View Replies !    View Related
Targeting Parent
Hi,

How do you target the parent (or a parent of a parent) of an instance?

I've tried

_root.name = _parent.obj; (where obj is an instance), but it doesn't give me the parents instances name.

thanks for any help

phil.

View Replies !    View Related
UnFocus Parent Swf
im making a site, in this site i have a gallery, the gallery contains thumnails that popup a window with an image or a flash movie.

the gallery works fine
the swf's in the popups work fine

BUT
the dont work together!

because when my gallery is on and the popup is on they are using to much system resources together!

how can i disable all animations and scripts in the gallery while the popup is open?

thanks,
thomas

View Replies !    View Related
Loadmovie Into Parent From MC
Hello,
The following code works great in a button on the main stage - but I now have the button in MC2 that sits in MC1 that sits on the main stage (if you follow me!!)

code:
picture.picture2.loadMovie(pictures.childNodes[0].childNodes[0].attributes["jpegURL"])


so I added a _root infront of the script to make it work but it doesn't - am I just doing something fundamentally wrong or similar???

Osc

View Replies !    View Related
Parent Problem
Hi there,

I made a simple rollover,rolloutbutton like this.Placed a button in an mc.On rollover it should play frame 2 to 12.On rollout frame 13.

Now here's the prob.At first I had a button placed inside an mc that used this code:

on(press){
_parent.noPass45 = true
this.gotoAndPlay(40)
unloadMovieNum(2);
}

But now this button would be the rollover,rolloutbutton.So it would be an mc placed inside an mc.Now the script above doesn't function.

So this is probably a _parent prob. Wright?Someone can help me out on this.

Big thx in advance,

Modulater

View Replies !    View Related
How To: Swap The Parent Of A MC?
hi all,
I have got a problem in my program.

I want to change the _parent of the existed MC, from root to other MC, anyone can help me to solve the problem...@@..

description:
There are two movieclips on the stage, one is called temp_mc1, one is call temp_mc2, and I want to change the _parent of temp_mc1 from root to temp_mc2, that mean the final result I want is _root.temp_mc2.temp_mc1 instead of _root.temp_mc1, is it possible to do that without using duplicate a new movieclip??


Thanks,
Jack

View Replies !    View Related
Loading .swf Into Parent .swf
I'm trying to load a smaller .swf file into the center of a larger .swf file when a button is presses. The file keeps loading all the way to the left top. how do i make it load in the center?

View Replies !    View Related
Parent Loading
Hi,

The title I guess say it all, huh?

But just to be sure.

I have a main menu wich goes right or left. Depends what categorie you choose. When it goes left I have to load a arrow movie wich goes left and for right has to load a moviw arrow which goes right (and not wrong). Thats means that there are two movies: arow left movie and arrow right movie. And both have to react at the moving menu, which were to load and play.
So first level would be the menu which ships from right to left.
Second level (under the menu) one of the arrow movie has to load depending which direction the movie goes.

(now Im confused. What was there I wanted??? A, right!)


I figured out that maybe its more confortable to load it from the library but also if it can be loaded from external files I dont mind. (I did the container thing before so I understand it a bit.

The arrow movies are movies played in the background, as the menu remains on top all the time.

The script for animating the menu is:

onClipEvent (load) {

_root.newposition = "null";

}

onClipEvent (enterFrame) {

current = getProperty(_root.drop, _x);

if (_root.newposition<current) {

distance = current-_root.newposition;

setProperty("_root.drop", _x, current-(distance*.1));

}

if (_root.newposition>current) {

distance = _root.newposition-current;

setProperty("_root.drop", _x, current+(distance*.1));

}

}


Any help accepted.
Thanks

View Replies !    View Related
Parent/root
can anyone help me here. ive had this problem before and i just scraped through it.

this is the As for a scrolling text box. the scrolling button works but its not scrolling the text when i move it up/down.

the MC for this is inside just one Mc on the main stage. ive changed all sorts and it wont scroll the text.


onClipEvent(load){
var objetivo:String = _parent.mi_objetivo;//entre comillas aquí escribe
var sostenido:Boolean = false;
var razon:Number = this._parent._parent[objetivo]._height / this._height;
var deslizar:Number;
razon = int(razon);
}

on(press){
startDrag(this, false, this._parent.barra._x, this._parent.barra._y, this._parent.barra._x + this._parent.barra._width, this._parent.barra._y + this._parent.barra._height - this._height);
this.sostenido = true;
}

on(release){
stopDrag();
this.sostenido = false;
}

onClipEvent(mouseMove){
if(this.sostenido){
deslizar = (this._y - this._parent.barra._y);
deslizar = int(deslizar);
this._parent._parent[objetivo]._y = -(razon * deslizar) / 2;
}
}

View Replies !    View Related
How To Control A Parent MC?
I've got a complex heirarchy of MCs...say I need to put a script in MC-1.1 to gotoAndStop(1) of MC-1...so there are 2 ways to do it as to what i know, one is _root.MC-1.gotoAndStop(1); and the other is the other way around like going one step up from the child ...i know it has something to do with '/' but cant figure out the syntax..could someome help me out? Let me know if im making sense.......

View Replies !    View Related
Parent Tutorial
Hi people
I need to know where can I find a tutorial about ussing parent command, I need to control the "y movement" of a big movie trought the movement of a small movie or a button,

thanks

Dave

View Replies !    View Related
Attachsound In Parent Swf
I have a swf with sounds attached to a sound object.
When I load this swf into a (parent) main swf it won't find the sounds from the library, except when I place the sound files in the lib of the main swf.

Is there a way to have to external swf keep the sounds in it's own library so the main swf won't get burdened with these files ?

View Replies !    View Related
Parent Script Help
Hi guys, I appoligise for such a stupid question. Im not the best scripter in flash, all i need is a script that will let a button in a graphic thats also inside of a movie work. I use to have the script but i lost it, if someone would be so kind and help me out, I would really appreciate it.

Thanks
Frank

View Replies !    View Related
Parent Hittest
is it possible to create a hittest with something inside a movie clip, and the scene the movie clip is in?

View Replies !    View Related
Parent Hittest
is it possible to create a hittest with something inside a movie clip, and the scene the movie clip is in?

View Replies !    View Related
Parent Hittest
is it possible to create a hittest with something inside a movie clip, and the scene the movie clip is in?

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved