ActionScript 3.0 :: Loading External .SWF Into Main Page With Preloaders?
Nov 25, 2008
I am working on my first Flash project with AS3.The structure of the flash site is pretty simple. I have a stage 1165px wide x 710px height Inside my Stage I have an horizontal bar with a menu followed by a container right under.
is that whenever I click on one of the button on the menu, that the related external .SWF loads into the container with a preloading bar and %. I already did all my .SWF files.
View 1 Replies
Similar Posts:
Jun 25, 2009
I am resizing games when i call them with JavaScript. Now I am calling a preloader with JS, and the preloader calls the main SWT. The problem is I need to resize the main .SWT.Do I resize the SWT from the preloader? Can I do it from Javascript?
View 0 Replies
Oct 25, 2009
The problem is that when I try to click on a button it gives me this error:TypeError: Error #1009: Cannot access a property or method of a null object reference.at dyson_fla::MainTimeline/progressHandler()(progressHandler is the function that calculates bytes loaded and does all the math for the preloader; this is part of the external .swf that are loaded onto the main timeline)Here's the code for the main .swf and after I'm adding the code for one of the external .swf that I'm trying to load.
import flash.display.*;
import gs.TweenLite;
import gs.easing.*
[code].....
View 0 Replies
Feb 14, 2005
I have a few swfs loaded into the 'main' swf file through 'load movie'. As each of the independent swfs are quite big files, I need a preloader for each of them. However, when I include the 'load movie' in the 'main swf', the independent swfs have not finished loading yet, and the movie bounces back to the begining, which is not my intention. Am I using a wrong type or preloader? I'm actually using the preloader I got from Kirupa, the one which is load with percentage.Also, I originally created the flash in MAc, and the 'load movie' command links to, say...painting.swf. But when I transfer the files to PC, it automatically changes to painting, without the swf. extension. As a result, the link could not be read. I modified the url in the load movie command to 'painting' without the extension. I have yet to test on a mac, but I think it would not work.
View 5 Replies
Jan 7, 2009
I am trying to load an external swf with a number of quotes into an empty movie clip on the home page. then I want it to obviously disappear when nav to any other page.
1) know that you need a loaderEmpty_mc to load the swf into
2) don't know code for how to get it to load on entering the home page
3) don't know how to cdde for leaving the home page and making it disappear
View 3 Replies
Jul 17, 2007
I'm in need of some help with a path - should be quite a simple one, Im just a bit confused. I have a main.swf and a page.swf loading into it. In the page.swf there is a text scroller as in this file example. So the main.swf loads the page.swf with the scroller but the text wont scroll when loaded in the main.swf. Im thinking its a path issue and I think the problem code is on the button...
[Code]...
View 2 Replies
May 4, 2011
I have created a main "site.swf" file that loads a "default.swf" file into a container after a preloader. On this default.swf file I have buttons that needs to load new external SWF files in its place in the container. All of the external SWFs contain buttons and navigations that will also call up other external SWFs into this container. So, I would like to know how to program each button (some are movieclips as buttons) to unload itself and load the respective SWF into the container (eg. AboutUsButton to call up aboutus.swf into the container). I do not have a main navigation on the site.swf file bacause the navigation changes on each SWF that needs to be loaded into the container.
View 2 Replies
Sep 25, 2011
I'm about 10 hours deep into getting an external swf to be loaded on a page in my main timeline. I've gotten as far as loading the external swf (within the first few hours) hahah but now, have spent twice as long trying to get the external swf to be removed when a person navigates to a different page of my main timeline.
I have a videoplayer on one frame which is my "video" page. I've gotten the external swf to load two different ways, for example, the latest code i am using to load the external is below and seems so nice, clean and simple:
var request:URLRequest = new URLRequest("VideoPlaylist_HV.swf");
var loader:Loader = new Loader()
loader.load(request);
addChild(loader);
loader.x = 180
loader.y = 50
But I would like to add a function that says on any mouse click event (navigation) close the swf that is loaded.
If any of you genius people out there can help me, please do. I thought getting it to load was going to be the hard part but I was wrong. I am very discouraged by Actionscript in general.
download what i have so far, i left alot of the content out so the file size isn't big. And yes, i am sure once you see how I work you will be sure that I am no flash expert. I can send a link to the .flas, the site won't allow me to post the link as I am new.
View 5 Replies
Jan 14, 2010
I've had no problem creating preloaders for a basic page. I have a gallery with a preloader on the main page. It works fine. You can click thumbnails to see large photos that are on separate swf files. Everything worked fine when there were no preloaders on the individual swfs. But later I added preloaders to each individual swf file and now they do not load - just a big fat "0% Loaded" screen.
I'm doing something wrong. Perhaps the preloader should be contained within the loader that is displaying the individual swf files? Maybe the individual swfs do not need their own preloaders? I'm over my head in AS 3.0
View 1 Replies
Aug 17, 2010
I have two external swf files which I need to load to the main page of the website, one is the about page which consist mostly of text, the other is an image gallery.Both of them have the same intro animation at the beginning.
My problem is, while testing the main page using bandwidth profiler, the about page loads beautifully, while the image gallery plays its animation first before it even finalizes to load the whole page.
View 2 Replies
Oct 9, 2011
I have a home page in that their are 4 buttons which lead to 4 different pages, I essentially need mine to be able to click on a button and then have it go to that page, oh and Im working with Flash CS4 in AS3
View 1 Replies
May 15, 2010
I'm loading from my main page an external js file, with a function.
I have a flash file in the main page invoking the javascript function.
Everything worked very well until when the javascript code was in the main file, but when I moved javascript to an external file the function seems not called anymore.
So... there is no way to move the javascript code to an external file ? Or any other solution ?
[Code]...
View 3 Replies
Jul 7, 2009
I'm loading an external SWF to a main SWF. The external SWF is a dynamic video gallery. When I test my movie, I click to load my external SWF. It load ok and functions perfect. Then if I click on a back button to return to my inicial view, I have I get an error that says:Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.It's funny because I already used the same code in another project and this problem never came up.The code on my main SWF is:[code]
View 4 Replies
May 28, 2005
When I put the common code for create a preloder in the beginning of the flash presentation, it will load the content of all the movie. But if I want to use different preloaders for loading JPEG's or mc, or different scenes, independly??
View 7 Replies
Feb 23, 2011
I am loading swfs into a movie clip. However, the contact button is not a loaded swf any longer. It's in the main flash page. This is what I want to do. All the buttons load the external swfs except when I click on the contact button that is in the main flash page. I need to get the other buttons to load after I click the contact flash button. Below is the code for the contact button and the one under for one of the other buttons.
[Code]....
View 3 Replies
Dec 24, 2011
I have one swf that was made by Wondershare Flash Gallery Factory Deluxe program, and some other files comes with it.
The problem is that when it loads into my main swf doesn't appear into the movieclip that i target to the code but on the stage, on top of all others, i don't know exactly what happens, it seems not to be in the display list!!!
The point is that i'd like a back button showing in front of the gallery in order to be able to close it and go back.
View 1 Replies
Dec 1, 2010
ive been trying to load 3 games(swf's) into a main swf and ive had nothing but problems.
what im trying to do is have three buttons on the main swf, each one loading a different game. im having no problems getting the game loaded into the swf its unloading it and getting back to the first frame of the MAIN TIMELINE, or MAIN SWF.
ive tried loading the swf's into a movie clip and ive tried loading them in there own frame BUT nothing is working and it is SO FRUSTRATING
View 1 Replies
Jan 5, 2005
I am a bit new to the world of externally loaded swf's. I am trying to load an swf into my main movie, and then access/control the movieclips within that newly loaded swf, but for some reason it is not working.
Here is a quick example:
this.menu.createEmptyMovieClip("myMovieClip_mc",this.menu.getNextHighestDepth()+1);
this.menu.myMovieClip_mc.loadMovie("\menu\standard.swf",this.menu.getNextHighestDepth()+1);
this.menu.myMovieClip_mc._lockroot = true;
trace(this.menu.myMovieClip_mc.option);
this.menu.myMovieClip_mc.onRollOver = function() {
trace("Hello?");
this.bounce(120);
}
Okay this code does sucessfully create the movieclip but my onRollOver function does not work, and I cannot access any of the movieClips within myMovieClip_mc such as option, it traces out as undefined.
View 2 Replies
Apr 12, 2006
ok so here the problem: i have a dynamically generated menu which is made up of a swf and an xml files, i want to be able to load these into my main swf, now the code i have got for the button is:
[Code]....
yet when is click on the button the swf loads but i get the follwing error: Error opening URL "file:///C|/Documents%20and%20Settings/alex%2Dwork/Desktop/Betatest/Flash/menu.xml" when i place a copy of the xml into the above folder it crashes flash 8 so what do i need to do to correct this problem?
View 2 Replies
May 12, 2003
First off, here are the files I'm dealing with:
1. guestbook.php
2. guestbook.txt
3. guestbook.swf
4. main.swf
I have a form on guestbook.swf that sends the data to guestbook.php which then reads and writes to guestbook.txt. Guestbook.swf works fine as a standalone movie - it'll read the text file and then display the data in the dynamic text box named 'guestbook'.
However, when I try to load guestbook.swf into a movie clip named 'content' from main.swf the data is not being shown in my dynamic text box ('guestbook'). I'm pretting sure it has something to due with a targeting issue, but I'm not sure how to do this.
Here is the code that I think is causing the problem (action for submit form in guestbook.swf):
on(release){
if(name eq ""){
warning = "You forgot your name!";
}else if(message eq ""){
[code]....
I've tried changing '0' to "_root.content.guestbook" in loadVariablesNum but when I tested it out, as soon as I click on submit it opens up another window with the address guestbook.php. I want the data to load in text box 'guestbook' not in another window.
View 1 Replies
Jan 16, 2004
i am extreemly new to flash / website design ( i made my first site 6 months ago ) i am very interested in making a good looking flash site. I have made a simple flash site before using dynamic text loading it form .txt documents. too bad the site is realy lame and i want to make a better one. here is the url to my site here This came about throught the useage of tutorials on this site. i am using flash MX version 6 now i am in the process of making a new site for my profile which will be totaly flash, using flash movies getting imported into a main site under a certain layer.here is how it is set up.
[Code]....
View 3 Replies
Jan 8, 2009
I'm trying to make a flash site and basically what I'm doing is loading an external page on top of the swf without having to reload the swf.
This is a perfect example of what I'm trying to achieve: [URL]
View 3 Replies
Sep 12, 2005
I have a preloader that i found on the net which i am using to load my main .swf. Inside the main .swf I am loading several external .swf's and I wanted to use the same preloader to load them in.. however I am having a bit of trouble doing so.. here is the code that is attached to the preloader I am using..
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); }}
When i use this preloader inside an external .swf which I am pulling into my main movie it resets the whole movie back to the begining.. i guess because of the referals to _root in the code...how I should modify this code for the preloaders in my external .swf's so I can preload and then play my exyternal .swf's in my main movie.
View 1 Replies
Dec 11, 2005
I have designed this site with few external swf. I was wondering how can I preload all the externals swf's file in the same preloader of my first frame and scene. I have this code :
onClipEvent (load)
{
total = _root.getBytesTotal();
[code].....
View 14 Replies
Aug 31, 2009
I'm building a website that loads multiple swfs within one main swf. I would also like some swfs to unload when i click on the button situated on it. Currently I'm only able to load one swf with this code, can I somehow load more that just one swf by default? you can see the code below:
[Code]...
View 3 Replies
Jul 8, 2004
I'm loading an external swf into an empty mc called "emptyMC" on my main timeline. That loaded swf loads another swf into an empty mc called "view2" when a button is pressed. Code:
on (release) {
loadMovie("tabletennis.swf", "_root.emptyMC.view2");
}
The above code isn't working right. I'm not sure how to target each empty MC in sequence in order for this to work.
View 4 Replies
Dec 22, 2009
I'm loading an interactive external SWF into my main timeline. The SWF is a game and when it's completed successfully it plays an animation on the _root timeline. I'm aware that the external SWF _root action is now referring to the the main timeline, but I'm not sure how to make it refer to it's own.
View 1 Replies
Feb 11, 2010
My project is PC software and not related to web.It contains of Main menu and 3 external SWF (Total 4 Files).Inside the Main-Menu 3 buttons , when the user click on button # 1 or # 2 or # 3 I want a code to unload the main menu first then open external swf # 1 or #2 or #3 depending on which button user click.I use this code to load the external SWF:
Code:
var myLoader:Loader = new Loader;
addChild(myLoader);
var url:URLRequest = new URLRequest("f1.swf");
myLoader.load(url);
Its working fine but the problem it load the external swf with the main menu in the same time! what I want a code first unload Main-menu then loading external swf. and another code in external SWFs to exit to Main-Menu with ofcorse unload the swf first then exit to main-menu.
View 5 Replies
Sep 3, 2010
I m loading an external swf file on main stage which has some links, I want if I click on any of these links the timeline of the main stage should chenge.
View 1 Replies
Dec 15, 2009
dim background content after loading an external swf into main swf. I was told that a dark movie clip placed over the whole site but under the external swf with alpha set to 50% would work. I need the background content to dim when the external swf is loaded and then go back to normal when exiting that page link. How can this be done thru xml or actionscript?My website is an xml flash template that loads the text and pictures for the site Thru xml file. Anyone have sample code? I am newbie to actionscript.
View 7 Replies