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




[F8] Movieclip Inside Movieclip GotoAndPlay



i have a movieclip button inside a movie clip that say the movieclip button "btn1960_mc" is the button i'm trying to click to go to the other scene.
problem is. when i clik this nothing happens at all.

btn1960_mc.onRelease = function() {
_root.gotoAndStop("Scene2",1);
}


i attached the thing i'm working on.



FlashKit > Flash Help > Flash ActionScript
Posted on: 04-19-2008, 01:59 AM


View Complete Forum Thread with Replies

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

GotoAndPlay Inside A Movieclip
hmm.. I'm having a problem.. I'm making a game.. In the game there is a scene (called scene 1) in that scene there is a movieclip.. Inside that movieclip there is alot of frames, and on the last frame there shall be a gotoAndPlay script that makes you go to scene 2 that is outside the movieclip... I have tried with gotoAndPlay("Scene 2", 1); and stuff, but it doesn't work

Can anybody help me ?

GotoAndPlay Inside A Movieclip
hmm.. I'm having a problem.. I'm making a game.. In the game there is a scene (called scene 1) in that scene there is a movieclip.. Inside that movieclip there is alot of frames, and on the last frame there shall be a gotoAndPlay script that makes you go to scene 2 that is outside the movieclip... I have tried with gotoAndPlay("Scene 2", 1); and stuff, but it doesn't work

Can anybody help me ?

GotoAndPlay Scene From Inside A Movieclip
I have a movieclip one_mc on stage.
Inside one_mc there is another movie clip two_mc.
Inside two_mc there is a button.

On click of this button, i want to goto a scene called "try".

I tried this:

_root.gotoAndPlay("try",1);// it dosn't work.

Any Idea?

Thanks

