ActionScript 3.0 :: Preloader In External.swf Does Not Work When Loaded Through Main Swf

Jul 11, 2009

this is my final bug then I can finally launch this bloody site. here's my problem, I am loading an external .swf, which contains a pre-loader. the preloader in the external .swf works fine when I test it online by itself (not being loaded via main.swf) But when I test the external.swf through the main.swf the preloader does not work. the external.swf just plays through like it does not recognize the stop in the first frame to initialize the preloader skipping it altogether.here is my code:

[Code]...

View 3 Replies


Similar Posts:


Preloader Can Not Close After Main Site Has Loaded

Dec 11, 2010

I'm using the sample external preloader file supplied with CS5 as the basis for my customised pre-loader. It's working fine except that once the main site has loaded and is open, the preloader remains loaded in the background.[code]...

View 7 Replies

ActionScript 2.0 :: Preloader For External Swf's - Doesn't Work For The External Movies?

May 22, 2005

... I've had my preloader successes already, but something still doesn't work for the external movies... I'm loading the main movie - which contains several chapters, loaded as external swf's - with the following preloader on the first frame, rest content from second frame on:

[Code]...

View 5 Replies

ActionScript 2.0 :: One Main Preloader For Multiple External SWF

May 2, 2005

I need to preload 2 external .swfs, one containing animation and one containing sound, and I need them to start playing at the same time. As of now I have a general preloader on the main timeline, but as you might expect, after the preloader finishes, there is a lag while the .swf's are being loaded. I thought everything was solved, until a friend of mine looked at it in dial-up, and the preloader just kept looping 10 times before the animation started, so now I'm starting over. Part of my complication I believe is that I'm using loadMovieNum into levels as opposed to loading the external .swf's in a separate container MC (that's what I've noticed most people recommend for this problem), but I tried doing that technique several times with no luck. Right now my main movie, index.fla, has a preloader MC in the first frame, with this AS attached to the clip:

Code:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
[Code] .....

The clip contains a loadbar, static text (which just says 'Loading'), dynamic text (which tells the percentage), and a 'stop' in the actions layer. In the actions layer within my main movie, there is a 'stop' on the first frame as well. On the second frame, there is this AS:
Code:
var audioOn = false;
loadMovieNum("musicfile.swf", 1);
loadMovieNum("1movie.swf", 2);
stop();

In order that the animation and music starts at the same time, within my animation .swf (1movie.swf), I have this AS on the first frame of the actions layer:
Code:
if (_level0.audioOn == true) {
gotoAndPlay(2);
}

Within my musicfile.swf, there is this AS on the second frame of the mp3:
Code:
_level0.audioOn = true;
My main objective is to be able to use my preloader to preload both of these .swf's concurrently in my main movie so that they may start at the same time.

View 1 Replies

ActionScript 2.0 :: Use The Main Preloader To Loads The External Swf's ?

Sep 20, 2003

I have a main swf loads a serveral swf's from the menu.how can i use the main preloader to loads the external swf's ?

View 4 Replies

ActionScript 2.0 :: External Preloader +swf Reloading Main Swf?

Apr 1, 2012

I have an External Swf with its own Preloader that is loaded into my Main swf,It works fine when i am testing it in Macromedia Flash 8 However when i upload all of it to my site and i click the button that loads the External swf in to my main swf it loads the hole main swf again and not the external swf. (NOTE i load the external swf into a MC ''myContainer2'' on the main swf) Here are my codes:

