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




Targetting And Positoning A Concatenated Attached Movie



Sorry funny title but wern't sure what else to call it!

What I'm trying to do is use attachMovie to attach a linked movie (in which there is a dynamic textfield and another movieclip) several times. So i set up a loop and I want to add these attached movies to the stage one underneath the other. my problem is once ive created the mc how do i position it?

Iv attached a file for anyone who wants to be the first to point out my stupidity!

Thanks for your time



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 12-10-2006, 10:44 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Targetting Attached Movie Clips
Hi , hope someone can fix this, it's prolly something rather simple , but I'm blinded by the simplicity

Roughly got this code (edited for viewing pleasure):


Code:
for (i=0; i<5; i++) {
planet=attachMovie("star", "mc_star"+i, 100+i);
}


now , after this for loop , let's say , I want to call the third attached star and set it to invisible ... how do I call it ?


Code:
planet["mc_star" + 2]._visible = false;


doesnt seem to do the trick.

Targetting Button Inside Attached Movie
I have a button (buttonA) inside a movieclip (clip1)
"clip1" is attached to an empty clip (emptyclip)on _root at runtime
_root.emptyclip.attachMovie("clip1", "clip1", 0)
Now I know that I can target "clip1" for example to change it's colour using _root.emptyclip.clip1 but how do I target buttonA (which is inside clip1)
ButtonA inside clip1 has an instance name of "buttonA" and is also selected for export in first frame with a linkage name of "buttonA"
I tried this, just to see if it would work
_root.emptyclip.clip1.buttonA.onPress = function(){
trace("button pressed")
}
but it didn't work!
I assume that there is a problem with targetting, but I just can't see what is wrong

JennyJ

Targetting Attached Movies
[Flash 8]

Hi,
I attached some movies based on an array pulled from an XML file. eg.

for (var k=0; k < accountArray.length; k++){
var thisAcc:MovieClip = _root.ledgerContent.attachMovie("accLedger_mc","ac countMC"+k,_global.cDepth);

Now I want to do a hitTest on each of them when a dragged movieclip is released. How do I put a variable into a target path so that I can create a loop for the length of the array? eg.

for (e=0; e < accountArray.length; e++){
if (draggedLoc == null){
if (ledgerContent.accountMCe.credit.hitTest(_root.dragable1.dragBut)) {
draggedLoc = "credit";
trace ("Dragged to "+accountArray[e][1]+" - credit");
} else if (ledgerContent.accountMCe.debit.hitTest(_root.dragable1.dragBut)) {
trace ("Dragged to "+accountArray[e][1]+" - debit");
draggedLoc = "debit";
} else {
draggedLoc = null;
}
}
}

The above doesn't work of course.

Targetting Attached Movieclips
Hey guys,

I did a search on the forums and found 2 threads that were relevant but didn't quite get what i wanted out of them.

I've loaded a movieclip using attachMovie(); and ive put it into an empty movie clip (as you would with external MC's)

So my AS reads:

