Navigating Btwn External Swf/main Timeline?
i'm having trouble understanding navigation with externally loaded swfs. i want a button press to load one of the external .swfs (chosen randomly) into a container movieclip already on the stage. when it finishes playing that, i want the playhead to return to this frame and run again. the problem is that i'm inexperience with using external swfs and i'm not sure what happens with the playhead while this external swf plays. does it keep refreshing this frame?? or does it stop temporarily while the external plays (and if so, how do i control it from there?) below is my code: Code: //remove movie clipmcContainer.unloadMovie(); //limit # of external that can be swfs loadedmax = 3; // * -------- FUNCTION TO LOAD EXTERNAL SWF ------- *//loadContent = function(){//max count not reachedif(counter>=max){ gotoAndPlay("transition1"); } else {selectRandom();counter ++;mcContainer.loadMovie(path+randomFile);}}// * -------- FUNCTION TO SELECT RANDOM FILE------- *//// * -------- adapted from Kirupa Chinnathambi ------- *//selectRandom = function(){filename = ["p01_01.swf", "p01_02.swf", "p01_03.swf", "p01_04.swf", "p01_05.swf", "p01_06.swf"];path = "http://a.parsons.edu/~lisa/spring04/interactivity/final/swfs/";i = filename.length;//randomly select swfk = Math.floor(Math.random()*i);randomFile = filename[k];return(randomFile);return(path);}// * -------end kirupa code ----------- * //// * -------- BUTTON FUNCTIONS --------- * //// each button calls same load functionb1.onPress = function(){loadContent();}b2.onPress = function(){loadContent();}b3.onPress = function(){loadContent();}stop(); thanks for your help. i am kind of new and probably making many mistakes, but i cant find the answer here or on actionscript.org, nor in the macromedia help and starting to feel dumb
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 04-27-2005, 10:29 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Navigating Btwn External Swf/main Timeline?
i'm having trouble understanding navigation with externally loaded swfs.
i want a button press to load one of the external .swfs (chosen randomly) into a container movieclip already on the stage. when it finishes playing that, i want the playhead to return to this frame and run again. the problem is that i'm inexperience with using external swfs and i'm not sure what happens with the playhead while this external swf plays. does it keep refreshing this frame?? or does it stop temporarily while the external plays (and if so, how do i control it from there?)
below is my code:
Code:
//remove movie clip
mcContainer.unloadMovie();
//limit # of external that can be swfs loaded
max = 3;
// * -------- FUNCTION TO LOAD EXTERNAL SWF ------- *//
loadContent = function(){
//max count not reached
if(counter>=max){
gotoAndPlay("transition1");
} else {
selectRandom();
counter ++;
mcContainer.loadMovie(path+randomFile);
}
}
// * -------- FUNCTION TO SELECT RANDOM FILE------- *//
// * -------- adapted from Kirupa Chinnathambi ------- *//
selectRandom = function(){
filename = ["p01_01.swf", "p01_02.swf", "p01_03.swf", "p01_04.swf", "p01_05.swf", "p01_06.swf"];
path = "http://a.parsons.edu/~lisa/spring04/interactivity/final/swfs/";
i = filename.length;
//randomly select swf
k = Math.floor(Math.random()*i);
randomFile = filename[k];
return(randomFile);
return(path);
}
// * -------end kirupa code ----------- * //
// * -------- BUTTON FUNCTIONS --------- * //
// each button calls same load function
b1.onPress = function(){
loadContent();
}
b2.onPress = function(){
loadContent();
}
b3.onPress = function(){
loadContent();
}
stop();
thanks for your help. i am kind of new and probably making many mistakes, but i cant find the answer here or on actionscript.org, nor in the macromedia help and starting to feel dumb
Navigating The Main Timeline From Embedded MovieClip
I somewhat new to Flash and am using CS3. Not sure why this isn't working. I have an animation that I want to play in between navigations. Here is the code that I am using. The first part is the code within the animation and the second chunck is what I have in the main timeline.
these are the errors i get:
1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:DisplayObjectContainer.
Attach Code
parent.gotoAndStop(parent.nextSection);
var nextSection:String;
homeButton.addEventListener(MouseEvent.CLICK, homeClick);
function homeClick(evt:MouseEvent): void
{
nextSection = "home"
boxAnim_mc.play();
}
Navigating To Frame Label In Mc From Main Timeline
Lets say that in my main timeline, I have a number of frame labels. On stage I have a movie clip (let's call it bg_mc) which contains a tweened animation that has been looping repeatedly (so it has its own timeline with its own frame labels).
I would like this to happen:
- On the main timeline, the playhead enters a specific frame called "newBackground."
- When that happens, I want the playhead in bg_mc to jump to the first frame in its timeline, "beginLoop."
How do I accomplish this?
Thanks so much for your help!
David
Loading External SWF From External SWF Onto An Empty MC On Main Timeline?
Hi Everyone,
Please bear with me while I explain. I have an external swf that loads into a frame in the main timeline, into an empty MC. I can do this just fine. Once this clip is loaded, I have a button in this clip that loads another external swf into a different empty MC on the main timeline. I'm using loadMovie, and I need to load these movies into specific empty MCs. In other words,
I have the following:
MainStage: frame 5, contains empty MC "ClipA"; frame 6, contains empty MC "ClipB"
External swf: "Movie1"
External swf: "Movie2"
"Movie1" goes into "ClipA" of frame 5 on Main Timeline; and "Movie1" has a button that loads "Movie2" into "ClipB" of frame 6 on Main Timeline. I need help loading "Clip B" into "Movie2" from a button in "ClipA."
I'm sorry my message is so roundabout - it's not really a complicated situation, but explaining it makes it seem so.
Thank you in advance for any help - I'm assuming it's some sort of _root or _parent issue things I'm not quite understanding.
Thanks!
macgirl
External Swf's Into Main Timeline
Hi,
When I try to load external SWF's into my main timeline, I lose the ActionScript functionality of those files. Do I need to export the ActionScript and import it into the main timeline? If so, how do I do that?
Cheers,
Lucas
Controling Main Timeline From External Swf
How is this done? I have loadmovie load up some movies and on exit I want the viewer to be taken to a named frame on the main timeline.......any suggestions would be greatly appreciated....
Thanks
Can External Swf's Control Your Main Timeline?
My main question is :
Can an external swf that you load into your Main timeline control you Main fla timeline???
Basically, I have a simple preloader that of course pre-loads my main movie than it plays till it reaches a stop action then loads in an external .swf in Level_1 above Level_0, main timeline/movie.
...as my main movie is stopped on the main timeline, is there any way to have the external .swf I loaded in (with it's own preloader), tell my main movies timeline to play within the Level_1 external loaded swf's timeline? It's is already a part (loaded into) my main timeline on Level_1. Should'nt the external .swf's timeline control my main movies timeline in it's actions with a simple:
TellTarget (_parent)
Play
or
TellTarget (_root.parent)
Play
or
Tell the parent timeline of my main movie to go to a frame label and play???
I am so confused with everything I've tried & I can get it resolved. Can anyone help or know what I am trying to accomplish?
Any Pointers a PLUS!
Referencing Main Timeline From External Swf?
lo all.
here's the deal.
I've made a main movie with different scenes. I've also made another movie with forward and back buttons on it to control the main movie. The control movie is loaded into level1000 so it's always on top.
I've put the following code on the button in the loaded swf.
//this SHOULD change the scene on the MAIN movie.
on (release) {
_level0.nextScene();
}
it's not working though.. I can only assume it's going to level0 of the control movie and not the main movie. I've had a quick look through the forums and can't find an answer. I'm hoping someone here will help me out.
If anyone want to have a look at the files then just ask and I'll post a url.
cheers
Specimen
www.the-nervous-system.co.uk
External Control Of Main Timeline
Hi. I'm befuddled. hehe. I should know this, but for some reason my synapses aren't synapsing. My pages navigation is an external movie clip(I DONT KNOW WHY!heehee)and I'm having problems with that...but I can figure that out. What I'm trying to get ahead with is, should I place buttons in the MAIN movie(that's loading the external nav) for the navigation? Or is it feasible for me to have the buttons in the external nav to control the MAIN timeline? I'm sure all I need to do is use .root to tell it where to go, but I'm not sure if it can do that. Ummm. Let me clear that up. I have external movie clip loaded into main timeline of main movie. Can I control the main timeline with the bottons in an external movie clip? Thanks for any help. SOrry about the disorganization.
Can An External Swf Control The Main Timeline?
I'd really appreciate any advice about this.
I'm working on a Flash MP3 player that loads mp3s from the web. For back-compatibility, it also plays .swf audio files. At the end of each swf (song), there's an action: _level0.nextTrack(); which tells the player to load the next track and keep playing.
Works great online, but as a projector or in test movie, it never seems to get the function call so the music just stops.
Is this a security feature? Is it possible to target the main timeline from a swf that was loaded from the web?
To clarify, here's the situation:
Main Movie (player) loads song.swf into _level1. At the end of song.swf, _level0.nextTrack(); is called.
If both files are on the same machine, works like a charm. But if the player is on my local machine and song.swf is loaded from an http address, no worky.
FYI: There are already 1200 songs with that _level0.nextTrack(); bit of code. So changing it in all 1200 files really isn't an option.
Any ideas?
External Swf Controling Main Timeline. Possible?
Hello everyone, I have a problem I've been trying to figure out the past couple of nights and I'm getting no where.
I am bringing in an external swf a level above my "Main" timeline and allowing it to play after loading.
After reaching the end of this external swf's timeline, I want to advance to the next Frame Label on my Main time line, hence loading another swf.
Is it possible to control the Main timeline (_root) with an external movie?
I have created one main movie, containing actions layer (loading external swf), Frame Labels layer (with a stop action at the end of each) I also have a continue button on the Main timeline which will allow user to advance the timeline forward to the next Frame Lable and not have to wait for loaded swf to finish playing.
The external swf's timeline contains the following at the end of timeline:
_root.gotoAndPlay("WhyBuy");
stop();
Is this right? Can anybody shed some light?
Thanks,
Ramon
Control Main Timeline Of External SWF
Ok, I have an swf called "music.swf" loaded in to the main timeline of the main movie. It is in a movie clip called music
I'm trying to get it to go to frame 13 of the loaded swf from a button within a movie clip in the main movie and StopAllSounds as well.
if any could please fill in the blank
on(release) {
~fill in here~
}
Thanks
- Jared
Load An External At The End Of The Main Timeline?
Im sure there is a simple answer....I have a button that loads an external clip...but i also want that clip to appear once my main stage animation has finished....so its the first thing displayed once the display area is up.....
help me again someone
Loading External Swf At End Of Main Timeline
I am trying to externally load a auto news scroller swf.file at a specific point in my main timeline.
I have the container movie clip created. The only problem is anytime I try to loadMovie for the specific swf, it never appears.
The main.swf is 50 frames long. I want an external swf to automatically load into a movie clip on the 48th frame, with no user behavior needed. I'm familiar how I would do this in SWiSHmax, but Flash 8 uses a different approach and I'm not having much success.
I keep getting errors like "not yet identified.loadMovie("test.swf")
I input container.loadMovie("test.swf")
I tried
on ClipEvent (load) and I've tried on ClipEvent (enterframe)
I'm sure there is an easy solution and its the simplicity that eludes me.
Thanks.
Chad
Controlling Main Timeline From External Swf
Any help with this would be much appreciated.
Here's the problem. I've got a site that's loading several swfs from a main timeline into levels. So far so good. However, because I've got clicked state son buttons and other areas to reach those navigation areas I need to be able to tell a loaded external swf to target the clicked state of the navigation clip on the MAIN timeline. I've searched through the forum and found my solution only it won't work! I know I need to use _level0 rather than _root - I'm just wondering if I'm looking so deep with a/s it's not happening (the clicked state of abutton is 3 or so movie clips donw. Code below (top bits just a rollover thing specific to the loaded movie):
on (rollOver) {
gotoAndPlay("over");
}
on (rollOut) {
gotoAndPlay("off");
}
on (release) {
loadMovieNum("content_latestnews.swf", 1);
_level0.nav.navclip.button6.gotoAndPlay("clicked") ;
}
Thanks in advance!
[F8] Communication Between An External Swf And The Main Timeline
I've got a main swf file to which I am importing an external swf which contains my scrolling thumbnail panel. My problem is that I cant get the onRelease script on my thumnails to communicate with an nested mc in scene2 on the main timeline of my main swf. The main swf got to scenes, one for the preloader and one that containes my content. The one with all my content got nested mc:s in it. My target path from the external swf is to get to the main timeline of my main swf and from there in to scene2 where my nested mc:s are located. How do I get to them? I've tried:
on(release){
_level0.Main.main_mc.web_thumbs.web_thumb_frame.go toAndStop("mypack");
}
Where Main after _level0 is suppose to point to the second scene but this does apperently not work.
Targeting Main Timeline From External .swf
I am creating a looping movie that will load external .swf's into an empty movieClip (display_mc). I want to be able to have the external .swf target the main timeline once the .swf ends. I am putting script on the last frame of the external .swf attempting to target a specific frame on the main timeline. However, it isn't functional. Any suggestions on how to accomplish this will be greatly appreciated.
Sample Code:
MainTimeLine - Frame 1 = _root.loadMovie("external.swf",display_mc);
ExternalTimeLine - LastFrame = _parent.display_mc.gotoAndStop("frame");
[F8] Loading An External SWF To A MC On Main Timeline.
Hey, could anyone give me any pointers on how to load an external swf into a Movie Clip on my main stage, it's a banenr for the top of the site, i want it to load into another mc, externaly, if anyone could help, paste any code or anything, it'd be appreciated.
Regards,
Curt
Control MC On Main Timeline Through External Swf?
Can someone explain to me how to code from an outside SWF that needs to have a button that will close the swf - go to some type of ending animation and then at the end of that, go to a frame within the timeline of an attached MC?
Load External SWF's Into My Main Timeline
Hi,
When I try to load external SWF's into my main timeline, I lose the ActionScript functionality of those files. Do I need to export the ActionScript and import it into the main timeline? If so, how do I do that?
Cheers,
Lucas
Controling Main Timeline From External .swf.
i've started a thread within general posts...i wondered if anyone else here can help....i've been on this for two days now trying to sort it..
i'm trying to control the main movie timeline with an external swf. i.e. u press a button....song starts...song title comes up via frame20/60/90 etc...but the swfs are streamed and when one ends the next starts....when the next starts the title doesn't change...coz it ha no trigger...anyone help ?
see this thread for more info
other thread.....
http://www.actionscript.org/forums/s...d.php3?t=46023
Targeting Main Timeline From External SWF..
I have imported an external SWF into my main movie timeline which contains buttons. How do I target a frame on my main movie timeline from the external file? I've tried
on (release) {
_root.gotoAndStop(5);
}
I know this should be simple - can someone help please??
External SWF Controlling Main Timeline
Hi all --
I have a main SWF file that I am loading a smaller, external SWF file into (with loadMovie, if you care to know). Within that smaller file, I have a button -- ideally, this button should trigger an action within the main SWF file.
My problem is that I cannot get the external SWF file to control an action within the main SWF. I'm guessing there must be a way to do this, but I'm having some trouble here.
Thanks in advance... please advise!
Control Main Timeline From External AS
--------------------------------------------------------------------------------
This has got me stumped
The Requirement: To cause the Main Timeline to play(), gotoAndStop(), etc, on command from an AS3 class instance (defined in an external package).
The Situation: Two strategies have worked fine in the IDE (standalone player), but fail when uploaded to a server and run through a browser (IE7, FP 10,0,12,36).
Strategy 1:
Pass the timeline reference to the constructor (from the main timeline) thus:
myInstance = new myClass(this);
In the constructor use the reference (this -> tl) to call a main timeline function tl.myFunction(param) that calls gotoAndPlay(), etc.
Result 1: Works in IDE, fails on-line (i.e. no frame advance on gotoAndPlay() etc).
Strategy 2:
1. Define a CONST for user-defined events.
2. Dispatch the events from various places within class (instance) code thus:
var result:Boolean = this.dispatchEvent(new Event(MY_EVENT)); ('result' gets true)
Define listeners on the timeline like so:
myInstance.addEventListener(MY_EVENT,myFunction);
Result 2: Works in IDE, fails on-line (no frame advance on gotoAndPlay() etc)
What's going on that both approaches work in the IDE, but neither work in the browser?
Grateful for any clues.
Control External Swf From Main Timeline
I have a external SWF loading into a target on my main swf. Is there a way to control the timeline from the loaded movie from the main timeline. So , control B timeline from A. I've tried mcholder.gotoAndPlay (2); but it won't work. Also, how can I get the mumbers of frames from the external swf into the main timeline. Will a global variable work?
Thanks
Preloader For All External Swf's Plus Main Timeline?
I haven't been able to find anything that does a really good job of getting the combined total bytes and the combined loaded bytes of my flash movie along with all the external swf's that I'd like to load.
Where can I find a good script or sample movie that accomplishes this?
Ideally, I'd like have some clipLoader movie clip that I can put in the first frame of my main timeline, have it load everything up with a progress bar and go onto play the next frame when it's done.
I have 4 external swf's that I'd like to preload:
swf_1.swf, swf_2.swf, swf_3.swf, swf_4.swf
I have a movie clip (clipLoader_mc) that I've placed on the first frame of my main timeline.
On the first frame of the clipLoader_mc:
Code:
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
var clipInstance_array = new Array();
externalSWFs = new Array("swf_1.swf","swf_2.swf","swf_3.swf","swf_4.swf")
externalSPath = "swf_import/"
// load all your movies up onto different movie clips
loadAllClips = function () {
for(var i=0; i<externalSWFs.length; i++) {
//create empty clips
clipInstance_array.push("clip_"+i);
this.createEmptyMovieClip(clipInstance_array[i], this.getNextHighestDepth());
//load the clips up
my_mc.loadClip(externalSPath + externalSWFs[i], clipInstance_array[i]);
trace(externalSPath + externalSWFs[i]);
//setProperty(clipInstance_array[i],_alpha,0);
//clips_array[i].getBytesTotal;
}
};
loadAllClips();
This loads everything up nicely, but not sure where to go from here.
Any links or help would be much appreciated.
This is a good link, but there's a lot of extraneous functionality that I'm not sure how to cut out:
http://flash-creations.com/notes/dynamic_loadjpg.php
This link works well, but the bytes are traces and I don't know how to add it together and get it to display properly in my flash.
http://www.tek-tips.com/viewthread.c...1271807&page=7
Thanks
Reference Main Timeline From External Swf
im trying to tell my main movie to goto a certain movieclip in the timeline from my loaded external swf heres the code Im working with,
Code:
_level0.myMC.gotoAndPlay(45);
unloadMovieNum(1)
I can tell the script is executing because the external movieclip unloads itself but the main movie does nothing.
Any ideas or changes I could try?
Thanks
How To Access Main Timeline From External Swf
hello,
my main application is a sprite heres my code:
package {
import flash.display.Sprite;
import flash.display.Loader;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLRequest;
public class ROOT extends Sprite
{
public function ROOT()
{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, onComplete);
loader.load(new URLRequest("file.swf"));
addChild(loader);
}
public function traceMe():void{
trace("traceMe();");
}
private function onComplete(event:Event):void{
}
}
}
from my external swf (file.swf) contains a shape code:
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.display.MovieClip;
public class file extends Sprite
{
public function file()
{
var shape:Sprite = new Sprite()
shape.graphics.beginFill(0xff0000);
shape.graphics.drawRect(0, 0, 100, 100);
shape.graphics.endFill();
addChild(shape);
shape.addEventListener(MouseEvent.CLICK, onClick);
}
private function onClick(event:MouseEvent):void{
MovieClip(this.parent.parent).traceMe();
}
}
}
when my main app is a MovieClip (extends MovieClip) is working.
but my main app is a sprite i take this message
cannot convert ROOT@16b26df1 to flash.display.MovieClip.
can i change this line
MovieClip(this.parent.parent).traceMe();
to something like this Sprite(this.parent.parent).traceMe();
Call Main Swf From External Swf's Timeline
Hi!
I've got a movie with a few buttons in it. When you click on one of the buttons an external swf opens. At the same time a large, quare, white movieclip opens at the back of the external swf (the white mc is in the main movie). Okay, so for so good.
In the external swf there is a close button. When you click the button, the external swf goes to frame 14 to show a short closing animation. The last frame contains the following code:
TweenLite.to(_level0.contentback_mc,1,{_alpha:0});
this.unloadMovie();
The first line is to make shure the large white mc becomes transparent again. The second line is - ofcourse - to unload the external swf.
The problem is that the first line doens't work.
When I trace the first line from the main movie, the output contains '_level0.contentback_mc;
Oh, and the external swf is loaded in an actionscript generation container (contentback_mc).
Any suggestions how to make this work?
Thanks in advance!
Transition Between 2 External Swf's And Main Timeline(as2/cs3)
I'm working on a photography site. I have a main movie that loads external swfs into it. The main movie is broken down into a main city page (w/ a menu of 50 cities) and a specialty page (w/ another menu of 25 specialties), but only one is visible at one time. I have frame labels for each city and each specialty on the main timeline that will load in the page. What I'm tying to do is have a button link(a specific specialty page) on each city external swf that brings the user from the city page to a certain specialty page.
The problem is that the I first need to load in the transition animation that plays when the page goes from city to specialty then it needs to load in whatever specialty page the user clicked, but its on a whole separate timeline since their external swf's. So basically it's:
1. click a city on main timeline, goes to frame label
2. loads in external city page w/ photographer names
3. click specialty link button for that photographer (I'm using MC's as buttons)
4. goes to frame label on main movie timeline and transition animation plays
5. after that is done playing the transition, go to another frame label on same timeline that is for the specialty the user clicked
6. loads in external swf of that specialty.
specCorp = mc variable/button
start2 = frame label that plays transition animation
fineartIN = loads in external specialty page
specCorp.onRelease = function() {
_root.gotoAndPlay("start2");
gotoAndPlay("fineartIN");
};
I know this isn't right cause it's only playing the first part of the AS. I think I need to make some variables for each city/specialty and somehow reference them to see what city/speciality link button was clicked so it will load that page. Another issue is that the main time line will load in a random speciality/city page when the swf starts, but I was figuring I could turn that off when linking between the two sections. I'm thinking it should go at the end of the transition animation and then call up all these variables, but would it remember what link button the user clicked on? Ok any help/suggestions would be great. Thank you.
Peter
Linking To The Main Timeline From An External Loaded Swf
Hi everybody!
I have a projector that loads an external swf file. Here's my code:
loadMovieNum("057.swf",1);
The thing is that when the external file is loaded, I need to control a movie clip placed in the main timeline of the .exe projector.
Because the file is nested into the projector, I thought that I could link to it using _root, but it didn't worked:
_root.mymovieclip.gotoAndPlay(2);
Is it possible to do this?
Is it a path problem?
What am I doing wrong?
Thanks a lot!
Controlling Movieclip On Main Timeline From External Swf
How do I control a movieclip on the main timeline from an external swf?
I have a swf (eathealthier.swf) that is loaded into a movieclip (main_mc) on the main timeline (tour.swf). From eathealthier.swf I need to control another movie clip called sections_mc that is on the main timeline of tour.swf.
Thanks in advance.
Loading External .swfs Over Each Other In The Main Timeline
I'm creating a website right now. I have the site set up as a series of external .swfs that load into a movieclip (movieload) on the main timeline.
There are 10 external .swfs. These .swfs are all different color schemes, so each .swf has a header, navigation system and whatever text/animations are on that page.
The navigation has one drop down menu which is in a movieclip. The only way I can get the buttons to load up the movieclip is by using the following code
on(press){
_root.loadMovie("page1.swf","movieload")
}
Everything loads up fine. The problem I'm having is between loading up external .swfs it unloads the previous .swf first. So I get a blank screen between loading the swfs
But it only seems to happen with the drop down menu. All the other navigation buttons that are not in the movieclip work perfectly.
If anyone could help me out that would be great, I've been trying to figure this out for days and I'm stumped. Hope everything makes sense.
Cheers,
jeleia
Accessing Buttons In External Swf From Main Timeline
Hello,
I am loading external swfs into a main swf. So I have main.swf which loads menu.swf, along with ssp_home.swf and home.swf.
These all load at the beginning.
I also have two other swfs - transition.swf and writing.swf - and when you click on the writing button in the menu.swf I want to load the transition, followed by the writing.swf into the main timeline.
I am really struggling - how to you tell a button in menu.swf to do load something into main.swf from main.swf?
Thanks and best wishes,
Contolling External .swfs In Main Timeline
here is my problem. I am loading an external .swf into an empty movieclip called dropzone1. Here is the code:
Code:
on (release) {
gotoAndStop(25);
loadMovie("FoodPage.swf", _root.dropzone1);
dropzone1.onLoad = function() {
gotoAndStop("CTOM");
};
}
I need the external to completely load and then go to frame label CTOM. The external movie has a preloader to show the load progress. After the preloader, the playhead goes to the first frame and stops and it will not continue to my frame label. from what i understand the movie is not fully loaded so the gotoAndStop comand is just passed over. I would really appreciate some imput. Thank you
Controlling Main Swf Timeline From Button In External Swf
so i've searched the archives and it doesn't seem that anyone has had problems with this. i think it's a really simple answer but i'm flash-stupid so if this is a silly question, i apologize and hope for an answer! my project is due tomorrow and i just barely got my preloader to work.
anyway, i have a main swf that controls all of my external swfs. i have a keyframe every 5 frames that has a movieclip on it. the movieclip calls the external swf with loadMovie("bedroom.swf", mh_bedroom) (as an example) . the thing is, every external swf is like a movie that continues like a story (except the story is separated into 10 swfs). so i have a button in my first external swf that is:
on (release) {
_level0.bedroom.gotoAndPlay("67");
}
when i click it, it just gives me a blank white screen. i want the button to call the main timeline (the one that holds all of the movieclips for the external swfs) so that it will go to a specific frame that holds the next movieclip/external swf that is supposed to play.
i hope that made sense. and i hope it's an easy fix that i just can't realize!
any help asap would be REALLY appreciated! thank you!
Is It Possible To Get A Reference To The Main Timeline In An External Class?
Hello,
After spending more then 2 hours on google on how to acces the main Timeline trough an external class
i found no solution.
Does anyone know how to acces the main Timeline in an external class?
And can you acces a movieclip (the instance name) of a movie clip that is drawn on the stage and not
dynamically placed with addChild in an external class?
I hope to hear from someone.
Flash MX : Can External MC's Control Main Timeline?
Hey quick question...can a movie clip which is loaded from an external source control the main timeline? For example I have a set of buttons contained within a movie clip which is loaded externally onto my main timeline...can those buttons direct the swf to a specific frame on the main timeline? Also...is there any way to load an external movie clip into a specific LAYER rather than Level? Maybe these seem like stupid questions but any one who can gimme a little help to an actionscript noob like me - thanks a lot!
Linking To The Main Timeline From An External Movie Clip?
Hello,
Just a quick question. In a new project I'm using a lot of external movie clips and for the most past all the nav is in the main movie, but I have a need to call to a frame label on the main timeline from one of the external movie clips that's being called to. Can anyone help tell me how to link to this?
I thought I could just use the "/" or maybe "_level0" or "_root" but I can't figure it out exactly.
Thank you!!
Jason
Passing Variables From An External Movie To Main Timeline
So I've been fighting Flash (8 if you're curious) for a good half-day and even the internet is letting me down. I'm still in the learning stages, so I'm convinced it's something I'm just totally too dumb to have missed -- if anyone could send me in the right direction, I'd be forever grateful. I'm not going to be able to sleep 'til I figure this out!
So my project is setup like so: I've my main flash file, and it loads external .swfs into a movieclip on the main timeline at _root.content using the loadMovie function. In the first frame of external swf, variables are defined for number of bytes loaded, number of bytes total, and percent loaded. When the percent loaded variable (currently named as loadPercent) reaches 100, the movie begins. No problems there.
Then I have a loading bar on my main timeline. It is set to appear only when an external movie is loaded. Dynamic text fields display the bytes loaded, total bytes, and percent done accurately (path used from within the loader clip is _root.content.loadPercent). That works fine.
But when I try to write ActionScript containing if-statements that reference this variable, it fails to evaluate it correctly. I'm trying to use the loadPercent variable, but I've also tried creating a new one in the main timeline by referencing the bytesloaded/totalbytes variables. That also fails. I've tried declaring the loadPercent as a _root variable from within the external swf, and that didn't work. I tried declaring it as a global variable. No dice. I've tried using it in all kinds of different places, none of which work. Usually it seems to evaluate itself as either undefined, or as the formatted "100" that displays as dynamic text -- except that the variable held all that formatting, HTML-style, too. (I have since eliminated THIS problem by using different variables entirely for the two.)
The strangest part of ALL is that when I export and get the player to list my variables, _root.content.loadPercent SHOWS UP CORRECTLY. (As _level0.content.loadPercent, but this doesn't work for me either, if I try to use it.)
My wits are totally ending. If anyone knows any way to either a) obtain those two variables regarding the external swf from the main timeline or b) pass the variables properly from the external swf into the main timeline, please let me know.
Thanks!
s.
Communication Between External .swf And A Specific Scene On The Main Timeline
Hi,
I've got an issue here that sure is messing with my head...
I've got a main swf file to which I am importing an external swf which contains my scrolling thumbnail panel.
My problem is that I cant get the onRelease script on my thumnails to communicate with an nested mc in scene2 on the main timeline of my main swf.
The main swf got to scenes, one for the preloader and one that containes my content. The one with all my content got nested mc:s in it.
My target path from the external swf is to get to the main timeline of my main swf and from there in to scene2 where my nested mc:s are located.
How do I get to them? I've tried:
on(release){
_level0.Main.main_mc.web_thumbs.web_thumb_frame.go toAndStop("mypack");
}
Where Main after _level0 is suppose to point to the second scene but this does apperently not work.
Any ideas anyone?
Would be greatful for any help as I spent way too much time with this issue...
Thanx - KrilleMan
Load External Swf (quiz) Into Main Flash 8 Timeline
Hi there,
I am creating at learning module in Flash 8 on Mac OS X, I have four external swf quizzes created from the template. To load it into the main timeline, I made a movie clip, and successfully loaded the swf quiz into my main timeline, using loadMovieNum, and to get it to unload, I put in the unloadMovieNum script, but once the short quiz is completed, it does not go back to the main timeline. It just sits there at the end. I guess you can tell I'm new at this
If anyone knows what i should add to the movieclip actions to get my swf to go away and put me back on my main timeline, I'd really, really appreciate it!
Thanks so much!
Connie
Loading External Swfs Into Frames In Main Timeline...
I'm not very well versed in AS, let alone AS 3, but since I'm working in CS3 I figured this is where I should post; however, I sort of understand AS1 and am not married to the idea of doing this in AS3. I'm sorry if it's the wrong place! Please bear with me as I try to explain this--I can tell that this isn't going to be very hard to do, but it's just way beyond my abilities.
I have about 30 external swfs that are very simple--basically one image with tweened fades and rollover-to-pause actions--they're loaded onto the main timeline as a slideshow. There are no buttons for next/previous control, and each image needs to load one after another automatically.
Because I need to show graphically which image is showing (i.e., "5 of 30" shown as 5 of 30 dots filled in), I figured it would be easiest if I designate 1 frame per image (=one swf) on the main timeline. So, frame 1 will load 1.swf, frame 2 will load 2.swf, which will make it easy for me to color in the appropriate dots according to where we are in the slideshow.
What I need to figure out is to "pause" at each of the frames on the main timeline until the loaded swf is done playing. They're all different in length--some are 50 frames and some are 90 frames long.
I almost had it figured out from massive googling, but I honestly don't understand it well enough to tweak what I've found to do what I want it to do.
I hope my post makes sense! I would really appreciate it if someone could point me in the right direction.
Thank you so much in advance!
Linking External Sfw File In Main Timeline Lebel
Hi
I am using flashmx 2004. I am creating a presentation where the main (suppose "main.swf" )movie has seven "lebels" on the timeline. I am require to link to external swf files for each lebel which I can do by using the button script :
on (release) {
loadMovieNum("externalmovie1.swf", 0);
}
Now when I want to return back form the "externalmovie1.swf" to a lebel say "contents" of "main.swf" movie time line I am geting problem.
Can I get some help please what should be the code to link to "contents" lebel of main.swf
Thanks for your help
Deep
External Movie, Load Button In Main Timeline
Hi there,
Just new on this forum and hoping to get some help!
I've build a website that loads an random banner every time the page is reloaded. This is done bij the loadmovie function that loads randomly external .swf files.
I hope to establish, that when people click on the banner they get redirected to a certain point in the main timeline. So the external swf file is containing a button and when pressing it must work for the main timeline.
Doe anyone has a suggestion?
Thanks Rik
Loading External Swfs With Buttons (that Are Not On Your Main Timeline)
I found my problem. I just don't know how to target it. I'm trying to load an external swf, when releasing a button. The problem is the button is not on the main timeline, but instead nested in a movie clip. I just don't know how to target that button. I tried loading the swf with a button on my main timeline and it worked, so I know the problem is not with the movie clip loader class or the actual swf itself. I actually learned this from a note midway down the page in one of your tutorials..... http://www.kirupa.com/developer/mx2004/transitions2.htm
how can i target that button that is nested in that movie clip?
here's my actionscript btw
var myMCL:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);
artbar_mc.artBtn_1.onRelease = function() {
myMCL.loadClip("art_1.swf", "container_mc");
};
any help is much appreciated!
Linking From External Swf In Mc To Specific Frame Of Mc On The Main Timeline
Hi all!
I hope, somebody can help me with that:
I have a movieclip on the main timeline that is called "scene". In that MC I load an external swf ("text") into an empty MC called "container". The swf "text" has a button that unloads movie from the empty MC.
Now I would like to jump to a specific frame called "goaway" in the MC "scene". What code do I need for the button to go directly to the frame in the MC?
This is how I call the swf in the MC "scene":
stop();
createEmptyMovieClip("container", 1);
loadMovie("day11blase1.swf", "container");
container._x = 0;
container._y = 0;
To unload the Movie I used
on (release) {
unloadMovie("container");
gotoandstop("goaway");
}
which obviously did not work...
Can anybody help?
Thanks!
Monika
External Menu Wont Switch Scenes On Main Timeline
This may be something basic that I am missing, but I would appreciate any help on this.
I've got two movies, my "main" movie and a "menu" movie. Main is loading Menu, (which are just some buttons), and that part works fine.
The buttons themselves aren't doing what I want them to. I've got them scripted to go to different scenes throughout the Main movie, but they don't work.
My actionscript is on frame 1 of the Menu timeline and this is what I initially tried:
stop();
but_portfolio.onRelease = function (){
gotoAndStop("portfolio", 1);
};
I cannot get them to work from the external Menu.swf that is loaded into Main.swf.
I've also tried:
but_portfolio.onRelease = function (){
_level0.gotoAndStop("portfolio", 1);
};
&
but_portfolio.onRelease = function (){
_root.gotoAndStop("portfolio", 1);
};
I also tried putting the script on the button itself rather than in the timeline. These didn't work either:
on (release) {
_level0.gotoAndStop("portfolio", 1);
}
&
on (release) {
_root.gotoAndStop("portfolio", 1);
}
Any suggestions?
I'd appreciate any and all help.
Thanks.
Zoila
|