Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Targeting Movie Clips


hello, i'm trying to change the scale of a movieclip with a button, and that works fine, but how can i make the button check to see the size of the clip? would it be somthing like:

on (release) {
if (_root.XmovieclipX._xscale > 640) {
_root.sizes = "2";
} else {
_root.sizes = "0";
}
}


naturally this script dosn't work for me, am i targeting it wrong?

thanks in advance




FlashKit > Flash Help > Flash ActionScript
Posted on: 02-28-2002, 12:01 PM


View Complete Forum Thread with Replies

Sponsored Links:

Targeting Movie Clips Inside Of Movie Clips
I am a AS3 newbie and am working on an animated cell phone text demo for my company's web site. I have three phones, each are a movie clip with a time line animation. The three phones are all inside of another movie clip where I animate their intro. I have a stop on the first frame of each of the three cell phones so that their screens are static as they fall into place. Their animations begin on the second frame of each of their respective time lines, and I would like the animations to begin when the phones are clicked. I'm not sure if these clips should be targeted from the main time line with the rest of the global script or if it should be on the time line of the nested MC. Even if I knew where to put it, I'm not really sure exactly what the script should be. Please help! My boss wanted this done last week!!!

View Replies !    View Related
Targeting Movie Clips
Can someone please help me!!! I am trying to link between a button and two html frames. I have figured out how to load the flash files into each html frame, but I cant seem to target the appropriate movie clip. I have tried to use tellTarget, loadMovie, getURL and also gotoAndPlay, but I can't nut it out. I'm sure it's probably something simple, but I just can't figure it out.

The html frame I'm trying to load the clip in is called "header.html", the button I'm trying to load from is located in a separate frame called "nav.html", the swf file is called "header.swf" and I'm trying to load a movie clip called "melb_tours_clip" or the frame name of "melb_tours" but it keeps loading the first frame of the "header.swf" which contains a "home_clip". The scipt i've most recently used is below.

on (release) {
getURL ("melb_index.html", "content");
getURL ("header.html", "header");
tellTarget ("melb_tours_clip") {
}
}

All the lines work except for the tellTarget line.

Please help me

View Replies !    View Related
Targeting Movie Clips
I'm having trouble getting variables to show in my flash movie. I've gotten the variable to load using loadVariables and they show up in the variable output of the debugger. I'd like to target them to a movie clip that has three text fields in a row and then repeats them as it moves through the array.
Here's that code
for (cIndex=0; cIndex<djoutput.length; cIndex++) {
mc_artisttable.duplicateMovieClip("djmc"+cIndex,cI ndex);
this["mc"+cIndex]._y = 0+(mc_djeditable._height*cIndex);
this["djmc"+cIndex].artistname = djoutput[cIndex];
this["djmc"+cIndex].genre = genreoutput[cIndex];
this["djmc"+cIndex].id = idoutput[cIndex];
}
I just can't seem to get the variables into the text boxes in the artisttable mc. Should they be dynamic w/ artistname, genre, and id as the variable, or should they be smart clips. any help would be greatly appreciated.
-Mike

View Replies !    View Related
Targeting Movie Clips?
I'm a bit new to flash and could use some help.

I'd like to use an if/else statement to target different frames in a movie clip. I created an instance of the desired movie clip in frame one on Stage1. I would think the code below would work in frame one, but it doesn't:

if (strTest=="products") {
gotoAndPlay("MovieClip1", 20);
}
else if (strTest=="design") {
gotoAndPlay("MovieClip2", 20);
} else {
gotoAndPlay(2);
stop();
}

I'd rather not create separate scenes if possible, but that's the only way I know how to do this.

Thanks for any help!

- Josh

View Replies !    View Related
Targeting Movie Clips
hey just wonderin how do you target movie clips that are several movie clip layers deep - what is the syntax for doing this??

View Replies !    View Related
Targeting Movie Clips
I am having a problem targeting movie clips at diffrent levels. I have a movie clip(menu) on level two with buttons in it that calls a movie(page loader) to the root level. On frame 15 of the page loader movie I call up another movie(section) which I cannot load. I am probably not targeting it right, any sugestions would be most heplful.

View Replies !    View Related
Targeting Movie Clips
Hello there. I need a bit of help with a hurdle I’ve encountered. I have a movie clip loading in on the first frame of the main time-line and am using script to randomly load in one of the images within it. However, I’d like to be able, once it’s loaded in the random image, to scroll through the images using next & previous buttons that are in a separate movie clip.
I’ve attached a file so you know what I’m bleating on about.

View Replies !    View Related
Targeting Movie Clips
Hi all,

