ActionScript 2.0 :: Targeting MovieClips As Vars From Main Frame?

Nov 4, 2011

I have the MovieClip named dessin, which loads another MovieClip named dessin (dessin.dessin). Now, there is a MovieClip named displayPlane, in the new MovieClip (dessin.dessin), in the MovieClip named displayPlane, there is a variable, which goes as follows:

Actionscript Code:
var _loc3 = displayPlane.attachMovie("displayNode", "displayNode_" + projectCount, projectCount);

inside that clip, there are multiple MovieClips in vars, I am trying to specifically target one var, the following:

Actionscript Code:
var _loc8 = this.attachMovie("closeBtn", "closeBtn", 5);

I have tried this code to target that specific MovieClip with no success.

Actionscript Code:
_root.dessin.dessin._loc3._loc8

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Targeting The Main Timeline From Within A MC?

Feb 3, 2011

I have this project that will basically work like a slideshow. I am trying to do things the right way and avoid scenes so I am building each slide as a separate mc and then placing them on the main timeline. What I'm trying to do is get the playback head to advance to the next frame on the main timeline once the mc reaches its last frame. I have found code that works but it seems pretty ghetto:
 
var _root:MovieClip = MovieClip(root)
stage.addEventListener(Event.ENTER_FRAME, text2);function text2 (myevent:Event):void { _root.gotoAndStop("slide2");}

I guess I have two basic questions:

1. What is the proper way to target a frame on the main timeline from within a mc in as3?

View 6 Replies

ActionScript 2.0 :: Tell Targeting A Mc On Main Timeline?

Jun 30, 2004

i have a problem with tell targeting. basically i have two mc on the main timeline and one(MC1) has a button burried in it. i want that button to tell the other mc (crystal) to play a label "editions" inside it.

