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




How Do I Make Buttons Load New SWFs?



Hi hope someone can help,
I currently have this site up www.thisisill.co.uk/George/GeorgeAdams.html
As you can see there is a problem when pressing buttons from page to page the scroll bar stays at the same position- I would like to put these buttons at the bottom of the page but with this problem its not practical.
Do I Action script the buttons so that they load new SWF files?(If so what is this code?)Therefore making each individual page a new SWF, instead of all being in one main stage like they are now. Will this solve my problem by resetting the scrollbar to the top when it loads a new file?
Please help as this problem has been buggin me for a while eventhough its probably really simple!
Cheers



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 10-04-2005, 01:11 PM


View Complete Forum Thread with Replies

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

Make External Swfs Load On Top Of Each Other?
Hi, new to actionscript and don't know what the heck I'm doing... I'm trying to load swfs - works ok, except the previously loaded swf disappears before the next one loads. How do I make them load on top of each other? I know I can use a different level for each swf, but I don't think that would work since people will click on the buttons in different orders (ex. someone clicks on something that appears on level 5, then clicks on something that appears on level 1). Any advice would be greatly appreciated! Thanks.

code:
_root.createEmptyMovieClip("mcPlaceHolder", 1);

mcTimeLine.btn1866.onPress = function ()
{
mcPlaceHolder.loadMovie("1866.swf");
mcPlaceHolder._x = 0;
mcPlaceHolder._y = 45;
};
mcTimeLine.btn1867.onPress = function ()
{
mcPlaceHolder.loadMovie("1867.swf");
mcPlaceHolder._x = 0;
mcPlaceHolder._y = 46;
};
mcTimeLine.btn1873.onPress = function ()
{
mcPlaceHolder.loadMovie("1873.swf");
mcPlaceHolder._x = 0;
mcPlaceHolder._y = 46;
};
mcTimeLine.btn1874.onPress = function ()
{
mcPlaceHolder.loadMovie("1874.swf");
mcPlaceHolder._x = 0;
mcPlaceHolder._y = 46;
};

Make Combobox Load Swfs Into Level 1
I'm a newbie to AS & components.

I need to make the combobox when you select an item from it to load an swf into level 1.

Thanks for any/all help!!!

I Want My Buttons To Load Swfs Not Working
hi there,
I have a menu problem. I want my links to load swfs, but when I put the code on each button (main and sub item), only one works!
this is the code i put on the button:

on (release) {
mySwf = eval("_root.swf"+choice);
if(mySwf != null){
loadMovieNum(mySwf, 1);
}
}

Pls have a look at the fla cos its easier than me trying to explain this...

Thanks ALOT

Load Swfs By Pressing Buttons
Hi guys,

I have a question for all you flash gurus out there:

I work in a document class where I have all actionscript for my website!

so this is what I want to do:

I want to load an array of sections(swfs) by pressing an array of buttons(mcs). The 7 different buttons links to 7 different sections on website...
I know I can use the "for loop" to develop a clean code that can recognize which button is pressed to load the section that it belongs to! Hope this make sense...

I'm happy to hear suggestion and I appreciate all help so I can get started=)

Cheers

Thomas

Using Buttons To Load External Swfs/jpgs?
Hi All-

While I've found many solutions that make perfect sense to me in AS2, I just can't seem to make this work in AS3 and I would really, really appreciate any help as I'm completely stuck. I have nine buttons on my left hand navigation in my main .fla file. As these nine buttons will be linking to rather large images, I'd like to load these images externally on mouse click of the buttons.

However, I cannot for the life of me figure out a code that works without using a UI loader component, which I'm trying to avoid as the UI loader causes my preloader to malfunction (my preloader will not appear until 15% of the movie is already loaded, a good 7 second wait while the screen is blank). *I've tried deselecting the "export in first frame" option for the UI loader, which didn't help the issue at all.*

I don't know if I should have this set up with the buttons linking to their own keyframes, each with code to play their respective external swf, or if there is a way to make some type of container that the swfs could appear in via mouse click.

Also, I need the swfs to show up in a specific space (not just anywhere on screen). The UI loader component would be perfect if it didn't mess with my preloader...

Thanks for reading!!

Load External SWFs While Buttons Stay On OVER Stage
My buttons are named as square1, square2, and so on..
My external SWFs are named as section1, section2 and so on...
All the external SWFs are inside a folder named flash...

The code below shows the buttons stay on "OVER" stage when clicked. However, I want the "section1" swf to load into the empty_mc when "square1" is clicked on, and "section2" swf to load into the empty_mc when "square2" is clicked on, and so on.

I also want to unload whatever is inside the "empty_mc" while another button is clicked on.

How should I fix the code below? Please help.

Thank you in advance !!!!!



PHP Code:



function onClick() {
    this.select = !this.select;
    
    if (this.select) {
        this.gotoAndStop("stay");
        lastClicked.gotoAndPlay("goout");
        lastClicked.select = false;
        lastClicked = this;
    
    } else {
        this.gotoAndPlay("goout");
        lastClicked = null;
    }
}

function overOut() {
    this.over = !this.over;
    
    if (!this.select) {
        if (this.over) this.gotoAndPlay("goin");
        else this.gotoAndPlay("goout");
    }
}

var lastClicked = null;

/////////////////////////////////////////////////////////////////////////

for (var i=1; i<11; i++) {
    var menuBtn = this["square" + i];
    var loadsection = this[empty_mc.loadMovie(["flash/section" + i + ".swf"])];
    var unloadsection = this[empty_mc.unloadMovie()];
    
    menuBtn.over = false;
    menuBtn.select = false;
    menuBtn.onRelease = onClick;
    menuBtn.onReleaseOutside = overOut;
    menuBtn.onRollOver = menuBtn.onRollOut = overOut;
    menuBtn.tabEnabled = false;
    


AS3 Buttons To Load External Swfs Into Mcs, Then Unload When Another Button Clicked
I need help. AS3 has ground my project to a halt. I can't get something as simple as three basic buttons working.

I need three buttons to load three external swfs into empty movieclips and a button that will unload the content (the loaded swf) of the empty movieclip.

Button #1
mcbuttons.mcBtnPhotos: Will load an external swf --- a photo gallery --- into an empty movieclip.
(In the script below, for my testing purposes, I have this button interacting with an internal movieclip).

Button #2
mcbuttons.mcBtnQuiz: Will load an external swf --- a quiz--- into an empty movieclip.

Button #3
mcbuttons.mcBtnVideos: Will load an external swf --- a video gallery--- into an empty movieclip.



This is the actionscript I have so far.

///////////////////////////////////////

var imageLoader:Loader = new Loader();

mcphotodrop.alpha = 0; // An animation of some photos.


//////// BUTTON ACTIONS ////////
mcbuttons.mcBtnPhotos.addEventListener(MouseEvent. CLICK, photoSWFLink);
mcbuttons.mcBtnQuiz.addEventListener(MouseEvent.CL ICK, quizLink);

mcunloader.addEventListener(MouseEvent.CLICK, unloader);
/* Here I am attempting to create a button to unload the content in the movieclip. I know this isn't right.*/


/*mcbuttons.mcBtnVideos.addEventListener(MouseEvent .CLICK, videosLink);
//This will be a third button once I figure out how to get the other two working.
*/

function photoSWFLink(event: MouseEvent) {
mcphotodrop.gotoAndPlay(2);
}//End of function

function quizLink(event: MouseEvent) {
var loader:Loader = new Loader();
loader.load(new URLRequest("TriviaGame.swf"));
quizloader.addChild(loader);
}//End of function

function unloader(event: MouseEvent) {
var loader:Loader = new Loader();
removeChild(quizloader);
quizloader = MovieClip(loader.content);

/*This does work, but the quizLink button will not reload the TriviaGame.swf if quizLink button is clicked again after I have clicked unloader button.*/

}//End of function

///////////////////////////////////////

What I think is happening is the unloader is removing my empty movieclip, i.e., quizloader, and not just its content.

I need help. This should be so simple or at least it was with AS2. I can't do this project with AS2 because I need to include video using AS3.

Thank you in advance to anyone who can help.

Make Buttons Load Different Clips
Hi

I want different movie clips to show when I hit aspecific button

check my drawing

Make It Invisible When I Press The Buttons To Load Movies
I´m making a movie that loads in swf-movies in the main movie. But in the main movie i have a picture (rather big). An when i press the button in t´he main movie to load a movie in a placeholder i can see the picture in the main movie every time i load a movie. is it any way that i can make it invisible when i press thebuttons to load movies

How Do You Load A Movie From A Button And Make The Buttons Disapear?
Hi,

I'm making a touch screen movie in flash and have a couple of issues. I've got three buttons on the stage, when I press them I want them to go to a certain frame but they don't, the flash animation just runs along the timeline and the buttons don't interact properly. Another way of doing this animation is to load a movie when a button is pressed. I've tried this but when I load a movie by clicking a button, the buttons stay in there place and the movie justs loads on the same screen as the buttons. Is there a way of getting around this without using scenes?

Andy

[F8] Dynamically Load SWFs And After Load, Resize
Hi there

So as a further step of my simple flash eBook i need to scale my dynamically laded SWFs(They are large converted pdf pages). So far, after i have loaded the 2 first pages i correct the x and yscale property of my containers(i have 2(holderOne and holderTwo), each displaying one page) and that works.

But, if i define a ._width and ._height to my 2 containers(now holding page1 and 2) they both just disappear from my stage. My trace tells me that they are loaded correctly, but they are not there.

Here's the onLoadComplete function in which i specify the size of my containers:


Quote:




preload.onLoadComplete = function(targetMC) {
holderOne._visible = true;
holderTwo._visible = true;
holderOne._xscale = 75;
holderTwo._xscale = 75;
holderOne._yscale = 60;
holderTwo._yscale = 60;
bar._visible = false;
pText._visible = false;
trace(targetMC+" finished");
};






As mentioned the above works, but if i use the ._height and ._width properties (400x500 on each page) on holderOne and holderTwo it does not (or maybe it does but my pages disappear).

Anyone who has a clue about what's happening?

Thx in advance

How To Make One Swf Out Of 8 Swfs?
hi,
i made 8 flash movies and would like to connect them to one big swf file. i hope someone can help me, thank you very very much.
andreas

Make Two Swfs Comminicate?
I have two swf's on a website. How do I make one send the other a message?

Make Two .swfs To Talk To Each Others
im trying to build one of those annoying floating banners. I have two pieces, one thats static and one that floats above content(on webpage). Here's my question, the two pieces would load, the one that float will play while the other one would be stopped, then when floating one is done playing i need it to tell other one to play. How can this be done?

Pre-load Load Movie Swfs
can I preload external swfs into the main movie that are on the load movie action?

How Can I Make Two Swfs Communicate Within A Web Page ?
(MX)

I have to different swfs in a frameset, that have to communicate.
Is this possible ?

TIA

2 Swfs. Make Second Play After The First Is Finished
I have two separate swfs (they are video files). I want the first one to play to the end then I want the second to load automatically and play with making the the user click a button.

I thought about combining the two swfs into one - but can't find a way to do this. Thought I could put each swf on a different frame - then I would need a command that would automatically advance to the next frame when the swf stopped playing.

Any thoughts would be appreciated.

Can You Make Modular Swfs Talk To Each Other?
Can you control the timelines, scale, rotation, dynamic content etc of separate modular swfs which are connected through /embedded within another swf? or are their actions sealed away, deaf from each other? For example if I made a menu a separate swf from the content it wants to control- would this not work?
And if it does work, I assume it takes _root -based actions to do so? I hope I make sense, my flash lingo can be sloppy sometimes

I know I went through this in a "intermediate flash" class I just took, but I've already forgotten. this doesn't seem like an easy topic to search. If it does work then that's very exciting!!

Can We Make Link-driven Changes To SWFs?
since i'm on this text kick, i was wondering if anyone knew if there is a way to have an imported text field contain some code that can be injected into the SWF itself?

for example: an HREF that passes code to the background image movieClip. click the different imported links and the BG changes.

if there is no way to do that, cool. just wondering. because i know you can pass parameters to OTHER SWFs via the HREF... so i wonder if it's possible to do that to itself...

food for thought. might be painful...

WR!

How To Make 2 Loaded Swfs Communicate With Each Other?
This has quite a long background history, so I`ll first ask the question: how can I make a loaded SWF file activate a function inside another loaded SWF file - both in the same 'parent' movie, domain and directory - when the user clicks a 'link' on the first swf?

I'm new to actionscript, been only working with it for 2 months and I've been learning on the go. So far, so good, flash cs3 help has been useful, as well as this forum and other sites. My project is a website, no innovations, just simple info and light animations.

The site should have an intro page (I called it index), a preloader, then the actual site (home), with links to each specific area (pages). In home, a small slideshow movie clip should always be on the upper left corner looping images until the user clicks a link to a page, when the slideshow fades away. With this briefing, I made a file for the index, and a uiloader in it would get the home file and that 'should' be it.
My stage resizing event listener was working perfectly on home - standing alone - moving the slideshow exactly as it should. But when home was loaded inside index, the slideshow moved way more than it should never getting in the right place. After various unsuccessful attempts, I decided to move the slideshow into its own swf and load it directly in the index, together with the home file. This way, I managed to make it relocate precisely, but got myself the problem I'm asking here. I need to get the slideshow to fade away when the user clicks a page link, but they are separate files.

I tried to use a Loader.content based function, located at the index, but figures Flash help was not exactly clear on how I had to use it properly, so I did not manage to get it to work. It always reported an unspecified property.
I searched around here and over the net, found similar problems and their solutions but could not resolve my problem. I think this is a little too specific...
Does anyone has any suggestions?

Thank you all very much in advance for this, and for the other things I've already got to solve thanks to these forums.

How To Make A Preloader For An HTML Site With .SWFs In It
I have 3 SWFs on an HTML site and want them all to start playing at the same time. Does anyone know some possible solutions. Is there a way to make kind of an intro preloader for the html and swfs. So that it loads all the info for the site then goes there?

Any input people have would be helpful thanxs in advance

Help Please -can I Make 2 Seperate SWFs On One Web Page Communicate?
What I want to do if possible is have a flash movie at the top of my html page tell the flash movie on the side of my html page when it needs to start playing. Can anyone help me on this one? Is it even possible?

How Do I Make Buttons That Just Make A Movie Carry On?
I am trying to figure out either how to make a movie end, instead of keep going around, and around again in a loop. Or, I need to know how to get a replay button.

Thanks Please help.

--LONDONABOY--

Externally Loaded SWFs Make Movie Slower
I'm having a weird problem with some externally loaded SWFs that contain only audio. They were created with Squeeze 4.3.

When I load them into my movie they drastically slow down the animation of the entire movie. As soon as I stop the audio in the external SWF the rest of the movie's animation goes back to normal. But if I start the SWF again it slows down again.

My questions are:
- Is anyone else encountering the same problem with audio only SWFs?
- Does anybody have any advice on publishing settings for the audio SWFs that may fix the "slow down"? Or any other methods for publishing audio only SWFs?

Swfs Can't Keep Up With Buttons
http://www.g-mg.com/example.zip

If you click really fast from button to button the external swf's being loaded can't keep up...
Any suggestions? thx!

Swfs Can't Keep Up With Buttons
http://www.g-mg.com/example.zip

If you click really fast from button to button the external swf's being loaded can't keep up...
Any suggestions? thx!

Using A .swf To Load Other .swfs
I have an .swf that contains a logo on the screen, and a series of buttons at the bottom. When you roll over a button, the logo moves down to the bottom left of the screen and becomes small, and the name of the movie that will be launched appears beneath the button.

If you click the button a .swf file is loaded and plays.

I'd like to inlcude logic in my ActionScript that says, if the user rolls out of the button AND NO MOVIE IS PLAYING, then clear the name of the movie and put the logo back up. If a movie IS playing, then do nothing.

The ActionScript as it exists now:

createEmptyMovieClip("sdp",1);
//set location where movie will appear
sdp._x = 5;
sdp._y = 5;
//Introduction Button
Intro_btn.onRollOver = function() {
gotoAndStop("Intro");
}
Intro_btn.onRelease = function() {
sdp.loadMovie("Intro3.swf","sdp");
}
//Linked Datasets Button
SAB_btn.onRollOver = function() {
gotoAndStop("SAB");
}
SAB_btn.onRelease = function() {
sdp.loadMovie("AvailBlds640x480.swf","sdp");


"Intro" and "SAB" are named frames in the movie (where the names of the movies appear when you roll over the buttons.

Any thoughts? Thanks
JohnES

What's The Best Way To Load A Seq Of Swfs?
i want to load a series of swfs (dog.swf, cat.swf, mouse.swf, etc) into loaders1, 2, 3, etc in my main movie.

i need to do it so that when the 1st swf is loaded, then the 2nd swf begins to load.. it loads, then the 3rd swf begins to load, etc.

also, is there a limit to the amount of files i can load at any one time? the sequence of swfs amount to just over 1mb, each approx. 80kb. i need all the swfs loaded eventually, with no unloading so that the user can skip between them at will.

any suggestions please?

Load Two AS2 SWFs In AS3
I have an issue where I have an AS3 project that is loading two AS2 swfs and passing parameters to the swf which then get set in _root variables on each of those swfs. If the two swfs come from the same domain, they overwrite each other so only one works but if the two swfs are from different domains they each have their own _root and work independently and great. Is there any way to force the two AS2 swfs at the same domain to not share the same _root when they are loaded into AS3? Here is what I am talking about:

var url:URLRequest=new URLRequest("

How Many Swfs Can I Load At Once?
how many swfs can i load at once?

Help Can't Load As2 Swfs Into As3
hi

i tried loading as2 swf into as3 swf, and using the local conection. that works fine.
when my as2 swf file load as2 swf files too, particulary files with components, those files are not loaded properly... and- event listeners don't work either (the status event of the components to load doesn't work at all......)

HELP! I DON'T WANT TO CONVERT ALL THOSE PROJECT INTO AS3!!!!!!

Controlling Swfs With Buttons
Hi,
My main movie is called site.swf and it contains 5 buttons, each of which loads a separate swf when released.
Each swf is loaded into the root timeline using the loadMovie command and loads into an empty MC in site.swf. So far so good.
All is well and each swf loads in to site.swf as a nice expanding window.

The problem I'm having is the transition between each swf. Currently, when a given button is pressed, the swf it triggers appears ok, but when I then click another button, the previous swf instantly disappears and the new one fades in.

What I want to achieve is an even transition between one loaded swf and another, but I can't seem to see how to achieve this.

For a visual understanding of what I'm talking about, have a look at
http://www.formiscontent.co.uk enter the site, and if you wait a few moments the relevant buttons will fade in...

Hope someone knows what I'm on about and can help!
Thanks in advance

Sharing Buttons Between Swfs
Going from instructions I got from the Lynda.com Flash Beyond the Basics tutorial I created a Shared library from which I exported all my buttons.
The problem I'm having is the ActionScript I'm associating with each of the buttons isn't coming over with the button when it is imported.

The thing that kills me is I am using literally the same five navigation buttons on every single swf and the way this is working right now I have to manually enter the ActionScript for each instance. All that it contains is this:


ActionScript Code:
on (release) {
    _level0.myMCL.loadClip("movieName.swf", "_root.targetMC");
}

Where movieName is whatever movie the button should load.

There has to be a better way to share buttons which perform the same action (i.e. loading a movie) across multiple SWF files. What am I doing wrong?

Buttons For .swfs Onto And Off Of The Stage
I have three buttons (instance names are: red_btn, yellow_btn, and blue_btn) and three extra .swf files (.swf file names are: redmovie.swf, yellowmovie.swf, and bluemovie.swf).

How do I code the AS3 to get the buttons to play each .swf file for the corresponding color at X:265 and Y:108?
Do I need a holder movie clip (empty movie clip), or not?

Basically, I want the buttons to play the .swf files (which are just squares) on demand, and then make them disappear/unload and show the next .swf at the same X and Y positions (X:265 and Y:108) accordingly.

If someone could paste the proper code and help me out, it would greatly appreciated. And, I would be able to get on with the rest of my hard life.

How Do I Load External Mcs And Swfs
I need some clarificication here on a basic problem.
I need to do the following:
* I have a main swf. (main.swf)
* attach an action such as, on release, to a button that will load an external.swf or a movie clips from my main library
* I want this external.swf or movie clip to load in both the main.swf or in a blank movie clip called movieholder. I'd like to know how to both.

Questions, can you use some of the same actionscript to load both swfs and movieclips.

Please help. I know its simple, I just can't figure it out

Inventory: Load Swfs Instead Of Mc
Hey guys,
For this problem I've included a download of the fla file so you can check out the code.

<a href="http://www.geocities.com/emtaolovesanhtao/my_controlbox.fla">http://www.geocities.com/emtaolovesanhtao/my_controlbox.fla</a>

I've managed to create an inventory, by collecting the object from 4 different scenes which are 4 separate MC's. What I want to do instead, is collect it from 4 separate swf files. For instance:

These are the 4 movie clips in the game:
MC1 = scBeach
MC2 = scSand
MC3 = scStreet
MC4 = scWater

The user has a map which uses the attachmovie function and removeMovieclip to load up the selected scene. I've created 4 swf files:

scBeach = beach.swf
scSand = sand.swf
scStreet = street.swf
scWater = water.swf

Instead of loading the MC, I want the swf to load as the scene, but I still want the inventory to work. Can I also create a separate control panel (the inventory bar which is the "frame" symbol in the fla) as a swf file too still??
Sorry if its a lil confusing . . . I'll try explain a lil more if its needed. If you can help I'd appreciate you droppin a message! thanks (:

Best Way To Load Random SWFs In
Hello, Does anyone know the best way to load random SWFs into a main Movie.

Cheers

Trying To Load 3 External Swfs One After Another
hi

here's what i'm trying to do: i have an intro "talking head" video that i want to start playing as soon as someone gets to the scene it's on. that should play then go directly to a slide presentation (done & animated in flashmx), then that should go directly into a closing "talking head" video. i am having lots of trouble with this.

so far, i have 3 keyframes, one after another on a separate actions layer--i have code on each of these frames. i have an empty movie clip in 3 separate instances on the timeline that i want to load the video, slides & video into. here's the code & more specific info:

the following are all on the actions layer:
frame 1 is labeled "intro"
frame 2 is labeled "slides"
frame 3 is labeled "close"

the empty movie clip is called "emptyclip"

the first instance of emptyclip on frame 1 is called "intro"
the 2nd instance of emptyclip on frame 2 is called "slides"
the 3rd instance of emptyclip on frame 3 is called "close"

the first video i want to load is called "introedit00.swf"
the slides are a swf called "winlp2_pppresentsound.swf"
the closing video is called "closeedit01.swf"

here is the code i have on the first frame of the actions layer:

Stage.scaleMode = "noScale";
//
intro.emptyclip.loadMovie("introedit00.swf");
this.onEnterFrame = function() {
// check the bytesLoaded to see if the swf has started loading
// m1.swf is loading into an empty MC which has a getBytesTotal() of 4
// the minimum size of a swf is 28, so if the bytes are greater than
// the size of an empty MC then the SWF has started loading
if (intro.emptyclip.getBytesLoaded()>10) {
//trace(emptyclip._currentframe+" x "+emptyclip._totalframes);
if (intro.emptyclip._currentframe == intro.emptyclip._totalframes) {
// we only want to goto "slides" once
delete this.onEnterFrame;
_root.gotoAndPlay("slides");
}
}
};
stop();

here is the code i have on the 2nd frame of the actions layer:

slides.emptyclip.loadMovie("winlp2_pppresentsound. swf");
this.onEnterFrame = function() {
// check the bytesLoaded to see if the swf has started loading
// m1.swf is loading into an empty MC which has a getBytesTotal() of 4
// the minimum size of a swf is 28, so if the bytes are greater than
// the size of an empty MC then the SWF has started loading
if (slides.emptyclip.getBytesLoaded()>10) {
//trace(emptyclip._currentframe+" x "+emptyclip._totalframes);
if (slides.emptyclip._currentframe == slides.emptyclip._totalframes) {
// we only want to goto "slides" once
delete this.onEnterFrame;
_root.gotoAndPlay("close");

}
}
};
stop();


here is the code i have on the 3rd frame of the actions layer:

close.emptyclip.loadMovie("closeedit01.swf");
stop();


it's just not working. when i go to control>test movie, it shows my background, skin, buttons, etc but the first video does not begin. there's just a blank spot where it should be! what is wrong with this code? i've been working on this for several days with no luck. please help!

Randomly Load In Swfs?
here's one to chew on:

I'm making a website for my swimteam, and I'll have say..11 movies. 1 movie to load the 10 other movies in, and each of the ten movies containing a different picture.

I want to generate a random number between 1-10 (integers) in the parent file and then use that random number to load in the corresponding swf file

example is it would generate 3 as a number and then load in "3.swf"

..I wish I knew more actionscript=(

Mac Os 9 Not Wanting To Load My Swfs
hey there. for some reason, my personal portfolio that i created using xml and flash just doesn't like opening up at all on mac os 9 and it's variants. it works fine on os 10 and os x (as well as works fine on windows).

when you click a button in the menu, it unloads a swf on a level, and then reloads a swf on the same level.

has anyone ever run into that problem as well?

here's the site if you feel like looking:

www.thehearingaide.com/grant

Dynamically Load Swfs?
Here's a problem for ya: I am building a flash site for a friend. She wants it to be "jello" -- that is, expand or contract as necessary to fill the browser window in whatever screen resolution a user may have. Is there a way to dynamically load MCs to do this? The attached file is the "frame" of the site. Across the blue background there will be three more MCs yet to be built: two for either side and one for the center. It's plenty wide and tall now, but not at some resolutions. Complicating this already complicated problem is the banner and footer, both of which would have to orient themselves to the top and bottom of the screen and stretch out or contract as necessary to fill the browser. And there is a background MC that changes alpha. Sure, I could solve this somewhat by putting the elements in a table (controlling the alpha with js) but then I would lose the nice repositioning effect of the logo (unless I packed my brain with more AS than would be safe to know). Is there any answer to this hare-brained scheme? KD

Swfs Don't Load In When I Upload Them To The Web
Hello,
I have a wierd problem. When I play my swf files from the html and swf files on the desktop they work fine but when I upload them to the web they do not work. I don't know what the problem is.

I have one main swf file that is referencing 6 swf movies which are loaded into the main swf holder_mc that plays the swfs when you click a button but for some reason I cannot get the movies to load in when I upload the files to the web. I have seen it work once, but I replaced the files and it dosn't work now. So perhaps this is something to do with the settings for either the external swfs or the main one?

I have made sure that they are all named correctly. At this point I do not know what to do or where to go for help. Does anyone know how to fix this?
I'd appreciate any help.
Ben
here is the the file if you would like to get an idea of what I am talking about
http://www.missiondoloresmural.com/corrigo.html

Load External Swfs?
What is the script to load external movie? To link up the pages. Thanks!

Load External Swfs On Top Of Each Other?
Hi, new to actionscript and don't know what the heck I'm doing... I'm trying to load swfs - works ok, except the previously loaded swf disappears before the next one loads. How do I make them load on top of each other? I'm guessing I'm supposed to use getNextHighestDepth, and I tried sticking it in instead of the level number, but it didn't work. Thanks!


code: _root.createEmptyMovieClip("mcPlaceHolder", 1);

btn1866.onPress = function ()
{
mcPlaceHolder.loadMovie("1866.swf");
mcPlaceHolder._x = 0;
mcPlaceHolder._y = 45;
};
btn1867.onPress = function ()
{
mcPlaceHolder.loadMovie("1867.swf");
mcPlaceHolder._x = 0;
mcPlaceHolder._y = 46;
};

How To Randomly Load 3 Swfs
Hi,

I have 3 swfs (1.swf, 2.swf, 3.swf).

I need my main timeline to load one of these swfs at random on level1. Can someone point me in the right direction?

cheers!
jen

Help... Best Way To Load External Swfs?
Ok... I just need a little info here if anyone can help. And this may be somewhat of a novel to read, but i just want to be concise and hopefully figue out a good way to solve my issues... I have 5 swf files for each section of a site im making. So everything works all find and dandy, but Its just taking to long to load. soooo, i was wondering if like once the main/index swf loads, while the user is checking out the main page, that the other swf's could be preloading in the background? because right now you click a button to go to a section and then it just preloads that from there, and with the porfolio and another section being pretty big it can take a while with slower internet. So let me just show what i have..... so on the buttons (actually on frames but..) i have this script to load what ever seciton the user clicks:

{loadMovieNum("Portfolio.swf","1");
} "

and then i have a preloader on the the first frame of every section with this action script on the MC:

onClipEvent (load) {
if (_parent.getBytesTotal() == _parent.getBytesLoaded()) {
quickPlay = true;
} else {
preLoad = (_parent.getBytesTotal() * 0.75);
}
_parent.stop();
}

onClipEvent (enterFrame) {
gotoAndStop(loadedIndicatorFrame());
if (quickPlay == true) {
if (_currentframe == _totalframes) {
_parent.play();
}
} else {
if (_parent.getBytesLoaded() >= preLoad) {
_parent.play();
}
}
}



and then inside the Loader MC i have this frame action (and my little animation) :




lastFrame = 1;

function loadedIndicatorFrame() {
var newFrame = int((_parent.getBytesLoaded() / _parent.getBytesTotal()) * 65) + 2;
if (newFrame - lastFrame > 4) { //too far
lastFrame += 4;
loadedText = int(_parent.getBytesTotal() / 1024 * (lastFrame - 2) / 65) + "kb of " + int(_parent.getBytesTotal() / 1024) + "kb";
} else if (newFrame - lastFrame > 0) { //normal move
lastFrame++;
loadedText = int(_parent.getBytesLoaded() / 1024) + "kb of " + int(_parent.getBytesTotal() / 1024) + "kb";
} else { //update the text only
loadedText = int(_parent.getBytesLoaded() / 1024) + "kb of " + int(_parent.getBytesTotal() / 1024) + "kb";
}
return lastFrame;
}





So realy im not sure if this is the best way to do it. I just want to know if you can load other movies while the main one is just idle... or if i should use scenes and can work it faster that way? Im kind of anal and really dont want to take out any graphics or degrade the quality. any help would be GREATLY appreciated! And if you want i can attach the swf's to check them out or whatever.. Thanks

[F8] Won't Load External Swfs
i have a swf embedded in an html file. the swf file contains buttons that when pressed load external swfs into it. the whole thing works fine when tested on my computer but when i upload it and test it on the server it doesn't work...any clues?

How To Load Ext SWFs In Same Window
on clicking 'next' in one swf I want to load another swf but I don't want to pop up a new window, I want it to replace the current swf seamlessly - is this possible? Get url opens a new window and load movie doesn't work?!

Help please, I'm a designer new to all this code stuff - I can't believe how fab all you guys are knowing all this stuff! Can I borrow your brains for half a day?

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