Targeting One Level From Another
Within a Flash document called "replace.swf" the following input style text field is created:_root.createTextField("main_txt",10,375,65,375,400);------- so, the above input text field can be addressed as "_level10.main_txt" from another level right?I also load "textStyler.swf" within "replace.swf" on level99:Now I try to make a change in "_level10.main_txt" from "textStyler.swf" with the following code:_level10.main_txt.text = "this is the replacement text";But no changes occur to the text field. I guess there's something wrong with the targeting!??thanks, carry
Adobe > ActionScript 1 and 2
Posted on: 11/03/2008 04:59:06 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Targeting A Level....
I am loading an external swf into my movie, using load movie command.
I want to adjust the position of the swf....using set property.
But it isn't working.
I want to set the property of the level1, can this be done?
I can't load the swf into an empty mc....because the coding doesn't work if I do that.
Can I adjust the x and y of a level???????/ Or am I trying to do something that is impossible.
Please help.
Help - Targeting Level 1
Hi People!
I'm really stuck - I need to target MCs in level1 from an .swf.
I have a holding swf (level0) and all the actions in the imported .swf need to target _level1 (movies within itself), but It doesn't seem to be working.
Here is an example of my code.
on(press) {
tellTarget("_level1.questionMov.answersMov.box1"){
gotoAndStop(2)
}
}
it doesn't seem to like it.
Any ideas???
Targeting .swf From Nav On Level 3
help.....
I have 3 different movies that load in level 1 and my navigation which loads on level 3 ie:
loadMovie("msmarymac_tai.swf", 1);
loadMovie("msmarymac_nav.swf", 2);
from the nav I can call the other movies to replace tai.swf with print.swf ie:
on (release) {
_root
loadMovie("msmarymac_print.swf",1)
}
so that's all dandy but now that I have my separate movies loading under my nav. like I want them to, how do I speak to them from my nav to say "go to next frame" ? Each movie could have it's own controls but I was hoping to have one control panel that does everything. Keep in mind the nav and the movies are external .swf files loading into the main.mov so I can not label the .swf's like I could if they were on the main time line.
Would it help me to learn Variables for this? What should I look at???
Thanks much,
best all,
-M
[mx] Targeting All Mcs Above A Level.
I am doing a shopping cart. I have used duplicateMovieClip, I have exported the mc from my library and it loads into a holdermc inside my scrollpane, When I duplicate the mc the scrollpane expands to fit the content. This works great.
I have a button inside the duplicated mcs which will remove the mc from the holdermc. I am trying to move the mcs that are below that mc to move up to fill that space.(_y)
Each mc has it own depth, the base movie is 0
So I was thinking on the delete button in the mc I could find out that mc depth first.
PHP Code:
i = this.getDepth(); trace("mc depth is: " + i);
Then target all the mcs in holdermc with a depth above "i" to move 120px up, then delete "i". Maybe something like this
PHP Code:
_root.slidertwo.myScroller.spContentHolder[i>] = targetmcs; targetmcs._y -= 120; removeMovieClip (this);
This is a guess and I know its wrong. Could someone help, tell me if I am on the right track.
Targeting Mc On Different Level
I am having trouble targeting the mc "nav" from a mc on a different swf on a different level (there are several swf's on that _level3). the "nav" mc is on _level3 and the button i'm trying to control "nav" from is on _level6. i know i can do this tho i never have. anyhelp with the path would be a great help!
here is one thing i've tried on the button that doesn't work??
on (release) {
_level3.6MainSite.swf.Nav.goToAndStop("Gallery");
}
i thought this should work but it doesn't?
_level3.nav.goToAndStop("Gallery");
how do i tell the player to look into 6MainSite.swf?
thanks,
imity4
Targeting Another Level
Please can someone tell how to target a movie which is on another swf which is on a diffrent level.
Many Tanks in advance !!!!!
Targeting And Level--It's All So Confusing
I'm not an expert but I do understand the differences between the two. However, I'm not able to use them in the right manner.
I'm using "level" to replace one swf with another swf, with a transition between the two. If you go stright down the navingation, the scripting works fine. But, if you click on buttons out of sequence(like most poeple will), the swf begin to act funny. The transition won't work right.
I set all the "levels" at 1 which is probably wrong. When I set them at different numbers it makes things worse. Is targeting a better option? I'm not using expert mode because I'm not an expert(obviously).
PS- There are only two buttons that work(Home, Our style) The images are not the final images because of loadtime and frame rate. I first need to solve the transition issue before I begin making changes. Thanks in advance
http://engravingimage.com/wedding/new.html
Targeting MC's On The Correct Level
Ok - I have 2 movies main.swf and dom.swf. I have a movie clip on main.swf called ‘bashment’ that I control using a button with the following code:
on (rollOver) {
bashment.gotoAndPlay(2);
}
on (rollOut) {
bashment.gotoAndPlay(16);
}
however I want to be able to control the movie clip when I am on the dom.swf which is on level 2 (main.swf is on level1)
so I basically some extra code adding that tells the button to not just action the MC, but where that MC is located, ie level2.
Any help would be more than appreciated
Targeting Level 0 With GotoAndStop.
OK, I have an object that is invisible on load of the movie in level0. When a button on the movie in level0 is pushed, the invisible movie is loaded into level1. How can I hit a button on the movie in level1 and make it gotoAndStop a certain frame of the movie on level0?
Targeting Correct Level
Greetings.
I have a flash movie with a slide open and close navi. The navi slides open for 20 frames and reveals the menu. On the slider I have a button to open and close the navi.
It goes Scene1 -> Navi -> Navbarslide -> Btn_control. On the Btn_control MC is A.S. on the button:
on (release) {
if (_parent._currentframe==1) { // only allow opening from closed position
this.gotoAndStop("Close Button");
_parent.play();
}
}
and on frame 2 other layer:
on (release) {
if (_parent._currentframe==21) { // only allow closing from open position
this.gotoAndStop("Open Button");
_parent.play();
}
}
THis works fine. However I need to close the navslidebar when someone clicks on a button on the menu as well.
The menu is: main -> Navi -> activemenu -> then 7 buttons that make up the menu. So I need to add to each button something similar to the latter of the two above A.S. Essentially closing the navslidebar whenever any of the menu buttons are clicked (released).
My problem is that I can't seem to get the right target. I tried _root.navi.currentframe==21 but that's not it.
Any ideas on where I should target?
Thanks!
Targeting A Level Without Loading
Anyone know if it's possible to add content to a level without loading a movie into it?
For example, I'm creating a preloader that loads an image into _level1. I'd like the preloader to sit on the level above the image (_level2), but I can't seem to target _level2 from _root in order to set up the preloader.
Any ideas?
Targeting Other Level Root. How?
Hi,
I have a button inside a movie that as been load on level5 and need to target the _root of the main timeline of level1.
How?
Thanks
Proper Syntax For Level/MC Targeting?
What is the proper syntax for targeting an MC on a different
level? I'd like to load 'content.swf' into 'blankMC' which resides on Level 10.
thanks.
Script For Targeting Keyframes (swf To Swf, Level 0)
Hi, beginner here, and creating a projector file for class. Would like advice on how to load a movie one swf at level 0 to a movie clip's target keyframe within another swf file.
So, it would be:
loadMovieNum(" .swf",0);
but it would target a movie clip (that is on the first frame of the swf) on the movie clip time line at frame 28.
THANKS!
Targeting A Scene From An Swf Loaded Into A Level
How do I target a main movies time line address from within another movie that will be loaded into a level in side that main movies time line. I know how to target the loaded movie on a _level within the main movie, but I am not sure how to target it going back out to communicate with the movie it is loaded into so that it will direct to the path of play were I want it to. I know I don't want to use _root., so what do I use?
Targeting A Move Clip Level
I am trying to target a move clip but I am having a hard time with it because it’s two levels above where the command is coming from and is one level below the root level how to I target it. I tried using it’s name alone but that does not work.
Targeting Frame Label In Level?
Hi
Got a swf loading into level 1 at my main timeline.
From an MC inside an MC at my main timeline I´v like to target the frame label "fade" inside the swf that is loaded into level 1.
Can this be done?
Tired this but with no success.
ActionScript Code:
on (press) { _level1.gotoAndPlay("fade");}
Targeting Main Timeline From A Higher Level
Hello,
Does anyone know how to target the maintime from a movie loaded into level 1? I want the main movie to go to frame 3 when I click a button in an swf loaded in level one. I tried saying:
blahblah_btn.onRelease = function() {
_root.gotoAndStop(3);
}
This code is on the timeline (actions layer) of the movie in level 1. It doesn't work. The main movie still stays in frame 1. Do I need to specify level 0 somehow? How do I say this?
Thanks!
Mary
Ackk Help.. Problem With Targeting/level With Sound Object
i've got the main movie (main.swf) (in level0) and i am loading the movie holding the sound (sound.swf) into level3.
how i originally did it, sound.swf would run by itself from level0 obviously, but now that it is loaded on top of another movie into 3, how would i target that sound event?
this is the original actionscript.
sound1 = new Sound();
sound1.attachSound("sideaa");
sound1.start(0, 999999);
'sideaa' is the identifier for the wav file linkage
anyone have an anwser about this?? im lost and get hungry arrrghhhh
- aj
Targeting Variable Text Fields In Movie Level 1...
How do I target a dynamic text field called 'box_text' sat in a movie clip called 'mouse' that is in a movie 'mouse.swf' I have loaded into level 1?
I need to be able to update the text within a mouse tool-tip / help box as it rolls over a diagram. The loaded movie clip is loaded in level 1 and all of the dynamic text box and surrounding graphics is within a movie clip called 'mouse' that is dragged around the screen by the user.
At the moment I am using:
with (_level1) {
mouse.box_text = "Welcome";
}
Level 0 Loads A Movie Into Level 1 - Buttons On Level 0 Still Appear To Be Active Underneath
I am working on an interactive cd. My main movie plays in level 0 and clicking on an option loads the relevant movie into level 1.
The problem I have is that the main movie's buttons are still active underneath and if you click on the wrong place in the movie on level 1 it jumps to a new movie because of the button below.
Is there a way to somehow deactivate these while there is a movie playing above?
On Mouse Press Load Movie To Level 5 And Unload Movies From Level 6.7.8.9 ?
on mouse press Load movie to level 5 and unload movies from level 6.7.8.9 ???
Ok here is the deal
I have 5 Music files I created 5 seperate flash movies for them
As it stands now I have
Track1 load to level 5
Track2 load to level 6
Track3 load to level 7
Track4 load to level 8
Track5 load to level 9
The problem is how I script that if I press track 1 to unload level 6,7,8,9 so only level 5 track playing
Or if I press Track 5 to unload movies level 5,6,7,8
This is what I done so far
http://eclipse.ebportal.com/bluenotejazz/index.html
If u press on track1 and after on track 2, Track 2 will just upload new flash file on top of track 1.
Now I am not good with this but, this is what I tried
This is as code stands
on (press) {
stopAllSounds();
loadMovieNum("flash/track1.swf", 5);
play();
}
This is what I was trying to do for TRACK 1
on (press) {
stopAllSounds();
loadMovieNum("flash/track1.swf", 5);
play();
}
on (release) {
unloadMovieNum(6,7,8,9);
}
---------------------------------
Of course for Track 2 this would be
on (press) {
stopAllSounds();
loadMovieNum("flash/track2.swf", 6);
play();
}
on (release) {
unloadMovieNum(5,7,8,9);
}
ETC
Pls some help need it here and its URGENT !!!
Load A Movie To Another Level And The Buttons In Base Level Still Work..
Hello,
Ok Im loading movies into level 95. The problem is the movie at the base has buttons in it and they are still active through the movie that is loaded at lvl 95. So to fix this I made one large button and made the movie at lvl 95 dragable. The only issue with this method is now your cursor looks like it is always active. So has anyone figured out a way to block buttons that are at the base level if you load into a upper level?
Thanx
Robert
Why Are Buttons On A Lower Level Still Active In A Loaded Higher Level...?
hi, i'm very new to flash and am in the midst of trying to figure out the loadMovieNum feature. I have the one swf loading into a higher level (say 10) but the buttons on the level below it are still active (ie you get the little hand if you roll over them) even though they are no longer visible. I tried loading all levles into 0, but that means the page below goes away entirely and i like having the preloader of the next page pop up over the current page. I've tried just loadMovie into an empty MC but get the same result. Can anyone help?
thanks in advance!!
[F8] Quiz Template Not Computing Score When Loaded Into A Level Other Than Level 0...
I have created a 10 question multiple choice quiz from the quiz template, and it works perfectly as its own .swf. But when I use the moviecliploader object to load the quiz .swf into another .swf in level 5 (or any other layer other than 0) I am able to go through all of the questions and get the correct feedback, but when the results frame shows up, nothing gets computed. Does anyone know what I should do to allow this to work? Thanks.
Quiz Template Not Computing Score When Loaded Into A Level Other Than Level 0...
I have created a 10 question multiple choice quiz from the quiz template, and it works perfectly as its own .swf. But when I use the moviecliploader object to load the quiz .swf into another .swf in level 5 (or any other layer other than 0) I am able to go through all of the questions and get the correct feedback, but when the results frame shows up, nothing gets computed. Does anyone know what I should do to allow this to work? Thanks.
HELP With LoadMovie: When I Load Level 1, Level 2 Disappears And Shouldn't
Hi I have a problem...
I have a movie on level 0 with menu buttons A, B and C. Every button loads a new movie (movie A, movie B and movie C) and they all load the movie in level 1. I have another movie containing the music (movie MUSIC).
When I load the site (level 0) I first load the music (movie MUSIC) in level 2 with a loadMovie(2) and later I let the user choose if he wants to see movie A, B or C by loading them with loadMovie(1). Unfortunately when the user clicks on a button to load any of the three movies A, B and C, the music MOVIE disappears and therefore the music stops. I need the movie MUSIC to be in the top-most level and to load before the other movies do, that's why I have it in level 2, so the controls (play, stop, volume) are always on top of all other movies loaded.
Can you please help me make the music play without the music MOVIE disappearing and stopping when a movie UNDER/BELOW is loaded in a level lower that the music movie's level?
Thanks a lot!
Return At Level 0 In A Specific MC Frame By Clicking In Other Level...
I have a movie that loads (by a button) others swf's in level 1, 2...
My problems are:
1 - These buttons functions, in level 0, being still working when I "loadMovieNum" and then I have another ones above in levels 1, 2...
How can I make the bellows buttons (level 0 - that are "invisible") to stop working?
2 - I used "tellTarget" function in level 0, inside a MC, that jumps to frame 100 to 150 and stop. And so it loads another swf's in levels 1, 2...Nice.
The code I used is:
on (release) {
tellTarget("/my_movie") {
gotoAndStop(150);
loadMovieNum("filetwo.swf",1);
loadMovieNum("filethree.swf",2);
}
}
Otherwise, when I "unloadMovieNum" 1, 2... and it returns at level 0, the playhead starts again in frame 1.
How can I return at frame 100 by the same click?
The code I´ve put in a button in filetwo.swf is:
on (release) {
unloadMovieNum(1);
unloadMovieNum(2);
loadMovieNum("fileone.swf",0);
_root.my_movie.gotoAndPlay(100);
}
What is wrong?
Whoa.. Sending A Variable From Level 1 To Level 0.. Hmmm...
I thought this would be easy but can't find the code anywhere.
I've loaded a .swf movie into level1 and want to click a button in that movie that changes a variable in the main timeline (level0).
Does anyone know the actionscript to do this?
Thanks dudes,
bossanova
Return At Level 0 In A Specific MC Frame By Clicking In Other Level...
I have a movie that loads (by a button) others swf's in level 1, 2...
My problems are:
1 - These buttons functions, in level 0, being still working when I "loadMovieNum" and then I have another ones above in levels 1, 2...
How can I make the bellows buttons (level 0 - "invisible") to stop working?
2 - I used "tellTarget" function in level 0, inside a MC, that jumps to frame 100 to 150 and stop. And so it loads another swf's in levels 1, 2...Nice.
Otherwise, when I "unloadMovieNum" 1, 2... and it returns at level 0, the playhead is on frame 150.
How can I return at frame 100 by the same click?
Loading Movie To Level 1, Cancelling Out Level 0 Buttons?
I have a movie (main.swf) and when you click one of the buttons, it loads section.swf on top of main.swf onto level 1
When section.swf appears on the screen, everything is fine BUT... the buttons on the main.swf work THROUGH the section.swf which is on level 1. Is there anyway to cancel out the buttons on level 0 when a movie is loaded ontop of it to level 1????
TIA
Return At Level 0 In A Specific MC Frame By Clicking In Other Level...
I have a movie that loads (by a button) others swf's in level 1, 2...
My problems are:
1 - These buttons functions, in level 0, being still working when I "loadMovieNum" and then I have another ones above in levels 1, 2...
How can I make the bellows buttons (level 0 - "invisible") to stop working?
2 - I used "tellTarget" function in level 0, inside a MC, that jumps to frame 100 to 150 and stop. And so it loads another swf's in levels 1, 2...Nice.
Otherwise, when I "unloadMovieNum" 1, 2... and it returns at level 0, the playhead is on frame 150.
How can I return at frame 100 by the same click?
Play Movie In Level 0 From Loaded .swf On Level 10?
hi everyone...
i have a movie(frame2) on the main timeline of the the main .swf loaded in at level 0, Which i want to play by clicking a button in a movie on the main timeline of .swf loaded in on level 10 what actionscript do i need to do this, i have looked at several other answers on the message board but none seemed to be relevant any body know what the script should be that i attach to the button.????your help would be much appreciated...
Controling Movie Level 0 From A Higher Level
Hi,
I have a movie that loads various other .swf files into level 3.
How do i get the movie loaded into level 3 to tell the main movie in level 0 to go and play a certain frame?
Can this be done?
Cheers
Pete
Controling Tween In Level 2 With Button In Level 1
Hi all,
This may be a bit long and confussing, pls bear with me. thank you
imagine this:
i have a main.swf tht loads a swf 3 buttons in it (but.swf) onto level1.
There are 3 other differnet SWF files (1.swf, 2.swf, 3.swf). Each of then has a tween tht casues them to fade in from frame 1to 10, stops at frame 10(a stop actionscript is used), and fades out to from frame 11 to20 and stops there(a stop actionscript is used, casues its the end and no point to loop).
Here's the problem:
I want the first button to click and 1.swf will be loaded onto level2 (it fades in and stays)of the main.swf. And when click onto the second button, 1.swf will fade out, be unloaded from level2 and 3.swf will fade in onto level2.
And this will go on and on in no particluar order(e.g button 1 can be clicked onto first then button 3, or button 2then button 3,etc).
i have tried to use the script below for the buttons but it donest seem to be right
----------------------------------------------------------------
on (release) {
_level2.gotoAndPlay(11);
}
on (release) {
unloadMovieNum(2);
loadMovieNum("3.swf", 2);
}
--------------------------------------------------------------
Hope i have made my problem clear, if not pls let me know.
I think this should be a fairly simple problem to slove....So i hope someone can reply me soon
THX A Million!
Movie Clip From One Level To Another Level
I have heard this can't be done but anyways..
I would like to take a movie clip from _level0 and duplicate and send it into another movieclip in _level1.
IS IT POSSIBLE??
Trish.
(Level1 has to be in flash 4...for now.)
Wait for the Wizards response.................
Movie Clip From One Level To Another Level
I have heard this can't be done but anyways:
I would like to take a movie clip from _level0 and duplicate and send it into another movieclip in _level1.
IS IT POSSIBLE??
Trish.
(Level1 has to be in flash 4...for now.)
..(It's not that entirely doubt you tony.)
Wait for the Wizards response.................
Stage Level Overlay Level
This is for an open book test I have for school. I have tried to serch it out but can't find the answer. Does anyone know?
Is the stage level above or below the overlay level.
A) above
B) below
C) the levels are on separate layers
D) they are only on mask layer
Barbara/Babs
Contolling A Movie At Level 0 From Level 1?
I have one movie (intro.swf) loaded on top of my main movie (start.swf) when the user clicks the 'skip intro' button I want the movie at level 1 (intro.swf) to unload and the movie at level 0 to progress (go to and play frame 28). What code do I use on the 'skip intro' button?
LoadMovie Into Level, Then Target An MC In That Level
Hi -
I am loading an .swf called "nav.swf" into _level16 of my main movie. Within nav.swf there are MCs in the root which I would like to target from the main movie.
I have tried the following:
_level16.nextButton._visible=false;
and
_level16.nextButton._visible=0;
with no luck.
when i trace _level16.nextButton I get undefined returned.
am I using the correct syntax here?
thanks!
Have Level 0 Play From Action On Level 3
I have a two movies main being on level 0 and the other that loads on top of 0 levl 3 when u click on one of the buttons on level 3 I want the main timeline on level 0 to continue to play wich is currently on frame 175 and stop at 185. So I have a stop on the main timeline of level 0 at frame 185and on 175 and the script I have on the button is
on (release) {
unloadMovie(2);
_level0.play();
loadMovie("home.swf", 2);
}
I also tried
on (release) {
unloadMovie(2);
_level0.gotoAndPlay(176);
loadMovie("home.swf", 2);
}
the both work but it dosent stop at 185
so I tried
on (release) {
unloadMovie(2);
_level0.gotoAndStop(176);
loadMovie("home.swf", 2);
}
and of courser it stoped on 176.
I am not sure what I am doing wrong. please help
Calling A Function In Level 0 Swf From Level 2 Swf
Hey guys,
I've got a swf file on level 0, which I've loaded another swf into level 2. My objective is to blur everything on level one to make the loaded swf on level 2 stand out. I have everything worked out except, I can't seem to call the functions in the main movie timeline from the level 2 movie.. i've tried _root, _parent, and even tried using a work-a-round by passing a _global variable back and forth between the two, which was getting messy. I know there's got to be a better way, or something simple I'm missing. Can you guys help?
Thanks in advance!
Jump To Scene 2, Frame Label "start" On Level 5 From Button On Level 150?
I have a button on Level 150 that needs to load movie on level 5 and tell the movie to jump to a frame label called "start" in Scene 2. Is this possible to do?
here's the code that I have for the button on level 150
on (release) {
unloadMovieNum (100);
loadMovieNum ("city.swf", 5);
unloadMovieNum (10);
unloadMovieNum (150);
Now how do I tell level 5 to jump to a certain
scene and then a certain frame label?
Any help would be greatly appreciated. Thanks.
Ps. This was is done in flash 5 not MX.
|