I am designing a site, which basically uses the technique of loading swf's into a main movieclip, I want the swf's that are loaded in the main movie clip to animate in and out. I found out how to do this using a variable 'next movie' which loads the appropriate swf into the movieclip as the previous Swf is animating out, you'll see if you look at the Fla's i have attached.

The problem I have is that as the current Swf is animating out, it should call the next swf but doesn't, the best thing is to look at the files, the 2 buttons I am using are company and Projects, which link to the swf's Company.swf and CLC.swf from Base.swf.

Somebody please help me!!!

Thanks

View Replies !    View Related
Targeting Movie Clips
Hi

At last i managed to get movie clips stack on top of each other, but now a new problem. Please have a look at my test site: http://www.koosha.com/m/

The code works for buttons on the stage and not for the buttons inside other clips. This is the code for the red button for example:

red_btn.onPress = function()
{
var someDepth = empty_mc.getNextHighestDepth();
empty_mc.attachMovie("red" , "redup", someDepth,{_x:200,_y:100});
trace(someDepth);
};

as soon as i move the red button inside a movie clip, it wont work. Any idea anyone?

Regards
Koosha

View Replies !    View Related
CS3 Targeting Movie Clips
This should be really easy yet I am having such trouble with it. I have movie clips that I am using as buttons. So I have movie clip A and have assigned a rollover and rollout mouse event on it. Within that clip A is clip B, and I have a rollover and rollout mouse event on it. Now clip A is also with a movie clip that does nothing but hold a lot of movie clips. Outside of that I can target A to do something, but not B. If I turn off the mouse events assigned to A, suddenly my mouse events for B work. I need them both to work, so that when the movie clip is moused over it reveals another movie clip that I can then press. What am I missing here?

View Replies !    View Related
Targeting Within Movie Clips
I know this has probably been asked before, but I can not seem to find the right answer. here is my issue, any help would be appreciated.

I have a button and when i click it I want it to go to a specific frame (labelled) in another movie clip (outside the movie clip the button is in).

So basically the script I have for it is:

_root.Movieclip02.gotoandplay("on")