GotoAndPlay(frames) From Inside A Movieclip To Another Useing Butons
lets say i`ve got a movieclip on the first frame in the main time line, and a button inside the movieclip. what action must i aply to the button in order for it to play a movie thats made in the main timeline. i have a vague ideea abaut instances and a feu actions but i cant get it thru. pls hlp. thanks

GoToAndPlay Action Doesn't Work From Inside A Movieclip?
I have a button that is 2 levels under the main timeline inside of a movieclip and it will not accept a simple "onrelease gotoandplay" action. do i need to add something in the code to tell it to play on the root timeline?

Right now it just says:

on (release) {
gotoAndPlay("testimonials", 11);
}


and it's two levels under the root timeline.

Gotoandplay Is Not Working Inside Flash5 Movieclip More Suggestions? Attached Clip
gparis thank you for previous comments there must be a glitch in my flash 5 or i am not doing it properly please see attached movie clip to help i would like it to loop between frames 19-23. thank you for your time

Help With GotoAndPlay("diff Scene" 1); On Button Inside Movieclip... Its Not Working
i have a button inside a movieclip with the actions gotoAndPlay("scene 3", 1); and its not working... if i copy and paste the button outside, onto the main stage, it works... and ive tried saying _root.gotoAndsadf and _level0.gotoAndasdf but its not working...

how do you do it?

#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.

var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);

It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.

Would love some help on this.

Cheers

#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.

var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);

It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.

Would love some help on this.

Cheers,

Sarge

Control A Nested MovieClip From A Button Component Inside A Seperate MovieClip.
I am a beginner in using Flash and Action Scripting.

This is the Scenerio:

I want to control a movieclip that is inside of another movie clip.
I control it from a button component that is inside of a seperate movie clip.

test = button component instance name
test1 = function
test2 = Movieclip instance name
test3 = Movieclip instance name
testbutton = movieclip name where button component is located

I am able to control a movieclip on the main timeline with the following AS 3.0:

test.addEventListener (MouseEvent.CLICK, test1);
function test1(event:MouseEvent):void
{
event.target.root.test2.gotoAndPlay(2);
}

I want to control a movieclip inside MovieClip1.

I tried this:

test.addEventListener (MouseEvent.CLICK, test1);
function test1(event:MouseEvent):void
{
event.target.root.test2.test3.gotoAndPlay(2);
}

The movie loaded fine when I tested but got this error when I pressed the button:

TypeError: Error #1010: A term is undefined and has no properties.
at Untitled_fla::testbutton_26/test1().

Please help!!!!!!!!!

#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.

var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);

It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.

Would love some help on this.

Cheers,

Problem With OnRelease For MovieClip Inside Draggable MovieClip [Flash Pro 8]
I have a movie clip, circle_mc, and in it is embed another movie clip, point_mc. I made the circle draggable with this:


Code:
circle_mc.onPress = function() {
startDrag(this);
};
circle_mc.onRelease = function() {
stopDrag();
};
and that part works fine.

I also want to be able to click on point_mc which is within the circle_mc movie clip. So, I added this:


Code:
circle_mc.point_mc.onRelease = function() {
trace("click was successful");
}
This does not work, and I'm pretty sure it is BECAUSE its parent clip is draggable and therefore has its own onRelease function. (If I comment-out the drag code, then the other code works as intended.)

Is there any way to do this or am I out of luck?

How To Load Image Into Movieclip Inside Movieclip That Is Dynamically Created?
Hello Kirupa Cats!

I am building a menu from an XML file, and I'm cool with cyclying thru the xml data to create menu items.

For every menu item in my XML file, I'm using attachMovie to insert a movie clip called menuitem from my library into a movieclip called menuholder. This works no problem, my menuholder movieclip is poplulated with as many menuitem movieclips from the library as designated by the xml data.

However, inside the library movieclip called menuitem, I have another movieclip on its stage, called mc_menuImage. I want to load an image into that movieclip, and I'm taking the URL for the image from the XML data.

My problem is I can't seem to figure out how to fully identify the movieclip mc_menuImage to load the image. It may have something to do with the fact that the library movieclip is being loaded dynamically, but the movieclip inside the library movieclip exisits pysically on the stage. I don't know...here's the code I'm working with:

THE CODE:

var xmlMenu:String = "menu.xml";
menuholder = createEmptyMovieClip("menuholder", -1);

var xmlMenuData:XML = new XML();
xmlMenuData.ignoreWhite = true;
xmlMenuData.load( xmlMenu );
xmlMenuData.onLoad = function(loaded) {
if (loaded) {
var mImage:Array = new Array();
var mRootNode = this.firstChild.childNodes;
totalMenuItems = mRootNode.length;

// fill array
for (var i = 0; i<totalMenuItems; i++) {
mImage.push(mRootNode[i].attributes.menuImage);
}
}

//make the menu
for (var i = 0; i<totalMenuItems; i++) {
var menuitem = menuholder.attachMovie("menuitem", "menu"+i, i);
menuitem.id = i;

/* now here I thought I could just do this: */
menuitem.mc_menuImage.loadMovie(mImage[i]);
/* but that doesn't work... */

};


When I trace menuitem I get this: _level0.menuholder.menu0, _level0.menuholder.menu1, etc, so I figured the syntax menuitem.mc_menuImage would identify the movieclip inside menuitem, but to no avail. Maybe it has something to do with levels, I'm not sure...

So I don't know, any suggestions? Thanks so much!!!

How To Scale The Movieclip Without Transform The Text Inside That Movieclip Uisng As
hi
how to scale the movieclip without transform the text inside that movieclip uisng actionscript


thanks in Advance

[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.

Loading An External Swf Inside A Movieclip That Is Inside Of A Movieclip
I was wondering if anyone could help me!!!! I used the tutorial for loading external swf's into a movieclip off of this site. But what I am trying to do is load another external swf inside of that external movieclip. Not sure if that makes sense. I kind of have it working where it loads the first external clip. But when I press a button to load a different one, it plays the transition then loads nothing. It's just blank.

This is the AS 2.0 that I am using for the external swf button that is inside another:

on (release) {
if (this._parent.currMovie == undefined) {
this._parent.currMovie = "StrategicPlanning2";
container2.loadMovie("StrategicPlanning2.swf");
} else if (this._parent.currMovie != "StrategicPlanning2") {
if (container2._currentframe>=container2.midframe) {
this._parent.currMovie = "StrategicPlanning2";
container2.play();
}


}
}

And this is the AS that I am placing on the last frame in the actions layer

this._parent.container2.loadMovie(this._parent.cur rMovie+".swf");

Please help!!! I am only a Graphic Designer!!

Trapping Mouse Events For A Movieclip Inside A Movieclip
Hi

Im having a few problems with my events for some movieclips. What I have is an AS2 class which creates a blank movieclip as a holder for submenu movieclips. This blank movieclip must trap its onRollOut event so that it can fade out the menus. The submenu movieclips which are then attached to the holder clip must trap their own mouse events which are defined in another AS2 class. The only trouble is they are not trapped.

I have seen a couple of other posts on the subject but got no clues from them. I was just wondering if what Im trying to do is possible or if Im fighting a loosing battle.

Any help would be much appreciated.
Thanks in advance
Dan

Mouse Event Triggers For Movieclip Inside Movieclip (can It Be Done?)
'canvas' is a large movieclip I am using to put other movieclips 'in' so I can move around and zoom everything at once. Like a coffee table with pictures on it.

I am loading up two images below with variables named map01 and map02. They overlap.


Code:
var map01:MovieClip = canvas.createEmptyMovieClip("map01", canvas.getNextHighestDepth());
map01.loadMovie("http://imagelocation1.jpg");
map01._x=-1000;
map01._y=39;
var map02:MovieClip = canvas.createEmptyMovieClip("map02", canvas.getNextHighestDepth());
map02.loadMovie("http://imagelocation2.jpg");
map02._x=-1000;
map02._y=130;

map01.onRelease = function () {
this.swapDepths(map02);
}
I would like to be able to click one of the images inside canvas and have it jump to the top. In this case, just a simple swap with map02 would be fine, I can manage the depths.

I have put a breakpoint right on the swapdepths line and debugged, and the function never gets called. Probably because it is the onrelease is for 'canvas', not any of the sibling movieclips that flash is looking for.

'canvas' has an onRelease that triggers a stopdrag and a onpress that triggers a startdrag. Removing these two triggers still does not allow any triggers for map01 or map02 to trigger though.

Any suggestions?

Is there some way to setup some logic on a canvas.onRelease function that can easily check to see if the clicked region is on an movieclip inside the canvas?

[CS3] Referencing A Movieclip Inside A Movieclip From A Class File
Hello All,

I'm trying to access a movieclip inside another movie clip from a class file that is not attached to either movieclip. For instance, I'm checking hitTests for the avatar the player uses on the game, there are two enemy movieclips. Inside each enemy movieclip is another movie clip that serves as a bounding box (specifically around the mouth of the enemy so it can eat the player). Here is what I have so far that isnt working:


Code:
if (_root['otter']['obbox'].hitTest(this) && touch == false) {
trace("Otter touched Urchin");
gotoAndPlay("hit");
_root['otter'].gotoAndPlay("eat");
touch = true;
}
The class file is for the avatar. On the stage is the otter mc and inside the otter mc is another mc called obbox which is what I'm trying to hitTest against. Needless to say, it doesn't hitTest or trace or play the animation. Is there a way to reference a nested mc? Thanks in advance.

Terror.

Attaching A Movieclip At A Specific Location Inside Another Movieclip
Hello all,

I am trying to attach a movieclip(a) inside another movieclip(b). When (a) is attached it is always attached at the top left corner OR if I use getNextHighestDepth() then the movieclip (a) is attached randomly at different locations. I would like (a) to be attached at the centre of the parent movieclip or at a specific location inside parent movieclip.

Please help me with this. Me a newbie to actionscripting.

Thanks,

Nish

Dynamic Movieclip Resizing With A Textfield Inside Of The Movieclip
Hello,

I've searched past posts in regards to resizing textfields but I was unable to find any help with the problem I am having resizing a movieclip that contains a textfield.

Basically I am dynamically creating an emptyMovieClip, then within that empty movieClip I am then creating a text fielld and populating it with text.

When I try to resize the movieclips instance by clicking on a button and changing the ._width of the movieclip and it fails.

Please help,

frank grimes

SetProperty Doesn't Work With Movieclip Inside Of Movieclip
I originally had this set up this way and it worked.

var hita:Boolean = false;
logotop.onEnterFrame = function() {
hita = this.hitTest(this._parent.middle.hitme);
if (hita == true) {
setProperty ("logotop", _alpha, "0");
}
}

Then I put everything in a new movieclip with the instance name "printme".
Now it doesn't work and doesn't give me an error.

var hita:Boolean = false;
printme.logotop.onEnterFrame = function() {
hita = this.hitTest(this._parent.printme.middle.hitme);
if (hita == true) {
setProperty ("printme.logotop", _alpha, "0");
}
}

Do you see anything wrong with the above code?

Getting A Movieclip To Match The Coordinates Of A Movieclip, Inside A Moiveclip.
Quick question. Is it possible for a movieclip to go to the coordinates (x,y) of another movieclip that is within a movieclip?

Major Issue: MovieClip Inside Movieclip Will Not Have MouseEvents?
Hey guys, I got this empty MovieClip i add to the stage called 'container'. In container, I also dymaically add warrior(), warrior2(), and warrior3(). Now Im trying to add my rollover state for warrior, however, it never works?

When I place the warrors inside of a container in design time and then attach the code and place it on the stage, it works? Any Ideas?

public function addHitState(container:MovieClip, linkage_name:String, id_name:String):void{
var class_definition:Class = getDefinitionByName(linkage_name) as Class;
var added_clipisplayObject = new class_definition();
added_clip.name = id_name;
container.addChild(added_clip);
added_clip.x = 1151.2;
added_clip.y = 407.8;

added_clip.buttonMode = true;
added_clip.addEventListener(MouseEvent.ROLL_OVER, rollOverFunction);
};

private function rollOverFunction(event:MouseEvent):void{
trace("@");
};

Apple A Color Transformation To A Movieclip That's Inside Another Movieclip
Hey,

I have a movieclip with it's .mouseChildren property set to true. In that movieclip are about 30 other movieclips, and inside each of those movieclips is a single dynamic textfield. I did this so I could set the .buttonMode to true on the 30 movieclips that are in the main movieclip so I could have the nice pointer finger/glove. When I mouse over the main movieclip the pointer finger/glove shows up as it's supposed to. What I want to do is apply a color transformation to the movieclip as I mouse over it. Here's what I have that isn't working:


Code:
function onFeedMouseOver(e:MouseEvent):void
{
var feedColorOver:ColorTransform = e.target.colorTransform;
feedColorOver.color = titleTextOverColor;
e.target.transform.colorTransform = feedColorOver;
}
I have verified that the function is indeed being called, and the color variable is working.

Any help would be very much appreciated.

P.S. The project is a rss reader where the user can select what feed they want to view from a scrollable list that is parsed form an xml file, then the feed will load and display the title, date, and short description of all the feeds for the user. Then it scrolls through them (it loops continuously). When the user clicks on the feed, it takes them to the article/blog post/whatever in a new tab or window. Everything works great, this is basically the last thing I need to do for it. This particular portion of the project is when the user mouses over the list of feeds.

GotoAndPlay Movieclip To Movieclip Timeline
I have been toying with how to get this done for two long now. And I haven't come across anyones thread that anwers this. Basically, I am setting up a site and I have been doing a lot of spagetti coding, since I can't seem to get anything to work if I just put it all on one frame on the root level. I have a movie clip (called dengel_intro) on my root layer that has many movie clips within in (one in particular is greg_home). Now this movie clip has an intro animation and then it stops. When i press the greg_home movie clip I want to send the user to a frame on the dengel_into movie clip. Here is the code that I have on the greg_home mc so far
code:
stop();
onRollOver = function()
{
play();
}
onRollOut = function()
{
gotoAndStop (1);
}

onRelease= function()
{
_root.dengel_intro.gotoAndPlay (76);
}


Everything works but the onRelease.

[F8] Control Movieclip From Button Inside Another Movieclip
ok. I have the Main Timeline..on the stage i have "side_menu_mc" inside that i have "menu_menu_mc"."slider" is menu_menu_mc's Instance name.

Inside "menu_menu_mc" i have a button (services_btn)."button_1" is its instance name. Upon clickin on this button, i want a frame labelled "services" (frame 18) in "side_menu_mc"'s timeline to display.

i attempted this.after some googling.but it does sweet nothing.


Quote:





Originally Posted by my shizer code


menu_menu_mc.services_btn.onRelease = function() {
trace("button pressed");
_root.gotoAndStop("services");
}

Movieclip Inside Movieclip Not Responding To Keypress
I am a beginner with Flash. I am using Flash 8 and am trying to make my very fist arcade game. I am starting with basic keypress and movement. Can't get this to react how I want. I attached the actual .fla file(if I attached it correctly). The movement doesn't include LEFT, RIGHT, UP or down or anything like that. It is only "two" movements. When the user is not touching the keys, the movie clip of the character is sent to his standing pose, which is a moving animation of him swaying back and forth. When the user presses the spacebar, he punches. This is the code, which works fine:

onClipEvent(enterFrame)
{
if(Key.isDown(Key.SPACE))
{_root.subzero_man.gotoAndStop("punch");
}
else
_root.subzero_man.gotoAndStop("standing");
}

This code is attached to the movie clip which is on the main Stage, main Timeline.

The problem is this: you have to be HOLDING DOWN the spacebar to see the punching occur. I don't want the user to have to hold down the spacebar. I want the user to be able to TAP the spacebar and the punch movie clip plays completely(within its own independent timeline).

So I changed the 4th line in the code to this:
{_root.subzero_man.punch_instance.play();

The name of the character on the main timeline is still "subzero_man", and now the name of the instance of the character punching is "punch_instance".
However, nothing happens. The character stays in his standing pose, ignoring the spacebar keypress.

I thought this was the correct syntax for referring to a movieclip instance which is inside another movie clip. In this case, the punching movie clip instance is inside the subzero character movie clip instance which is on the main timeline.

Is my code wrong?

Path Confusion To Movieclip Inside Another Movieclip
I'm trying to get the right path to my embedded movieclips.

I have movieclips (I'll call baby1_mc) loading into another movieclip (I'll call it the momma_mc)

Then from the main time line I want to check if the movieclip that loaded is baby1_mc or baby2_mc, etc.

How do I target the babies to check which moviclip they are?

Thanks so much!
And if you have any questions, just let me know.

Accesing Movieclip Inside Movieclip With Dynamic Name.
Hi,

I have a movieclip which is nested inside a movieclip. now i am creating instance of parent movieclip in a loop and giving it a dynamic name.

now i need to hide the child movieclip nested inside the parent movieclip with dynamic name. this is what i am trying to do


ActionScript Code:
function doThisFunction(e:Event) {
           
            var getIdonClick = e.currentTarget.name; // getting the instance name of movieclip on its click
            getChildByName(getIdonClick).bg_tag_us.visible = false; // trying to hide the movie clip with instance name bg_tag_us.

i get an error while compiling ...


ActionScript Code:
1119: Access of possibly undefined property bg_tag_us through a reference with static type flash.display:DisplayObject.

can anyone help in accessing the child movieclip..

Editing A Movieclip Inside A Movieclip & Classes
Hey guys,
iv created a movieclip (let call it movieclip ParentClip) inside my .fla file, and i made my movieclip out of 3 other movieclips (Lets call them ChildClip1, ChildClip2, ChildClip3). I have made a parent class called 'BaseMovieClip' and each Child Movieclip has its base class set as 'BaseMovieClip'.

So does anyone know how 2 access the movieclips that are in ParentClip?

thanx in advance



btw, im creating a 3d flash engine, what does everone think of that? worth it? its going well so far, about 80% done.

How To Reference To A Movieclip Inside An Attached Movieclip
Hi,

I have a button who has to attach a movieClip myMc who contains another movieClip box.

I'm trying to assign an onRelease action to the movieClip inside the Attached movieClip, but it doesn't works.

The code:


PHP Code:



myButton.onRelease = function(){    var ref:MovieClip;    ref = container.attachMovie("myMc","newMc",this.getNextHighestDepth());}ref.box.onRelease = function(){    trace("hello world");} 




How can i reference to the box movieClip?
By the way, If i try something like this everything works fine:


PHP Code:



var ref:MovieClip;ref = container.attachMovie("myMc","newMc",this.getNextHighestDepth());ref.box.onRelease = function(){    trace("hello world");} 




I guess the problem is to attach the movieClip in the button event, but this is what i need.

Checking HitTest With Movieclip Inside Movieclip
I have a game where different movieclips are loaded randomly from an array in to a movieclip call flavors and move across the stage. Flavors is then loaded into the main timeline. I'm trying to test if a movieclip called "butterscotch" is loaded into the flavors movieclip and hits another movieclip called "butterscotch_tube". If it hits the right tube, the it adds one point, if it hits the wrong tube, all points are erased.

Here is the code inside Flavors:

Code:
var flavors:Array;

var thisFlavor:MovieClip;

flavors = [new creamSoda_mc(), new rootBeer_mc, new strawberry_mc, new cherry_mc, new watermelon_mc, new grape_mc, new bubblegum_mc, new butterscotch_mc, new cottonCandy_mc, new raspberry_mc, new sourApple_mc, new chocolate_mc, new mystery_mc];
thisFlavor = flavors[Math.floor(Math.random() *flavors.length)];
addChild(thisFlavor);
Here's the checking in the main timeline:

Code:
if(flavor.thisFlavor.hitTestObject(tubes.butterscotch_tube))
{
if(flavor.thisFlavor == thisFlavor[7])
{
butterscotchScore ++;
trace("butterscotch = " + butterscotchScore);
flavor.removeEventListener(Event.ENTER_FRAME, hitTube);
}

else
{
butterscotchScore = 0;
trace("butterscotch reset");
flavor.removeEventListener(Event.ENTER_FRAME, hitTube);
}
}
The problem, I believe, is in (flavor.thisFlavor == thisFlavor[7]).
thisFlavor is giving me an error, and I don't know what to put in the parenthases to get this working.

Thanks so much for your help in advance!

How To Play/stop A Movieclip Inside A Movieclip?
This is probably really simple and stupid but I can't figure it out. I'm trying to play a movieclip exported from my library which inside a movieclip on the stage.


Code:

//create container MC
var myContainer:MovieClip = new MovieClip();
stage.addChild(myContainer);

//bring in animated MC from library and load into container
var myAnimatedMC:AnimatedMC = new AnimatedMC();
myContainer.addChild(myAnimatedMC);

//play mc?
myContainer.myAnimatedMC.play();

The movieclip is added onto the stage but it just won't play. The last step doesn't work? Any ideas?

Movieclip Inside Movieclip (Timeline Problem)
Temp link to the swf file:
http://avflower.com/
Fla file (rar archive): (deleted)

Click to the fish, so, the top part of the fish would break and stop. Please, help me to change the AS3 code the right way.

Movieclip Inside Draggable Movieclip Won't Work
I have searched and cannot find this solution so I turn to my friends here. How do I trigger movieclip1 inside movieclip2 while keeping movieclip2 "draggable"? Right now the dragging works but I cannot trigger movieclip1. I am using AS2 but might be lured into using AS3 if it makes things easier. I need to start learning it as some point.

Thanks for your help,

Chris

Movieclip Inside Movieclip In Flash MX
hmmmmm...........

how do you tell a movieclip inside a movieclip to do something? how come the old _root. code is not working anymore in flash MX? can someone help me out here? thx a whole lot

View Movieclip Inside Movieclip
I cant figure out how to make it so the action of a movie clip is viewable inside of another movie clip (or even within a scene) in the program, so I dont have to render it out. Is there an option I need to turn on or an addon program? Any help appreciated in advance

Targetting A Movieclip Inside A Movieclip.
I also posted this thread in the CS3 forum, but i am going to end up using AS2 for the site, so i figured i might be able to get more help here since this forum is more common.

What i am trying to do is target a button (which is actually a movieclip) that is inside another movie clip for rollOut, rollOver, and release functions. I have tried various versions of code but still seem to be having trouble or something is just eluding me. I have posted a version with just the code for the first rollover, because i have been using a blank version for code testing.

The path to the movieclip i am trying to function is _root.navigation.home

If anyone can access this file and help me out it would be greatly appreciated.

This file is in Flash 8 format, unfortunately i can't seem to save below that in Flash CS3 (sorry).

File is here navigation.fla and is roughly 225k.

Again any help would be appreciated on this as it has been bugging me senseless for the past 4 days.

[CS3] Getting A Movieclip To Work Inside A Movieclip
How do I get this to work?

On the maintimeline I have two movieclips clip1 and clip2, clip1 has the instruction:

Code:
with (_root.clip2) {gotoAndPlay(2);}
It works as it should.

What I want to do is take these two movieclips and put then into a movieclip but when I do all I get is the output message.

Quote:




Error: A 'with' action failed because the specified object did not exist.




So I tried to changed it to:

Code:
_root.clip2.gotoAndPlay(2);
This just does nothing.

Movieclip Inside Movieclip With Actionscript
hy,

i'm trying to put some actionscript inside movieclips but i didn't sucess, anyone can give me some tips.

So, the ideia is:
i have one movieclip instance name mc1 with this this code:

Code:
mc1.onRelease = function():Void {
trace("ola mc1");
};
and inside of mc1 i create another movieclip with the instance name mc2, and the folowing code:

Code:
mc1.mc2.onRelease = function():Void {
trace("ola mc2");
};
like that when i release any of the mc it give me always the first one mc1 message. what i really whant is when i release mc1 or mc2 it give me the correspond message.

anyone can me if i can do something like that.

thanks in advance

Generate Movieclip Inside Movieclip
Hi,

Im using actionscript to generate movieclips onto the stage. I have created a popup movieclip with the following code. Popup is a moviesubclass.


Code:
popup_mc = attachMovie("Popup", "p1", 102,{_x:140,_y:40});
my Popup.as file structure looks something like the following

Code:

import mx.utils.Delegate;

dynamic class Popup extends MovieClip
{

function Popup()
{
this.onPress = Delegate.create(this,startDrag)
this.onRelease = Delegate.create(this,stopDrag)
}
function init()
{
}
}
I think it needs to be generated withing the function Popup() method
how do i generate a button inside the popup.

thnx,

ps I dont want to use flash components they dont work for me.

Adding A Movieclip Inside Another Movieclip
i have a movieclip on the stage called spectrum. i want to create another movieclip inside spectrum, and then draw on that movieclip.


Code:
var spectrumShape:MovieClip = new MovieClip();
spectrum.addChild(spectrumShape);
spectrumShape.x = 0;
spectrumShape.y = 0;
spectrumShape.width = spectrum.width / spectrum.scaleX;
spectrumShape.height = spectrum.height / spectrum.scaleY;
spectrumShape.graphics.lineStyle(10, 0xFF0000);
spectrumShape.graphics.drawCircle(10, 10, 40);
when i test this, i see no circle inside the spectrum movieclip, or anywhere else. what am i doing incorrectly?

i have tried using a shape, and a sprite instead of a movieclip, and the results are the same.

How To Click A Movieclip Inside Of A Movieclip
I have a main object movieclip that has a base class. I have defined a function in the base class for clicking on the main object movieclip. Within that movie clip is another movie clip that also needs to have a click function. I can not figure out how to determine if the mouse is clicking on the nested movieclip or the main movieclip. I thought maybe a conditional statement would work in the base class click function that said not to run the base class click function if the mouse was targeted onto the nested movieclip. But I am having difficulty getting that to work as well.

ActionScript Code:
private function clickFunction(evt:MouseEvent):void {
            xyCalc=Math.abs( (initialX-finalX) * (initialY-finalY) );
            if (xyCalc<6 && (evt.currentTarget.currentFrame==1 || evt.currentTarget.currentFrame==3)) {
                evt.currentTarget.gotoAndPlay(2);
            } else if (xyCalc<6 && evt.currentTarget.currentFrame==2 && this.Mouse.cursor!=evt.currentTarget.backImage.thumb1) {
                evt.currentTarget.gotoAndPlay(3);
            }
        }
// this is the piece of code where I am trying to identify the nested movieclip.
this.Mouse.cursor!=evt.currentTarget.backImage.thu mb1

Update:

I am now tring to define a variable that will return the nested MovieClip and using that variable to cancel the base class click. I also though of defining a boolean variable that will be set when the nested movieclip is clicked. My problem is still trying to get code in the base class to acknowledge the nested moveiclip.

Buttons On A Movieclip That Is Inside A Movieclip
i created this rollover button that has a movieclip inside. When you rollover the button it plays an animation. (hint: you have to follow the square for the animation to play completely) When it finishes the movieclip plays. Everything is good up to this point. The movieclip has a next and previous button that is suppose to advance to the next logo. This never occur. How do I activate the next and previous buttons. I'm assuming you have to delete the rollover action to activate the actionscript for the movieclip within the rollover button. Am I even close. Please assist me.

www.geocities.com/demetriusmcclain/services.fla

Duplicate Movieclip Inside Another Movieclip
Is it possible to use duplicateMovieClip to copy a movieClip into another movieclip, or is it only possible to duplicate it inside one and the same containermovieclip?

Stop A Movieclip Inside A Movieclip
I use 2 movieClips as buttons placed inside another movieclip in order to achieve something like a dropdown menu.Those 2 movieclips have 2 (stop) frames inside them and they are used as On/Off states.The movieclip that holds those 2 button/clips is used for animating the buttons (actually appear/disappear with motion tween and alpha fade).
My problem is that the movieclips/buttons are always go back to the 1st frame in each keyframe of their animation.
Is there any way to achieve this dropdown menu (even another way) so that the states (actually the frame which each movieclip/button stops) remains always the same troughout the whole animation?

MovieClip Inside Of MovieClip - How To Access?
Hi,

I am loading a movie clip from my library to the stage by adding a linkage name to the move clip and creating a new class of it in a .as file. This works great, the problem is I have a move clip inside of the movieclip clip I loaded to the stage and I cannot access its properties like I used to in AS2.

example

Load moveclip1 to stage from the library. Movieclip1 has movieclip2 inside of it. With AS I use moveclip1.moveclip2.x = 10 and I get errors.

Do I have to just load the other movie clip in with the linkage system?

Thanks,

waffe

Load Movieclip Inside Movieclip
I'm familiar with the loadmovie script and loading an external swf file into an empty movieclip, but is it possible to load a movieclip inside an empty movieclip, all within the same swf? I don't want to use external files because I really don't have much content and it would be easier to just make everything in one swf file.

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