attachMovie("identifiername,"newname","emptymoviec lip");

My question is how i will go about targetting the loaded movieclip and having it play a certain frame.

I tried:

_root.emptymovieclip.gotoAndPlay(2);

and

_root.attachMovie("box","box","holder").gotoAndPla y(2);

(stab in the dark ).


Thanks in advanced guys.

Targetting Attached Movieclip Question
i have a problem adressing or targetting a attached mc

when i target de mc directly it works fine but when i try it trough a variable it doesnt recognise its path anymore???

hopefully a part of the code is gonna explain the situation a litle better...


this piece works fine:

decrement and increment are two functions
/////////////////////////////////////////////////////////////////////////

ThisItemNumber.onRollOver = function() {
this.but1_1.Decrement(50, 2);
};
ThisItemNumber.onRollOut = function() {
this.but1_1.Increment(100, 2);
};
//////////////////////////////////////////////////////////////////////

this doesnt work
//////////////////////////////////////////////////////////////////////

ThisItemNumber.onRollOver = function() {
var WichButOver = ["but1_"+this.numbr];
this.WichButOver.Decrement(50, 2);
trace(WichButOver);

//trace = but1_1 if you rollover but 1
//trace = but1_2 if you rollover but 2
};


ThisItemNumber.onRollOut = function() {
var WichButOver = _root["but1_"+this.numbr];
this.WichButOver.Increment(100, 2);
trace(WichButOver);

//trace = but1_1 if you rollover but 1
//trace = but1_2 if you rollover but 2
};

hopefully yall know what i'm talking about....
tnx in advance...

desperado redg

Targetting Attached Movieclip Question
i have a problem adressing or targetting a attached mc

when i target de mc directly it works fine but when i try it trough a variable it doesnt recognise its path anymore???

hopefully a part of the code is gonna explain the situation a litle better...


this piece works fine:

decrement and increment are two functions
/////////////////////////////////////////////////////////////////////////

ThisItemNumber.onRollOver = function() {
this.but1_1.Decrement(50, 2);
};
ThisItemNumber.onRollOut = function() {
this.but1_1.Increment(100, 2);
};
//////////////////////////////////////////////////////////////////////

this doesnt work
//////////////////////////////////////////////////////////////////////

ThisItemNumber.onRollOver = function() {
var WichButOver = ["but1_"+this.numbr];
this.WichButOver.Decrement(50, 2);
trace(WichButOver);

//trace = but1_1 if you rollover but 1
//trace = but1_2 if you rollover but 2
};


ThisItemNumber.onRollOut = function() {
var WichButOver = _root["but1_"+this.numbr];
this.WichButOver.Increment(100, 2);
trace(WichButOver);

//trace = but1_1 if you rollover but 1
//trace = but1_2 if you rollover but 2
};

hopefully yall know what i'm talking about....
tnx in advance...

desperado redg

Dynamic Attached Button_mc + Targetting Proper Value
Hi once more

so i've managed to get flash building up a menu that reads from a xml file
it nicely attaches buttons for the amount of nodes i want to be shown
(11 in this case) it will change over time, and i don't feel like recoding every button behavior everytime the menu needs to get updated, cheers for dynamic...

all the names are filled in nicely, but 1 thing is missing and i can't find out where my mistake could be.
i've spent over 3 days now, fiddling around with the code, yet nothing works, or works half...

here is the deal:
ps the theName_str is is "masked" for obvious reasons

Code:
var i:Number;
var theName_str:String = "/place/to/look/for";
var name_array:Array = XPathAPI.selectNodeList(this.firstChild, theName_str);
for (i=0; i<name_array.length; i++) {
var SB = attachMovie("sub", "buttonsub"+i, i);
SB.btntxt.text = name_array[i].firstChild.nodeValue;
trace(" "+i+"."+name_array[i].firstChild.nodeValue);
SB.onRelease = function() {
trace(" "+i+"."+name_array[i].firstChild.nodeValue);
}
}
so this in the output gives me nicely all the values i want in the button textfields.

yet if i press a button , the output gives me something like

Code:
SB.11 undefined
11 stands for the amount of nodes that is being loaded.

when i change the code to

Code:
SB.onRelease = function() {
trace(SB + "."+name_array[i].firstChild.nodeValue);
this traces in the output... it's very confusing for me at this point


Code:
_level0.SB10.undefined
so i'd like to know how i could trace for example when i press the third button, it says SB.03 name of the corresponding node

so in other words SB.03 in the textfield says kirupa
how do i trace when i click on it "sb.03 kirupa"

i hope this is well written for someone to understand, my english isn't that well. is there anyone here that wishes to guide me? much appreciated

kind regards
triss

Audio Positoning Problem
hi,

im loading 5 external swfs (not simultaneously) from a map, with a point for each swf. Whenever the user clicks on a point, they will be taken to that swf.

The user should be able to go back and forth between the map and whatever swf they are on. Although the swfs are loading as they should, it goes back to the first frame before loading the map again. Also, I'm using 'audio positioning' in some of these swfs and it doesn't seem to perform its desired action when the swf is loaded...

any help on this would be great, thanks.

I posted the above a short while ago, however the problem of the audio positioning still seems to remain...

when the audio is however many seconds in, whatever action has been attached to it should be performed.... though it does not seem to pick this up for some reason when going between the external swfs.... works fine when i export it from the FLA on its own...??

Concatenated Variables - Flash 4.0 - Help?
Hi:

I'm trying to set a variable to a value which is a string plus an existing variable, i.e. "xy" = "_level" & yz.
I get an output message that the movie must be exported to Flash 5 to use that expression.

Isn't there a way to set variable with concatenated strings in Flash 4?

I'm blocked. Thanks to anyone who can take pity on me.

How Do I Get A Return In A Concatenated String?
How can I put a return in this so it displays on two lines in my dynamic text box?

myTextField = featureList.childNodes[0] + " " + featureList.childNodes[1]


Thanks

Concatenated String Trouble
I'm having trouble getting the value of a variable called from concatenated string. Here's the code:

n = random(Number(5));
// I pick a random number.

_level0.dis = ("_level0.clip"+n);
// I then concatenate a a string with the random number on the end of the string

_level0.thetext = _level0.dis;
// I then set a variable to the value of the newly concatenated variable. This is where the problems arises. _level0.dis seems to equal to the concatinated variable as a string as opposed to grabing the value fo that string.

ie.
_level0.text holds a value of _level0.clip3, as opposed to the value of _level0.clip3 which is "Hello I'm Clip 3". If I call _level0.clip3 directly then I get the proper value.

I hope this makes a little bit of sense... Any help would be greatly appreciated.

Running Concatenated Methods
I'm building a code writer that generates code for animated effects. I've got the output working but I also have a portion of the app that displays a demo of the animation.

The code is being concatenated from a bunch of input fields so its like
code:
my_testField.text + "." + my_nextField.text;

and so on...

Now all I need to do is some how assemble a path to a movie clip and the concatenated command in that way that actually runs it.

Any ideas how to do this or do I need to supply more info?

CreateTextField From Concatenated InstanceName
I'm attempting to create 'just enough' text fields. I may have a poor strategy but... my thought is I could achieve this through a for-loop. My question is with regards to createTextField:

Why does this work:

createTextField(["q"+0+"_txt"],1,10,10,100,20);
q0_txt.text="testing!";

but this does not:

createTextField(["q"+0+"_txt"],1,10,10,100,20);
["q"+0+"_txt"].text="testing!";

Is it possible to concatenate the instance name and then assign text to it? I thought maybe it was since it is possible when creating the instance.

Getting back to my problem, I'd like to be able to replace the '0's with a variable from a for-loop to create a dynamic number of text field instances. If you have any suggestions or thoughts on this or if you have any other possible solutions, I'd greatly appreciate it.

Thanks,
dw.

Concatenated Instance Names / Properties
title of this post is fairly vague so here's the general context; i've built an interactive map of sorts, with a set of districts marked off with all-enclosing boundary lines denoting their perimeter. each "district" is clickable and has been placed on the stage at the appropriate _x and _y coordinates to form the greater map. each district is a unique movie clip, with instances named sequentially "m1" thru "m19".

so here's the situation. i have a movie clip that is being placed on the stage at runtime via attachMovie(). the movie clip is one in a series of sequentially named clips, "static1" thru "static19" that corresponds to the similarly numbered "m" clip on the stage (as mentioned above). at any given time, only one of these "static" movie clips is placed on the stage, based on a number variable that I set manually. in essence, the "m" numbered clip and the "static" numbered clip form a pair. the "static" clip is effectively a 'highlight' that is introduced over top of it's corresponding district, and is being attached to an empty movie clip named "mDistrictArea". the newly instantiated clip recieves the name "mDistrictHighlight". (considering some other factors, this is the easiest way of meeting certain ends within the scope of this project. there are probably smarter ways of doing this but it more or less works the way i need it to.)

what i'm having trouble with is the number variable i've set manually at the onset. specifically, i'm trying to write the script around that number so i can use it to target the "m" clips programatically. something is flawed in my script though. here's a portion:


Code:
//--sets 'current district' variable and finds coordinates of district area
var nCurrentDistrict:Number = 15 (or whatever...)
var nXposition:Number = ["m"+nCurrentDistrict]._x
var nYposition:Number = ["m"+nCurrentDistrict]._y

//--uses value of nCurrentDistrict to determine highlight area
//----fills mDistrictArea with the appropriate highlight
_root.onEnterFrame = function() {
mDistrictArea.attachMovie(("static "+nCurrentDistrict), "mDistrictHighlight", mDistrictArea.getNextHighestDepth());
}
//----shifts mDistrictArea coordinates to appropriate location
mDistrictArea._x = nXposition
mDistrictArea._y = nYposition
where nXposition and nYposition equate to the _x and _y coordinates of whichever "m" clip happens to be targeted, according to the number specified for the nCurrentDistrict variable.

when i go to test the movie, the new clip is brought to the stage, but since i've placed mDistrictArea (the empty container clip) at 0,0 by default, that's where it gets placed and doesn't budge. i've traced nXposition and nYposition and i get undefined values. i've even gone ahead and substituted the values for both of those variables with the _x and _y coordinates of an actual instance name rather than the number variable, (like m15._x and m15._y for example), and sure enough the clip is placed at the appropriate coordinates. i'm almost positive there's something wrong with my syntax or how i'm concatenating the instance name. i'm just trying to figure out the proper way to get at the "m" clip's _x and _y properties, while still incorporating the nCurrentDistrict variable for actually determining which "m" clip is being targetted.

hopefully all this makes sense. as always, help is very appreciated.

Load Movie /targetting Movie Clip Problem..someone Save Me :)
Hi there..ive done stuff before with the Load movie command but now something that is still new to me..I checked out the help tutorial via the Help section on flash.What i want to do right now precisely is summed up in this example:


The following loadMovie statement is attached to a navigation button labeled Products. There is an invisible movie clip on the Stage with the instance name dropZone. The loadMovie action uses this movie clip as the target parameter to load the products in the SWF file, into the correct position on the Stage.

on(release) {
loadMovie("products.swf",_root.dropZone);
}

Anyhow the main file I am working with right now has dimensions of 800 wide by 600 h pixels. Please see swf file URL Link it will explain my whole problem alot better.

http://beats.midnightsunrecordings.c...m/testsite.swf

I thank you very much for your help and time.Appreciate it!

Cc

Targetting A Loaded Movie
Hello,

I'm trying to target a movie loaded in level 0 from the movie that is currently on level 0. I want to jump to a framelabel in the maintimeline.
Is this possible?

This is the code I'm using now:
on (release) {
unloadMovieNum (0);
loadMovieNum ("raafbr_8.swf", 0);
_root.gotoAndPlay ("sluiten");
}

It doesn't work. Can anyone please help me?

TIA

Danielle.

Targetting A Movie Clip With PHP
Ok i have made a login script that connects to a sql database to check the user and pass!

This all works fine when everything is on the main timeline! But when i out it into a MC the php doesnt seem to be able to send data back!

so from my php script how do i target the MC?

**working extract of code when everything is on maintimeline**
print "checklog=1";

so i kinda need to do

print "MCname.checklog=1";

Make sense
[Edited by pottypotsworth on 02-15-2002 at 10:08 PM]

Targetting Movie Clips
Below are the target paths for my project:

_root
---------charger

---------bigbox
----------------------spin


I want to access the movie clip "spin" from within the movie clip "charger." In the last frame of the "charger" movie clip, I have the following line of actionscript:

_root.bigbox.spin.gotoAndStop(8);

The above actionscript does not work. When I move the "spin" movie clip up one level and put it on the main timeline, I am able to access it with:

_root.spin.gotoAndStop(8);

Why wouldn't it work one level further down?

Movie Not Targetting Frame
hi guys,

In my main movie i have a mc called house.
On the time line it has stop(); so it can play the enitre 10 frame movie clip

In the movie clip itself I have set the last frame action to

_root.gooandplay(targetframe);

for some reason all the clip does is loop and not go bck to the main scene

any ideas?
cheers vamps

Targetting Movie Clips
Hi everyone,

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.

I'm not sure if I've given enough information or whether it's clear but if someone can help I'd be really grateful.

Movie Clip Targetting
Hello all
I have aproblem i am trying to resolve rearding targetting a embedded movie clip.
The mbedded movie has a stop action on frame one .I use a button to control the movie .I target the movie with the this . syntax but it will not play it will only play if i hit thje button twice or if I remove the stop action.I have tried to target it with _root as well as the target command nothing works.
Can anyone please help me thanks all for your time.

Targetting A Particular Frame In A Movie To Load
Hi all, I would appreciate some help...

I want to add an action to a button, which will load a movie (into level 1) and have it go to a speficied frame (rather than just going to the first frame) - is this possible

I think I have to do some tell target scripting except everything I have tried doesn't seem to work - probably bad syntax

Thanks
Slade Smith

Targetting Movie Clips In Different Levels
Hi,

I'm having serious problems trying to control a movieclips properties in a base movie. Here's what I'm trying to do...

I have a main movie (new.swv) which contains a movie clip which is acting as a backround (the instance name is also "background"). I then load another movie into Level 1 (photos.swv). Once the photos movie has loaded (ie. preloader scene is complete, and scene 2 is activated) I want to gotoAndPlay the frame labelled "fade" within the background movie clip which sits within the original movie. This should then fade out the original background.

I've tried several things, including....

_root.background.gotoAndPlay("fade");

_parent.background.gotoAndPlay("fade");

Please could someone stop me from having to put my fist through my monitor!!!!

thanks!

Targetting The Rightlevel, Movie, Instance Or Something?
Hi All,

I have a targetting problem (no I am not a sniper!):

I have a main timeline with different scenes on it, pretty standard stuff.

At some point I use loadMovieNum to load a swf into level10. From the movieclip I loaded in, I want to target the main timeline...

This does work:
_level0.gotoAndPlay("intro", 1);

but I expected this to work, but it doesn't:
_parent.gotoAndPlay("intro", 1);

nor does any variation with _parent work...

what am I doing wrong? I have it working with the _level0 targetting, but I want to use _parent... if possible...

anyone?

Targetting Movie Clips Dynamically
here is my dilemna:

i have narrowed down the source of my movie's problems to one line of code, which should work, and i don't know why it shouldn't:

_root["doors"].play();

it's weird. because the instance's properties can be modified easily, like so:

_root["doors"]._x=100;

that works. but functions like play() and gotoAndPlay do not. i was thinking of setting up an elaborate system of boolean checks to determine which movie clip is being targetted, but please don't make me resort to writing ugly code!

can someone help? it would be appreciated

Targetting Movei Clip From Another Movie
Hello
I have a swf file which has a button that needs to do the following:
-Call up a movie clip.
Ok before you say- easy, i know its:
loadMovieNum("secondswffile.swf",0);
great but - thing is I need a movie clip that sits INSIDE that one.
and before you say, easy, let me add that this movie clip is not on the "stage" it is one that is called up on that second swf file by the attachmovie function and I can't see it on the movie explorer so I can do the necessary evil by doing something like:
loadMovieNum("secondswffile.swf.OneIwantMovie",0); or whatever.. ( I dont know if thats right even but anyhow)
So basically if anyone has just understood all that, then can you supply me with a snippet of code this fine evening?

thx
Shaf

Targetting Movie Clip With Movieclip
Hi, im creating a movie clip in flash which when you rollover it expands like a banner (i.e goes to and stops at frame 40). Now on frame 40 I have defined a textfield which recieves text from an external text file and on this frame I have also created some movieclips for navigation..the text loads fine but when I click on the movieclips that were created in this frame nothing happens...(the instance names are all defined and correct) does anyone know what the problem could be..the code is as follows:


Code:

var info_lv:LoadVars = new LoadVars();
banner_mc.onRollOver = function() {
info_lv.load("bannerinfo.txt");
};

banner_mc.onRollOut = function() {
this.gotoAndStop("collapsed");
};

info_lv.onLoad = function(bSuccess:Boolean) {
if (bSuccess) {
banner_mc.gotoAndStop("expanded");
loadInfo();
} else {
banner_mc.info_txt.text = "I'm sorry problem loading info";
}
};

function loadInfo():Void {
banner_mc.info_txt.text = info_lv.info;
banner_mc.nav4_mc.onRelease = function(){
trace("hello"); //this doesnt work
}

}
THanks for your help in advance..im on a project and need to hand it in tommorow..any help appreciated...thanks

Targetting Elements Of A Loaded Movie
Hi there,

I was wondering if there is a way to control a loaded movie. I am
trying to pause the animation and audio of L0T0T100.swf which is loaded
within main_mc, but am not quite sure how to target it.

loadMovie("LessonFiles/L0T0T100.swf", main_mc);

pause_btn.onRelease = function() {
main_mc.stop();
};


If you could send me a hint, I would appreciate it.

Thanks,
Susan

Targetting Parent Movie Clip
I've used one main movie clip to load in swfs. How do I target a function contained within the main movie clip from within one of the children swfs? In AS2 it was as simple as _root.thisFunction(). I'm getting a 1061 error to the effect of, flash isn't sure if that function actually exists or not so it won't run.

Any help?

Trouble Targetting Movie Clip
Hi all,

I'm trying to put together a fairly simple animation. At the moment I've got an animation happening on the main timeline. When the playhead reaches a certain frame, a movie clip symbol gradually fades in from transparent to full opacity. On this movie clip is another animation but it's timeline is set to stop on the first frame. On the last frame of the main timeline I'm trying to target this movie clip to get it to play. I've put the following code on the last frame:

this.newanimation_mc.play();

... so that it will target this movie clip and play. But when I test I get the following error:

**Error** Scene=Scene 1, layer=plane movie clip, frame=30:Line 1: Statement must appear within on/onClipEvent handler
this.newanimation_mc.play();

Total ActionScript Errors: 1 Reported Errors: 1

Can anyone tell me why this might be happening?

Thanks for any help offered.

Dynamic Targetting Problem In Loaded Movie
Im having this targetting problem for a website Im developing. I cant work out why its happening because the problem only occurs for a movie which is loaded into another movie clip which is itself loaded into the base movie.

The website has 2 main variables: one which refers to the current section (current) and another which refers to the next section (next_section). In this way we get smooth transitions between movies and the site looks great

This is the code I have on my dummy home button:

on (release){
_root[current].play();
_root.next_section = "_level0.home";
}

If the current variable was replaced it would work thus:

_root.team_mc_holder.keymembers_mc_holder.play();
_root.next_section = "_level0.home";

This works when I handcode a button BUT not when its dynamic and the variable is passed to the button.

Ive uploaded the fla files base.fla, team.fla and keymembers.fla. http://www.webeuphoria.net/flashkit.zip 3.5mb

From the beginning click enter website, then our team, then key members. When you get to: Sir Derek Higgs is the Chairman of Bramdean then click the button HOME at the top of the page. It should take you back to the _root but doesnt......although the test button does and its the EXACT code.


Any help would be appreciated, please?

Thanks

Web euphoria.net

[F8] Targetting Loaded Movie Clip Problem
Stuck with something silly.

I have a mc on the stage, called face_mc.

On the face_mc's timeline there is a button (called a_btn) with the action

a_btn.onPress = function(){
_root.attachMovie("a", "aa",1);
_root.aa._x = 30;
_root.aa._y = 30;
unloadMovie(_root.face_mc);

}

This loads the "aa" mc on the stage, but in the wrong place. The bit of script
_root.aa._x = 30;
_root.aa._y = 30;
Does not seem to "target" it correctly.
Doesnt _root.attachMovie() load the mc "aa" on the main timeline? Isnt the target path to it then _root.aa ? What am I doing wrong?

Targetting Inside A Loaded Movie Clip
Hello all, here's what I'm trying to do:


Code:
loadMovie("test.swf", mcBox);

if(mcBox.box.hitTest(mcDot)){
trace("it hit")
}
Basically what I'm trying to do is load a swf into a movieclip, and then run a hit test on a movieclip within that loaded movie. It doesn't feel that targetting individual instances within loaded swf's is working, even though it will trace a valid pathway.

Any comments?

Help Targetting A Frame In A Movie Clip From An External Swf
The concept is you are walking down a hall, and paintings are coming up the sides. The movie stops between each set of paintings, and I wanted to load an external swf of each painting when you click on each one for a better look, for loading purposes. As an unnessary habit, I did the whole movie in a movie clip called "m_hallway".

So my problem is even though I can load the external swf fine, and I can return to the main swf fine, I can't access a frame label in the movie clip, 'cause the main timeline is only 1 frame. Is there script to load a frame of a move clip on the stage, from an external swf?

I tried pasting all the frames on the main stage instead of in that movie clip, but the content is heavy, and it isn't centered, and will be a task to try and re-align everything correctly.

Thanks in advance

Targetting Nested Movie Clips Problem
I have this dynamically made movieclip called submenu_mc[ i ] , inside of it I have some movie clips and i want to dynamically define their functions: here is my code


Code:
activeSubmenu=menuContainer_mc["submenu_mc" + i];
for (var item in activeSubmenu){
if (activeSubmenu[item] instanceof MovieClip){
trace("movie clip found"); // this never gets traced
}else{
trace(activeSubmenu[item] + " " + typeof (activeSubmenu[item])); //this shows me that there are movie clip instances too
}
}

although the for in loop tells me that there are instances of MovieClip i dont know why i dont get the first trace executed. Anyone know why?

Targetting Multiple Movie Clips From Single Frame
On my timeline I have 10 keyframes, on each frame I have a new instance of 'square_mc' appearing. Instead of putting the following script on each MC I want to put it on frame 1 and have all MCs read from it. So I only have to change it in one place.

I can write the function for the frame script and call it from each mc but can't target each MC properly

onClipEvent (load) {
targetScale = 0
_xscale = _parent.startx
_yscale = _parent.starty
}
onClipEvent (enterFrame) {
if (_xscale > targetScale+0.1) {
Scale = (targetScale+_xscale)/_parent.accel;
_xscale -= Scale;
_yscale -= Scale;
} else {
break;
}
}

Help!

Move Duplicated Movie / Attached Movie Into Another Movieclip?
I need to load an external swf, and then duplicate movieclips from it into a movieclip on my main timeline.

I can get the duplicate or attach movie stuff to work within the loaded swf, but I need to get the movieclip into another one on my main timeline.

Any ideas?

Help...movie Attached
www.customfangrills.co.uk/webFlash2.swf

please ignor all design issues as this is a demo. just set up for technical reasons.

1.click on the buttons for each section in order from left to right, see how each new section (colour) sits on top.

2.now when you goto each section randomly the bg colour reverts back to the previous section. this is because all the animaiton is in one tmieline.

how can i create my desired effect .(1) each section coming in on top when navigation randomly.

load movie clip maybe??

please help me im stumped.

maybe sombody could do me a simple fla version of 3 colours for me to edit.

thanks.

How Can I Get Which Attached Movie On New Name
hi

i am attaching a movie to newgride1 , the newcolor value will change by mouse click on a button, how can i know the value from the attchedMovies newName (i mean which newcolor it hav clicked)

thanks


var _loc3 = this.newgrid1.attachMovie(newcolor, "obj" + String(objCountx), objCountx);

Action Works Attached To A Button But Not When Attached To A Frame
can anyone tell me why the following button script works:

on (release) {
_root.welder.eyes.gotoAndPlay(2);
_root.welder.gotoAndPlay(2);
}

but this virtually identical script won't work in a frame (on the same timeline as the button):

_root.welder.eyes.gotoAndPlay(2);
_root.welder.gotoAndPlay(2);

i've been pulling my hair out all day over this. i can't think of an explanation as to why the second example wouldn't work. its baffling to me.

Passing RGB Value Into Attached Movie,,?
well , guys i am making a paint application....(not tht coool , HUh)

my problem is tht i am painting through a single script and by attaching objects from the library..on a fly..

some colors are there ....i wanna have the RGB value of those color buttons in my attached movie clips...??

so wht should i write as a scripts...??


CAN ANT ONE ....????


REGARDS

SetTextFormat In Attached Movie
Hi,

I'm trying to display formatted text in an attached movie but the setTextFormat doesn't work.
There's the code on frame 1 of _root:

_root.attachMovie("test", "test_play", 1);
test2 = new TextFormat();
test2.color=0x00FF00;
test2.bold=true;
_root.test_play.output="hallo daar";
_root.test_play.sentence.setTextFormat(test2);

Sentence is the instance name of the textfield.

What am I doing wrong here?
Thanks in advance for your time, Danielle.

Scrolling An Attached Movie
Okay...I got the the movieclip scrolling using a scrollpane, but there are a few probs with it

As you can see the bottom one is how it should look, and the top image shows how it looks if I scroll it.

Does anybody have an idea what the problem could be?

Thanks in advance

:sploenk:

Removing An Attached Movie
I've assigned linkage properties to MC's in my library, and call them to the stage using attachMovie. My question is, how can I remove an attached movie?

S.

Duplicate Attached Movie
When I duplicate a movieClip which has an attached movie to it, the attached mc is not duplicated.
Why does this happen?

The same happens when there are duplicated movieClips or a loaded movie/jpg inside the movie to be duplicated.

How To Duplicate An Attached Movie
i have attached a movie on the main scene & i want it do duplicate into multiple copies (it is a faded text mc). How to go about this issue?
Please Help
Thanx in advance
Rgds
Bhaskee

Centering An Attached Movie
how do I center an attached movie? I have a msg pop up kinda attached movie from lib which on click of a button loads on the screen. Now i want this loading to be exactly in the center of the screen, no matter what size the user is viewing the movie at. (ie 800 X 600, 1024 X 768 etc). I laso have a fullscreen command in the beginning so the size of the monitor or the screen is not the issue.
I tried with _X & _Y positioning but the MC doesnt seem to move even a Pixel from its original position.
Please Help
Thanx in advance
Rgds
Bhaskee

Removing Attached Movie?
I have an attached movie within my flash file... I want it to go away when I hit the back button or next button and procede to the next frame??? Any Idea's???

Thanks,
Carlos

Setting The _x For An Attached Movie
This is crucial for my code, but I canīt understand why it doesnt works:
It is inside a MC:

this.removeMovieClip();
_root.attachMovie ("HI",another, 1);
setProperty (_root.another, _x,100);

Whats going on:
The "HI" MC is placed on stage, at the 0,0 point, and the 1st line doesnt works (the MC isnt removed).

Any ideas?
Thanx a lot

Copyright Đ 2005-08 www.BigResource.com, All rights reserved