My button lies here (though I don't think this matters):

_root.movieclip01.button

Movieclip 01 and 02 are on the same level (top/root level) of the movie, just in different frames, so Movieclip01 rests on the top level in frame 01, and movieclip02 rests on the top level in frame 05.

Tried to be as detailed as possible, again your help is appreciated.

View Replies !    View Related
Help Targeting Movie Clips
I'm hoping someone can help me out. I have one scene with two movie clips (both are instances in frame one of scene one). Is something wrong with my syntax below, because when I change the value of "x" it's not going to the correct frame in the movie clip. Thanks!

x=3
if (x=1) {
_root.clipone.gotoAndPlay(15);
} else if (x=2) {
_root.cliptwo.gotoAndPlay(5);
} else if (x=3) {
_root.cliptwo.gotoAndPlay(20);
} else {
stop();
}

View Replies !    View Related
Targeting Movie Clips With Variables
Hi, This has been driving me nuts... i'm currently working on a movie in which you can duplicate objects (movie clips) by pushing a button. these objects are all the same movie clip, but each frame contains a different symbol (i.e., a different object)...

My problem is that when you duplicate the movieclip, i need it to immediately go to the same frame as the parent movie clip. I've tried setting variables based on the _currentframe property, (and then using tellTarget when you duplicate the new movie clip), and that works fine until the button that duplicates the movies resides in a movieclip... i'm assuming that my problem is that when you tell target an expression (to target a movie who's name corresponds to a variable) within a movie clip the variable's location is what's targeted, not the actual location of the movie clip as well... I'm sorry this is so difficult to explain, but i guess if anyone knows of a way to target a movie clip that's named by a variable from within another movie clip, that'd be really helpful...

i was able to work around it by adding an action to the movieclips to set themselves to a variable using the _onload command... that works, but it'd be nice to know if it was possible to do it the other way...

thanks a bunch,

roland

View Replies !    View Related
Targeting Duplicated Movie Clips
Hope someone can help me. I'm trying to target individual MC's that are inside duplicated MC's generated by an array. Is this possible?

thanks for any help!

Ray Boehmer

E-Learning Developer
Cisco Systems, Inc.

View Replies !    View Related
Targeting Multiple Movie Clips
Maybe this is a dumb question, but is there a way to change the properties (specifically _alpha) of multiple instances at once?

Here's my situation. I'm making a map, and there are 188 instances, which all fall into 4 categories. I use a naming convention of category + number. When I click on a category, instead of changing the alpha for 50 or so isntance, I'd like to hit them all at once. Is that possible?

View Replies !    View Related
Targeting Embedded Movie Clips
How do I go about targeting a movie clip that is embedded inside of another, from clicking on a button in a seperate movie clip! phew.... does that make sense? thanks.

View Replies !    View Related
Targeting Movie Clips Headache
Hello, please help...
I have a MC "whitecross" sat within another MC "explodingtxt" and would like to alter the rotation and visibility on rolling over a button (also inside MC "explodingtxt".) I am using the script (which doesn't work):

on (rollOver) {
setProperty ("whitecross", _rotation, 15);
setProperty ("whitecross", _visible, true);
}

Also, how would I target the clip if it were sat inside scene 1 (top level)?

Sorry for being a bit simple...

View Replies !    View Related
Targeting Masks That Are Movie Clips?
Targeting masks that are movie clips???? can this be done. Need to move the masked area of a movie clip when the mouse is in certain areas. The masked area is itself a movie clip. Doesn`t seem to be working but dont know that is because I`ve made a mistake somewhere or its not possible.

yours confused
ash

View Replies !    View Related
Targeting Duplicated Movie Clips
So I'm using the following actionscript to duplicate a movie clip 50 times:

i++;
duplicateMovieClip ("_root.flower", "flower"+i, i);

Is there a way to target these clips?

Basically what I'm doing is duplicating a movie clip of a flower-like object. Then, when it's been duplicated 50 times, I want to wipe the stage clean of all duplicated clips and start again. What can I do to remove all of these movie clips?

View Replies !    View Related
Targeting Movie Clips Using Variables
Hi!

I am currently putting a small game together for viral marketing purposes, and am having a little difficulty targeting a movie clip dynamically.

I need to use a variable as part of the target string.

For example:

_root.targetplayer = mike

then in the button, in a movie clip,

on (release) {
with (("_parent." add _root.targetplayer)) {
gotoAndStop("tackle");
}
}


the aim obviously being for the button to target the movieclip: _parent.mike

I have been unable to get this to work, and it's beginning to drive me nuts! i can only assume i am going about it the wrong way, and as a designer i would really appreciate a programmer offering a little advice!

the question can be summed up once more, as:

how can i target a movieclip without explicitly stating the location of the movieclip, but by using an expression as the target

thanks!

gavin

View Replies !    View Related
Targeting Duplicated Movie Clips
anyone know how to do this....i've been trying really hard and failing.... pleeeeease help someone...i want to target a movie clip("grow") inside some of the duplicated movie clips and tell it to play...

on(keyPress"i"){
//variables
b = random(12);
i++;
a = "leaf" + i

//dupposition
_root.leaf.duplicateMovieClip(a,i);
_root.leaf._y = ypos[b]
_root.leaf._x = xpos[b];

}




on(keyPress"i"){

_root.leaf1.grow.gotoAndPlay("fall");


}

View Replies !    View Related
Targeting Dupplicated Movie Clips?
Hey there.

I am modifying a flash interface, the classix side scrolling one that increases in velocity depending on how far to the edge of the stage ou go on either side.

It works by duplicating the button many times. This is all fine, but how do i now add specific rollvoer actions to these duplicates since they are not actually on the stage where i can edit them?

Not sure how to approach this.

let me know if you do!

thx!!

Stevie Spin

View Replies !    View Related
Targeting Timelines Of Movie Clips
I have three movie clips of a star twinkeling all referring to a base movie clip animation. What I need is to control the timing of each one so that they dont all twinkle at one. I have tried to control the way they play by targetting them in all different ways but can seem to manage it.

Also they all need to start staight away but at different points along the animation.

It is driving me nuts any help would be fantastic thanks

View Replies !    View Related
Targeting Duplicated Movie Clips
I'm duplicating a movie clip using the following code:

i = 1;
do{
my_mc.duplicateMovieClip("my_mc" +i,i);
i++;

}while (i < 50);

The next thing I want to do is line them all up side by side, so what's the best way to target all the duplicated movie clips so I can re-set their _x and _y coordinates?
Sorry if there are loads of posts on this already but my browser kept timeing out every time I tried to search.
Many thanks.

View Replies !    View Related
Targeting Frames Within Movie Clips
Greetings,

I am using Flash MX 2004 professional

I need some help with a project.

I have a root timeline that contains 2 frames. Each frame is labeled and in each frame there is a movie clip.

Within each movie clip I have two buttons. One to move forward on the root timeline and one to root backward on the main timeline.

What I want to be able to do is go from inside one movie clip (the one on frame 2 of the root timeline) to a specific frame inside the movie clip that is placed on frame 1 of the root timeline.

I tried to label the specific frame within movie clip 1 (frame label "slide1" on the root timeline) with the name "backslide" and then in movie clip 2, I used this script at the end of that movie clip timeline:

_root.gotoAndPlay("slide1","backslide");

This did not work. I tried a number of different ways but either it would just go to the beginning of slide 2 and play it over again or it would go to slide 1 and start from the beginning rather than from the frame I wanted it to start at.

Is there a way to do what I am trying to do?

thanks for your help
peace
cc
<><

View Replies !    View Related
[F8] Targeting Movie Clips Within Components
I've got a component which draws maps. I am able to provide custom maps in the form of movieclips with the map image dropped into the clip. The component has a parameter which allows you pass in the value of the custom map clip. I wish to have several different maps available, each stored on a different frame in the custom movieclip.How can I change the code so that by clicking on buttons I'm able to change the frame number of the custom movie clip which is added dynamically to the component?

The custom clip is added using attachMovie to an EmptyMovieClip, therefore it does not have an instance on the stage, just a name. How do I target it?

I'm using Flash9 with AS2 for compatability.

View Replies !    View Related
[f8] Targeting Individual Movie Clips
Hi,

I'm making a demo movie that contains several Movie clips that animate down the stage and contain a button with an over state and a nested movie clip for a text effect.

I want to target the individual Movie clips so that they Stop movement on MouseDown and Play on MouseUp.


The code is as follows:
I can accomplish it for one Movie clip, but the action also affects the other clips simultaneously.

How do I discreetly address the individual Movie clips without affecting the others?

Thanks ahead of time for the help.

View Replies !    View Related
[f8] Targeting Individual Movie Clips
Hi,

I'm making a demo movie that contains several Movie clips that animate down the stage and contain a button with an over state and a nested movie clip for a text effect.

I want to target the individual Movie clips so that they Stop movement on MouseDown and Play on MouseUp.


The code is as follows:

onClipEvent (mouseDown) {
this._parent.TAPmover.TAP.onMouseDown = function(stop) {
};
stop();
}
onClipEvent (mouseUp) {
this._parent.TAPmover.TAP.onMouseUp = function(play) {
};
play();
}


I've attached the .FLA for review.

I can accomplish it for one Movie clip, but the action also affects the other clips simultaneously.

How do I discreetly address the individual Movie clips without affecting the others?

Thanks ahead of time for the help.

View Replies !    View Related
Targeting Nested Movie Clips
I have a menu that attaches movie clips to an empty holder movie clip on the stage. Using this code:


Code:
this.button1.onRelease = function() {
var swapthedeck:String = "mc1";
_root.attachMovie(swapthedeck, "holder", 20, {_x:1, _Y:1});
enableAll();
this.gotoAndPlay("_clicked");
this.enabled = false;
}
In another area, I'm trying to find that movie clip that was loaded into holder for use in another script. I am currently using this:


Code:
this.control1.onRelease = function() {
control1.gotoAndPlay("_clicked");
var mcInstance:MovieClip = _root.getInstanceAtDepth(20);
trace (mcInstance);
}
However, when I trace the mcInstance, it returns "_level0.holder". This is the right name for the holder, but not the movie clip that was loaded inside of it. Does anybody know how to harvest the name of the movieclip that is present within holder? Any help is greatly appreciated. Thank you.

Rich

View Replies !    View Related
Targeting Movie Clips And The 'if' Statement?
Hi,

does anyone know why the code at the bottom isnt working(the stuff about the mc_bg's...gotoAndPlay ("off")...and ("on")...etc)

- the code is on first frame, main timeline
- all mc_bg's are on seperate layers on first frame, maintime line

Thanks!

Code:
stop();
//setup start stage
var main_selection:Object = null;
_root.waitMC._visible = false;
//setup main buttons
var mcs:Array = new Array("reel", "things", "links", "contact");
for (var i:Number = 0; i<mcs.length; i++) {
var mc:MovieClip = this["mc_"+mcs[i]];
mc.id = i;
mc.onRelease = function() {
if (_level0.main_selection != this) {
_level0.main_selection.enabled = true;
_level0.main_selection.gotoAndPlay("wait");
_level0.main_selection = this;
_level0.preloader.gotoAndPlay(1);
_level0.preloader.gotoAndPlay(2);
_global.containerMC = _level0.containerMain;
_global.containerMC.loadMovie("chapters/"+mcs[this.id]+".swf");
this.enabled = false;
}
};
mc.onRollOver = function() {
this.gotoAndPlay("over");
};
mc.onRollOut = function() {
this.gotoAndPlay("wait");
};
}
if (main_selection=mc_reel) {
this.mc_bg01.gotoAndPlay("on");
this.mc_bg02.gotoAndPlay("off");
this.mc_bg03.gotoAndPlay("off");
}
if (main_selection=mc_things) {
this.mc_bg01.gotoAndPlay("off");
this.mc_bg02.gotoAndPlay("on");
this.mc_bg03.gotoAndPlay("off");
}
if (main_selection=mc_links) {
this.mc_bg01.gotoAndPlay("off");
this.mc_bg02.gotoAndPlay("off");
this.mc_bg03.gotoAndPlay("on");
}

View Replies !    View Related
Targeting Children Movie Clips
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 MC

I tried doing main_MC.sub_MC.onPress = function ...... but it still targets the main_MC.

How do I enable target Children or something?

View Replies !    View Related
Targeting Multiple Movie Clips
I have four different movie clips which serve as backgrounds for externally loaded swf's and a respective button to expand each background (basicaly small windows that expand to big windows. for each mc, frame 1 is collapsed and frame 25 is expanded and then 50 is collapsed again where it goes back to 1. both frame 1 and 25 have stop actions). But i can only have one window expanded a time. so the problem is how could i have 'button 1' close whichever window is currently open and at the same time open its respective window. any of the windows could be open depending on which button was pressed first. Ive tried all sorts of nonsense with if statements and _currentframe property to no avail. my last attempted code is below. thanks in advance for any help, im new at this and completely lost.
- Lac3rta








Attach Code

var bgs1 = bg1_mc._currentframe;
var bgs2 = bg2_mc._currentframe;
var bgs3 = bg3_mc._currentframe;
var bgs4 = bg4_mc._currentframe;


services_btn.onRelease = function() {
if (bgs3 == 1) {
bg1_mc.gotoAndPlay(1);
bg3_mc.gotoAndStop(1);
}
if (bgs3 == 25) {
bg1_mc.gotoAndPlay(1);
bg3_mc.gotoAndPlay(25);
}
if (bgs1 == 1) {
bg1_mc.play();
bg3_mc.gotoAndStop(1);
}
if (bgs1 == 25) {
bg1_mc.gotoAndPlay(25);
bg3_mc.gotoAndStop(1);
}
}

View Replies !    View Related
Targeting Multiple Movie Clips
Hi everyone,

I'm fairly new to ActionScript so I would really appreciate any help I can receive.

Right, I have a Flash file which contains a movie clip with an instance called, 'contentHold_mc'. Inside this movie clip are 4 individual movie clips with instances entitled, 'content1_mc', 'content2_mc', 'content3_mc' and 'content4_mc'. I know these are not the best names for instances, but this is just for simplicty's sake. At present all movie clips run at the same time. I want them to run sequentially. On the last frame of the instance, 'content1_mc', I want to stop the instance from playing and start playing the instance, 'content2_mc'. On the final frame on 'content3_mc', I want to stop the instance from playing and start playing the instance, 'content3_mc', and so on until 'content4_mc' finishes playing. I have tried to use the tellTarget function without success and anyway, I believe this is now deprecated.

Would anybody be able to provide me some guidance please as to how I can achieve the previous using the 'dot' notation?

I have tried the using the code found at the bottom of this message in the final frame of the movie clip instance that I want to play first ('content1_mc'), however get a compiler error because of the preceding two full stops '..'

Thank you in advance for any help I may receive with this query.








Attach Code

stop();

../contentHold_mc.content2_mc.gotoAndPlay(1);

























Edited: 12/04/2007 at 01:02:51 PM by joe_pendlebury

View Replies !    View Related
Targeting Movie Clips Question...
This is really driving me nuts & is probably so very elementary I will say DUH when I find out what I am doing wrong. I have a relatively large swf that I need to load UNDER my interface.

I can get it to load very easily on top of my interface...but unfortunately that is not where it needs to go.

I even tried creating an empty movie clip (dropping it into the first layer) then attempted to load the swf into the target clip...No success

What could I possibly be doing wrong? I know this has got to be easier than it looks!

Janet

View Replies !    View Related
Targeting Attached Movie Clips
I'm having trouble figuring out how to target a series of movie clips i'm attaching to my movie.

Here's the idea:
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:
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("xml/data.xml");
2. Here is the loadXML function i reference in the xml.Data.onLoad above:

Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];

// the total and stepArea vars are used to space the dots. total is also used in a loop.
total = xmlNode.childNodes[1].childNodes.length;

stepArea = (Stage.width/2) - Number(titleBar_mc.stepContainer_mc._x);

// here is where i'm attaching the dots.
for (i=0; i<total; i++) {
//render the step dots
var q = stepContainer_mc.attachMovie("step", "step"+i, i);
q._x = i*(stepArea/total);
q._height = (stepArea/total)/4;
q._width = q._height;
}
firstImage();
} else {
content = "file not loaded!";
}
}
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:
var p = 0;
function firstImage() {

image_mc._alpha = 0;
image_mc.loadMovie(image[p], 1);
//this is where my problem is. 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?
stepContainer_mc.step[p].gotoAndStop(2);
}

View Replies !    View Related
Targeting Movie Clips Question...
This is really driving me nuts & is probably so very elementary I will say DUH when I find out what I am doing wrong. I have a relatively large swf that I need to load UNDER my interface.

I can get it to load very easily on top of my interface...but unfortunately that is not where it needs to go.

I even tried creating an empty movie clip (dropping it into the first layer) then attempted to load the swf into the target clip...No success

What could I possibly be doing wrong? I know this has got to be easier than it looks!

Janet

View Replies !    View Related
Targeting Duped Movie Clips
I'm able to successfully duplicate and load a movie into a duped movie clip, but is it possible to loadMovie into a movie clip that sits inside of a duped movie clip.

I'm having trouble getting it to work.

Here's the code:

ActionScript Code:
box3.boxLoader.loadMovie("intro.swf");


box3 is the duplicated movie clip and so technically boxLoader should be sitting inside that clip and be targetable....right

View Replies !    View Related
I Really Suck At Targeting Movie Clips
I am going to attempt to break this down as simple as possible. Hopefully someone can help me out.

the base movie clip (base.swf) contains primary navigation.
clicking on the primary navigation loads secondary navigation (nav_sec.swf) into a movie clip with the instance name emptyMC_nav. this works.

The secondary nav (nav_sec.swf) contains buttons that load content (content.swf) into a movie clip with the instance name emptyMC_load into the original base.swf movie

This is where I am running into trouble. The secondary nav does not want to load the content.

Any idea where I am going wrong?

Thanks

View Replies !    View Related
Targeting Nested Movie Clips
The setup:
I have two rectangle movie clips named rectMC1 and rectMC2 in the library. In my AS their variables are _rectMC1 and _rectMC2. Within rectMC1 there is a nested movie clip with the instance name nestedRectMC1. Within rectMC2 there is a nested movie clip with the instance name nestedRectMC2.

The problem:
I am trying to check the 2 nested movie clips for collision but I am not sure how to target them in my AS. I have tried the following:

Code:

function checkCollision(event:MouseEvent):void
{
   if(_rectMC1.nestedRectMC1.hitTestObject(_rectMC2.nestedRectMC2)
   {
      do this and that;
   }
         
} // end function checkCollision

However, I am getting this error message:

TypeError: Error #1010: A term is undefined and has no properties.

Anyone know what's wrong?

View Replies !    View Related
Targeting Nested Movie Clips?
Hey everyone, I have a movie clip which is my global navigation, inside that movie I have several other movie clips for further control such as options, thumbnails etc. Well normally in as2 I would just use an _parent and target the nested clip. Not sure what I am doing wrong here but would appreciate some help.
Code:

import caurina.transitions.*;
// cant target the movie inside globalNav movie which is op1  even with like    this.globalNav.op1    it doesnt work
globalNav.op1.addEventListener (MouseEvent.CLICK,minNav);
globalNav.op1.buttonMode = true;
// minimize window
function minNav (event:MouseEvent):void
{
   Tweener.addTween (globalNav, { x:79, y:732, time:1});
}

View Replies !    View Related
Targeting _level0 In Loaded Movie Clips
I am loading some variables into _level0 of a movie clip that is loaded into a symbol. Can I target _level0 of this loaded movie clip, i.e. _root.content.sights._level0, to access these loaded variables' values?

View Replies !    View Related
Targeting Movie Clips And Slider Control
I have a movie that contains a slider. This movie is loaded into another movie clip on the stage, the instance name is "swf_container".
The slider works OK when previewed alone, but not when loaded into the parent movie.
Help my actionscript...

on (press) {
_parent.myPress=true;
startDrag ("", false, _parent.myLeft, _parent.myTop, _parent.myRight, _parent.myBottom);
}
on (release, releaseOutside) {
_parent.myPress=false;
stopDrag ();
}

View Replies !    View Related
Targeting Dynamically-created Movie Clips
Okay, here's the deal, maybe some of you can offer some advice. First, a bit of background:

I'm creating a small application that dynamically creates movie clips, and those movie clips dynamically create their own. Sounds more confusing than it is, but my whole point here is that hard-coding the path in the code isn't going to "cut the mustard", if you will.

SO, inside this movieclip I want to target a subitem and edit properties (rotation, x and y, size, etc) via a series of buttons. Right now I have a variable located in the parent called cur_item. when I click on a subitem, I tell it the following:

_parent.cur_item = this;

Which then gives the parent variable a nice long name, something like _level0.instance_2.item_0, where item_0 is the correct name, so that part checks out.

Where I have the real trouble is in my buttons. The button exists on the parent layer (same as the cur_item variable). I have this script on the button:

on (release) {
this[cur_item]._rotation += 15;
}

When I test the movie and hit that button, the ENTIRE movie rotates 15 degrees!!! I have no idea why that happens. Do any of you?

View Replies !    View Related
Targeting Scenes In Embedded Movie Clips
How do you go about targeting a specific scene in your flash file from within an embedded movie clip? I have a .FLA file with 3 scenes, and within those 3 scenes there are embedded movie clips with various buttons on the clip timelines. I need to set some of those buttons to go to certain frames in specific scenes, and I can't seem to figure out how to do it. Just setting up the "goto" command under the normal mode to target a specific scene doesn't work (it only takes me back to the first frame within that scene), adding the "_root." to the beginning of the script causes the button to do nothing at all. HELP! This one's driving me nuts, and I'm sure it's easy

View Replies !    View Related
Targeting Scenes From Nested Movie Clips
I have a movie with two scenes. In the second scene I have a movie clip containing a button. I want that button to gotoAndStop on a frame in the scene 2 timeline. Is this possible? I can get to scene 1 using with(_root) but I cannot get to scene to.

View Replies !    View Related
Targeting Movie Clips From Buttons Inside Mc's
I have a movie clip in SCENE 1. The movie clip contains a button. I want to use that button to target a movie clip on SCENE 3?
Or from that same button (in the movie clip, which I use to rotate the buttons on stage)in SCENE 1, how do I target a frame in SCENE 3?
I think the changing of scenes is crossing me up.
Thanks
Anthony

View Replies !    View Related
Duplicating Then Targeting Movie Clips...quickie
I want to duplicate a movieclip, then stick the new name of the movieclip into an array AS AN OBJECT so I can refer to it later.

See if you can figure out what I'm trying to do by this code that DOES NOT work:

code:
clipArray = new Array(howmany);
clipArray[0] = choices0;
for (i=1; i<howmany; i++) {
bloop = 'choices' + String(i);
duplicateMovieClip( 'choices0', bloop, i );
clipArray[i] = bloop;
}


What I want is an Array with pointers to (choices0, choices1, choices2... choicesX). What I get is an array full of strings rather than objects.

View Replies !    View Related
[F8] Targeting Dynamically Created Movie Clips
hi everybody,

I am pulling data from an xml and dynamically attaching mcs, that are being populated with data. To create a cool section indicator I am changing the alpha of the selected mc. But to make sure that when a different section is selected I have to change every mc back to alpha 100.

This is what I'm doing right now:

_root.clips_masked.loadClipsInfos["clip_info"+i].btn_vid.onRelease = function() {
_root.clips_masked.loadClipsInfos.clip_info0.box_m c._alpha = 100;
_root.clips_masked.loadClipsInfos.clip_info1.box_m c._alpha = 100;
_root.clips_masked.loadClipsInfos.clip_info2.box_m c._alpha = 100;
_root.clips_masked.loadClipsInfos.clip_info3.box_m c._alpha = 100;
_root.clips_masked.loadClipsInfos.clip_info4.box_m c._alpha = 100;
_root.clips_masked.loadClipsInfos.clip_info5.box_m c._alpha = 100;

etc...

can I target all clip_info mcs at the same time?

Help would be appreciated!

View Replies !    View Related
[F8] Targeting Buttons In Attached Movie Clips
I'm creating a slidshow-type engine and i'm running into problems with targeting buttons in the attached movie from the main timeline of the main movie. Right now there are only two movies clilps to attach. The first movie clip works fine, but when I go to the next movie clilp, it doesn't work. Same when I go back to the first movie clip, the button no longer works. I'm try to keep all my code in one place, I have just added added a few trace commands, so you can tell if the code in the main timeline, or the attached movie is being triggered.

I have attached the file and the code.

I have a feeling that the problem is in either in the "FADE IMAGE AND TEXT" section or the "CONTROL" section.



Code:
/* -----------------------------------------------
-------------- INITIAL SETUP ---------------------
--------------------------------------------------*/
import mx.transitions.Tween;
import mx.transitions.easing.*;
var i = 0;
var sideBarContent = new Array();
var stepTitleContent = new Array();


// Set Movie Title
movieTitle = "XO Communications | How to Read Your Bill";
//--------------------- End Initial Setup




/* -----------------------------------------------
-------------- CONTENT ---------------------------
--------------------------------------------------*/
stepTitleContent[0] = "<b>Remittance Page</b>";
sideBarContent[0] = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam suscipit. Cras tristique, lorem sed aliquam volutpat, mauris diam blandit nisi, ut venenatis odio elit eu dui. Donec ullamcorper risus elementum elit. Morbi blandit dolor. Ut leo mi, convallis vel, dapibus et, pellentesque vitae, nisl. ";

stepTitleContent[1] = "<b>Statement of Account</b>";
sideBarContent[1] = "Suspendisse non elit. Pellentesque at ipsum. Suspendisse nisl. Ut fringilla ante a massa. Curabitur cursus, elit fringilla porta blandit, purus nulla dictum sem, eget imperdiet risus augue non nisl. Vestibulum massa mauris, dictum in, luctus ut, ultricies blandit, leo.";
//--------------------- End Content



/* -----------------------------------------------
-------------- FADE IMAGE AND TEXT ---------------
--------------------------------------------------*/
// set text mask-----------
this.sideBarText.setMask(this.sideBarMask);

// define slide-in function
sideTextSlide = function(){
var slideTween = new mx.transitions.Tween(this.sideBarMask, "_x", mx.transitions.easing.Strong.easeIn, -187.9, -14.0, 0.5, true);
}

// define fade-in function
allFadeIn = function(){
this.attachMovie("image"+i, "mainImage", this.getNextHighestDepth(), {_x:213.9, _y:53.0});
this.mainImage.setMask(this.imageMask);
var fadeTween = new mx.transitions.Tween(this.mainImage, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 0.5, true);
fadeTween.onMotionFinished = function(){
sideBarText.textArea = sideBarContent[i];
sideTextSlide();
};
}
//--------------------- End Image Fade Mask





/* -----------------------------------------------
-------------- CONTROL ---------------------------
--------------------------------------------------*/

// First actions
allFadeIn();
var movieLength = (sideBarContent.length-1);
this.sideBarText.textArea = sideBarContent[i];
this.stepTitle = stepTitleContent[i];

// Next Button
nextButton.onRelease = function(){
if (i < movieLength){
i++;
stepTitle = stepTitleContent[i];
sideBarText.textArea = " ";
removeMovieClip(mainImage); //dump loaded movie
allFadeIn();
}
}

// Previous Button
prevButton.onRelease = function(){
if (i > 0){
i--;
stepTitle = stepTitleContent[i];
sideBarText.textArea = " ";
removeMovieClip(mainImage); //dump loaded movie
allFadeIn();
}
}


//--------------------- End Navigation Buttons



/* -----------------------------------------------
-------------- MORE INFO -------------------------
--------------------------------------------------*/
this.attachMovie("moreInfo", "moreInfoBox", this.getNextHighestDepth(), {_x:295.5, _y:195.5});
moreInfoBox._visible = false;

loadInfo = function(){
moreInfoBox._visible = true;
var revealInfoW = new mx.transitions.Tween(moreInfoBox, "_width", mx.transitions.easing.Strong.easeIn, 0, 532, 0.5, true);
var revealInfoH = new mx.transitions.Tween(moreInfoBox, "_height", mx.transitions.easing.Strong.easeIn, 0, 285, 0.5, true);
moreInfoBox.moreInfoBlocker.useHandCursor = false;
}

// This button in in the first attached movie
mainImage.payStub_btn.onRelease = function(){
trace("hit buttom from main movie");
loadInfo();
}

// This button is in the second attached movie
mainImage.statementInfo_btn.onRelease = function(){
trace("hit buttom from main movie");
loadInfo();
}

moreInfoBox.moreInfoBlocker.onRollOut = function(){
var hideInfoW = new mx.transitions.Tween(moreInfoBox, "_width", mx.transitions.easing.Strong.easeIn, 532, 0, 0.5, true);
var hideInfoH = new mx.transitions.Tween(moreInfoBox, "_height", mx.transitions.easing.Strong.easeIn, 285, 0, 0.5, true);
}

//--------------------- End More Info

View Replies !    View Related
[CS3] Targeting Multiple Movie-clips From Timeline
Hi there,

Probably a dumb question but I want to target a bunch of different movie clips instances from the main timeline. Basically I have an enlarged pixel that when rolled over becomes more opaque. I have one of these set up and named "pixel". I want to duplicate this on the stage so I have around 100 odd but want to target all of them with the same code. Something similar to this:

this.pixel.useHandCursor = false;

this.pixel.onRollOver = function() {
pixel.gotoAndPlay(2);
}

this.pixel.onRollOut = function() {
pixel.gotoAndPlay(11);
}


Hopefully someone can help.

Cheers in advance,

James

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved