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


Similar Posts:


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

Professional :: Control The Movie Clip Mc_allPages From Within The Movie Clip Mc_buttonMenu?

Aug 20, 2010

I am making a web site in flash in which I have multiple movie clips.I have mc_buttonMenu on the main timeline.Inside of mc_buttonMenu, I have 3 buttons that are all button symbols.From the main timeline, I have a movie clip called mc_allPages.In this movie clip, I have a few layers.I have the content layer.This layer controls how my pages display.I have another layer called labels.I labeled frames 1 to 10 as 'home' and layers 11 to 20 as 'contactUs'.I have another layer in mc_allPages called actions.I put a stop(); on frame 10 and frame 20 on this layer.I want to be able to control the movie clip mc_allPages from within the movie clip mc_buttonMenu.I put some action script in various places, but it never worked.I tried this action script:
 
_root.btn_home.onPress()
{
Gotoandplay("home");[code]...........
 
I tried placing that code on the main timeline, inside mc_allPages, inside mc_buttonMenu and split up into both buttons appropriately for btn_home and btn_contactUs.Sometimes the animation would stop on frame 10 and sometimes it would just play through to frame 20 and ignore the stop(); I put on frame 10 inside the mc_allPages movie clip.However, whenever I pressed the button ( btn_contactUs ), it never went to the frame labeled "contactUs" in the allPages movie clip.

View 11 Replies

Buttons Inside A Movie Clip To Control Same Movie Clip?

Aug 27, 2009

I am trying to place buttons inside a movie clip to control the timeline of the same movie clip. This does not seam to work like buttons on the main timeline. When I play the movie the cursor does not turn into a hand and the rolloever affects only sort of work. I have read about controling the movie clip with buttons on the main timeline, but I need one of the buttons to change halfway through the movieclip. I want to be able to jump to interior shots while in the exterior section and vice versa. It would seem that button would work the same way inside a movie clip as they do on the main timeline, but that does not appear to be the case. I am using CS3. Action scrip 2.0 is selected, but I could change it to 3.0 if it would make a difference.

View 6 Replies

ActionScript 3.0 :: Movie Clip Control Another Movie Clip?

Feb 9, 2009

On my timeline have two movie clips. In one of my movie clips i have a button that when you click it i want it to navigate to another frame in the other movie clip. Here is the code i have in the movie clip with the button.

[Code]...

View 1 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 :: 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

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

ActionScript 3.0 :: Use RotationY Relative To The Parent Movie Clip?

Mar 21, 2010

I am using the following code to rotate movieclips with a nice 3d flip effect. var flipTween:Tween = new Tween(mc,"rotationY",Strong.easeIn, mc.rotationY,mc.rotationY + 180,time,true)

However the rotationY is relative to the stage not the parent movieclip of mc.I.e: If the rotation effect on the movieclips looks different depending on where on the stage they are. I know that with the roation tool in cs4 you can rotate relative to the parent movie clip, how can you do this in AS3 code.

View 5 Replies

ActionScript 3.0 :: AddChild() Display The Movie Clip Outside Of The Parent?

Nov 9, 2011

I use the method addChild() to add a Movie Clip intoa nother one.mc1.addChild(mc2);But once the Movie Clip is added (and the second Movie Clip is higher than the first one) then it's displayed outside the first Movie Clip. Is there a way to prevent to display outside the parent?

View 6 Replies

AS3 :: Flash :: Access Variable Of Parent Movie Clip?

May 24, 2011

How to access variable of parent movie clip in child movie clip in Action script 3.0

View 1 Replies

ActionScript 2.0 :: Making Parent Movie Clip Invisible?

Jun 26, 2009

I have a movie into which I am loading external swfs. this all works fine but some of the content is duplicated and where there is slimline text it shows that there are two layers. see the header on white here:

how can i set the alpha to 0 or remove the host movieclip, from the externally loaded swf. does that make sense? so once the external swf has loaded into the empty movieclip then the parent movie disappears.

View 0 Replies

ActionScript 3.0 :: Movie Clip Doesn't Take Parent's Dimensions

Jun 30, 2010

I'm working on a map project with several movie clips that are dragged and dropped onto their respective movie clips. PROBLEM:

Initially, draggable movie clips are reduced their original size. When they are dropped onto their matching movie clip, I would like them to take the dimensions of the movies placed on the map. How to do that?

HERE IS MY CODE
stop();
var startX:Number;
var startY:Number;
var finalX:Number;

[Code].....

View 0 Replies

ActionScript 3.0 :: Call Function In Parent Movie Clip?

Feb 23, 2009

I have a child movie clip attached to the parent via the flash interface. The child is running a timer via code on its (the child's) timeline. When the timer finishes it needs to trigger a function on the parent's timeline. All the examples show how to trigger a function on the child - that is easy and I have got that working.

View 1 Replies

ActionScript 3.0 :: Move Child Movie Clip From One Parent Object To Another?

Dec 26, 2011

I'm having a hard time working out the most appropriate way to move a child movieclip between parent objects.
 
I'm creating a board-game type game wherein I've dynamically created an array of 'Square' movieclips, with no visual elements, which are arranged in a 10x10 rectangle on the stage. I then dynamically add the appropriate types of piece movieclips to the various squares with the addChild() method. In general, a square should only have one child piece at a time.
 
All of this works well for setting up the play area, but now I'm having an issue with moving a piece from one square to another. I want to have the user click a square with a piece on it, then click the destination square to move the piece. I have the logic for determining where a user can move any given piece to, but I don't know how to actually move the piece.
 
The pieces are all different class objects that extend both a base class I call Piece as well as the MovieClip class. The main issue is that when dynamically adding the various pieces to the squares, I don't provide them a unique name to access them later. I don't bother with unique names because I have no way of knowing which piece instance will be in a given square, so using getChildByName(name:String) isn't very useful.
  
So I can think of two routes that I can take: Making a getter/setter for the Square class that manages a private Piece property (as well as the adding and removing of the child piece to/from the parent square), or using getChildAt(index:int) to try to access the child piece.
 
I want to go with the first route as it seems to be the most maintainable to me. My problem is that I can't work out how to manage empty squares in this scenario. My instinct is to null to private _piece property of one square once I've moved the child piece instance to another square... but I'm fairly certain that the private property is a reference type, and nulling it out will null the actual piece object even after it's changed parents.

View 1 Replies

ActionScript 3.0 :: Refer To Movie Clip In Parent That Includes Target.name?

Nov 18, 2009

I am writing code in a MovieClip and want to refer to another MovieClip that shares the same parent.it'll be MovieClip(parent).theOtherMovieClip.But I want to refer to the MovieClip using the current MovieClip's instance name + "txt." This was my guess at the code, but it doesn't work.

MovieClip(parent).MovieClip(this.target.name+"txt" )

This didn't work either

MovieClip(parent).this.target.name+"txt"

View 1 Replies

ActionScript 3.0 :: Parent Movie Clip Properties Are Affected By Child's

Nov 22, 2010

My player movie clip has a smaller movieclip within it. Because the smaller movieclip is not within the parent clip it changes the x,y,width,and height value of the player movieclip and throwing everything off! To adjust I have to add (-2ndmovieclip.height) to everything i want to do. This is sloppy and I don't like it. Is there a better way to have a child within a movieclip without it affecting the parents properties? i want the parent to keep its original x,y,width,and height properties but the child keeps adding to them!

View 5 Replies

ActionScript 3.0 :: Control A Movie Clip From Another?

Dec 10, 2009

I have a parent movieclip (present_content_mc) that has two nested movie clips, players_content_mov is the first one. It's on frame 6 of the parent clip. The second movie clip, bios_mc is on frame 7 of the parent clip.

Now, my problem is getting a button on frame 2 of players_content_mov to go to frame 18 of bios_mc on click. Here are the two types of coding i've tried[code]...

View 9 Replies

ActionScript 2.0 :: Control 3 Movie Clip With One Button?

Nov 6, 2009

i have 1 button and 3 Movieclip there is 2 frame in each move clip . i want to control all mc with my button. when i press it all mc go to frame 2 .

i use this action for button :

Code:
on (release) {
_root.f1 = true;
}

and use this action on first frame of each movie clip :

Code:
stop();
if (_root.f1 == true) {
gotoAndStop(2);
}

but don't work

View 7 Replies

Movie Clip Control Main Timeline?

Dec 22, 2009

I am simply trying to tell my main timeline to go to the next frame when a movie clip reaches the end of its timeline (using AS3). Here is what I have which does not work.

Code:
MovieClip(root).gotoAndPlay(nextFrame);

View 2 Replies

ActionScript 3.0 :: Control Nested Movie Clip?

Jan 4, 2010

I try to control nested movie clip.So i have box movie clip and on this movie clip i put tree movie clip.And now i try to change for example apha of tree. Code:

//box_mc.tree_mc.alpha=.4;
box_mc.getChildByName("tree_mc").alpha=.4;
"" for me not logical symbols:) it looks like trace("blabla"); why need use ""?

[code].....

View 1 Replies







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