ActionScript 2.0 :: Making A Preloader For External .jpg Files?
Jun 7, 2004
I've had some trouble making a preloader for external .jpg files. The problem is in the onEnterFrame, I'll show you some part:
PHP Code:
loadjpg = function(mc,jpg) {mc.onEnterFrame = function() {trace("lele"); } }
that is just a part of the hole function, but I think it will be enough. It traces "lele" once, not when mc enters a new frame. I've also tried to call it with different ways like:
[mc].onEnterFrame, with (mc) { onEnterFrame() .
View 1 Replies
Similar Posts:
Jan 15, 2004
changing a preloader I have into a preloader that can be used for loading external swf.Now the code for the preloader is
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
[code]....
Ie the preloader and steps through a preloader animation filling the logo (ie loader)Now I have tried changing a few things but having problems tried loading into a container and a level
View 2 Replies
Jan 7, 2010
In order to learn the ins and outs of preloaders in ActionScript 3.0 I've been working on a program in Flash CS4. The problem I'm having is that the preloader is not throwing/recieving the Progress and Complete events.I decided to make the preloader an independant class and put it in a seperate package from the document class. I also made a second independant class to serve as a progress bar, which the preloader includes. Basically the structure of my program is Flash File>Document Class>Preloader Class>ProgressBar Class.So far the Document Class creates the Preloader and puts it on the screen (a black box with a progress bar on it so far, I'll add text later). What I'm working on now is getting it to actually preload, so that on the Progress events it increases the size of the bar untill it's completed, and then puts a play button on the stage when it recieves the Complete event.The examples and tutorials I've read on preloaders suggest that all you have to do is monitor the loaderInfo property of the stage object using various events. In order for the external Preloader Class to access the loaderInfo property of the stage, I pass the stage.loaderInfo property to the external Preloader Class constructor as an argument, and the _targetLoaderInfo property of the Preloader Class has that argument assigned to it. I then set up the Progress and Complete events on the _targetLoaderInfo property, expecting it to pass through to the loaderInfo property of the stage. It's not working.
View 3 Replies
Oct 31, 2009
I'm using this code for my preLoader:[code]And it works fine as a preLoader in that it adds the animation and counts up the percent of the swf that's loaded but only for the images on my stage. My code calls in some external mp3 files and I want the preLoader to wait until the external files are loaded too.[code]S'all pretty straight forward, I just want to make the preLoader wait until the mp3 files are loaded too.
View 0 Replies
Aug 13, 2010
I'm trying to add a preloader to external .swf files that will load into main site but when I test movie I get this:TypeError: Error #1009: Cannot access a property or method of a null object reference
[URL]
View 3 Replies
Feb 6, 2012
I broke it into about 8 parts. 1 being the "mainSWF". This one loads up, and has a preloaded on Frame 1. Once this is loaded, you get to a certain page, and it loads the first external SWF, inside of this one. This SWF still uses the backgrounds, of the "MainSWF". And when you get to the end of this SWF, it sends a "dispatchEvent" to trigger a function that unloads the current SWF, and loads the appropriate new one. THIS ALL WORKS!
What I am looking to happen, is have a preloader to load the these external SWF's. (Like I have on frame 1 of the "MainSWF".
I would like to have them on the first frame of each external SWF, simply because the first frame is a good frame to sit on while the loader happens. ANd the first frame of each External SWF is different. My MainSWF preloaded is working great, and its code looks like this[code]...
View 6 Replies
Oct 31, 2009
I'm using this code for my preLoader:
stop();
stage.addEventListener(Event.ENTER_FRAME, loading);
function loading(event:Event):void
{
[code]....
View 8 Replies
Mar 31, 2004
I want to preload 5 swf files in the preloading bar and use it later on, how can I do the loading bar for external files? Also, if the external files r not swf, is it possible to do it?
View 4 Replies
Dec 18, 2002
I have been playing around with this for few days and I am about to give up.. I want to be able to preload anythything thats being loaded to a certain MC. but I dont want to have to set any VARS in the file thats being loaded to indicate its done loading. I could make each swf thats being loaded give a var stating its done loading and make the loader gone.. but I want to be able to preload any swf.. mp3.. jpg almost anything that I load into the target.. Let me know if anyone has created something like that before..
View 4 Replies
Feb 27, 2011
I could create a program for him in flash which would be able to play sounds corresponding to keys on the keyboard, but split in to 3 groups, and only 1 sound from each group can be playing at a time. I don't know that much about as3, and I told him this but said I would try anyway. The first thing I came up with was this:[code]In there, there's nothing to stop the sounds overlapping or looping like in my other solution, also it's obviously a lot less compact, but I sent it to my friend like that to see if it would at least play instantly. The response I got was that, although the lag was noticeably less, it was still present.
View 3 Replies
Apr 6, 2011
i am using this preloader to load load external swf files in my main.swf. it works great but it has a small issue regarding loading timing. when it gets to 100% and loads the external swf file the swf file as i suspect is loaded a little bit earlier than the % and when it shows up its already playing the 10th frame instead of the first frame. the code is below....
MovieClip.prototype.fadeIn = function() {
this.onEnterFrame = function() {
if (this._alpha<100) {
[code]....
View 0 Replies
May 15, 2008
ANYONE KNOW HOW TO Preloader and Transition for Dynamic Files AND Transitions Between External SWFs MIX TOGHETER...
View 1 Replies
Dec 18, 2011
I've got an external preloader from this tutorial [URL] and i would like to merge it with an preloader from oxylusflash (its a premium preloader)
[Code]...
View 2 Replies
May 4, 2009
Im trying to make a preloader. this is my first attempt and from a tutorial and some minor adjustments on my part this is what ive come up with. i was wondering if there was a way to add a percent, and also why this doesnt disapear after its done loading. it remains on the stage throughout the loaded swf.
PHP Code:
siteLoader.loadMovie("Population.swf");
loadingBar._xscale = 1;
loadingBar.onEnterFrame = function() {
[code]....
View 14 Replies
Nov 29, 2009
well i have developed a small website in flash 8 and i m facing some problems with it...
- the website has content (text) which is loaded externally
- the images are also called externally with the help of 'loader' component
- i have added a preloader at the beginning of my file
but still when i loaded it on the server....the images and the content is coming slowly....
load the whole file completely at the time of loading (including the external content)...?
View 4 Replies
Feb 11, 2009
I was following a tutorial for a Pre Loader. I keep getting this error...
Error 1119: Access of possibly undefined property bytesLoaded through a reference with static type Class.
View 4 Replies
Mar 3, 2009
i'm making a preloader for my banner rotator, but the reason to be here writing this post is to ask for help to fix a bug in my preloader, for example: When I click on a button to change the image while the preloader is counting it simply starts counting the the bytesLoaded of old image + the new image(bytes) of the button I've clicked. Then the percentage goes over the 100% ... I didn't want to disable the button, I know is possible in some way but I am not finding success.
[Code]....
View 3 Replies
Mar 5, 2009
I am trying to build a preloader class for loading external content (images in a gallery). I have no experience in this area and I could not find many examples of making preloader classes. I was wondering if and how would it be possible to trace bytesLoaded and bytesTotal from within the preloader custom class. I was trying to pass the Loader's variable into the class and then try to trace the bytes but no luck with that.
View 1 Replies
Sep 4, 2009
When I test the site with the preloader.swf file I made for it, it loads, but then some of my button functions do not work in the site. When I test the site fla file everything works fine. I have been trying things out with the preloader code, but not sure what would cause this.
This is my preloader code:
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent .PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLET E, done);
l.load(new URLRequest("sample.swf"));
prog_mc.stop();
function loop(eventrogressEvent):void {
[Code] .....
View 8 Replies
Jun 20, 2004
if i delete the preloader code/mc the image of the building displays shape but if i keep the proloader code in the movie and publish the building is fussy
View 1 Replies
Jul 26, 2005
I am trying to make a preloader that has some cool liquid effects. I want it to look like a gas tank being filled up, viewed from the side. I am trying to script it so that the surface of the fuel sloshes around as it fills up the tank, but I just can't figure out a good way to go at it.
View 14 Replies
Apr 21, 2011
ive tried making a image fill preloader using masks etc. When publishing its just showing my preloader not continuing to my content.which is on frame 11. I was wondering if anyne can help me with code?
stop();
mask_mc.DisplayObject.height = 1;
this.addEventListener(Event.ENTER_FRAME, loading);[code]...
i have placed this on frame one where just preloader content is, then all content frames start at frame 11.
View 1 Replies
Jul 19, 2011
I'm working on making a pretty chunky game engine for games I plan on making, but I was wondering if you make external AS files unopenable such as .lib files, so that if I give it to a friend that wants to use it, he/she cannot change my code. Is there anyway to make external AS files unopenable? Also, obfuscation isn't an option for this problem as it only stops the people who hack the finished product, not stopping people who have access to the actual files.
View 2 Replies
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
Jul 19, 2009
I am able to get the Flash preloader working with say an image like JPG but when I attempt to have the preloader load a video it doesn't work. I read that in order to use a FLV file it needs to be embedded into a SWF file so preloader can work with it. One issue with embedding the FLV file into the SWF is the sound does not match up with video after that conversion which can kinda be fixed by changing the FPS. Needless to say I have not been able to get this working correctly. I am not sure if there is a work around for this issue.
View 11 Replies
Jan 15, 2006
I'm working with the following in Flash 8:1. A main SWF movie with 7 scenes and 1 scene is called Audio On the Audio scene I am loading 11 swf files for the individual songs in buttons.2. An SWF bunch of SWFs over 1mb each which are 30 sec mps songs, However, I need to get a preloader for each of the external swfs. Attached is a link to a preloader example I found and started to modify. [URL]Button Action Script
on (press) {
stopAllSounds();
}
on (release) {
Sound;
}
I am just trying to get the preloader to work with the home scene of the movie.The problem I have is the song buttons don't all appear on the home scene so I can't figure out why the preloader isn't loading everything then goes to the home scene..
View 1 Replies
Jan 17, 2011
I'm struggling with getting swfPanels and JSFL files to work. I've tried to get the example on here to work but am having no luck. When it asks to save, I am unable to save the files in the place where it asks to do so, but am putting them in the configuration folder in the Adobe Flash CS5 folder.What do I need to do to make swfPanels and JSFL files to work?
View 2 Replies
Feb 3, 2011
How do you make fonts in Flash .FLA files so they do not don't disappear when copied from one computer to another?
View 4 Replies
Oct 15, 2005
I know how to make such preloader for loading one file after another. But I need preloader that will be able to preloade many files/movies at the same time and show percentage of each one. Lets talk about 3 movies. How to do that? I remember that I have seen such thing somewhere on the net before.
View 7 Replies
Jan 22, 2009
i just started to learn as3 with flash cs4. i have couple of doubts.
1. how to create a preloader which need to show by loading a bunch of jpg,mp3,xml and swf files one bye one. the problem face is to get the file size to find the totalbytes before loading a file.
2. how stop loading of a file while loading in progress.
View 3 Replies