External Preloader
onClipEvent (enterFrame)
{
percent = Math.floor(_root.getBytesLoaded() / _root.getBytesTotal() * 100);
gotoAndPlay(percent);

[code]....

View 1 Replies

ActionScript 2.0 :: ComboBox Does Not Work When Loaded In Main SWF

May 10, 2009

I am going to make one contact form with Combobox with some input fields in it. The problem is when I tested the contact.swf it works fine and I can easily select any item as I like. But when this contact.swf loads in the main swf by clicking the contact button in the main swf the combo box does not work at all. I attached these two flash for your look. [URL].

View 2 Replies

ActionScript 2.0 :: Load External Swfs With Main Swf Preloader

Sep 3, 2009

My external swfs are taking 8-10 secs gap in loading inside main swf, that's why i want to load my external swfs with dynamic content at the same time when my main swf loads.

Code of preloader

Code on 1st frame:
onClipEvent (load) {
total = _root.getBytesTotal();
}

[Code].....

View 3 Replies

ActionScript 2.0 :: Better To Have The Preloader Code In The External Swf Or In The Main Movie?

May 31, 2005

When importing external swf's, would it be better to have the preloader code in the external swf or in the main movie? I've seen threads about this everywhere but I don't see the difference. Once the movie pops in it starts preloading right? Is there a faster result when the preloader is in the main movie?

View 2 Replies

ActionScript 2.0 :: One Main Preloader For Multiple External .swfs?

May 2, 2005

I've tried to approach this from several angles, employing several of the tutorials, attachments found in various threads, etc, and nothing has worked. So, please bear me as I ask yet another question regarding this subject.I need to preload 2 external .swfs, one containing animation and one containing sound, and I need them to start playing at the same time. As of now I have a general preloader on the main timeline, but as you might expect, after the preloader finishes, there is a lag while the .swf's are being loaded.thought everything was solved, until a friend of mine looked at it in dial-up, and the preloader just kept looping 10 times before the animation started, so now I'm starting over. Part of my complication I believe is that I'm using loadMovieNum into levels as opposed to loading the external .swf's in a separate container MC (that's what I've noticed most people recommend for this problem), but I tried doing that technique several times with no luck. Right now my main movie, index.fla, has a preloader MC in the first frame, with this AS attached to the clip:

Code:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();

[code].....

View 1 Replies

AS3 :: External Preloader Won't Work

Aug 14, 2010

I'm trying to create a preloader for a site I am creating. Originally I was going to make it an internal preloader, but I ran into that issue where the preloader doesn't start until 50% (or more). After searching these forums for a solution to "that" issue, I found it suggested that the best way to fix it is simply do an external preloader instead.

When testing the preloader using the bandwidth editor, I see that the preloader animation isn't starting now until it's at 100%, instead I simply get a white screen. Once it reaches 100% the preloader animation runs through and then...nothing. My main.swf doesn't load. It just stops.

Here is my code:

Code:
var fileToLoad:Loader = new Loader();
var fileURL:String = "testmovie.swf";
var fileRequest: URLRequest = new URLRequest(fileURL);

[code]...

preloader is my movieclip with the animation, and preloader.loading_txt is a textbox inside that mc which displays the % loaded. I wanted to make it so that once the preloader (and its animation) reach 100%, the preloader mc then plays frames 101 - 124 (which are a small transition animation into the main site). Once it reaches 124 it's supposed to call the main.swf to load.

View 1 Replies

Form Loaded Into Main Movie Doesn't Work?

Mar 31, 2007

I have created a main swf file which holds a movie container which other swf's load into. One of the sections has a form in it. When I preview this section on its own the form works, but when I preview through the main swf file (or online) the text fields cannot be typed into. How can I fix this? Files can be downloaded from;[url]....

View 6 Replies

ActionScript 3.0 :: Preloader Percent To Include Main Movie And External .swf

Apr 4, 2011

I need a preloader to include an external .swf (iPhone_334x500.swf) that is dynamically added later in the timeline. Currently, the preloader goes to 100% and then begins to load the external swf before completing and going to frame 2. Rather than just appear to sit at 100% for 20 secs while it is still loading my external swf, I would like to include the external swf's load time in the preloader data.

This is my "preloader" code on frame 1, which is empty except for the AS. (Just a basic bar and percent preloader.) I included all of my code just in case, so please ignore the font embedding and masking if it makes it easier.

[Code]....

View 3 Replies

ActionScript 3.0 :: Load My Main SWF Through My External Preloader - FontDescription Could Not Be Found

Oct 9, 2010

Been trying to load my main SWF through my external preloader, however no mater what i do I'm getting this: VerifyError: Error #1014: Class flash.text.engine::FontDescription could not be found. Could this be due to TLF embedded fonts or things being loaded on the first frame of my main site?

View 1 Replies

Preloader Will Not Show / When External Swf Is Loaded

Jun 1, 2009

I have my main movie, and from there an external movie is loaded which has a scrollpane on it. Problem is the preloader will not show when the external swf is loaded...when the button is clicked, nothing happens for about 3 seconds and then eventually the scrollpane comes up. I have the preloader on Scene 2, and it works for all my other external swfs so I know its the scrollpane issue.[code]I have tried have the "export to first" frame linkage thing but that doesnt work... does anyone know how best to do this?

View 2 Replies

ActionScript 2.0 :: Show Preloader Before External Swf File Is Loaded?

Apr 21, 2011

I have been looking for a way to show a preloader before the external SWF file loaded but unfortunately I had no luck as of yet!!I have a button that loads a few external files in some empty MCs. I just want to show a small preloader before the external SWF files loaded?

View 1 Replies

ActionScript 3.0 :: Preloader For External SWF Loaded Via Loader Class

Oct 15, 2010

I'm hoping to implement a preloader on a main.swf that measures the bytes etc loaded in an external.swf. My two concerns are that 1) this just isn't possible? 2) I can't have multiple preloaders on the main.swf, which I would if I used one for the external .swf. I intend to try and explain this in the best way I can what I have done so far, as I personally feel this is quite a complex task.

