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




Preloading External Swf Loops Main Movie?



Heye, I am using multiple external .swf files that load into a main swf they all have preloaders. When the one movie loads in, it seems to send the 'Main' movie to the beginning of its 'Main' timeline. I'm guessing the the preloader is affecting the _root? I'm also using kirupa's Transitions for external swf's (http://www.kirupa.com/developer/mx2004/transitions.htm) I don't know if this is affecting it. For some reason this only happens every once in awhile, i'm not sure what is triggering it, but with the right combination of clicks, the 'Main' timeline loops and reloads everything. You can see it here:
http://www.cakecouture.net/new/test

I guess my question is, how do you make a preloader affect the timeline of the loading movie, and Not affect the _root timeline. I'm sorta new to this so lay terms would be appreciated. Thanks MUCHO in advance!!!!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 04-19-2006, 12:47 AM


View Complete Forum Thread with Replies

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

Preloading External .swf's And The Main .swf All In The Main .swf's Preloader
Hello everyone

My question is would anyone know how to preload external .swf's and the main .swf all in the main .swf's preloader? All feedbacks are welcomed. Thank u.

toneDigital

Preloading External Swfs By Way Of Main Swf
so i'm completely new to this thing and would appreciate any (and all) responses to this.

i've spent the past four hours reading every thread on external swfs and preloading them, and have tried almost all of the scripts for them, but they don't work for what i'm doing. i'm not sure why, but here is how my movie works:

i have about 15 separate swf files. i have one main swf file that has about 15 movieclips spread 2 frames or so apart. each frame with the specific movieclip has something like:

loadMovie("FIRST.swf", "mh_intro");

action applied to it

the way my movie is supposed to work is that one swf usually is followed by another swf, that is followed by another swf, so on. i figured the easiest way to do it was to just call "loadMovie" at the end of each swf, but was told that it wouldn't work if i wanted to preload all of my swfs since it would just replace the swf in the first place and take forever doing so.

does this make sense? i hope so. i'm really desperate! it's my final project for class and i've been trying to figure out a way all weekend.

again, thank you so much!

Preloading External SWF Into Movieclip On Main.swf
for some reason this seems to be a hot topic recently. yet all the documentation seems to point in other directions...

i have a preloader that works well for the main.swf, yet i have an external swf the needs to preload between two scenes but yet still play in the main timeline (it´s complicated why i just can´t preload in the beginning, but i has to do with user input).

i´ve been thinking simply to create a movieclip where i need to it play, and preload the external swf into that. yet i´m at a loss of how to script and what to do.

any help is appreciated! thanks.

Preloading External SWF Into Movieclip On Main.swf
for some reason this seems to be a hot topic recently. yet all the documentation seems to point in other directions...

i have a preloader that works well for the main.swf, yet i have an external swf the needs to preload between two scenes but yet still play in the main timeline (it´s complicated why i just can´t preload in the beginning, but i has to do with user input).

i´ve been thinking simply to create a movieclip where i need to it play, and preload the external swf into that. yet i´m at a loss of how to script and what to do.

any help is appreciated! thanks.

Preloading External Movies While Playing Main Swf
I'm willing to bet this has been answered here somewhere, but I've yet to find it, sorry in advance folks.

Here's my problem...

I need to preload one swf while playing another. Each are at about 700k at this point.

I've created a movie (with sound) that has become too large in file size and I need to break it into two. Since there are two songs in total, I simply have made two swf's to break it up, one to load onto the end of the first one.

Let's call them A.swf and B.swf.

Normally, preloading's not a problem for me, but in order to keep the movie seamless I need to start B.swf at the end of A.swf without a preloading break.

How DO I do that? Can I preload that second swf while the first one plays, THEN have the second one play?

Beer's on me for answering, thanks!

Preloading External SWF's In Main Flash File
I have a main flash file that loads external swf files when the user clicks any button on the navigation.  I have a preloader in the main file that preloads the external when the button is clicked, but then it takes quite some time for the external movie to load.  Is there a way that I can preload the external swf's in the background while the main page is being displayed (before the actual button is clicked on the navigation to take you to that page?)  Right now its taking about 20 seconds for the external swf's to load, which is way to long.  Any help would be appreciated.

Thanks,

braves07

Preloading .swf Before Preloading Main Movie
Ummm

Things are getting complicated lol

I have my main movie going ..AND I actually managed to get a pre-loader working ...

and it's all ok as long as you have adsl or cable connection - otherwise it is REALLY messy.

The main .swf uploads onto the web .. but the secondary swf have not yet loaded .. and so it is all out of synch .. if you wait a while and refresh you get it ... but argh it is horrible .....

so .. is it possible to block the preload of the main movie until it has preloaded its secondary swf's ??

I should imagine it's recoding the actions AGAIN .. can any one get me started please ..

Is this often a problem if you add swf to a main movie ???

tyyyy all

julia

Error#1009 While Preloading External Swf Files In The Main Swf
HI everyone,

I hope you all have a nice day and there is someone out there who could help me :-)

I am loading external swf files into my main swf with this code:


ActionScript Code:
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
stop();


    var myLoader= new Loader();
    myLoader.x = 230;
    myLoader.y = 110;
    myLoader.name = "containerSwf"
   
    stage.addChild(myLoader);
    myLoader.load(new URLRequest("PFP GROUP web.swf"));

   
CladtekIntro_btn.addEventListener( MouseEvent.CLICK, loadCladtek);
function loadCladtek(Event:MouseEvent): void
{

      myLoader.load(new URLRequest ("CladTek.swf")); 
       
}

and so on I have made a few more buttons load different swf's.
The external swf files, in this case "PFP GROUP web.swf" and the rest of my swfs have their own preloaders in their own timeline with the following code:



ActionScript Code:
import flash.display.*;
this.stop();

this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, PL_LOADING);

function PL_LOADING(event:ProgressEvent):void {
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;

lbar.scaleX=pcent/100;
lpc.text=int(pcent)+"%";
if(pcent==100){
this.gotoAndStop(2);
}
}

Then I export the movie PFP GROUP web.swf with simulate download and everything works fine, loading bar progresses OK. When I export my main swf and come to clicking on the button that loads PFP GROUP web.swf it gives me hundreds of Error messages WHILE the loading of this file is happening.This is what the Error says:


Quote:




TypeError: Error #1009: Cannot access a property or method of a null object reference.
at PFPGroupweb_fla::MainTimeline/PL_LOADING(




I guess the Error is in the comunication between the swf's somehow because I don't get any Errors when exported on its own, and it does say that is in the PFPGroupweb_fla::MainTimeline/PL_LOADING(. I also can't figure out why is in the _fla file!?

If you know what the problem is can you please tell me, any help will be greatly appreciated. Thank you

Ananda

Preloading Swf's Into Main Movie
Hello...I think this is a fairly simple one...but I can't get it to run properly....I have a main movie called movie4.swf and I have several swf's I want to preload in the main preloader, I have tried code like this and inserted it into a plain movie called "blank":

onClipEvent (load) {
loadMovieNum ("cottages.swf", 1);
loadMovieNum ("bungs.swf", 1);
loadMovieNum ("rates.swf", 1);
loadMovieNum ("rates2.swf", 1);
loadMovieNum ("specials.swf", 1);
loadMovieNum ("contact.swf", 1);
loadMovieNum ("links.swf", 1);
loadMovieNum ("motel.swf", 1);
loadMovieNum ("plain.swf", 1);
}

but it doesn't seem to load in anything...these movies are very small but almost take a minute to load in any help would be appreciated...sorry if I don't reply straight away but I am on the other side of the date line.

Thanking you in anticipation

Preloading The Main Movie
in as2 i always preloaded a main movie on the first frame of that main movie. Not sure if this was a good practice, but it worked fine. In as3, the only way i am understanding how to preload a main movie, if by way of a parent swf that loads the desired movie into itself, then displays that preloaded movie. Is it possible (and as well recommended) to load my main movie from the first frame?

Preloading In Main Movie
Hey everybody can somebody give me a clue on how to build the following: I will have a main.swf that has 3 buttons in th emain swf is a movieclip that will load in the new movies when clicking on one of the 3 buttons. when i click on one of the buttons the movieclip content will dim to 50% alpha or something like that then the preloader starts preloading in the main swf and when he is finished the new swf appaers. Basically what i need to know is how the preload external swf files from the main swf

Preloading The Main Movie
In the past, I've used a preloader to load the "main movie" and I'm curious to know the current best practice for preloading a main movie. Previously, the preloader would sit on the first frame and then the bulk of the main movie would sit in frame 2 and beyond. The preloader would be something like this:


ActionScript Code:
preloader_mc.onEnterFrame = function(){
    loading = _root.getBytesLoaded();
    total = _root.getBytesTotal();
....// continued
 


So it targets the root. Now, I've been using the MovieClipLoader class to preload *EXTERNAL* swfs fine, but how do you preload an internal swf?

Preloading Movie Clips Over Main Swf
Hi..........can anyone tell me how to load movieclips over the main movie, but keep them hidden until they are selected to be shown from a button or smartclip in the main mc ?????????

Preloading The Main Movie Externally - Woe Is Me
The problem is that my main movie works fine but there is a delay before it appears on screen, where the screen is just white, before the preloader kicks in.

I am trying to load my main movie using a smaller, external preloader. The code for the smaller preloader is:

____________________________________________

fscommand("fullscreen", false);
fscommand("showmenu", false);
fscommand("allowscale", false);
stop();
_root.movie.loadMovie("main.swf", 3); //this loads my main movie in a layer above the preloader
loadStatus_mc.progressBar_mc._xscale = 1;
this.createEmptyMovieClip("loader", 5);
this.loader.onEnterFrame = function() {
this.percentDone = math.floor((_root.movie.getBytesLoaded()/_root.movie.getBytesTotal())*100);
loadStatus_mc.loadProgress_txt.text = this.percentDone+"%";
loadStatus_mc.progressBar_mc._xscale = this.percentDone;
this.loaded = _root.movie._framesloaded;
if (this.loaded>0 && this.loaded == _root.movie._totalframes) {
swf_placeholder.removeMovieClip();
removeMovieClip("loader");
setProperty (loadStatus_mc, _visible, false);
}
};

_______________________

I'm sure there is a glaring problem in there somewhere. Can anyone show me?
Thanks in advance.

Preloading Music With Main Movie
Hello,
Im still working on my music problem. I am loading a external mp3 in with my preload code and it doesnt seem to preload the music with the rest of the movie...

When I load my movie on the server and watch through the intro the music loads right on time, but when I hit the skip intro button the music doesnt play. Which I believe, watching the intro give the file enough time to download the song into cache, but skiping the intro doesnt, which means my preloader code isnt preloading the music correctly. Any help is greatly appreceated.

Here is my code:

ActionScript Code:
// Load Music
soundtrack = new Sound(_root.soundObject);
soundtrack.loadSound("soundtrack.mp3", false);
// get size and calculate %
soundLoaded = _root.soundtrack.getBytesLoaded();
soundTotal = _root.soundtrack.getBytesTotal();
sofar = _root.getBytesLoaded();
total = _root.getBytesTotal();
percent = (sofar+soundLoaded)/(total+soundTotal);
percentdisplay = Math.floor(percent*100)+"%";
// when done preloading: start
if (percentdisplay == "100%") {
    _root.gotoAndPlay("start");
}


And on the frame I want the music to play the code is

ActionScript Code:
onClipEvent (load) {
    _root.soundtrack.onLoad = soundPlay();
    function soundPlay() {
        _root.soundtrack.start(0, 0);
    }
}

[F8] Preloading Multiple Swf's Into Main Movie Problem
Hi all,

I'm building a flash website in Flash 8 which loads external .swf's with preloaders into the same empty movieclip on the main movie timeline. All is working fine, except when a user clicks on a button to load an external .swf (the button actually goes to a frame label and then said frame contains the loadmovie action - e.g loadMovie("locations_beach.swf", "frame"); - where 'frame' is the empty movieclip), but then decides to click on another button which loads another movieclip before the original has finished loading. This basically breaks flash, causing the movieclips to start looping erratically (even though I have stop actions in place).

Obviously this problem doesn't occur when I test locally, but please follow this link to see what I mean. Click on the 'locations' or 'recent shoots' sections and then try to load a new movie before an existing one has completely loaded:

http://www.david-vernon.co.uk/365_2/365.html

I think it maybe something to do with the preload code I'm using. Here's the actionscript I'm using on frame 1 of all my external movies:

stop();
myInterval = setInterval(preloader, 10);
function preloader() {
if (getBytesLoaded() >=getBytesTotal()) {
play();
clearInterval(myInterval);
}
bar._xscale = (getBytesLoaded()/getBytesTotal())*100;
percent.text = Math.round(getBytesLoaded()/getBytesTotal()*100)+"%";
}

I'm not very good with actionscript and I'm really stumped with this! Would it help if I had the preload code contained in my main movie, and if so how do I modify the code above to make this work?

Any help would be greatly appreciated!

Preloading Several SWFs In Order In The Main Movie
what is the simplest way to preload several SWFs into the main movie, one after another? The objective is to make the next swf to load just after the previous one has been fully loaded, reducing the wait of the preloadings.

Another important details is that the others swfs have to be "invisible" for the user, until he clicks on the "load" button, that will actually show the swfs and hide the previous one.

Preloading A Movie Being Called From A Main Movie
Hi,

I am running a main movie called home.swf which has buttons that call other SWF file say MOVIE1.SWF into an empty holder, called menu1_holder, then positions and displays it. This all works fine.

The problem I get is when I call that MOVIE1.swf it does not use the preloader that is in movie1.swf properly - it just hangs on a black screen then displays 100% for a bit then loads the actual movie. However, when I actually just call it stand alone in it's own HTML file, the pre-loader works just dandy.

This is the code for the pre-loader, which works a treat - Note, it uses frames not scenes as this home.swf movie calls all other movies into it as required.

onClipEvent (load) {
_xscale = 0;
}
onClipEvent (enterFrame) {
_xscale = 100*(_root.getBytesLoaded()/_root.getBytesTotal());
if (_root.getBytesLoaded()/_root.getBytesTotal() == 1) {
_root.nextFrame();
}
_root.percent = Math.floor(100*(_root.getBytesLoaded()/_root.getBytesTotal()))+"%";
}

Any help would be greatly appreciated.

Thanks

PJ

Why Does My External Swf Movie Disappear When My Movie Loops?
In my main movie I call for an external movie to be launched. After the small external movie loads on top of my main movie a few seconds later the main movie goes back to frame one and my previously loaded external swf movie disappears, then I have to relaunch it again.

Here is the website I'm putting together to give you an idea.

http://www.chicagoitv.com/home2.html

click on sound room button a wait a few seconds and it will just disappear.

PLEASE HELP

Why Do The Main Movie/site Close When I Load External Movie In A New Window?
When i want to load an external movie in a NEW window...why do my main site window close?????

this is how i load a movie in a new window...???
what is wront
_____________________________________________
on(release) {
loadMovie("mymovie.swf", _blank);
}
_____________________________________________

this happens when i test the movie

Thanks
Mirrorman

Calling Functions In Main Movie From An External Loaded Movie?
Hey everyone

I have a preloader function in my main movie, that I would like to be able to use in the different SWF's that I load into new levels using loadMovie....

How do I refer to this? Can anyone take a little time to explain how..

- Rune

Load External Movie Immediatly After Main Movie Loads
I apologize if this is the dumbest question in the world becasue it seems it would be. I know how to load an external movie when you click a button but how do you get it to load immediatly after the main movie finishes loading? I can't figure it out. Is this possible with actionscript 1.0? Thank you.

Instructing An External Movie Clip To Play From The Main Movie
Anyone tell me the easiest way to sort this one?

I have a movie clip that consists of 2 keyframes.

It is loaded onto level1 above my main movie and the first frame is blank (so that it does not come into play until instructed).

The second keyframe is the main part of the loaded movie and this needs to play after receiving instruction from the main movie.

My problem is 'How do I instruct this to happen??'
I have no knowledge of action script so if anyone could advise or tell me if there is an easier way to do this I would be eternally greatful........................................

Loading An External Movie Through An External Movie To The Main Movie
I hope I can explain this well enough for someone to understand.....Here it goes

I am creating a full site in flash. The main movie has an empty movie clip in the middle of the movie to load external movies as the user clicks on the links. Everything has worked good so far as the linking has only gone 1 level deep. However, when I created a new external movie, and had buttons on it for another external page, but yet to open in the main movie, I can't get anything to work. Example.... In the main movie, the user clicks on the archive link, and the external archive movie is loaded into the main movie. Now, on this archive movie, there is a button on it that links to a another movie (say text effects.swf). However, when they click this button for text effects, I can't get it to load into the main movie clip and replace the archive movie that was currenlty there. Can anyone help me figure out how I need to go about doing this?

I hope I have been pretty clear on my problem. You can always visit www.davidgreer.home.dixie-net.com to see the movie and how it works. I can always post the .fla if I need to.
If anyone can help, please let me know. Thanks.

External Swf Loads In Photos Movie But No The Main Movie.
Alright, if you look at the photos.swf here
www.e-volutionds.com/lasd/photos.htm
you notice all the images load once you click on them with the following code on the image button

on (release) {
_root.loadPhotosMC.loadMovie("zphoto3.swf");
}


however on the real site photos loads into main.swf, so main-->photos-->scrollimages. and the images don't popup on the main site.

www.e-volutionds.com/lasd/dog.htm

Any ideas? Thanks!

Problem With External Swf Var In Main Movie
I'm loading XML news in my external swf, which contains three dynamic text field. Working fine when i export it. But when i try to load that external swf in my Main Movie...No response....

(I have defined some _root variables in my external swf. No result occuring because of that?)

Preloadin External Jpg/swf Fro The Main Movie
in can't get a preloader work....
i want a preloader in the main movie preload the external jpg/swf loaded in the main movie
i tryed using loadmovie() but it sems that getbytestotal and getbytesloaded don't work

making a preloader on each external swf doesn't solve the problem.

any sugestions?

Loading External Swf's Under Main Movie
I have to load a heap of external swf's into the main movie for a
website that has already been created by someone else I have to change a heap of info and pics. They have used this code loadMovieNum ("aust_flash_1_3_09.swf", 1); to load in the swf but when they come into the movie they are on top and cover up the main movie.
I want them underneath Is there a simple way to fix this problem .

External SWF In Main Movie Ideas?
I have a question about loading and stopping external swf so that they do not loop but stop at the end of the movie...Is this possible and how do i do it? I know that it involves actionscript..but i am not sure of the procedure...can anyone assist??

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

Resize An External Sfw From Within Main Movie
Hi everyone,

Please, if you could help me with this:

I need to resize a swf file within my main timeline, calling it from a button. The canal.swf file is loaded into an empty movie clip. However, the actionscript I use doesn’t work when I load the swf file into the movie clip from a button (loadmovie_button), but works if I load it into the first frame of a movie (loadmovie_frame1). The script is exactly the same!

I attach here three files for review, the canal.swf file and two flashes files, one calling the resize property from a button and the other directly from frame 1.

My goal is to resize it calling from the timeline from a button. Why is it not working? How can I make it work?

BYW, I use Flash MX.

Thanks,

Patricia

External Movies Within A Main Movie
Hey users whats up. I got a question. I want to do this.....

Main.Swf:
Bio.swf
contact.swf
news.swf
links.swf
beats.swf

So anyways the main.swf will be the main swf in the website and will contain the links. What Im trying to do is when a user clicks on the bio link for example, the main movie in the main.swf will do a nice animation then will load up the bio.swf. So then afterwards when a users decides to view the links.swf, that user clicks on that link then once that happens it will play a nice fading out animation in the bio.swf then it will load the links.swf, so on and so forth...

How can I do that? Does using variables have anything to do with it..

Hittest From External Swf To Main Movie
whats the problem here?


Code:
if(eval(this._droptarget) == _parent.cart_mc){
trace('hit cart');
_level0.stuffBought.push('item name');
}
the movieclip i want to test for the hit is in the main movie as cart_mc. that code is in the external swf in an onRelease function. currently, it drags fine... but traces out 'hit cart' whenever i release it.

thanks in advance for the help.

External .swf Controlling A .swf In Main Movie?
Using Flash MX 2004 Pro--

I currently have a main timeline. On the timeline there is an external .swf which immediately plays--

bluebar_mc.loadMovie("blue_bar.swf");

I have a navigation pop-up menu on the main timeline. When the a certain button is pressed it launches another external .swf into the main timeline.

on (release) {
digital_mc.loadMovie("digital_ill.swf");
}

This .swf has a preloader. When the preloader is completed I want the original bluebar_mc (on the main timeline) to vanish. i know an option is to have _visible property, but I don't need it anymore and want to conserve filespace.

Also, should i not be using the on (release) command for the buttons and instead applying them another way in the actions layer?

Any info is helpful or alternative options for setting up something like this!

How Do You Get The Value Of A Variable From An External SWF Into The Main Movie?
Hi There, I was just wondering how you go about transferring the value of a variable from an external SWF into a main Flash movie. I have a main Flash movie with a variable called curscr (current screen). I want to show screens by loading external SWF into my main movie (this I can do fine). However I want to have the screen number of each screen stored in the external SWFs. So when I load the external SWF I want to know how to gain access to the screen number the external SWF is holding in a variable then display it in the main movie. So in a external SWF I have set up a variable on the root timeline like this

var thisScrNum = 1;

So basically I’m trying to get to this variable in the external SWF to transfer to another variable in the main Flash movie – I’m trying to transfer it to the variable ‘curscr’.

Does anyone know how to do this?

Many thanks

[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

[F8] Controling Main Movie From External Swf
Hi experts,

I have two files

main.swf and external.swf



i have use the following script on main.swf to do animation



import mx.transitions.Tween;

import mx.transitions.easing.*;






PHP Code:




btn.onRelease = function(){

new Tween(_root.textBox,"_x",Strong.easeOut,_root.textBox._x, 100,1,true);//2 is the num of seconds

new Tween(_root.textBox,"_width",Strong.easeOut,_root.textBox._width,400,2,true)









which work perfectly fine.



Now due some reason i had to place the navigation bar in the external movie clip , in external.swf

Using the same script how can i control the textBox animation which is on the main.swf??

please help.

Loading An External Swf Into Main Movie
Hello All
I am new to flash, I have just purchased cs3 and i am trying to load an external swf into my main movie/site this external swf is a mp3 player which loads the mp3s via xml. Could anyone help me explaining how to load this external swf into my main movie?
Thanks in advance.
Bendeguz
if you need to see the movie i can provide the fla and swf files.

Controling Main Movie From External Swf
Hi experts,
I have two files
main.swf and external.swf

i have use the following script on main.swf to do animation

import mx.transitions.Tween;
import mx.transitions.easing.*;



PHP Code:



btn.onRelease = function(){
      new Tween(_root.textBox,"_x",Strong.easeOut,_root.textBox._x, 100,1,true);//2 is the num of seconds
new Tween(_root.textBox,"_width",Strong.easeOut,_root.textBox._width,400,2,true) 




which work perfectly fine.

Now due some reason i had to place the navigation bar in the external movie clip , in external.swf
Using the same script how can i control the textBox animation which is on the main.swf??
please help.

Getting External Swf To Talk To The Main Movie
hello,

i'm having bad luck with the forum today! reposting:

i have a question regarding an external swf file talking to the main movie. essentially i want a button residing on an external swf to close the swf file and then send the main movie back to a previous point in it's timeline.

i'm sure i do not have this set up in the most effective way. however currently the button points to an empty frame in the external swf. rather than actually closing it appears to no longer be there.

my main movie is organized into scenes and lables. now that the external swf is not there i want the main movie to be pointed to a specific lable in one of it's scenes.

what code would i need to add to my external swf's button? i've been looking through my reference books but can't seem to find enough information to make it work properly.

as always your help is warmly appreciated!

*thank you*

Aeluv.

Loading External SWF´s Into A Main Movie
Loading external SWF´s into a main movie !

--------------------------------------------------------------------------------
Hi there

1) have a main movie clip with percent preload, where should be loaded some external.swf´s ! How can I preload (with percentage bar) external.swf´s ?
2) How can i target(AS) and [positioning] the external Swf´s that schould be loaded into a specif place on the main movie clip?
Any help? please!
Thanks.

Scale External Swf To Fit Main Movie?
Hi!

Im trying to load a bunch of swf-files into a main swf
nothing special with taht but is it possible to
set the size of the swf that i load?

I mean if i have 5 diffrent swf-files

1. 1.swf that is 320x240
2. 2.swf that is 500x300
3. 3.swf that is 720x576
4. 4.swf that is 1024x768
5. 5.swf that is 1366x1024

the stage widht & hight of main.swf = 1024x768
som i want the external swf's to stretch to this size even if
it means that it's being corpt...


PLEASE all you pro's help me out here

Loading External SWF's Into Main Movie
Hi all,

Ive been trying to find a fix for this problem for the last few days and now its driving me crazy so lets see if anyone else can shed some light on it.

I have a flash movie that has 5 buttons. When each button is rolled-over it loads an external swf into the main movie. This is basically just a large image that replaces a previously loaded movie on the same level. This is the code i use:


Code:
on (rollOver) {
button1.gotoAndPlay(2);
loadMovieNum("image1.swf", 2);
}

on (rollOut) {
button1.gotoAndPlay(16);
unloadMovieNum(2);
}
This all works fine for all the buttons so no problems there. The problem is due to the size of the image1.swf it doesnt quite appear straight away when rolled over - takes a second or two to load. What i would like to do it preload all the external swf's that are used for the rollover on the main movie timeline - ideally when the main movie preloads itself - so when you rollover the buttons the loaded swf appears instantly.

Here is my current preload script:


Code:
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
text = percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
}
}
Any help is much appricated - this has been driving me mental!

Cheers

JAmes

Controlling Main Movie From External Swf Fi'es
Hi,
Am new to actionscript and not sure how to do this...

I am loading random external swf files into my main movie with this script

choice = Math.round(Math.random()*16);
switch (choice) {
case 0 :
ad.loadMovie("ads/ad1.swf");
break;
case 1 :
ad.loadMovie("ads/ad2.swf");
break;
case 2 :
ad.loadMovie("ads/ad3.swf");
break;
case 3 :
ad.loadMovie("ads/a4.swf");
break;
case 4 :
ad.loadMovie("ads/ad5.swf");
break;
case 5 :
ad.loadMovie("ads/ad6.swf");
break;
case 6 :
ad.loadMovie("ads/ad7.swf");
break;
case 7 :
ad.loadMovie("ads/ad8.swf");
break;
case 8 :
ad.loadMovie("ads/ad9.swf");
break;
case 9 :
ad.loadMovie("ads/ad10.swf");
break;
case 10 :
ad.loadMovie("ads/ad11.swf");
break;
case 11 :
ad.loadMovie("ads/ad12.swf");
break;
case 12 :
ad.loadMovie("ads/ad13.swf");
break;
case 13 :
ad.loadMovie("ads/ad14.swf");
break;
case 14 :
ad.loadMovie("ads/ad15.swf");
break;
case 15 :
ad.loadMovie("ads/ad16.swf");
break;
}


The swf files that I'm loading are buttons and I want them to be able to link to different scenes within my main movie. Is there a way of doing this?

Any help/pointers much appreciated!!Text

Loading External SWF´s Into A Main Movie
Hi there
1) have a main movie clip with percent preload, where should be loaded some external.swf´s ! How can I preload (with percentage bar) external.swf´s ?
2) How can i target(AS) and [positioning] the external Swf´s that schould be loaded into a specif place on the main movie clip? Could you please answer me as clearly you can about this question..Any help? please!
Thanks.

How Do I Reference My Main Movie From An External Swf?
Hi there.

I've learnt from many tutorials and forum questions on Kirupa...
...and have gone along steadily in my task...
...but finally I've found something that I can't find an answer for.

I've loaded a few external swf's into my mainmovie...
...where the external swf's are individual ads.

Each external swf is loaded randomly at the beginning of the "side-ad" movie clip...
...then there are about 90 frames of play...
...then back to frame 1...where the ad is randomly loaded again...
...and so on.

Each external swf has it's own transparent button covering the ad...
...which when moving your mouse over it...stops the movie at it's current frame...
...so that you can click on the ad and be taken to the relevant page.

My issue is this...
...like each individual swf movie...
...I would like to be able to stop the "side-ad" movie clip in the same way as the ads...
...so when moving my mouse over the ad...the "side-ad" clip should then stop at it's current frame...
...but if I put a transparent button over the external swf...to stop the clip when the mouse moves over it...
...the button covering the ad becomes void...
...so the "side-ad" clip stops...but the ad carries on playing...
...and when I click on the ad...it doesn't respond...because of the other button that's now covering the external swf.

My solution appears to be a simple one...
...instead of having this button covering the external swf's...telling "side-ad" to stop...
...I suppose each individual external swf should reference the main movie...
...and the button telling the ad to stop...should also tell mainmovie/"side-ad" to stop.


