ActionScript 2.0 :: Targeting A Nested MC?

Jul 13, 2006

I am creating a drop down menu and having problems adding problems to the nested MCs. I have all the actions on the root timeline and I have a one Main_MC which holds several Sub_MC's.I have the Main MC animated fine but I can't find how to control the Sub-MC's.Here is a sample of my code and I have tried _root. and this. and show below but I can't get it to work.

//main MC
Main_MC.onRollOver = over;
Main_MC.onRollOut = out;[code].....

View 9 Replies


Similar Posts:


ActionScript 3.0 :: Targeting Nested MovieClip?

Jan 26, 2010

I have a main swf that loads an external swf (WNC.swf). The external swf (WNC.swf) contains a scrollPane that loads another external swf (WNC_DATA.swf). I'm trying to target the WNC_DATA.swf from the main swf, so I can tell it to go to frame (2). The following code targets the first child swf (WNC.swf), however I'm unable to target WNC_DATA.swf inside the scrollPane.

[Code]...

View 5 Replies

ActionScript 3.0 :: Targeting Nested Movie Clips?

Feb 25, 2010

Here's my example, on frame 1 is an mc I created named holder. Inside there's an mc named box. Inside box are four mcs, circles1-4, inside the circles I have four skulls. If I want to affect only the skulls, what is the proper way to go about it?For instance, whats the proper way to write a trace statement?or , if I wanted the skulls to fade individually on mouse over, how would you properly go about writing this function?
 