Here's the basics:
I have an external .swf file, being loaded, using the following Action Script (3), in what I shall call, main.swf:

//---loader---
var swfLoader:Loader = new Loader();
addChild(swfLoader);
var swfURL:URLRequest = new URLRequest("nameofswftobeloaded.swf");
swfLoader.load(swfURL);
function loadHandler (event:Event){
var thumbsPanel:MovieClip = event.target.content;
addChild(thumbsPanel);

This works fine. The Action Script I use after this simply allows me to control the external .swf from the main .swf so isn't necessary.. I finish the loader, with this:
"swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);"
So, this all works fine. However, as the external .swf contains images, it doesn't load instantly. I therefore need some kind of preloader to show how much of the external .swf is loaded. However, I tried placing this in the external .swf itself and it failed miserably - for some reason it basically didn't preload and the completed phase of the preloader just appeared.

View 1 Replies

Flex :: Preloader Has To Be Visible Until Other External File Loaded

Jun 13, 2011

I have a Flex application that loads some data from the database. During this I want my custom preloader stay visible. When I postpone the dispatchEvent( new Event(Event.COMPLETE)) in the FlexEvent.INIT_COMPLETE handler, the loading will never happen because the next frame is not entered. How can I keep the loader running until all the data is fully loaded?

View 1 Replies

ActionScript 3.0 :: Access Function In External Swf Now Being Loaded By Preloader Swf?

Jul 1, 2010

I have followed the tutorial on gotoandlearn that builds a preloader swf to load an external swf. The problem I am having on the main timeline is that I now cannot access a function in the final external loaded swf. This worked fine when I just loaded the external swf into the main timeline but with the preloader I think I have my loader instances confused and I don't know how to fix it.

[Code]...

Like I said this worked perfectly before I tried cleaning things up with intermediate preloader swf and now its all gone pete tong (again!!) When testing this by reviewing the main timeline it cannot recognise the function killStream

View 0 Replies

ActionScript 3.0 :: CS4 - Communication Between Loaded External Swf And Main Timeline?

Feb 4, 2010

I'm having issues with an animation and need to get it functioning properly. I've posted two example/demo files to illustrate desired functionality.The main timeline (testMain.swf) consists of a loader, section/slide one content, and a button (bttnClick) set to load an external swf (external.swf).

external.swf contains two additional sections/slides and two 'next' buttons (bttnEnter with 'bNextOne' & 'bNextTwo' instance names) to navigate. When the second 'next' button (bNextTwo) is clicked I need the loaded external swf to fade out revealing the original main timeline (testMain.swf) and returning/stopping playhead at the 'slideOne' frame label. Does the external swf need to be unloaded even though users will most likely go back to it? What�s the best way to handle this?

If you could assist with the external swf fadeout to main timeline, the return to 'slideOne' frame label, and insight as far as the best way to return to the external swf.

View 2 Replies

ActionScript 3.0 :: Getting An External Swf To Be Loaded On A Page In Main Timeline?

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

ActionScript 3.0 :: External Swf File Loaded By Preloader: Place And Size?

Feb 22, 2011

i try to implement a preloader for my site but i have the following problems:once the preloader is finished it opens my external swf but this one appears below the preloader and very little in the window (almost smaller than my preloader size)

package classes
{
import flash.display.MovieClip;

[code].....

View 0 Replies

ActionScript 3.0 :: Flash Preloader Pause After External File Loaded?

Aug 24, 2010

I have a preloader.swf that loads another swf (main.swf). It all works fine, however I would like the loading bar to stay on 100 (once it gets there) for 2-3 seconds before the main.swf opens, currently as expected from the code below, as soon as it gets to 100% it flicks straight over to the main.swf.

I am using tweener, and I could achieve this easily using the onComplete code to call this.addChild(loader);, however, the problem is, both my preloader and my main swf are liquid layouts, and if I were to call the this.addChild(loader); at the end in its own function, then it throws a

TypeError: Error #1009: Cannot access a property or method of a null object reference.

. The only way to get around this error is to put the this.addChild(loader); so that it loads upfront. After a bit of google research, i found this error occurs due to the stage properties already been set in the preloader.swf (from liquid layout)then once the main.swf loads it tries to set them again...So is there another way i can cause a delay for 2-3 seconds once my preloader hits 100?

Below is my preloader code with liquid layout settings

Code:
//LIQUID LAYOUT
stage.align=StageAlign.TOP_LEFT;
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, resizeHandlerLoading);

[Code]....

1. using my tweener onComplete method and fixing the error caused by preexisting stage properties

2. Thinking of an alternate way to delay the main.swf from opening straight away (keeping in mind that this.addChild(loader); would need to stay where it is...

PS - here is a link to a person who was getting the #1009 error with preloader and liquid layout, their solution works, but won't allow me to use a tweener delay...[URL]

View 2 Replies

ActionScript 2.0 :: Preloader Movie Clip - Once It Is Loaded Somehow It Doesnt Go To The "main" Scene?

Dec 25, 2002

I have this Preloader movie clip on one scene called "preloader" then i have content on the second scene called "main".The preloader works fine, its just that once it is loaded somehow it doesnt go to the "main" scene.This is the AS on the preloader MClip ::

onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();[code].....

View 14 Replies

ActionScript 2.0 :: Text Disappear When It's Loaded As An External Swf Into The Main File?

Nov 30, 2003

I am using the transition preloader on url]... to load in external swfs (http:url...). I have Spark's calendar component on one of the external swfs. All text appears fine when testing the calendar page itself but the text seems to disappear when it's loaded as an external swf into the main file. Is this a path issue?

View 3 Replies

ActionScript 2.0 :: Swf Called Main.swf Which Has A Container Movieclip That Gets External Swf's Loaded Into It

Jul 28, 2004

I have one swf called main.swf which has a container movieclip that gets external swf's loaded into it.

my external swf is called hosting and it calls an array of data that is loaded into a movieclip that is duplicate for each element from the database. The elements from the database are as follows:

Business
Economy
Power
Standard

Each one of these has a button over it that when press loads information from the database into a movieclip that contains a textbox. My button code is: _root.movieclip.loadVariables("url to database");

This works flawlessly when I run the hosting.swf by itself, but when it is loaded into the contianer in the main.swf the buttons dont work. I believe that it is the _root in the button call that is causing this but I dont know how to fix it. I think the _root variable changes when hosting is loaded into the main.swf.

View 1 Replies

Doesn't Work When Loaded Into External Swf?

Aug 30, 2011

I've only been working with flash for about 3 weeks and I'm fairly new to programming soI'm using Flash CS5 with AS3 btw.

Code:
///////////////////////////
// Custom Mouse Controls

[code]....

View 2 Replies

ActionScript 2.0 :: Load An External Swf And Dynamically Attach The Mc's In The Loaded Swf To The Main Movie?

Nov 20, 2010

I want to load an external swf and dynamically attach the mc's in the loaded swf to the main movie. Is it possible to reference the linkage properties of the externally loaded swf in this way?

View 1 Replies

Professional :: Loaded External Swf Does Not Work Properly?

Oct 13, 2010

I'm trying to create universal loader of flash games on one entertainment site. What I want is to make some kind of container (SWF A) which will load another flash to it (SWF B) (by some params).
 
SWF B could be anything - AS1 / AS2 or AS3 flash. SWF A is programmed with AS3. Problem is that not all SWF games, which I try to load, works fine. Some games lost their click events, some games does not load at all, some games are corrupted. When I run that games separately (not using my loader), games work just fine. Why is this happening? Why some flash games are not working properly after loading by another flash?
 
I'm using Loader object to handle this, without any special settings - same as on examples on AS3 Bible book...

View 9 Replies

ActionScript 2.0 :: Button Won't Work When Loaded As External Swf?

Jul 7, 2004

i am using Kirupa's Transitions Between External SWFs tutorial to design my site. One of the external swfs i am using has a pic scroller with thumbnails, but when a thumbnail is clicked, nothing happens. When I load the pic scroller movie by itself, it works fine.

check out these links to see what i am talking about... (only the first two thumbnails of pic scroller have actions)

movie with transitions

pic scroller alone

The actionscript that is actually on the thumbnail button is:

on (release) {
loadMovie("detective.swf", "_root.content");
}

i am guessing there is something wrong with that _root part? Also, you have to click on 4 movie clips before you actually get to the button, so that might be causing some problems.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved