ActionScript 3.0 :: Targeting A Parent Movie Clip?

Mar 18, 2010

this is weird, ive tried all my resources and cant come up with the solution.

heres the heirarchy

Main Stage

sampleStage_mc (this contains all my samples)

sampleStageNavigation_mc (this is the movieclip that houses my buttons)

............................................

what i want to happen is when you click on one of the button_mc, i want it to target a frame label on the "sampeStage_mc" timeline.

heres my code:

Actionscript Code:
toshibaBtn_mc.addEventListener(MouseEvent.CLICK, toshibaSample);function toshibaSample(evtObj:MouseEvent) {    parent.gotoAndPlay("toshiba");}


theres four timelines, here is the outline

button_mc (i click this and it runs the code in sampleStageNavigation timeline)
sampleStageNavigation_mc (timeline that holds the ActionScript and the button_mc)
sampleStage_mc (timeline - this is the one I need to access)
main stage (timeline)

View 10 Replies


Similar Posts:


ActionScript 1/2 :: Targeting A Movie Clip Inside Another Movie Clip?

May 9, 2010

im currently trying to target frame 2 and a movieclip on that frame  This works. But now im trying to target a movieclip inside a movie clip.This code works when trying to target one movieclip.cal.onPress = function() {gotoAndPlay(2);message.total = unit1;}how can i edit that code to find another movieclip inside the movieclip message?

View 6 Replies

ActionScript 1/2 :: Targeting Movie Clip Button Within A Movie Clip?

Feb 26, 2011

I am trying to target a movie clip within a movie clip.
  
I have a movie clip on the main stage with an instance name of a
  
I have the following action script on it
 
on (release) {_root.a.gotoAndStop(2);
}

So on frame 2 of a I have a button (instance name b) which also has two frames and a stop action on frame 1. All I want to do is click on the button and make it go to frame 2. It should work but it isn't Here is the actionscript on the button (b) on (press) {_root.a.b.gotoAndPlay(2); }

View 2 Replies

ActionScript 1/2 :: Targeting A Movie Clip Inside A Movie Clip Inside Another Movie Clip With A Twist?

May 9, 2010

Im able to link to a movieclip inside a movieclipUnfortunately one of the movieclips now are a scrollbar and scroll. Now the actionscript isnt working?cal.onPress = function() {gotoAndPlay(2);message1.contentMain.message.total = unit1;

View 17 Replies

ActionScript 3.0 :: Resizing Parent Movie Clip Affects Child Movie Clip?

May 27, 2009

i am trying to use the Tween class to change the size of movie clip to certain height.the code works for me but when resizing the parent, it effects the child.i tried the height and scaleY property for the thum, but does not work.

ActionScript Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;

[code]....

View 6 Replies

ActionScript 2.0 :: Targeting From Movie Clip?

Oct 7, 2003

I have a movie clip in my main movie. The movie clip has buttons on it that tell where the play head should go in the main movie. I'm using this script;

[AS]
_parent.gotoandStop(28);
[/AS]

The play head goes to the right frame but it keeps playing even though I've specified it to "gotoAndStop" at frame 28. I've tried using labels and addressing it that way but same thing happens.

View 2 Replies

ActionScript 2.0 :: Targeting From Movie Clip

Oct 7, 2003

I have a movie clip in my main movie. The movie clip has buttons on it that tell where the play head should go in the main movie. I'm using this script;

[AS]
_parent.gotoandStop(28);
[/AS]

The play head goes to the right frame but it keeps playing even though I've specified it to "gotoAndStop" at frame 28. I've tried using labels and addressing it that way but same thing happens.

View 2 Replies

ActionScript 3.0 :: Targeting Another Movie Clip To Animate?

Dec 16, 2009

how to target to the another movie clip to animate?I was using code as below but the output is not really correct.It seemed something is duplicating (I just suppected)

PHP Code:
import flash.display.MovieClip;
var mc_Ripple:MovieClip = new Ripple_Text() ;

[code].....

View 7 Replies

ActionScript 2.0 :: Targeting Movie Clip Animation?

Jul 28, 2005

I have three small images on the stage in frame 1. I also have an invisible button symbol over one of the images and have given this button an instance name. On frame 2 there are the same three images but with a lower opacity level and also on this frame 2 is a movie clip instance containing an animation. I need an onRollover event connected to the button on frame 1 so that when the user rolls over it, the playhead jumps to frame two and shows the images and also plays the animation in the movie clip.

I've applied the following code to the button symbol on frame 1:

stop();
specialised_btn.onRollOver = function() {
gotoAndPlay(2);
}

and I've also put a stop action on the last frame of the animation within the movie clip in frame 1 so that it won't loop.

The problem is that when I test the movie, when you roll over the image on frame 1 it just continually loops between frames 1 and 2 - it doesn't play the animation on frame 2 as I thought it would.

View 3 Replies

ActionScript 2.0 :: Targeting A Child Movie Clip?

Oct 20, 2004

I have a movie clip on the main timeline calledbg_graphics, I want to target a movie clip within that movieclip called bg1_mc. to gotoAndPlay frame 2.The bg_graphics clip goes to a random frame within that movieclip, there are 3 frames. 1st has bg1_mc, 2nd has bg2_mc, and 3rd has bg3_mc. How could i determine which file to gotoAndPlay frame 2 in bg_graphics when i don't know exactly which frame its going to be on, let alone target a movie clip within a movie clip.I used this code to generate the random frame

function randomBg() {
//generate random BG based on random frames within the MC
randFrame = random(3)+1;[code].....

View 7 Replies

ActionScript 3.0 :: Targeting A Button Inside A Movie Clip?

Feb 10, 2010

Trying to target a button inside a mc in order to trigger a swf.the mc is called "nav_btns"the button is called "contact_btn" The swf has the same name as the listener in order to repeat the function with multiple swfs. my problem is, i'm getting an error of an Access of undefined property with my mcI geting an error:"1120: Access of undefined property nav_btns.

my code:
var Xpos:Number = 461;
var Ypos:Number = 294;

[code].....

View 1 Replies

Actionscript 3.0 :: Targeting A Movie Clip Inside A Loaded Swf?

Jun 10, 2009

I loaded this "slider" swf into a "sliderHolder" on my index swf file. inside that loaded swf there's a movice clip called icon_mc. I'm trying to target it and make it go to a specific y position within that loaded swf on a MouseEvent inside the index.swf. I can't seem to make it work.I triedI have traced sliderHolder and it says it's empty.I have traced sliderLoader and it gives a Loader.So how do I access the movieClip if I just have those two as references?Here's what I have and want to do in code:

Code: Select all
var sliderLoader:Loader = new Loader();
sliderLoader.load( new URLRequest("sliding/ImageBar.swf"));

[code].....

View 1 Replies

ActionScript 2.0 :: Targeting A Movie Clip Created With XML Information?

Jan 27, 2005

I am having trouble targeting a movie clip that was dynamically generated from information in an XML document. Basically, what I want to do is be able to manipulate the movie clip after it was generated by the initial function. Unfortunately, I can't figure out how to properly target the clip even though I am pretty sure I have the proper title and location (tried both _root. and _level0.).[URL]the string at the bottom - "_level0.mc_image2" - is the name of the last movie clip (with an image inside) to the right.

View 1 Replies

ActionScript 2.0 :: Targeting A Timeline In An Loaded Movie Clip?

May 27, 2005

The swf successfully loads where I want it to, but I'm having trouble moving the new movie clip to a specific keyframe in the timeline.

Code:
on (release) {
_parent.productImage.loadMovie("./flash/BT_Closeup.swf");
_parent.productImage.gotoAndStop("set2");
}

View 1 Replies

ActionScript 3.0 :: Targeting Dynamically Created Movie Clip?

Oct 6, 2009

i'm creating a menu where i place movieclips dynamiclly:

for each (var button:XML in XMLgothrough) {
//Create a new menu item
var menuItem:MenuItem=new MenuItem ;[code]....

but i keep getting a ReferenceError: Error #1065: Variable menuItem1 is not defined.at MethodInfo-359()error.

View 14 Replies

ActionScript 2.0 :: Targeting A Movie Clip Created With XML Information

Jan 27, 2005

I am having trouble targeting a movie clip that was dynamically generated from information in an XML document. Basically, what I want to do is be able to manipulate the movie clip after it was generated by the initial function. Unfortunately, I can't figure out how to properly target the clip even though I am pretty sure I have the proper title and location (tried both _root. and _level0.).

I've put the files I am working with online for reference:[URL]

If you load the swf [URL] ) the string at the bottom - "_level0.mc_image2" - is the name of the last movie clip (with an image inside) to the right.

Also, if you look at the code, you'll see this is a modification of the portfolio from: [URL]

View 1 Replies

ActionScript 2.0 :: Targeting Mess - Blank Movie Clip Created In The Preloader Swf

Jan 1, 2004

I have a looped sound and some components in my main movie (scroll bar) which for some reason is really bogging down my swf and causing the preloader bar not to show up until like 46% or something ridiculous.

So I am trying to solve the problem by having a preloader swf as suggested by Kode in this thread. However, now all my targeting is messed up in my main movie. Everything that was _root has to change but I can't tell what to load it into. I tried using _parent, _parent._parent, _root.container_mc (which is a blank movie clip created in the preloader swf that main is loaded into after the preloader is 100%) and others but nothing works. Even the simple looped sound which was originally just _root.backsound.start(0,999) can't be targeted. how to target things on my main stage based on the preloader swf?

View 14 Replies

ActionScript 2.0 :: Targeting Instances - Attaches A Movie Clip To The Stage Each Time At A New Level?

Jul 28, 2008

I have a function that attaches a movie clip to the stage each time at a new level.

myLevel++
attachMovie("myMovieClip", "instanceName"+myLevel, myLevel)
}

At the moment it works just fine but I want to target specific instances and I can't work out the instance names.I am trying this..

instanceName[myLevel]._x = 400

View 9 Replies

ActionScript 2.0 :: Control Movie Clip From Parent Swf

Sep 7, 2009

Im trying to control a movie clip that is part of a swf from another swf file. For example. My main flash file is called index.swf. this flash files loads another flash file called image.swf within image.swf are several movie clips (mc_1, mc_2) that I need to control show hide. I need to do so directly from index.swf.This would be flash 9 action script 2.Here is the code i am trying to work with. "filter" is a movieclip on index.swf. mc_1 and so on are movie clips on image.swf. What is the path i need to define before "mcfadeTo..."[code]

View 6 Replies

ActionScript 3.0 :: Can't Target Parent Movie Clip

Feb 17, 2010

I have a swf which contains a main menu bar along the top which has been added dynamically at run time. ALl the controls for this bar live inside btnHold One of these buttons loads in a new swf. There is a button within this second swf that I want to use to control the main menu bar in the top layer (I want to make it invisible for a time, or get its layer and then ensure that its not too high etc etc)However, I just can't work out how to target this btnHold from within the newly loaded swf.

View 2 Replies

ActionScript 3.0 :: Can't Get Movie Clip To Communicate With Its Parent?

Aug 29, 2009

Within ninja.swf, there are six scenes, and in the later 5 scenes, there is an movie clip (consule2)with has a halfdozen buttons (of which one is home_btn) that serve as the navigation across the site. So, in the consule2, I set up an Actions layer, and for Home_btn, have created this piece of code:

//Home Buttonfunction gotodsHome(event:MouseEvent):void{  MovieClip(root).gotoAndPlay("FullLoaded","01_Landing_Page");}Home_btn.addEventListener(MouseEvent.CLICK, gotodsHome);

[code]......

View 5 Replies

ActionScript 3.0 :: Preloading Parent Movie Clip?

Aug 14, 2011

function loadProgress(e:ProgressEvent):void {
var percent:Number = Math.floor( (MovieClip(parent).bytesLoaded*100)/MovieClip(parent).bytesTotal );

[code]...

View 7 Replies

ActionScript 2.0 :: Data From Xml To Parent Movie Clip?

Jul 9, 2010

I have movie clip A and move clip B (in the root). Move clip A load data form external swf. The swf also load data from xml (the data is xml file name) till here work perfectly.What I want is, to pass the xml file name from the move clip A swf to movie clip B on button click. What Movie clip B do is load the xml file passed from the move clip A swf.

View 2 Replies

ActionScript 3.0 :: Refer To Parent Movie Clip?

Feb 8, 2011

I am attaching one Movie Clip to another using addChild [code]...

The problem is that when I use MovieClip(parent).mc2 the flash assumes that I call the stage, while I want to call the mc1.

I use only a document class file for this project (not object-oriented approach)

View 2 Replies

ActionScript 2.0 :: Loading Parent Movie From Within A Clip?

Jun 19, 2007

I need to be able to load/change a movie within the main container using a button within a subcontainer if that makes sense?

Ive had problems before with loading and unloading movies eventually breaking the damn thing.

View 1 Replies

ActionScript 2.0 :: Change The Parent Of A Movie Clip

Jul 1, 2008

How can I change what movie clip an object is contained in after it has been added to the stage? I want a movie clip to start out in the main stage but them move into another movie clip so that when I move the containing movie clip the sub clip moves as well.

View 1 Replies

ActionScript 2.0 :: (FMX) Checking For The Name Of The Parent Movie Clip?

Feb 20, 2004

I'm checking for the name of the parent movie clip which is something like MyClip2 or MyClip3 ...when i trace the variable MyID, it displays the right number but when i try to do basic operation on it, it acts like a string not a number..

[AS]
on (press) {
if (this._name.substr(0, 6) == "MyClip") {
MyID = this._name.substr(6, 6);[c

View 5 Replies

ActionScript 3.0 :: Garr - Parent - Repositioning A Movie Clip

Jan 18, 2011

i know this has been covered a million times but im running into troubles repositioning a movie clip in as3 i have an mc that has this code on the timeline at frame 50:

[Code]...

View 2 Replies

ActionScript 3.0 :: Accessing A Movie Clip In A Parent Scene?

Oct 31, 2009

Setup:
*Scene 1:
- MovieClip1

[code].....

View 8 Replies

ActionScript 3.0 :: Accessing 'Label' In A Parent Movie Clip

Nov 4, 2009

What is the code to make you jump to a "Label" in a parent movie clip, when clicking on a button.Lets say the buttons name is push_btn and I am in mc2 and the label is located in mc1.

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved