Control Main Movie From LoadedMovie
I have loaded an .swf on to my main movie ("menu"). The loaded .swf has a button that unloads it when pressed, but I would also like this button to reset the main movie ("menu") back to its start.
All help appreciated.
FlashKit > Flash Help > Flash General Help
Posted on: 01-17-2003, 04:53 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Scale LoadedMovie From Main.swf
How's it going? I'm trying to scale the size of an external .swf from the main.swf, if that's possible.
something like this:
//loading a game and exit button to level 2 and 3
loadMovieNum("game.swf",2);
loadMovieNum("exit_btn.swf",3);
//want to launch game at 150% of default size
"game.swf"._xscale=150;
"game.swf"._yscale=150;
//set possition of game (all from place of load script)
"game.swf"._x=200;
"game.swf"._y=150;
I know this code isn't correct, but I'm looking for something similar if it's even possible. I've tried loading my game.swf into a mc but then I have trouble with my games _root.
Thanks for your help.
Fast Forward And Rewind Buttons To Control Movie Clips AND Main Movie
I am creating a software training movie in Flash (MX). The main movie has text, sound and animations directly on the main timeline, and also includes external swfs (video screen captures) that are loaded dynamically into a movieclip target.
loadMovie("bkr_openpgm.swf", "mc_finvideo");
I'm not importing these videos because they can be quite large after importing (my video capturing software can export as swf and avi). I will never play more than one movieclip at a time (so I use the same movieclip to load all movies: mc_finvideo), and there can be many frames in between movie clips where there's only non-movieclip stuff going on on the main timeline. After I finish playing a movie clip , I unload the movie from the movieclip using the following on the frame on the main timeline where the movieclip should end
mc_finvideo.unloadMovie()
I have play, pause, fast forward and rewind buttons on the main timeline that control the main movie just fine. The play and pause buttons also control the movieclip fine.
However, I'm having problems with the rewind and fast forward controlling the movieclip. The button logic works fine (moves play ahead or back 100 frames) UNLESS I click the rewind button at a point within 100 frames AFTER a movie clip has unloaded. Then (assuming the last movie clip was at least 100 frames long), the movie goes back to a frame where there should be a movie loaded, but of course there isn't, since the frame that loaded the movie clip wasn't hit.
Here's the code for the rewind button's on release event:
intCurrFrame = math.round(_currentframe);
intMCCurrFrame = math.round(mc_finvideo._currentframe);
//if the movieclip is closer than 100 frames
// to the beginning, go back 100 frames
// otherwise unload it
if ((mc_finvideo._currentframe - 100) > mc_finvideo._totalframes) {
mc_finvideo.gotoAndPlay(intMCCurrFrame - 100);
} else {
mc_finvideo.unloadmovie();
}
this.gotoAndPlay((intCurrFrame - 100));
The fast forward button is similarly problematic -- if I click fast forward within 100 frames of a frame where a movie clip will load, the frame that the movie fast forwards to has no movie clip playing because the frame that loads the clip was skipped over.
Can anyone help me make this work? (Maybe I'm going about this whole thing the hard way?)
I can post a sample fla if it will help clarify.
Thanks
MC And Control Of Main Movie
Sorry for the seemingly inept question, but I cannot figure out the answer....
I have a movie clip within the main movie that I want to use to control where the user goes (sort of a menu system). Well, that's actually what it is......
Anyways.....
How do I tell the buttons with the movie clip (menu) to go to a certain scene within the main movie? I have tried several different combinations, but the closest I have gotten is being able to access the very first scene of the main movie; which starts the whole problem over again.
Thanks for saving the remaining few hairs on my head, before I pull them all out.
Control MCs From A Main Movie--please Help
I am still pretty new to Flash and I have a problem with a web site.
(using Flash 5)
I have a main movie that basically only shows buttons for navigation and a "box" in which movieclips should be loaded on button-click.
I created that main movie which has one frame so far (only showing the buttons and the box). I also have two movie clips so far, one is named "company", the other one "editorials". Let's stick with these two for now.
My problem is, I really don't know where in my main movie I should place these movie clips. Do I put them in frame 2 and 3?? And what action should the buttons have to load and unload these movies?
If someone wants to help me here, please make it foolproof...I really need help!
THANKS!!
How To Control The Main Movie?
From a movieclip in my main swf, I load an external movie using this code:
loadMovieNum("gallery.swf" ,1)
While the 2nd external movie(gallery.swf) is playing, you can still here the music and the movie still keeps playing in the background from the main swf. Which is O.K., except when I unload the 2nd movie, I want it to go back to the very beginning of the main movie. But while experimenting, I keep getting overlapping sound loops.
My question is:
Is there a way to unload the main swf or clear it, while # 2 movie plays, then restart it (preferably without the preloader) after unloading movie #2?
Control The Play On The Main Timeline From Within A Loaded Movie (not A Movie Clip)?
Question... I have a movie (main movie) that loads another movie (movie 2) automatically. Movie 2 contains a button that loads yet another movie (movie3). Now I’m having trouble with this next part... When movie3 loads I want "main movie" to stop where it’s at in the timeline and stop all other loaded movies until the user clicks another button where upon movie 3 will go away and "main movie" will resume. Movie 2 is like the paper clip guy in Word and movie 3 is my help movie. Therefore, it can be accessed at any point during the main movie and I don’t want to use a goTo command to jump to a frame label or scene. Does anyone have any idea how to control the play on the main timeline from within a loaded movie (not a movie clip)?
Control Main Movie From External Swf
hello all,
When i load an external swf into my main movie, how would I get a button inside the external MC to back and play something on the main timeline?
for instance if i have a home button in the ext. MC and want it to go play the frame labeled "home" in my main movie?
*note: using FMX2004
Thank you
Control A Movie From The Main Stage
Ihave a mc on my main stage however when a button is pressed on the main stage i wish the mc to return to a certain frame of the mc.
I have seen people post about this before so know it can be done and no doubt its relatively easy coding, however it avaids my knowledge..
Any Help Gratefully appreciated
[F8] Control The Main Movie From An External Swf
I have an external .swf loaded into in my main movie and I would like to direct a script that when the external swf is unloaded it goes to a specific frame label in the main movie. Is it possible to control the main movie from an external swf?
Thanks
Loaded .swf And Main Movie Control
hey guys simple question needing answered
i have a flash file where the .swf files load in on to the stage (this works fine). but basically what i need to know would be how to edit the follwing code so that when a button is press in the loaded .swf it will go to a certain frame on the main flash file
if (Username_txt.text == "admin") {
gotoAndStop("admin_page");
}
i've tried adding _root, _parent to the start but that doesnt work is there any other code i should try
thanks in advance
Control _level From Main Movie
When the movie loads, it also loads a movie onto level 1. When a button in the main movie is pressed, I would like the movie that was loaded on level 1 to gotoAndPlay(1);.
Any thoughts on how I can do this?
Thanks in advance
Control Movie Clips Inside Main Movie
Please help me! Maybee it's a stupid question?
I'm trying to create an animated movie. I created 4 movie clips inside my main movie (10 frames in each movieclip) I would like to play first movie clip when it's finished start to play the second, then third, fourth.... and I placed each movieclip in the single frame on the timeline. But when I played movie I only see the last (fourth) movieclip and don't see first 3 clips. Maybee somebody can help me with ActionScripting, or maybe can tell me where I can find some information.
Thanx.
Simple?: How Do I Control Main Movie With Movie In A Different Level?
Hi,
I have a main movie (on level 0)with other movies getting loaded into other levels. I want to be able to target a specific scene in that main movie from the movies in the other levels. How do I do this?
Any help is greatly appreciated. The sooner the better.
Thanks in advance,
D
Control Function In Main Movie From Loaded Movie
I have a main movie (securityGrid) setup. It is a form for adding and updating user information for an application.
I have a second movie (empSearch) that allows me to search the user database, so I can add a new user to the application. I want to use this movie as the default search movie in other movies
I have an empty movie clip (holdMovie) in the main movie (securityGrid) that loads (empSearch) using a on press function with a button. It also passes in parameters from (securityGrid) to tell (empSearch) what the output parameter is and that it is a movie and not an HTML call. This part works fine.
loadMovie(empSearch + varString,_root.holdMovieMC);
After I use (empSearch) to find the person I want, I click a button to send that information back to (securityGrid). This part does not work. I've tried many methods of getting this work.
Set a global
outputResults = itm.empName + "," + itm.loginId
_global[outputVariable] = outputResults;
This works, but I can't find a way to trigger a function in (securityGrid) to unload (empSearch) and then fill in the add row form in (securityGrid).
_root.getAddUserForm(outputResults);
Does anyone have a simple example of what I am doing, so that I can possibly figure out what I am doing wrong? The movies and database are on a Intranet, so I can't post an example.
Control Main Timeline From Within A Movie Clip? Help
Please help...
I have a video game on the main timeline of a scene. The scene label is "Game"... before the game starts, I have frame 1 of the main timeline attach the movie clip "Instructions" and play it. Once instructions reaches the end, I have Flash remove the video clip(works) and I want it to go back to the main timeline(Game) and play frame 2. What command do I use to have it do this? I tried:
Game.gotoAndPlay(2);
_root["Game"].gotoAndPlay(2);
BUT it Doesnt Work! I assume because "Game" is the Scene name, not a movie clip name... Any ideas on how to do this??
THANK YOU!
PLEASE HELP - Movie Clip Control Of Main Scene
Hi,
my problem that is driving me crazy:
I have a movie clip playing on a stopped frame on my main scene, what I need is for when the movie clip within the scene reaches the end frame for the main scene to gotoandplay another frame,
I keep trying variations of _root.goToAndPlay("Scene 1",2) on the last frame of the movie clip but it doesn't work. please please help,
Thanks
Using External Movies To Control The Main Movie
Ok this probably sounds complicated but I'll try to break it down.
In my Flash Movie, I have used loadMovie to load an external .swf.
From within that external .swf I had movie clips that used _root to control the main timeline of that .swf (not the main movie), but of course it doesnt work when I test it.
I also have a 'close window' button inside that .swf that tries to unload the blankMovie in my main movie, but that doesnt work either.
Is there something I'm missing so these elements can talk to one another?
Control Main Timeline From Within A Movie Clip
Is it possible to control the main timeline from within a movie clip without a button? Basically what I am doing is, I have snow using Actionscript on the main timeline, actually I have two snow effects. One is just regular snow, the other is snow that "sticks" and plies up when it hits a MovieClip.
Then, I have a couple other movie clips on the main timeline as well. One is a changing background and the other is snow at the bottom of the screen piling up.
I have 3 frames on the main timeline that keep looping to produce the snow, then inside the movieclips I have about 215 frames. Now, at the end of one of those movie clips, I want the one that was piling up snow to fade out, along with the snow effect that was piling on top of it. What I did was created another scene. However, I can't get to that scene from inside of a movie clip without a button, can I?
Thank you very much in advance.
How Do I Control Main Movie From Nested Clip? Help
I KNOW i'm just getting some punctuation mark wrong, right?
I have a dozen sub-movie clips nested in my main movie clip (Scene 1) and I would like to set up action frames in these sub-movies that tell the playhead in the main movie to gotoframe, etc... can someone send me the simple gotoframe script?
when i use gotoframe("Scene 1", 5) or gotoframe(_root.5) ... 5 being the frame i want to jump to... Flash tells me it contains no errors, but it just wont work!
thanks!!!!
jason
Can A Movie Clip Control The Main Timeline?
ok, heres the deal, im making a game in which if you hit the movie clip (path_mc) you go to the next level (the next frame). The script is on the player.
heres what my script looks like:
onClipEvent (enterFrame) {
if (this.hitTest(_root.path)) {
//action to get to timeline{
nextFrame()
}
}
}
i need a way to preform an action from movie clip to timeline
i tried _parent.timeline, _root.timeline is there any way i could set timeline as a variable?
please help.
thanks in advance.
Control Of Main Movie From Symbol Movies
To help keep things organized, I built movie clip symbols to keep my main movie timeline clean, and placed the symbols inside of the main movie. I would like to do something like this:
if (movie symbol is finished playing)
{
gotoandplay(3) --- movie clip finished, move to the next one
} else {
gotoandplay(1) --- movie clip not finished, keep looping
}
Any ideas on how to get the main timeline to continue from a movie symbol?
Thank you,
~ Nick
Component To Control The Playing Of The Main Movie
Hi everybody,
I haven't ever created a movie with a media controller before, and I do not know how it is done.
If I have a main movie, with movieclips loaded into levels, or into other movieclips, how can I create (or use a component) to control the playing of the main movie (and everything that happens in the movie), so I am able to rewind, pause and play?
Thank you very much for your help.
Peace,
Cayo Hueso
How Can I Add An Actionscript On The Main Movie That Will Control An External Swf:(
help me guys, i have two movies, mainmovie.swf and loaded.swf...
loaded swf has movieclip inside it named button1.
i want to create an button1.onRelease = function(){} but instead of writing the actionscript on the loaded swf movie. i added it on the mainmovie.swf...
is this possible, i will control the external movieclip by adding its actionscript in the mainmovie... the loaded.swf doesnt have actionscript, all of my as will go on the mainmovie... help please
Component To Control The Playing Of The Main Movie
Hi everybody,
I haven't ever created a movie with a media controller before, and I do not know how it is done.
If I have a main movie, with movieclips loaded into levels, or into other movieclips, how can I create (or use a component) to control the playing of the main movie (and everything that happens in the movie), so I am able to rewind, pause and play?
Thank you very much for your help.
Peace,
Cayo Hueso
[help] Using Buttons In Clip To Control Main Movie
Newbie Flash MX Actionscript question.
Kinda new at programming.
Constructing main movie (lets call it "main").
Constructing a movie clip within the main movie (lets call it "navbar").
Inside the clip are various buttons set to take me to different scenes in the main movie on release. Problem is, they're not working.
Actionscript applied to the buttons within the movie clip reads:
on (release) {
gotoAndPlay("Scene 2", 1);
}
have also tried
on (release) {
_root.gotoAndPlay("Scene 2", 1);
}
and
on (release) {
_parent.gotoAndPlay("Scene 2", 1);
}
Any idea what I'm doing wrong?
Any help is greatly appreciated. Thanks.
Communicating From One LoadedMovie To Level0.Movie
Hey guys, wasn't sure if this was a newbie question or not, but as a newbie to the forum, thought it was best suited here.
I am quite lost in a maze of swfs right now, so I hope I can ask this correctly. I am using ActionScript 1 and Flash MX 2004.
I have a base swf to load other swfs into using JavaScript. A specific variable will load specific swfs. This all works fine for now.
Basically, my base.swf will load a swf called ask_female.swf. This ask_female.swf has a Button in it. On this button is the actions:
on(press) {
_root.getURL("javascript:touch('hair')");
_root.message="hair"
}
The javascript part seems to work (as it tells the base to gotoNextFrame fine), but the message variable doesnt seem to pick it up.
What I am really asking is, is _root the way to go when talking from swf to level0.swf?
Any help would be appreciated, or if you could ask questions to help me ask my question better.
Thanks guys! My project is in your hands!!
Control Main Timeline From Clip Inside Movie
Have a movie clip on my timeline(its a button)
_root.home.onRollOver = function(){
_root.home.gotoAndPlay("over");
_root.home.back = false;
_root.home.play();
}
_root.home.onRollOut = function(){
_root.home.gotoAndPlay("out");
_root.home.back = false;
_root.home.play();
}
_root.home.onRelease = function(){
gotoAndPlay("main", 1); }THIS IS WHAT I CANT GET TO WORK
When I click the button nothing happens. Ive tried..
_root.gotoAndPlay("main", 1);
gotoAndPlay("_root.main", 1);
gotoAndPlay(_root."main", 1);
Ofcourse none of theese worked.
Can External Swf File Control The Main Movie Volumn?
can anybody help me?
i have a main movie and i can load external swf which contain volumn and balance(pan). but i cant control the main movie bg sound's voulmn and balance with that external pan from external swf file. does anybody know how to do this, pls help me!
many thanx
Control Objects In Externally Loaded Mc's From Main Movie
hello, i was wondering if anyone knew, are you able to control objects like buttons and movieclips etc that are part of an externally loaded .swf from the main movie? so say you wanted the user to click a button somewhere on the main movie and you wanted that to trigger a circle located in the externally loaded .swf to change to 80% of it's original size. how would you go about that? it's just a need an example to get an idea of how the coding goes.
by the way can you do the same thing with variables? change the values of variables located in the externally loaded mc in response to something happening on the main mc?
thanks in advance.
Main Timelline Control With Button In Movie Clip
I'm trying to make a photo gallery site with a dropdown menu. Within the menu are buttons to jump the main timeline to the corresponding scene, each scene will have a different group of pictures.
I can get the buttons to work only if I don't have a 'rollover' and 'rollout' control on the dropdown menu (ie if the menu movie clip is NOT animated).
I'm pretty unfamiliar with actionscript so I would love some help.
http://www.missouri.edu/~bdlhb9/menutest.html
Here is the link to what I have. As you can see the buttons are not working but the movie clip is. How can I tell the buttons to work?
Thanks.
Control A Dynamic Movie Clip From The Main Timeline
Hi everyone,
Here is the problem, I have two .swf files
one of them is the base movie that loads data about a template, and then loads the template (2nd movie) inside an empty movie clip on stage. Now I want to load an image inside a movie clip which is inside the template(2nd movie) using AS from the main timeline (base movie).
Thanks is advance
Ameretat
Make Movie Clip Control Main Timeline
i just got a navigation menu from someone but i am having a problem using it. it is done in movie clips and not buttons, so how do i get it to control the main "timeline" or "movie" with which it resides?
i am using flash 8.
any help would be greatly appreciated!
matt
Sound Control Loads Into Main Movie Incorrectly,
Hi all,
I have a sound controll a.s. in which I changed the direction of the glide to suite my site. When played as a fla, it works fine, when loaded to the main movie, in a mc, the loaded movie does not directly load into the mc, and the controller glide jumps out of place. I am a beginner, so if you can explain in lay terms that would be spelndid. MX in Windows. Thanks.
start_btn.onRelease = function() {
myMusic = new Sound();
myMusic.attachSound("ChopinWalz.mp3");
myMusic.start(0,100);
};
slider.onPress = function() {
startDrag(this, true, _root.groove._x+100, _root.groove._y, _root.groove._x, _root.groove._y);
};
slider.onRelease = function() {
stopDrag();
};
slider.onMouseMove = function() {
myPoint = new Object();
myPoint.x = this._x;
myPoint.y = this._y;
_root.groove.globalToLocal(myPoint);
_root.myMusic.setVolume(-1*myPoint.y);
updateAfterEvent();
};
stop_btn.onRelease = function(){
myMusic.stop()
;
}
Need Control Over Main Mc From Final Nested Movie Clip
I have created a flash promo banner for my site but am having trouble controlling the loop of the entire movie. I am fairly new the to AS so it may be a very simple solution that I am just missing. I have nested 3 Mc (wd_mc, pd_mc, id_mc) and am having trouble returing to the main MC wd_mc
I have used:
_root.gotoAndPlay()
this.parent.gotoAndPlay(1)
wd_mcgotoAndPlay(1)
All in the last Action frame of the final nested MC.
And none have proven to be any success. There is a link below to my website with the animation playing, as you can see it only plays once and the final Mc continued to loop itself. I want it to loop from the Main Mc (wd_mc) as this will look more professional. Can anyone offer any ideas. The actual file is also posted if you need to see inside of the fla. for any clerification.
[url="http://www.msu.edu/~townse85/is2k.html"]
Please help...been at this for three days.
Thanks
How To Control Main Timeline From A Button In A Scrolling Movie?
I just can't figure it out... I want a button to have the main timeline play when pressed - it is part of a movie in a scroller, so I need it to reach out from the scroll movie to the main timeline and tell it what to do, but all I have tried isn't working.
Thoughts?
Thanks.
Control External Movie Clip From Main Swf - Works In FP6, Not In FP7 - Why?
Hi,
I'm loading an external clip into the main swf, and then endeavouring to control it from the main swf. If I publish as Flash Player 6.0 it works. If I publish as Flash Player 7.0 it doesn't work.
Why? I'm using the correct variables syntax etc...This is driving me mad!!!!
I need it to be FP 7.0. The images should scroll left to right depending on what button is pressed.
Files attached - please take a look...
Control External Movie Clip From Main Swf - Works In FP6, Not In FP7 - Why?
Hi,
I'm loading an external clip into the main swf, and then endeavouring to control it from the main swf. If I publish as Flash Player 6.0 it works. If I publish as Flash Player 7.0 it doesn't work.
Why? I'm using the correct variables syntax etc...This is driving me mad!!!!
I need it to be FP 7.0. The images should scroll left to right depending on what button is pressed.
Files attached - please take a look...
Control Main Movie From Externaly Loaded .swf File
wanted to know how its possible to control main movie from externaly loaded .swf file.
for example:
i have mainmovie.swf in which is loaded 2ndmovie.swf
and in 2ndmovie.swf is button which plays mainmovie.swf 2nd frame. how to make it??
Control Main Movie From Exlernal Movie
So I have a main movie where I load external swf's with the mx.controls.loader on level 100, each external swf/loader in it's own frame and I put in a framelabel on each frame with the loader in the main movie.
I want the external movieclip to go to a new framelabel in the main movie when it ends, is there a way to do that witout puttin in a buttons?
I tryed something like this in the external swf, but no luck:
Quote:
on(enterFrame){
_level0.gotoAndPlay("news");
}
Code:
this.onEnterFrame = function() {
_level0.gotoAndPlay("news");
};
"news" is a framelabel in the main movie
Using Movie Clip To Control Main Movie
i have a movie clip sitting on my stage. the movie clip is just 4 buttons
they are : skip back, replay, continue, and skip foreward
when i click (for example) the continue button, i just want the main movie to play.
this is what i have on the button in the movie clip.
Code:
on (release) {
tellTarget ("_root") {
play();
}
}
but its still not telling the main movie to play.
help please
Dynamic Html Link Tags To Control Loading Of External Swf Into Main Movie.
Sorry about the long, long title but I thought I better put it all there just in case some can solve this problem and other can dfind it easier.
Ok... Here we go:
1.- First :: I have a main movie which dinamicaly loads external swf files.
2.- second :: some of those external files contain dynamic html with css formating.
3.- third :: my problem comes here where I want a <a> tag to load a new external swf into the main movie.
Any ideas... have been seaching for days and can´t seem to find any info!!!
Please help,
acegogo
Dynamic Html Link Tags To Control Loading Of External Swf Into Main Movie
Sorry about the long title but I thought I better put it all there just in case some can solve this problem and other can find it easier.
1.- First :: I have a main movie which dinamicaly loads external swf files.
2.- second :: some of those external files contain dynamic html (.txt-files)
3.- third :: my problem comes here where I want a <a> tag to load a new external swf into the main movie.
Any ideas?
Please help,
Kejsaren
Loading A Movie From A Movie On Main Timeline, To A Specific Frame On Main Time Line
I need help loading a movie from a button in a movie on the main timeline. To a specific frame on the main timeline.
i.e. I have a navigation movie, in it is a load of buttons. I want to load separate movies to a blank movie on a specific frame on the main timeline.
I guess I am having target problems, I can load the movie in the main timeline, but not the frame i want it or the the blank movie in that frame.
Loading Movie Into Main Timeline From Movie Clip Within Main Movie
Hi there,
I'm having major difficulties loading external SWF's into my main movie. The button actions are in a movie clip within the main movie. I've used the following AS to load in my external SWF files on higher levels:-
mybutton_bn.onRelease {
loadMovieNum("two.swf",1);
unloadMovieNum(2);
unloadMovieNum(3);
unloadMovieNum(4);
unloadMovieNum(5);
}
Similarly, my external text files are not loading!
myLoadVars = new LoadVars();
myLoadVars.onLoad = function() {
my_txt.htmlText = myLoadVars.myHTMLdata;
}
myLoadVars.load("textfile.txt");
All works fine until I upload to the server. It's really driving my around the bend. Any suggestions will be gratefully received.
Many thanks
Q.
|