my code is:
on (release) {
_root.crystal.gotoAndPlay("editions");

[code]....

View 1 Replies

ActionScript 2.0 :: Tell Targeting An Mc On Main Timeline

Jun 30, 2004

i have a problem with tell targeting. basically i have two mc on the main timeline and one(MC1) has a button burried in it. i want that button to tell the other mc (crystal) to play a label "editions" inside it.[code]but it only works when the crystalMC is on the first frame of the root.is there a way of telling the root to move to the position of the first mc and then play a label inside that mc?

View 1 Replies

ActionScript 3.0 :: Targeting A MovieClip On The Main Stage?

Jul 12, 2010

on MC2's timeline I want to target objects on the main stage. Not sure on how to write that without using root. I've been trying deviations of
 
MovieClip(parent).MovieClip(parent).mcName.

View 3 Replies

ActionScript 2.0 :: Targeting Main Timeline From AttachMovie?

Nov 18, 2008

I'm working on this project, where i attach movies to an empty movieclip. In these attached movies, i have a button that needs to target a function on the main timeline. Example:

on the main timeline, i have an action that loads a bitmap onto the background: loadBitmapSmoothed("background.jpg",bg_con); On the main timeline, i also have a button with following action:

on(release){
this.mc_holder.attachMovie("MC_products",1);
}

Then, in the attached movieclip i have a button that needs to swap the image previously loaded into the 'bg_con'-movieclip, like thus:

on(release){
_root.loadBitmapSmoothed("product_1.jpg",bg_con);
}

For some reason, this doesn't work. I've also tried using _level0. but nothing happens.

View 5 Replies

ActionScript 3.0 :: Targeting Code Placed Movieclips?

Oct 14, 2010

I am still sorting out how things translate to AS3 so here it goes:
 
In the land of AS2:
 
Say you for looped 5 times and placed movieclips on the stage (attachMovieClip) each one having an mc inside called box_mc. You named them in the loop mc_1, mc_2, mc_3, mc_4, mc_5.Then later you wanted to rotate that box in them you could for loop again and target/rotate the box with a line like this:

this["mc_"+i].box_mc.rotation +=5;

Now in the land of AS3:I place 5 movieclips using addChild and the way I later target the box_mc inside them is to use two lines something like this:

[code]...

I know this method works, but is this the most efficient/correct way of doing this? I tried to get to the box_mc level when assigning the targetMc var, but never found a way that didn't error.Compounding question, how do you make an old line of AS2 work in the AS3 world like this:

this["mc_"+i]["child_mc_"+j].box_mc.rotation +=5;

View 11 Replies

ActionScript 2.0 :: Targeting Different Movieclips With A Variable?

Apr 7, 2010

On my stage, I have a bunch of movieclips with sequential instance names ("toggle1", "toggle2", etc.). I also have another bunch of movieclips, each with their own sequential instance name ("name1", "name2", etc.).How can I set it so that when I click on a "toggle" movieclip, a specified property changes on the "name" movieclip with the same number.Here's what I have so far.

ActionScript Code:
for (var i = 1; i <= 16; i++) {[code]....

What am I missing/doing wrong?

View 1 Replies

ActionScript 3.0 :: Targeting Movieclips On Stage?

Apr 19, 2010

before it was just
somemc._x = someotherMc._x
but as3 doesn't know how to identify someotherMC

[code].....

View 5 Replies

ActionScript 3.0 :: Targeting MovieClips From A Class?

Mar 3, 2010

how to target MovieClips from a class. If I have a MovieClip on the stage named recMc and I want to manipulate it using a class, I know that if I attach my class in the Document Class field in my .fla file and then just do something like this... it works

- class and fla are in the same folder -

Code:
package {
import flash.display.*;
import flash.events.*;

[Code]....

how to target this object without attaching the class to the Document class?

View 4 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 3.0 :: Targeting Individual Movieclips Created From Xml?

Nov 19, 2009

Im creating movieclips based on the items in an xml file. It pulls the data in ok, and loads in an image from the given description, and poisitions the clips ok.

Where i'm falling down its assigning button functions to these clips. I can not reference the clips indivually it always refers to the last clip created.

code sample below

files attached also

// Import Classes and Tweening
import gs.*;
import gs.easing.*;
import fl.motion.easing.*;

[Code].....

View 1 Replies

Actionscript 3 :: Apply Property To All Vars Or MovieClips?

Jan 20, 2011

how, to apply a property of a var to multiple vars at once. I'm making a point-n-click game where i want to apply the buttonMode property to multiple variables (of MovieClips).

I don't know if this is even possible or how simple or advanced this is, but it would be damn handy.

I have searched on Google and this site for a possible answer, with different search terms/keywords, but can't find anything close. I also tried different things with an asterisk such as *.buttonMode = true and movieClip.*.buttonMode = true but no success.

View 1 Replies

ActionScript 3.0 :: MovieClip With Button On Main Timeline - Targeting Root?

Oct 31, 2011

If I have a movieclip on the main timeline, and a button in that movie clip. How would I go about getting it to advance the main timeline to its next frame? I understand that in AS3 movie clips are not connected to the timeline in the same way as they are in AS2 but I dont understand why the following works, or if there is a better way?

stop();
next_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent) {
MovieClip(this.root).nextFrame();
}

View 2 Replies

ActionScript 3.0 :: Way Of Text Field Are Targeting Is On Main Time Line?

Feb 2, 2010

I received an AS file from an outside source and I want to understand the what MovieClip(root) is doing? I know there is a movieClip on the stage called "field" and with in it a dynamic text field called "txt" and that this text field is being tied into a css class. But I don't quite get the MovieClip(root) part.Is this just a way of saying that the text field you are targeting is on the main time line? [code]

View 9 Replies

ActionScript 3.0 :: Targeting Label Inside MovieClip On Main Timeline

May 2, 2011

How to target a label within a movie clip on the main timeline, from a button within another movieclip on the maintimeline.

View 0 Replies

ActionScript 2.0 :: Targeting Sections In Main Timeline From Separate Menu SWF?

Jan 16, 2006

[URL]

I made a site, but the menu isn't loading properly. If you reload the page the menu loads, but not sure why not loading every time.

Right now menu and site sections in main SWF file. Maybe I put the menu into a separate SWF file it would load properly?

If the site sections are in the main SWF timeline, then how do I do the actionscript for the menu buttons?

Ie)
menu in level7
main site in level0
site sections are "product section", "about us section", "glossary section" on main timeline

So I'm not loading any SWFs, just moving between sections on main timeline.

View 2 Replies

ActionScript 2.0 :: Targeting AS Generated MovieClips Instance Names?

Oct 2, 2006

Right check this:

/////////////////////////////////////
/////////////////////////////////////
///////////////FUSE//////////////////
/////////////////////////////////////
import com.mosesSupposes.fuse.*;

[code]....

But the problem is the thumbMov movies will obviously have a uniquely generated instance name i cant target directly due to the "for" loop..How can i modify what ive done to target any of the thumbMovs with the FUSE functions?

View 3 Replies

ActionScript 2.0 :: Targeting Dynamic Movieclips For OnPress Actions

Aug 15, 2007

I'm generating movieclips based off of an xml file. The images load fine but I can't figure out how to target them for onPress actions.

[Code]...

View 4 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 3.0 :: Create A Global Vars On The Main Timeline And Change It Within Another Movie Clip

Oct 28, 2009

I need to create a global var in AS3 so that I can create the var on the main timeline and change it within another movie clip.

View 3 Replies

Actionscript 3.0 :: Access/refer Funcs & Vars Main Swf And Loaded Swf Vice Versa?

Jul 4, 2009

i have a loader.swf contains important functions and variables that loads 10 external swf-s (site compontents) in a container MC, those external swf-s also have some important functions and variables.my problem is that i don't know how to access the variables and functions declared in the main swf ( loader.swf ) from the loaded swf-s.so the hierarchy looks like:

Code: Select all
main swf ( loader.swf )
childAt(0)  ( container MC )[code].........

1. ( for example ) : how can I access/refer the functions and variables declared in the "main swf" ( loader.swf ) from the "2. loaded swf" ?

2. how can i access/refer the functions and variables declared in the "2. loaded swf" from the "1. loaded swf" ?

View 14 Replies

ActionScript 2.0 :: Fmx - Targeting A Movie In A Different Frame?

Jun 4, 2003

I am curious if it is possible without using some other kind of language to target a movie that is located in the same html file, but in a different frame?

Basically lets say my one swf files is a navigation bar. I then have other frames in the html file and when i click a button i want it to goto a frame in a different swf file which is in a different frame. Do i have to do a getUrl call? or is it different because is it an swf file?

View 2 Replies

ActionScript 3.0 :: Targeting Labeled Frame From Xml?

Jan 26, 2010

how do I target the labeled frame in my main timeline. this is my xml code

<?xml version="1.0" encoding="UTF-8"?>
<menu color="0x000000" font="Tahoma" size="20" rolloverColor="0xFF0033" clickColor="0xFF0033" >

[Code]....

View 1 Replies

ActionScript 3.0 :: Execute Functions In Main Document Class When Main Timeline Reaches Frame X

Oct 16, 2009

I have 3 functions in my main document class that I want to execute when the main timeline reaches a particular frame number. how do I do that?

see the code and comments

public function mainClass()
{
//stage declaraction
stage.align = StageAlign.TOP_LEFT;

[Code]....

View 5 Replies

ActionScript 3.0 :: Targeting Frame Label In An External Swf?

May 14, 2010

I have 2 swfs. One called "loves.swf" that contains 4 buttons. When you click on one of the buttons, it opens up an with an external swf, called "about_loves.swf". I would like to make each button go to a different frame labeled in my external swf. Currently, when you click on any button (btn1, btn2, btn3, btn4), they just play frame 1 from the external swf, "about_loves.swf".I would like btn2 to play frame 2 of "about_loves.swf", btn3 to play frame 3 of "about_loves.swf" and btn4 to play frame 4 of "about_loves.swf".here is my code so far:

// these two lines are needed only once, so here they are:
import local.display.ShadowBox;
ShadowBox.initialize(stage);

[code].....

View 2 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 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 Nonnative Frame Labels?

Nov 28, 2003

Targeting nonnative frame labels?

[URL]

View 4 Replies

ActionScript 2.0 :: GetURL And Local Frame Targeting In FP9

May 31, 2007

I have a two frame page - the left frame is a custom flash Tree object that parses a number of IMS-compliant manifests (basically an XML tree menu structure) and the right frame displays the href of the tree object that is clicked. If i run this from a server, it works fine and displays all links in the right frame. But if I run it from a local or network drive it opens all links in _blank.

Adobe have a technote on the new allowScriptAccess and getURL in FP9 [URL] but dont mention anything about this issue (that i can locate). I also cannot see how opening all pages in _blank can fix any "security" issues. Can anyone confirm that targeting html frames locally via getURL under FP9 is now not possible or has been changed? or is this a bug (sorry - undocumented feature)?

View 1 Replies







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