ActionScript 3.0 :: Load External SWF And JPG And Make A Preloader Of It
Feb 9, 2009i learned how to load an external SWF and JPG and make a preloader of it. Now I need to preload a MP3 and I can't. The code I did my self was:[code]
View 2 Repliesi learned how to load an external SWF and JPG and make a preloader of it. Now I need to preload a MP3 and I can't. The code I did my self was:[code]
View 2 RepliesI am currently working with Flex 4. I successfully use custom preloader by s:application ... preloader="path"..., but i want the preloader to load external file as well, can it do that? How can i call the variables in the preloader?
View 1 RepliesI'm trying to make a preloader for a little flash project that involves re-assembling a load of rectangles to make up a pattern.Idea is that instead of the usual load bar i wanted to make use of this pattern that is relevant to the project and have it rebuild it self with these rectangles flying in from the side. So far I have got the tweening sorted using the tween class and staggered the 42 (yes took a little while, probably an easier way so let me know on that also) rectangles using 'setTimeout' so it releases each 100milliseconds after the one one before it. This probably the wrong way to do it but i wanted to check how it looked and this was the one way i knew how to do it.
I want to make it so that these rectangles fly in a complete the pattern once the loading has finished, but on a fast connection I don't want it to rush the animation but for a slow connection I obviously want it to adjust the release time and maybe even the travel speed to compensate.
I had an idea of maybe working out the percentage loaded divided by 42 and then run an if statement to see if that percentage for that segment had been reached before 100millseconds had passed, if 100 had passed then release the rectangle, if not then hold the rectangle until 100 m/s had passed. Not sure if that is the best way to do but that's why I'm looking for some suggestions from more experienced developers.
Code:
import mx.transitions.Tween;
import mx.transitions.easing.Regular;
// declare variables
[code]....
I have my main swf file and two external swf files i'm trying to load into the main one. I have preloaders for each external swf file but when I have the main swf file it won't load the preloaders it seems to be loading the entire thing and then showing the swf. How do i change that to showing the preloaders i already have? here is my code at the beginning on each external swf,
[Code]....
I am trying to build a website with a preview window to display pieces of work when you click on a thumbnail. Each piece of work will be it's own swf, because there will be several images to show in each example, and I want to have a cool blur/fade in and out of each, and I want it to loop.
Anyway, I am trying to figure out how to load the swf into a "preview box", and have a preloader calculating the size and all that. So when you click a button, depending on the size of the external swf, the preloader will pop up and on completion, the swf will load. Not sure where to put the preloader code or where I should put the preloader in the first place.
I need to load external swf's into a gallery. But for some reason I can't picture how to set it up on the timeline. This is for college homework.
I have the entire gallery set up and working but I just don't have the preloader for the three external images. However, I do have a preloader working fine for the site itself.
Here's the code for the external swf's:
ActionScript Code:
loader.load(new URLRequest("1.swf"));
var movieName:String;
[Code]....
I have preloader and I want to load External swf file.and file is loaded it automatically go to loaded file.
View 1 RepliesI have my main swf file and two external swf files i'm trying to load into the main one. I have preloaders for each external swf file but when I have the main swf file it won't load the preloaders it seems to be loading the entire thing and then showing the swf. How do i change that to showing the preloaders i already have?
stop();
myBar._width=0;
preloadI=setInterval(preloadF,100);
[code].....
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.
I've searched the forums and see a post about this but could not get it to work, and know its truely done my head in. Does anyone know the as to make a preloader for external jpg's or even better if someone has a fla for download.
View 2 RepliesI have an image gallery that I made with this tutorial (AS3 Photo Viewer Tutorial), and I'm trying to get an external preloader to load it. The only tweaks I've made to the tutorial file have been to change the stage size, and change the name and contents of the xml file.The preloader, which uses something I downloaded from preloaderz, worked with another, simpler swf, but when I try it with this one, I get
Quote:TypeError: Error #1009: Cannot access a property or method of a null object reference.
at PhotoViewer()
I don't know why this won't work. Another thing I don't quite get is how the .as file is attached, because the PhotoViewer.fla file appears to be blank, with nothing I can see in the timeline/ stage, or in the actionscript. Before trying the external preloader, I tried adding one to PhotoViewer.fla, using script from the ActionScript 3 Classroom in a book, which worked in their lesson file, but not with this file. I also tried moving the script to the .as file, but that didn't work either.I'm using Flash CS4. If all else fails, I might have to try a simpler image gallery, that would hopefully work with a preloader, but I like how this one looks.
I have my site working using this style of loading in images. I want to add a preloader so it works better is this possible?
View 1 Replies[URL] this is my website and my banner is swf file.... it takes some times to load in a low speed connection... I want to have a preloader for this, which shows the precent or the bytes loaded, total bytes, and also a load bar....
View 6 RepliesHow do I make an external movieclip preloader? Anyone know of a good tutorial because I have been trying for the past 12 hours to get a preloader to work(no not 12 hours straight lol). My file is 2.6 mb so I really need the preloader. Or if there are any free programs that make preloaders that would be good too. Or any components that have a tutorial with them(also needs to be free).
View 6 RepliesIs it posible to make a preloader of a SWF that loads an external JPG?
View 1 RepliesI would like to load and display an external jpg before my main preloader begins.
Basically this is for a game and I would like to display an advertisement jpg then keep this up while the game preloads.
I tried the following code on the first frame but it doesn't seem to work.
Code:
var myLoader = new MovieClipLoader();
var myListener = new Object();
myListener.onLoadInit = function () {
[Code].....
I make preloader.swf and videochat.swf I make a background for my videochat, and i cut it to 15 pieces, and make 15 .swf in my forlder /skins/ I make a .xml files called skin.xml in folder /skins/
something like this.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Skin>
<SKIN_BKGROUND>
<BKGROUND name="Standard" value="bkground.swf" />
[code].....
Now i want my preloader load skin.xml and load all the .swf in my xml and at the end it load videochat.swf I need the example to preloader everything with 1 progressbar % how i can paste the .swf background in my videochat.
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].....
Im trying to load an swf that is dynamically built, with an external preloader I built. The actionscript used is as follows:
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent .PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLET E, done);[code].....
I get the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.cool::Cool()
I have been working on a site of mine, and I wanted to make a 360 rotation view thing with some pictures (12 shots all from different angels around the same axis). I need to make a preloader load everything up front, so there wont be any legging.
My best guess was making a slide show kinda thing, with an rotation and zoom bar. And before the slide show, a frame that holds the preloader. But the preloader doesn't loads the right images. I load my images from an XML file, and then parse them into an array (something I got from here I believe). That parts seems to work all fine, but when I load the images using a "container.loadMovie(image[i]);" code, it isnt loading anything, except for an error :s
[Code]...
There are some loose ends (like the gotoAndPlay(3) things, but that is because I may wanted to add a thumbnail gallery in frame 3... )
I've been searching to find a simple answer to external preloaders, but it seems there are many ways to accomplish this with ac3.I am new to as3 and this is what I've come up with so far:
green_mc.scaleX = 0;black_mc.scaleX = 0;var loader = new Loader();loader.load(new URLRequest("zibapistachiointeractivesmfilesize03.swf"));loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
[code].....
I have my preloader loading my main swf where I'm loading another swf that contains a background.
When my preloader is done it shows my main swf but it takes a while after that for the background to load.
Whats the easiest way to get my preloader to wait until the background swf is done loading?
I have created the following preloader saved as "preloader.swf" that loads an external SWF file as follows:[code]I was reading to try avoid the PROGRESS and COMPLETE events since these events don't work 100% of the time.Now my question is this: is there a way of how I can go about to have the same functionality of loading an external SWF file (as above) but WITHOUT using the PROGRESS and COMPLETE events?
View 1 RepliesIs it possible to have a preloader for a external FLV while the user waits for the buffer to load?The code I used is here: (I did not use the component panel but a video instance from the library)
// Create a NetConnection object:
var netConn:NetConnection = new NetConnection();
//Create a local streaming connection
netConn.connect(null);
[code]....
how to load audio and have it ready for after the preloader. I had it export for actionscript before but it loads before the preloader starts which really elimates much of the need for the preloader. I took off the linkage for it to load for frame 1. I search the forums and saw that a few people recommended following link
[Code]...
I'm making a portfolio site in FLASH MX 2004 that displays images from an external folder, indexed in an array.I've set it up so that a user clicks on a button to get a different image from an array - the images are loaded externally - the alpha value for the current image is set to zero and then the border around the image shrinks to 80x50.Then the new image is preloaded (using a simple bar in a movie clip to graphically display this in the 80x50 border). Then the width and height of the image are read and the border is dynamically sized to fit around the image and the alpha value of that is set to 100 to show it.
THE PROBLEM:An if statement is used so that when the border shrinks to be exactly 80x50, the call to"photo_mc.loadPhoto(image[i]);" is triggered, where the selected image is preloaded and the details of its width and height are retrieved to send to another function, which sizes the border and sets alpha of image to 100.But, as the condition is always true (i.e. border remains @ 80x50 during preload), the preloader freezes, as the call to send the image to the loadPhoto function is perpetually made. When running the finished flash movie (with photos loaded locally) on my computer, obviously there is no preloader and it all works as planned. Only when you run it online this happens.
to see what I mean. (if you look on mozilla firefox you can actually see the function getting called perpetually - the preloader keeps resetting to 1pixel, but the photos eventually load!)HERE'S THE RELEVANT ACTIONSCRIPT:INFO_instance names:photo_mc = the empty movie clip into which the images are loadedborder = the border that fits around the image displayed in photo_mc-----//This function is called whenever a button is clicked to change the photo displayed in photo_mc
MovieClip.prototype.changePhoto = function() {
photo_mc._alpha = 0;
var dw = 80;
[code].....
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 RepliesI need to load an external movie that includes some video. That external movie is like 95mb. How can I preload everything so that there is no lag when I get to the scene where I load the external swf? This movie, of course, is not getting put on the internet. I am using Flash as sort of a high end Powerpoint app. Not sure if this is just a basic preloader or not.
View 2 RepliesBasically I have a background image which is loaded while the rest of the flash file is loaded. So once the preloader has finaly appeared its already half way through which I dont want.
Is there a way I can specify a certain image to be loaded before everything else in the flash file and before the first frame to start?
I like to play external preloader before it's load original movie index.swf.But I have a problem on resizing index movie.
Here is preload AS3 code:
package
{
import flash.display.*
import flash.display.MovieClip;
[code]....