Is there a way of referencing my mainmovie from inside an external movie?

Controling Main Movie From External Swf
Hi experts,
I have two files
main.swf and external.swf

i have use the following script on main.swf to do animation

import mx.transitions.Tween;
import mx.transitions.easing.*;



PHP Code:



btn.onRelease = function(){new Tween(_root.textBox,"_x",Strong.easeOut,_root.textBox._x, 100,1,true);//2 is the num of secondsnew Tween(_root.textBox,"_width",Strong.easeOut,_root.textBox._width,400,2,true) 




which work perfectly fine.

Now due some reason i had to place the navigation bar in the external movie clip , in external.swf
Using the same script how can i control the textBox animation which is on the main.swf??
please help.

Preloading An External Movie
how would i go about preloading an external SWF from the main movie? Say, if i wanted it to load in the background. Thanks.

Preloading External Movie ( Help )
First off, would like to know if anyone has a link to a tutorial about this.

Main Movie:
1) Layout
2) Movie Clip // Instancename = loadhere
3) ActionScript // loadMovie("swfs/external.swf", "loadhere");

External Movie:
1) Layout
2) Preloader in Scene1
-----------
Basically a tutorial / movie sample on how to get external .swfs to preload into a movie clip with instance name, I have been trying forever and can never get it to work

Thanks in Advance for any help.

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