ActionScript 2.0 :: Targeting Clips On Layers - Change The Level Dynamically?

Jan 15, 2004

[URL] Theres the example to work with....anyway....as you can see, im loading in movies externally...each on its OWN different level....what i want to do is make it so that when i click a menu option on the left, the current swf loaded on the stage closes and the new one comes up (to avoid the clutter of 10 differnt windows all scattered).....here are my thoughts:

1. have variables on the root timeline that are basically "currentLoaded" and "currentLevel" -- which basically will store the name of the currently loaded swf and the level that its on.

2. each swf would have code on frame one that would see if the 'currentLoaded' varible is blank, and if not...it will close the current loaded swf ....

my dilemma is that i dont know how to change the level dynamically...i know you could do the instance name like this:

[Code]....

View 4 Replies


Similar Posts:


ActionScript 2.0 :: Targeting All Dynamically Attached Clips

Aug 21, 2006

I want to target ALL the 20 clips attached as below, at the same time, when I press the button "blue". However, my code can target only ONE of the clips at any time. I have tried attaching the clips to a separate dynamic clip and then targeting it but problems with the registration point (0,0) of that clip means I cannot achieve the result I want:

Code:
for(i=0;i<20;i++){
mc = this.attachMovie("red","red2"+i,i);
var scaleFactor:Number = Math.random() * 80 + 20;
mc._x = Math.random()*500;
mc._y = Math.random()*400;
mc._xscale = scaleFactor;
mc._yscale = scaleFactor;
blue.onRelease = function(){
new Tween(mc,"_xscale",Strong.easeOut,mc._xscale,200,3,true);
new Tween(mc,"_yscale",Strong.easeOut,mc._yscale,200,3,true);
}}

View 2 Replies

ActionScript 2.0 :: Targeting Dynamically Generated Clips?

Jul 27, 2008

I'm trying to make a flash widget that loads thumbnails from an xml document and have each thumbnail link to a different web page. So far everything works fine but I don't like using _root incase the widget gets loaded into another swf. In my expereice _lockroot dosen't always work.the line highlieted in red will only work if targeted through root as opposed to all my othere reference to ["placeHolder"+i] which use this.["placeHolder"+i]. I've tried _parent, this._parent and adding lots of other _parents. Nothing will work this is the file structure _root.placeHolder'N'.tn_mc. how I can substitute _root for a relative path.

widget_xml = new XML();
widget_xml.ignoreWhite = true;
widget_xml.load('flashWidget.xml');//path to document

[code].....

View 1 Replies

Actionscript 2.0 :: Change Level Of Movie Clips?

Jul 29, 2009

I wanted to know if there's any command that let's you bring in front target Movie clip or Move it at the end...

Also Is there any command that pauses the proccess of the script and another that let's you continue?

View 3 Replies

ActionScript 3.0 :: Targeting A Text Filed One Level Above?

Feb 1, 2012

I have a txt field in my main.swf that i want to target.I'm importing another.swf into main.swf that has a menu and dynamic content from xml.This is how i successfully load the text to bodyTxt text field in another.swf

PHP Code:
bodyTxt.text = xml.link[pict].@pgText;

i can't get the text to load into a different text box in the main.swf from the imported another.swf?

View 3 Replies

ActionScript 3 :: Level Of MovieClip - Moving Action Layers?

Aug 9, 2011

When creating some extended MovieClip to the stage using AS on Actions of some frame, on which layer this MovieClip is created? On layer where Actions were? If I wanna move it down, for example, can I simply move the Actions layer? And by the way, one more question, what if I would not create Actions layer and write all the code on some used one?

View 2 Replies

Actionscript 3 :: Are There Any Resources Specifically Targeting Which Offer Level Of Complexity

Jul 22, 2011

Today I came across this question and I now have a sudden urge to find & complete similar challenges for ActionScript 3.Are there any resources specifically targeting AS3 which offer a level of complexity similar to the above? It'd be great to start really pushing the limits of my ActionScript skills.

View 3 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 3.0 :: Accessing Clips Inside Clips Of Dynamically Generated Clips

Jan 15, 2009

For loop generates clips containing clips. I need to access a specific clip (look_back) within the parent clip generated by the loop. Not sure how to do this.[code]

View 1 Replies

ActionScript 2.0 :: Targeting The Movie Clips?

Jul 29, 2006

I've just finished the navigation buttons in my flash movie which take the viewer to the different sections of the site by directing the playhead to the right frame label. I've used the following code to do this:

on (release) {
this.gotoAndStop("info");
}

I have a problem though: I've also created a movie clip animation where two rectangular shapes move in simultaneously from the left and right sides of the stage creating a sliding door effect. When the viewer is in a particular section (frame) and they use one of the nav buttons to go to another section, I'd like for this animation to play (giving the effect of sort of closing a particular section) and then having another movie clip where the sliding doors open up in the incoming section to reveal that section. My problem is that I don't know what actionscript I'd use to achieve this. What code would I use on the nav button to make the first sliding door movie clip play, then have it move to the second sliding door movie clip and then finally go to the section labelled on the nav button.