function over(evt:MouseEvent):void{
evt.target.alpha = .5;
{

[code]....

View 8 Replies

ActionScript 3.0 :: Targeting Nested Movieclip On Different Frame?

Oct 13, 2011

I always face this problem when coding with flash, and still not able to get a solution for this problem....
 
if the nested mc is in the 1st frame then I can use: Level1_mc.Level2_mc.Level23_mc.gotoAndStop("2");
 
If refering nested btn I will use: MovieClip(parent).gotoAndStop("2");
 
so my question is, how about refering an mc from main timeline into nested mc but different frame( frame 4,5 or 6....)?

View 6 Replies

ActionScript 3.0 :: Targeting Nested Clip From Class?

Jul 23, 2009

I use the loader class to load in an external swf, a preloader movie in my class. (not a document class)

To target the properties in the swf (specifically the text field in it), I coerce it to a movie clip after it's loaded and add the child with:

var thumbPreloaderMC:MovieClip=evt.target.content as MovieClip;

now I can use:
thumbPreloaderMC.preload_text.text "sometext";

to reach the text field. works.

But, I want to nest that clip in a container movieclip I'm placing all the thumbnails I'm loading in, thumbContainer.

So I create the movieclip thumbContainer, add the child, then add the preloader swf to this clip.

I can't name the loaded swf, it throws an error, I googled that and see I can't name an already named clip.

I get an error "TypeError: Error #1010: A term is undefined and has no properties."

First of all, I'm fairly green with as3 still, I think perhaps I should rethink how I'm structuring this. I could and would ask how to target a nested loaded swf from a class.

is nesting clips like this from a class bad practice? What are best practices when it comes to using timeline based animations like preloaders etc by a class? I'd like to make my class as reusable as possible, but one can't create all animations and graphics from code.

View 1 Replies

ActionScript 3.0 :: Targeting Nested MovieClips Outside Of Scope

Oct 12, 2009

I have a movieclip added to the stage through a function.
ActionScript Code:
function myFunctionOne():void{
var myClipA:clipA = new clipA();
myClipA.name = "myClipA";
addChild(myClipA);
}

To access this item on the stage I have to use:
ActionScript Code:
getChildByName("myClipA");
I have some other movieclips INSIDE this clip that have also been dynamically added. If I want to reference one of those clips I have to reference them by name using getChildByName.
[Code].....
But is there a better way to reference movieclips if they are created inside a function, or is there a way to create them so they are always globally accessible?

View 1 Replies

ActionScript 2.0 :: Drag N Drop Nested .swf's Targeting?

Jul 20, 2010

I created a drag N drop .swf that works great until i pull it into the main movie. The drag works, but not the drop. I know its level's issue/pointing and the targets arent being read correctly by the main..

View 1 Replies

Actionscript 3.0 :: Targeting A Frame In A Nested Movieclip From Another?

Jun 1, 2009

On my main timeline, I have a movieclip called "mainpage". Within "mainpage", I have a button that when clicked upon, needs to go back to the main timeline, into another movieclip, and to a specific frame in that movieclip. The code I've been using for all my other buttons is this:

Code: Select allfunction goAdler (e:MouseEvent):void{
MovieClip(parent.parent).gotoAndStop("adler");
}
adler_proj_btn.addEventListener(MouseEvent.CLICK, goAdler);

In that particular case, the button is going up to the parent movieclip of it's parent to a specific frame label.The problem I'm having is that I need for this button within "mainpage", rapp_proj_btn, to go to the main timeline, go into a movieclip a few frames down called "portfolio_content" (on a frame labelled "Portfolio"), and to a frame labelled "rapp". No matter what I've tried, I can't seem to target the "portfolio_content" movieclip, even though I've put the instance name on it and everything. I can, using the code below, get the rapp_proj_btn to go to "Portfolio", but I can't get inside that "portfolio_content" movieclip that sits on that frame.

This is the code I use to get to the proper frame:

Code: Select allfunction goRapp (e:MouseEvent):void{
MovieClip(root).gotoAndStop("Portfolio");
}
rapp_proj_btn.addEventListener(MouseEvent.CLICK, goRapp);

I tend to get an error describing not being able to get to an undefined property called "portfolio_content", and to be honest, in AS3, I'm not exactly sure how to go about fixing that error. I've tried calling the "portfolio_content" instance name in the code (right before gotoAndStop), but it doesn't recognize the movieclip.

View 12 Replies

ActionScript 2.0 :: Targeting Button Nested In Another MovieClip

Feb 27, 2008

I built a button, but as a movie clip. It's nested with in another movie clip on the main timeline. How do I go about targeting the button?- when I have it on the main timeline, it works fine. But once it's nested. The action script can't find it.

Here is the code I'm using:

btn1.onRollOver = function () {
this.gotoAndPlay("in");
} btn1.onRollOut = function () {
this.gotoAndPlay("out")
}

View 10 Replies

ActionScript 3.0 :: Targeting Dynamically Created Nested Movieclips?

Feb 17, 2010

I'm dynamically creating movieclips with dynamically created movieclips inside them and am having trouble with targeting them.

Below is a simplified example of what I'm trying to achieve, in the real file there are a lot more movieclips and I'm creating and naming them with a for loop.

This one is just one Sprite created inside another sprite. I can target the top level sprite named "testname". However when i try target the nested MC it throws an error.

The bottom couple of traces are just test MCs I've made to make sure i got the syntax right, on targeting nested movieclips.

PHP Code:

var holder:Sprite = new test1(); 
holder.name = "testname"; 
this.addChild(holder); 

[Code]....

View 5 Replies

ActionScript 1/2 :: Targeting An FLVplayback Component Within A Nested Movie Element?

Oct 24, 2009

I'm trying to get my own buttons to load FLV movies into the FLVplayback component. I've got it to work in a simple test but making it work on a more complex level. The test is here I've named the FLVplayback instance 'my_video'The simple buttons have this script in the actions:

n (release) {
my_video.load("videonamehere.flv");
my_video.autoPlay=true;

[code].....

View 1 Replies

ActionScript 3.0 :: Targeting A Nested Mc Timeline From A Main Timeline?

Dec 30, 2009

I have a main.fla which has 3 movieclips inside it. All 3 mc's have timelines that run 40 frames. The main.fla timeline has each mc instance on a frame. mc_1 is on frame 1 mc_2 is on frame 40 mc_3 is on frame 81 as the main timeline plays the clips each one fades to the other. I need to know how to target this scenerio after mc_3 plays I need to have a goToAndplay (20) set up so the animation inside mc_1 starts playing (frame 20) of mc_1.

View 5 Replies

ActionScript 2.0 :: Setting The Depth Of A Nested Object Higher Than That Of A Non-nested Object?

Jun 24, 2005

As the title says, i would like to have an object which is nested beneath another objects depth set higher than that of one the is NOT nested. Is this possible if so how, may be real easy and im just over-looking it but

View 1 Replies

ActionScript 2.0 :: Targeting A Mc With Within A Mc?

Mar 2, 2006

I have made a navigation that is a movieclip, now within the movieclip are 6 movieclips that are the "buttons" of the navigation. This is then placed on the maintimeline as the movies navigation. When one of the "buttons" is pressed i want it to go to a specific point on one of the 6 movieclip "buttons" timeline. This is the code that I have used before on the maintime line to target a movieclip there... but never a mc within an mc. First, would I still place this code on the maintime? or within the mc that the 6 mc buttons are placed? Second how would I target the nav buttons mc's?

stop();
but1.onRelease = function() {
this.gotoAndStop(9);

[Code]....

View 2 Replies

ActionScript 2.0 :: F8 Targeting Gets Lost

Jan 15, 2009

I've got a dynamic textfield clip which is placed twice on the stage. It also includes a button. Funny thing is, the first trace works (tracing its _y value: 0 for clip 1 and 200 for duplicate clip 2). When I press the down button of both clips however it traces undefined though it's the same line. How does onPress mess up the targetting of both clips? [code]

View 6 Replies

ActionScript 3.0 :: Targeting A Loaded Swf

Nov 11, 2009

1. I'm loading an external swf onto my main swf.
2. Then I'm tweening an object which is separate to the loaded swf.
3. When the tween has completed I'm calling a function to make the loaded swf gotoAndPlay(2);

[Code]....

View 8 Replies

Targeting Label In External SWF?

Feb 12, 2010

I have 2 SWF (swf1 and swf2). I want to load swf 2 into 1, but getting it start on a label or a particular frame.I use this to load SWF 2

Code:

on(release){
loadMovie("movie2.swf",0);
}

How do i target it to start from a label in a scene from movie2.swf?

View 3 Replies

ActionScript 3.0 :: Targeting MC Already Placed On Stage?

Apr 28, 2011

I'm trying to target an MC that is already placed on the stage (as opposed to adding it from the library).

But I get this error:

Quote:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com::Test()
at objects_fla::MainTimeline/frame1()

[Code]....

View 5 Replies

ActionScript 3.0 :: Targeting An Instance Of A Mc?

May 27, 2009

With AS2 I u sed to do  createEmptyMovieClip("name"+i, to create multiple instances of an mc. I ocuuld then target these individual instances

[Code]...

View 4 Replies

ActionScript 3.0 :: Targeting An Event From A Different MC?

Feb 4, 2011

I made a  play/pause button for this project I'm working on (basically a slideshow with a different movieclips on each frame) and I have managed to get it to  target either the main timeline or a nested MC. The problem is with the  code I have is that the button will only work for one MC at a time. This  means I will need a separate play/pause button for each individual  slide. Is there some way to make a button that globally starts and stops  any MC without effecting the main timeline?
 
Here is the code I am using now:
 
stop(); 
pause_btn.addEventListener(MouseEvent.CLICK, stopplaying);function stopplaying(event:MouseEvent):void {    MovieClip(parent).green.stop();    gotoAndStop(2);}
 
Ned proposed adding an event at the beginning of each movie clip and programming the play/pause button to work that way. My problem (after spending a lot of time with it) is that I can't get my play/pause button (a MC itself) to target the event in a separate MC. 
 
This is my event placed on the first frame of my movie clip:
 
dispatchEvent(new Event("imHere"));
  
This is the code I have in the play/pause button that doesn't work:
 
stop(); 
pause_btn.addEventListener(MouseEvent.CLICK, stopplaying);function stopplaying(event:MouseEvent):void {    gotoAndStop(2);}

[Code]....

View 8 Replies

ActionScript 2.0 :: Targeting SWF From Another One In ECard

Jul 31, 2009

I am building an ecard, and I created two swfs. The first swf is the actual ecard, with a dynamic text box that is going to display the message. The second swf is where you would actually type in the information, such as name, email, and message. Is it possible for two swfs to "talk" to each other inside an html document? Also, I am not quite sure how to send the card to someone's email. I am assuming that when you hit SEND it reads the input box with that email, but not sure how that works.

View 1 Replies

Actionscript 3.0 :: Targeting A Mc In A Different Timeline?

Dec 30, 2009

I have a main.fla which has 3 movieclips inside it. All 3 mc's have timelines that run 40 frames. The main.fla timeline has each mc instance on a frame.

mc_1 is on frame 1
mc_2 is on frame 40
mc_3 is on frame 81

as the main timeline plays the clips each one fades to the other.

I need to know how to target this scenerio

after mc_3 plays I need to have a goToAndplay (frame) set up so the animation inside mc_1 starts playing (frame 20) of mc_1.

I know how to do off a button

but there is no buttons, the action needs to happen when the playhead reaches the last frame of the main timeline in main.fla

View 2 Replies

ActionScript 2.0 :: Targeting External .swf's?

Oct 5, 2004

targeting external .swf's.I am trying to load external movies to a main movie in a branched manner (i.e. root -> first movie has buttons to load second -> second movie has buttons to load third) in specific areas on the main movie.

In this simple flash im trying to get the main-button to load onto the main movie. Once it loads, a button appears and replaces the black square. When you click on it a series of other buttons appear on the side and replace the red square. Once those buttons appear, when one clicks one of them a small movie loads into the blue square and replaces it.

View 3 Replies

ActionScript 2.0 :: Targeting Loaded .swf?

May 1, 2003

this code is working to load and position the external swf, but it won't gotoAndPlay to the frame inside the external swf--what am doing wrong here?

PHP Code:

bio.onPress=function()[code]......

View 3 Replies

ActionScript 2.0 :: Targeting Function Within MC?

Jul 14, 2006

I am trying to start and stop an animation from outside of the main timeline. I have written the functions inside the movie to start and stop the animation and they work fine when called from within the movieclip but when I call them from the maim timeline I get nothing. I have checked the targeting is correct and can't think what this is

View 6 Replies

ActionScript 2.0 :: Targeting A Fame?

Jun 19, 2003

i have three MC's 1,2,3 and a button for each of them, on pressing each button it makes the appropriate MC play half way then stop at a frame with a stop action. BUT what i want is to use a if statement something like this

script is on MC1 button

tell MC1 to play ();
if MC2 is at frame xx
tell it to play ();

eles do nothing

View 4 Replies

ActionScript 3.0 :: Targeting A Button Within A MC From Another MC?

Jan 5, 2010

I know what the error 1061 means, but have no idea how to fix it. I've tried to correct it a million & one ways...

Code:
1061: Call to a possibly undefined method getChildByName through a reference with static type flash.display:DisplayObject.

I'm trying to target a button named 'mcTargetButton' (a SimpleButton) that's inside a movie clip called 'mcTargetParent' from a movie clip called 'mcCallFromThisClip'.

Both clips are on the main timeline. Note, I am using a document class... if I trace (this.parent) from 'mcCallFromThisClip' it prints the name of the document class.

[Code].....

how hard should it be to reach a button from a different movie clip?

View 1 Replies

ActionScript 3.0 :: Geo Targeting In Flash?

Feb 23, 2010

Something has come up where we may need to do some geo targeting to deliver different content to a video player based on the client's (as in end-user) location. Basically, we would want to control the delivery based on country. This sounds like a huge, deep topic that I can't even begin to address. Anyone have any thoughts or experience doing this sort of thing with Flash content?

The swf may need to sit on a server we have no back-end access to, so ideally it would be a solution that doesn't require PHP or any other sort of back end...but I'm not sure if that's possible.

View 2 Replies

ActionScript 3.0 :: Targeting MC Inside Of MC?

Mar 12, 2010

I have 10 MC that are generated inside of a for loop. Each MC got another MC inside of it that is already sitting on the stage and has it's own instance ame applied! After that I put them inside of a MC container, that I also add dinamicly through the addChild method! But I have one issue when I want to change the position of the child MC(one that is sitting on the stage), through targetting to it's instanceName! The code I use:

Code:
var box1_mc:Box1 = new Box1();
var ball1_mc:Ball1;
var balls:Array = new Array();

[Code].....

View 1 Replies

ActionScript 2.0 :: Targeting Objects Between Swf's?

Jan 28, 2011

So i have multiple swf's that are within a stage. The main swf (index.swf) has a menu and once clicked it makes another swf to display. A common issue i'm having is that for the other swf's. I have animations which work within that swf but when i run from index they don't work.I know this is because of the targeting of the object but how do make this work?ample on 5.swf i have a button that has an action, when a mouse cursor goes over it a photo fades in and out on it, and that works when i run 5.swf

View 9 Replies







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