Load Swf _root Problem
for presentation I want to show some already finished swfs in my master.swf, just like the little preview.swfs here in flashkit are shown in a master.html
No problem with the loadMovie-function! But then the [COLOR=dark-blue]_root[/color] of the master.swf will become the [COLOR=dark-blue]_root[/color] of the loaded.swf, which kills the functionality of the loaded.swf. Is there anyone who knows a solution for that???
thanx very much for any help
FlashKit > Flash Help > Flash MX
Posted on: 07-01-2004, 08:21 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Load In _root Quicky
How can you do a loadmovie in the _root ?
It wants a target but how can you tell it to go to the _root to find the target ? Basically the target is not in the current movie...but in the absolute root. or at least that is where I would like it.
Thanks
Load Swf _root At Start
the answer to this question is probley already on here, but there are alot of posts ! LOL
any way, i have no problem loading external swf's from buttons
but for the life of me i cant get a external swf to load when
the main swf starts up
eg i have a site.swf file embedded in in a html doc.
and when i go to www.whatever.com and the site.swf file loads
i want it to load content.swf into a empty movie clip ive called
window.
ive tried
on the mc itself, loadmovie, and on the frame window
onload loadmovie window.swf _root.window
no luck
could one of you flash experts out there, give a fulla a hand?
would be great !
thanks
Load Vars From _root
i have a root movie in which i have specified some variables:
var mc_array = ["1.swf", "2.swf", "3.swf", "4.swf"];
var counter = 0;
then i load the first .swf into a container. inside the swf is the following buttoncode:
on (press) {
loadMovie(mc_array[counter],mc1);
counter++;
}
how can i tell flash to look for the variables mc_array and counter in the root movie?
How To Use _root To Load File From HDD
I have main moviclip.Inside this movieclip I have 2 layers. On the 1st keyframe of layer1 I have _root to moviclip to load
[ _root.section != "a.swf"; {
_root.section = "a.swf";
_root.transition.gotoAndPlay("closing"); ]
thing is this is not leading me to the a.swf. I need to know the road to that a.swf.
P.S. If I have the 2 layers on scene1 the path, shown above, works
Load _root (269) When MC Loads (40)
I don't know why this doesn't work:
scrollMC.back_3.onPress = down3;
function down3() {
figure_1.gotoAndPlay(21);
ifFrameLoaded(figure_1,40) {
_root.gotoAndPlay(269); };
figure_2.gotoAndStop(1);
}
I want the root to wait until the MC (figure_1) gets to frame 40 to jump to frame 269, but when I click on scrollMC.back_3 it just jumps immediately to 269 without figure_1 playing frames 21-40.
//loadVariablesNum In External .swf (does _root Load)?
I have A main.swf that loads form.swf in one of its movie clips. and I am having troble w/ the submit button on that form.
I believe my problem lies somewhere between using externally loaded .swf's and maybe having the submit button inside of a movie clip inside of a movie clip. How does the loadvariableNum actually work,will it only submit that swf's variables or will it also send the variables of the _root time line. I am very confused. like I said my url is sdginteractive.com/fh02
the asp page is
sdginteractive.com/fh02/whatever.asp
scroll all the way2the bottom and hit submit. that SUBMIT button is inside of an externally loaded movie and it is using:
on (release) {
loadVariablesNum ("http://www.sdginteractive.com/fh02/verify_s.asp", 0, "POST");
}
Now the question is:
half of the form are radios setting variables to the _root. timeline.
on (release) {
_root.radio1 = "1";
}
with a value of 0 or 1. when I hit submit which is located in the ext swf does it send the variables from the _root timeline? (the parent swf)
does it just grab all variables from any of the two seperate swf's?
Or will it only load the variables from the ext .swf
_root Load Movie And Levels Help
I've got an SWF named 'external.swf' with some actionscript that allows you to control the timeline and play the movie backwards and forwards. this is done using a movieclip named 'code'.
The movieclip 'code' contains the following actionscript:
function CtrlLoop() {
var NextFrame;
if (_root.direction == "fwd") {
nextFrame = _root._currentFrame + 1;
if (nextFrame > _root._totalFrames) {
nextFrame = 1;
}
} else {
nextFrame = _root._currentFrame - 1;
if (nextFrame < 1) {
nextFrame = _root._totalFrames;
}
}
_root.goToAndStop(nextFrame);
}
The following actionscript is attached to the movieclip 'code':
onClipEvent (enterFrame) {
_root.code.CtrlLoop();
}
There are two buttons in the main timeline that control the moie and allow it to be played backwards or forwards. The following actions are attached to the buttons:
on (release) {
// play reverse function in the code clip
_root.code.PlayRev();
}
on (release) {
// play fowrard function in the code clip
_parent._root.code.PlayFwd();
}
The movie works fine as a standalone movie but when loaded into another movie it doesnt work???. I'm trying to load this movie into a blank movieclip with the following target name 'scrn_2_loader' this blank movieclip is itself in another movieclips timeline that is placed on the main timeline of the base movie.
Can anyone please help me with this problem. Why doesn't the 'external.swf' movie work when it's loaded into the main movie??? Thanks in advance.
_root + Load Movie + Levels HELP
I've got an SWF named 'external.swf' with some actionscript that allows you to control the timeline and play the movie backwards and forwards. this is done using a movieclip named 'code'. The movieclip 'code' contains the following actionscript:
function CtrlLoop() {
var NextFrame;
if (_root.direction == "fwd") {
nextFrame = _root._currentFrame + 1;
if (nextFrame > _root._totalFrames) {
nextFrame = 1;
}
} else {
nextFrame = _root._currentFrame - 1;
if (nextFrame < 1) {
nextFrame = _root._totalFrames;
}
}
_root.goToAndStop(nextFrame);
}
The following actionscript is attached to the movieclip 'code':
onClipEvent (enterFrame) {
_root.code.CtrlLoop();
}
There are two buttons in the main timeline that control the moie and allow it to be played backwards or forwards. The following actions are attached to the buttons:
on (release) {
// play reverse function in the code clip
_root.code.PlayRev();
}
on (release) {
// play fowrard function in the code clip
_parent._root.code.PlayFwd();
}
The movie works fine as a standalone movie but when loaded into another movie it doesnt work???. I'm trying to load this movie into a blank movieclip with the following target name 'scrn_2_loader' this blank movieclip is itself in another movieclips timeline that is placed on the main timeline of the base movie.
Can anyone please help me with this problem. Why doesn't the 'external.swf' movie work when it's loaded into the main movie??? Thanks in advance.
Load Movie In Between Layers On _root?
Hi there,
Can someone help?
Is there a way that you can load a movie.swf in between layers on the root movie?
I have a shadow border on the root movie on the top layer, and i wish to load a captivate.swf using the load movie action, but i want to load it into a layer under the shadow on the root swf file.
Can this be done?
Thanks.
Making The _root Invisible When Load A Swf
My homepage loads swf through the menu. On load, the homepage has to be invisible. Here is the part concerned :
this.createEmptyMovieClip("container",this.getNext HighestDepth)
Galleriehotel_mc.onRelease=function(){
loadMovie("travelgallerymiddletrial.swf","containe r")
};
How do I have to proceed ?
Thank you .
AS 2 Load Variables Or _root Issue
I used the tutorial from kirupa on passcodes to implement a PHP/Flash login but am having problems with making it work... I have a index.swf that my login.swf page loads into.. the login works when I use it by itself, but when I use the index page and the login loads into that file, then it won't work..anybody know if I'm not configuring my paths correctly or what? not sure... thanks in advance for any help at all!!
this is the code on the button:::
on (release, keyPress "<Enter>") {
if (pass != "") {
loadVariablesNum("newlogin.php", 0, "POST");
}
}
this is code from login.swf timeline:::::
stop();
Selection.setFocus(passinput);
this.onEnterFrame = function () {
if(_root.checklog == 1){
_root.gotoAndStop(122);
}
if(_root.checklog == 2){
_root.gotoAndStop(124);
}
}
Can You Load A _root Targeted Movie Into Another Without Hassles?
Quick question,
is there any quick and dirty way to load one swf into another, that is full of _root targeted actionscripts, without having to go in and retarget it all?
Anyone else with this problem? Is there a way to self contain the movie so it doesn't target the parent swf's timeline?
Thanks...
Load Multiple Movies Into _root.holder
i need to load 2 or more movies into the _root.holder
if this cant be done then where can i pop them so thay are still dragable not using _root.holder?
example: goto my website and open the 1024 x 768 (Beta Version)
using the menu to open small windows uses
ActionScript Code:
on (release) {
loadMovie("../_movies/portfolio_eng.swf", "_root.holder");
}
but how do i keep this mc up and open another using the menu?
when a new mc is loaded it replaces whatever is in the _root.holder
Please help
Adam
_root.load.duplicateclip.issues.that.suck
created a duplicate movieclip and put it on the first frame with the other clips I want to work the same way but when I add the same actions for the other clips to the new button it brings up a blank page. I figures since its on the same page the button should work properly with the layers but something isnt right. The move loads but not the enter thing which you see on the other buttons.
Basically I am using a template and deconstructing to add my own flavor. I want the same effects that are on the template buttons on a new button but its not working. I have been trying to figure it out while learning scripting since I feel I have to get it out of the way but this has bee a thorn for like a week and I know it can be fixed simple by someone who fully knows scripting. just trying to get the right actionscrip.
Thanks,
_root.load.duplicateclip.issues.that.suck
created a duplicate movieclip and put it on the first frame with the other clips I want to work the same way but when I add the same actions for the other clips to the new button it brings up a blank page. I figures since its on the same page the button should work properly with the layers but something isnt right. The move loads but not the enter thing which you see on the other buttons.
Basically I am using a template and deconstructing to add my own flavor. I want the same effects that are on the template buttons on a new button but its not working. I have been trying to figure it out while learning scripting since I feel I have to get it out of the way but this has bee a thorn for like a week and I know it can be fixed simple by someone who fully knows scripting. just trying to get the right actionscrip.
Thanks,
Actionscript To Enable _root.ProgressBar To Load New Movie
I know i've been posting a lot about this but i'm ALMOST there it seems. This code is being executed from an external .SWF inside of the loader component. it loads the movie, but the progress bar isn't working for this.... anyone gotta tip?
basically: main.swf has 2 loader components ("loader" and "loader2" in seperate locations, and a progress bar ("Pbar") component on the timeline. main.swf loads movie2.swf into "loader", and "pBar" shows the loading status just fine. there is a button inside of movie2.swf that triggers main.swf to load movie3.swf into "loader2". it shows up fine, but the progress bar doesnt work for this second loading action.
Code:
on (release) {
_root.pBar.source = _root.loader2;
_root.loader2.contentPath = "movie3.swf";
}
Actionscript To Enable _root.ProgressBar To Load New Movie
I was stupid and forgot to put quotes under the pbar source. duh.
on (release) {
_root.pBar.source = "loader2";
_root.loader2.contentPath = "team_tcurran_video.swf";
}
I know i've been posting a lot about this but i'm ALMOST there it seems. This code is being executed from an external .SWF inside of the loader component. it loads the movie, but the progress bar isn't working for this.... anyone gotta tip?
basically: main.swf has 2 loader components ("loader" and "loader2" in seperate locations, and a progress bar ("Pbar") component on the timeline. main.swf loads movie2.swf into "loader", and "pBar" shows the loading status just fine. there is a button inside of movie2.swf that triggers main.swf to load movie3.swf into "loader2". it shows up fine, but the progress bar doesnt work for this second loading action.
Code:
on (release) {
_root.pBar.source = _root.loader2;
_root.loader2.contentPath = "movie3.swf";
}
Load Movie On Level1 Play Instance On Level2 From _root
Hi,
I have a 'main' swf time line and a 'control' swf which is loaded onto level2 when the main movie starts.
On frames 10 to 20 of the main timeline are for eg.
loadMovieNum("01_purpose.swf",1);
stop();
...which loads the content swfs on level 1 of the root timeline.
This is controlled by buttons on my control swf. (ie goto and stop ,10)
This all works fine.
I want to be able to highlight my buttons on the 'control' swf so that I can see where I am in the timeline of the presentation.
I have an instance of 'colour' in my control swf and I want to action this from the root timeline so that a next and previous button on the control will also highlight the correct button. 'colour is just a movie clip the moves a block of colour from one label to another eg 'one', ';two' etc.
Am I close with this syntax in my main (root) timeline?
loadMovieNum("01_purpose.swf",1);
_level2.colour.gotoAndStop(one);
stop();
Would appreciate any help!!
_root.play() / _root.gotoAndPlay() Not Working
Hi,
I am working on an interactive movie, the movie consists of a number of small movie clips. I need each clip to play and when it reaches it’s end stop and tell the main time line to move to next frame, on that frame the next MC will [play and do the same.
I am trying to use this script for the last frame of the movie:
_root.play()
I also tried “_root.gotoAndPlay()” and “_root.nextFrame()
It doesn’t seem to work.
Anyone has any idea why ???
Loading .swf To _root And Performing Actions On _root
Hello, I have a loader which should load a movie which should be placed on the _root so that all of it's actions will still work. also, i need to perform some actions on the _root which is specified in my loader. f.eks. say I load my movie at _level0 and then I trace "movieLoaded" all the time.
And I use flash MX
This _root And That _root, Parents, Children, LoadMovie...
I'm building a showcase to show a bunch of my work. Let's call my work "children" and the showcase file the "parent".
A lot of the children files have some actionscript that references functions and variables on the root level. However, when those files are loaded into the parent file, the root is now the root of the parent file, not the child file.
SOME of the stuff, I've been able to remedy by opening each flash file and copying and pasting all that crud into the shell flash movie.
Unfortunately, not all of my wizardry is working, and hey, who knows what's wrong. Since the individual files each have functionality that works on it's own, is there some way of telling those children files to look at the root ONLY on their own file, or, as soon as the swf is loaded, the root is changed?
How can I avoid this in the future?
ALSO, is there some way to globally override the "getURL" function call so any and all clicks are now dead links?
After I Do "_root.unloadMovie()", I Can't Load My Functions Again.
Basically, I want at some point in my program (such as a "reset" button), to completely unload everything in the movie. Logically, I chose "_root.unloadMovie()". This works.
However, after this, I cannot run my program again. I assume it is because I've gotten rid of everything, including my program on my Actions layer of the _root.
Does anybody have a solution for this "reset" of mine? I want to unload every MovieClip that I loaded onto my stage, but I don't want to have to remember or identify which MovieClips are on the stage (thus why I tried using _root). Yet I still want to keep my the ActionScript on my _root layer.
_root.link / _root.page Help
hi gang, ive got a flash template im trying to edit for a friend, id say im fairly good at flash ive made alot of sites with actions but having trouble with this.
the problem i have got is the _root.link=
this is the action script:
on (release) {
if (_root.link <> 8) {
_root["page"+_root.page].gotoAndPlay("w2");
_root.link = 8;
_root.page = _root.link;
}
}
(there was more but that was just controling the button animation, ive just posted this to keep it simple , for me atleast)
what im having trouble doing is working out where the route is?
i want to be able to creat another movie and link it
eg:
on (release) {
if (_root.link <> 9) {
_root["page"+_root.page].gotoAndPlay("w2");
_root.link = 9;
_root.page = _root.link;
}
}
how would i lable the movie to be '9' where would i do this, i have looked and ive had no joy, some help would be good, if u need more info from me please do ask
_root._root[eelmine].nextFrame(); ?
if a condition is true, then:
_root.(MC with instance name that is the value of "_root.eelmine").nextFrame();
is this correct?
_root._root[eelmine].nextFrame();
_root._root[eelmine].nextFrame(); ?
if a condition is true, then:
_root.(MC with instance name that is the value of "_root.eelmine").nextFrame();
is this correct?
_root._root[eelmine].nextFrame();
_root._root.testbox?
I have this small problem.
I have 2 swfs(main.swf and links.swf)
I then load links into main. In links I loadvar using php and sql.
I fetch links from my sql databas and print it in php.
But it doesnt work when I load links into main.
It only works when I view links.swf directly.
Example:
links.php
databas connection etc etc
mysql query etc etc
print"&name=$name";
print"&link=$link";
print"&status=DONE";
in flash(links.swf)i then have this:
status = "LOADING";
loadVariablesNum("links.php", 0, "POST");
if (status eq "LOADING") {
gotoAndPlay (_currentframe-1);
} else {
gotoAndPlay (2);
}
I have 3 dynamic boxes called:name,link and status.
and a stop() on frame 2.
So how do I get this to work? I´m sure you guys know the answer to this.
I also have another question.
When I look at the links.swf directly only the first post appears and I want the whole list so that the user/visitor can scroll the link list. How do I loop that in flash or is it in php/sql It should be done and if so,, how would the php code look like.
Would this work?
$query="select * from links";
$result=mysql_query($query);
$name=mysql_result($result,"name");
$name=mysql_result($result,"link");
print"&name=$name";
print"&url=$link";
print"&status=DONE";
How do I then make the name linkable?
I can only have one dynamic box in the flash right?
So that the name flashkit is the link to flashkit.
Please help me with the above,, really need to get this to work.
_root._parent.? Problem With "_root" Etc
I have been using flash for some time now and understand basic actionscript. However only just recently(last few days), i have gone onto more advanced stuff like cursors (advanced for me )
Well i am making a flash movie that incorporates all of my testings for people to see.
I am current;y working on a movie where the cursor is a knife, and when the cursor goes over this picture of someone, the knife (cursor) should go to and play the second frame of the knife (cursor) which has added blood.
I.e, when the mouse goes over the picture, the knife becomes a picture with blood, so in effect you are stabbing the picture. (don't worry, i'm not a sadist!)
At the moment my movie is like this...
drag drag2
(pic) (knife)
^ ^
| |
<<drag_mc>>
^
|
Scene 1 -----> navigation...
(root?)
Description: The scene one has two movies in it, "navigation" (which is OK) and the "drag_mc". The "navigation" is fine so i won't go into that. The "drag_mc", then has two movie clips in it, "drag" and "drag2".
I assume that to make the "drag2"(cursor) go to frame 2 when it hovers over "drag"(picture) that the "drag" should have a on(rollover)
command. I've put in the command, but i'm having troubles linking that to the "drag"'s frame 2.
I have just messed about with _parent and stuff, but never understood it.
Please could someone help me here, and/or tell me exactly how the _root and stuff works??
P.S. the on (rollover) is actionscript for the drag movie, and not in the movie if you get what i mean....
---newbie in distress---
EDIT: the picture did not come out as planned, but it is still readable. Just remember that the two movies ("drag" and "drag2") are placed in the "drag_mc" movie
A Button In A MC In Frame 1 Of _root Hiding An MC In Frame 2 Of _root?
Hi. I have a button, "auroraB" in a movie clip "startupMC" which is in frame 1 of _root. There is another MC, "scenic" in frame 2 of _root.
The button "auroraB" is clicked and takes the user to frame 79 of the MC in frame 1. From there the user clicks another button to go to frame 2 of the _root.
How do I get it to hide MC "scenic" in frame 2 of _root when the button "aurroraB" is clicked? Thanks
_root.send1.text = _root.total3.text;
Ok I have this script in a Movie Clip! First frame has
_root.send1.text = _root.total3.text;
2nd frame
gotoAndPlay(1);
So it updates!
Both send1.text and total3.text are input text fields in Flash! When I test this out it works fine but when I get it up online it doesn't work! The information in total3.text doesn't get sent to send1.text!! Also note both have Var titles asigned to them! Let me know if you can figure out what's wrong! Thanks!
Convert "_root" To _root
anyone know how to convert a string "_root" to the path specifier _root???
The Object() converstion function doesn't seem to be doing the trick..
hmmm
any help would be appreciated
cheers
"_root.MCname" + "_root.MCvalue"
Hallo,
how can I grab the value contained within a MC name, e.g.:
Code:
duplicateMovieclip(_root.myMC, "_root.myMC"+someIntegerVariable, level);
_root.myMC+someIntegerVariable._x = 100;
It happens that the parser cannot parse the second row, since
"Left side of assignment operator must be variable or property".
My target is to make the sum of two instance names as a single instance name.
thank you very much!
s---
_root?
hello
i have a clip inside a clip.. and in THAT clip i have a button that want to close the MAIN clip to be removed from the main time line.. it is located there....
doesent work with :
on (release) {
removeMovieClip (_root.news);
_root
Help I've got some flash 5 code that I have to edit yet I don't know flash 5 code well enough.
The problem is that all the code is referencing the _root directory, but I need to put it into another file. Now when I was using flash 4 code I would simply use relative references, but I don't know how to move outside of a file in flash 5. For Flash 4 I would go ../blah.
How can I do this???
Please help
What Is _root?
i have a movie with many Mc controlled by tell target action in it.now i want to add preloader scene to this movie.when i add the scene ,it works fine but in the movie some buttons in the MCs have goto _root and play <frame no.> these button send the movie to preloader,why???
what is root for the flash player---the maintime line of the scene it is right now OR maintime line of the first scene???
_root.a._x Eq -271 {
if (_root.a._x eq -270) {
stop ();
} else if (_root.a._x ne -270) {
gotoAndPlay (21);
}
Can someone tell me what's wrong with this if anything?
It should be working.. i dont get it..
-Paradoxz
_root
I'm reading and reading and I still don't understand for what is the _root on Flash.
And I neither understand the function of with (I used Tell Target).
Bye::::::::::::
Help With '_root'
Erm, I got this from a previous post....
_root.MUSIC.gotoAndPlay("MUSICOFF")
What would I do if I wanted it to be the same but to level 7??
_root
Where is the _root command in the actionscript menu
If _root ?
Hello friendly flashers,
I have a new problem.;-)
Here is the idea.
It has to be a check for a button. And then goto the correct frame.
if it's onframe 1 goto frame 40
on (release) {
tellTarget ("_root") {
gotoAndPlay (40);
if (_root) {has to check frame 2
tellTarget ("_root") {
gotoAndPlay (41);
}
}
}
}
Hope you understand my question.
Thanks in advance
J
_root Help
i'm desiging a website for my friend. on request, i made all buttons in a movie clip that have pull down buttons. a nifty trick, but i cannot get the buttons to work properly.
i use normal mode, and it hasn't worked properly. i've heard that to function, it needs the _root. command, but i have fooled around with it and am better off asking for some real help. if you could get one button to work, i could copy/paste/edit for the others.
i'd like the buttons to work when pressed. the content is on scene1.
please help
stews
_root. What? Please Help
hey flashers,
ok, i have a movie clip, inside the movie clip is a button that when clicked, is supposed to load a movie into a blank movie clip on the main timeline. its not working as you probably figured. I gave the blank movie clip on the main timeline an instance name of "dtext". the action script i have for the button is this.
Code:
on (release) {
loadMovie ("dynamic text box.swf", "dtext");
}
i know it has something to do with that .root command, but i cant figure it out. where does the root command go, and is there anything else i am doing wrong? please help.
Jacob
_root?
I want to go down multable levels in movie clips.
and i thought you use root and give each movie an instance name. so like
_roor.movie1.movi2.gotoAndPlay(5);
but it does not do anything, am i writing the code wrong
|