View 5 Replies

ActionScript 2.0 :: Targeting Movie Clips?

Feb 25, 2002

Ok, here's the deal. I have a MC in a MC, but i want to target the middle MC.MainStage -> Clock -> clock(art)there is a button on "clock(art)" i want it to target "Clock" to animate. i know the root function should target the mainstage...how can i target that middle MC?

View 3 Replies

ActionScript 2.0 :: Targeting Movie Clips From Buttons Within Other Mcs?

Feb 27, 2010

I'll try and make this as clear as i can, so as not to waste your time. I think it's something really simple i'm just missing...On the main timeline, i've got a movie clip ("mc_A") that contains two other movie clips ("mc_1" and "mc_2").at the end of it's timeline, I put a button in "mc_1" to play "mc_2". I'm using

on (release) {
telltarget ("_root.mc2") {
play () ;

[code].....

View 1 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 2.0 :: Targeting Children Movie Clips?

Jan 23, 2009

I have main MC when press it opens up and then has buttons in that MC.if main_MC is open then press it again will close it. Problem is I need to target the buttons inside main_MC but I can't cause it targets main_MC and thus closes the MCI tried doing main_MC.sub_MC.onPress = function ...... but it still targets the main_MC.

View 4 Replies

ActionScript 2.0 :: Targeting Attached Movie Clips

Dec 13, 2005

I'm having trouble figuring out how to target a series of movie clips i'm attaching to my movie.I'm loading some xml for a slideshow and i'm generating a series of dots at the bottom of the screen to indicate how many steps are in the slideshow and the circle is meant to highlight your current position as you step through the presentation.the MC for the dots is two keyframes with a different color and a stop action on each frame.
Here's the rundown of the code:

1. There's nothing weird here, i'm just bringing the xml in [code]

2. Here is the loadXML function i reference in the xml.Data.onLoad above:[code]Okay so now i have some dots with the instance names, step0, step1 etc. right? And at the end of my loadXML function you see the firstImage(); function. This is where my problem is, how do i target the first (step0) instance? I have no problem when I write "step0.gotoAndStop(2);" but I need to figure out how to use a variable to keep moving it along when i make my next and last functions for the slideshow.

3. Here is the firstImage function:[code]how do i target the step the same way i target the image? do i have to go back and do something in the loadXML for loop?[code]

View 2 Replies

ActionScript 2.0 :: Targeting Dynamic Clips In Array?

Jun 29, 2006

I made an array containg 3 clips and dynamically attached them to my main timeline. I can successfully tween all of them with the following code.

Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;

[code].....

View 2 Replies

Combine Multiple Movie Clips On Different Layers

Oct 2, 2011

I'm making a simple drag-and-drop style dress up game, and I want to know if it's possible to combine multiple movie clips on different layers so that they can be gragged as a single object in the game, but retain their seperate layers. For example, if I make a hat and I want the front part of the hat to be on a layer above the doll base's head, and the back of the hat to be on a layer behind it, but the hat has to move as a whole when dragged.

View 2 Replies

Movie Clips - Layers On Root Timeline?

Feb 28, 2010

I have only been using FLASH CS3 for a little under a month. I have messed about with it to create some basic stuff. However recently I started on a bit of a larger project. I 'm by no means an expert in FLASH CS3 or AS3.My problem -I created a .FLA file that has seven movie clips on the main timeline, each in its own layer. These are listed below in the order they appear within the main time line.

layer ------------ movie clip
ON -------------- on_mc
RIM ------------- rim_mc
NAV-------------- coverbase_mc
PLAYER---------- player_mc
MAIN------------- main_mc
NAMEBOX------- shellname_mc
BASE------------ Base_mc

The art work for these was all imported from adobe photoshop. They all only have one frame on the main timeline. Each movie clip though has its own internal time line and some have further nested movie clips within them.The issue occurs within the NAV layer/coverbase_mc. I placed a movie clip(to act as a button) within coverbase_mc. This movie clip is called navbut_mc.Now, I already have a couple of similar movie clips, that act as buttons, in on_mc and rim_mc these work as I intended them to. However navbut_mc does not work at all in its current position. I get no errors at all on testing the movie but the action that I want it to do does not work even buttonmode = true; will not work on it.

However, if I use the same movie clip in the rim.mc, but obviously give it a seperate instance name (start_mc), then it works as intended. I have looked at various diffrent things but have to admit i'm stummped. Its almost as if when its in coverbase_mc its being hidden by the clips above it, if thats possible.The reasons I need it to work in coverbase_mc are for a) the overall look of the project b)I have some other buttons in that location that need to work from there.

View 1 Replies

ActionScript 2.0 :: Only 255 Layers Per Movieclip In Which To Put Movie Clips?

Mar 26, 2005

I have a game that im making and i was wonder if i wanted to attach 1000 bullets to a movie clip would it work?

View 1 Replies

IDE :: Targeting Multiple Movie Clips In Motion Tweens?

Apr 2, 2009

I am trying to target multiple tweens, trying to turn their visibility false/true. I have named each tween in the tween properties box, and I have targeted them like this: plane.plane2.tween1._visible=false (and so on), but no go! Only the first of the seven is actually affected--the others are not.

View 11 Replies

ActionScript 3.0 :: Targeting Movie Clips - Go Back And Alter Appearance

May 28, 2009

I have created several movie clips in a loop.

[Code].....

After they are added to the stage I later want to go back and alter their appearance. I am having difficulty targetting them:

[Code]...

View 3 Replies

ActionScript 2.0 :: Not Enough Layers - Group A Large Amount Of Movie Clips?

Mar 5, 2005

I'm making a game where missiles are created using the duplicateMovieClip thing and I've used it a lot before, but i never noticed that there is a limit to the number of layers, around 256, I think. The problem is that i have a bunch of sprites in my games and each of them move(i.e. fire,smoke,shrapnel from rockets,etc) so is there a way to group a large amount of movie clips so that they're on one layer, without putting them into another movieclip? If u want look at a part of my game, well two parts.

View 3 Replies

ActionScript 2.0 :: Dynamically Targeting A Path From A MC?

Jun 23, 2009

I have a function and some textfields within a movieclip, and I need to reference those textfields dynamically. This worked when I'd had the TFs on the stage, but not since I've placed them in an MC.The TF naming convention works out to this:

Code:
t_t1c1r1
t_t1c2r1
t_t1c1r2

[code]....

So, to access them dynamically, I combine the letters with index numbers to be gotten through the function's arguments.

Code:
this['t_t1c'+i+'r'+ii].text;
Object(this)['t_t1c'+i+'r'+ii].text;

The numbers represented by "i" and "ii" are coming through fine in trace, but the path is still wrong. I've tried different combinations of _level0, etc., but it only works in my testing when I make an absolute reference to the field (e.g. Object(_level0.mc_instance)['t_t1c'+i+'r'+ii].text which is not a viable solution).

View 1 Replies

ActionScript 2.0 :: Dynamically Targeting A Path From An MC

Jun 23, 2009

I have a function and some textfields within a movieclip, and I need to reference those textfields dynamically. This worked when I'd had the TFs on the stage, but not since I've placed them in an MC.The TF naming convention works out to this:[code]The numbers represented by "i" and "ii" are coming through fine in trace, but the path is still wrong. I've tried different combinations of _level0, etc., but it only works in my testing when I make an absolute reference to the field (e.g. Object(_level0.mc_instance)['t_t1c'+i+'r'+ii].text which is not a viable solution).

View 1 Replies

ActionScript 2.0 :: Targeting Layers - Make "Text"-layer Invisible When Start The "Turn Page"-animation

Nov 24, 2011

I'm making an interactive book and I would like to make my "Text"-layer invisible when I start the "Turn Page"-animation. It's either that, or I'm gonna have to put a code for EVERY 23 MoveClips with the Texts in them, since I'm using the same "Turn Page"-button.

View 2 Replies

ActionScript 2.0 :: Targeting A MC Inside A MC With A Dynamically Generated Name?

Nov 26, 2009

I'm trying to target a movieclip inside another movie clip which I have dynamically generated the name.

ActionScript Code:
firstText = "text" + randomNum;
_root[firstText].gotoAndStop(9);

[Code]....

The first part works, I can "firstText" and I can make it go to frame 9 and stop but I can't manipulate the movie clip "title_txt" which is inside "firstText"

View 2 Replies

ActionScript 2.0 :: Targeting Dynamically Loaded Swfs?

Mar 21, 2006

Having trouble targeting movieclips in a dynamically loaded swf. (Flash 8, Actionscript 2).I have a swf file, which contains a set of duplicated movieclips, that I am loading into another swf file (using the movieClipLoader() class), basically like this: "swfA" is loading into "swfB", and I have clips 1, 2, and 3, inside "swfA."I don't seem to be able to mouseover and click clips 1, 2, and 3, when "swfA" is loaded into "swfB". But when I run "swfA" on it's own, the clips are active and clickable.I've tried setting "this._lockroot = true;" at the top of "swfA", and tha in the duplicating script, but still no luck targeting the clips.I usually execute the duplicating script on the main swf (swfB), but I wanted to contain everything in a swf, thinking it might be simpler. But the targeting problem has me scratching my head.

View 1 Replies

ActionScript 2.0 :: Dynamically Targeting Properties Of An Object

Aug 30, 2006

I have an object that has properties that are numbered numerically but I cant seem to access them dynamically.[code]

View 3 Replies

ActionScript 3.0 :: Targeting A Button Inside Dynamically Loaded SWF

Jun 4, 2010

I have a main.swf which loads a sub.swf. Inside the sub.swf is a button instance (myBtn). How do I access myBtn from main.swf timeline?

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







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