it's possible to script an external preloader's empty movie clip to be of a specific size and position on the main stage? here's the script i've got for the preloader so far:
var my_pb:mx.controls.ProgressBar; my_pb.mode = "manual"; this.createEmptyMovieClip("Portfolio", 999); var my_mcl:MovieClipLoader = new MovieClipLoader();
I'm trying to get an object to increase in size the lower it goes down the stage, and decrease in size the high it moves up the stage.
It only needs to increase or decrease by a small amount. Basically, it's for a game character. To ad realism to his movements, it would be nice to have this feature.
I made a preloader for my single scene movie and although the preloader is about 16k, when placed into frame 1 of the movie and tested, the frame is shown to have about 256k, which is larger than the movie it's loading. I've gone through all the files and made sure that export in frame 1 is not checked and made sure the publish settings also are set to export in frame 1.
Does anyone know how much the size of a swf is impacted by the number of lines of code you associate with it? Obviously the graphical assets take up the most space but how much is added by 100 lines of code?
I'm working on a slideshow where I'm calling in photos from an xml file. How do I tell AS to resize the stage according to photo dimensions? Would I need to list the dimensions in the xml file? If so, how would I pull that into the fla file with AS?
As stupid as my question might sound, i have spent the last 2 weeks reading oop books; but could use some guidance. I have a flash project that is basically a supped up slide show. On the stage i have the following: main_mc (instance name = images_mc) = movieclip which holds "pictures" ui1 (instance name = ui1_mc) = user interface that allows user to draw on picture (when drawing is enabled) ui2 (instance name = ui2_mc) = activates invisible hit areas (buttons) on select pics, when hit area is clicked, we jump to another pic in the main_mc.
I accomplished all of this on the timeline, but am updating the code to OOP. I am having A HELL OF A TIME trying to figure out how to store references to the instances (images_mc etc..), so i can control them from varying class files. I have found it is easy to control the instances from the documentclass, but not from unrelated class files. Example: images_mc.stop(); works in document class; but ovieclip(Parent).images_mc.stop() doesn't seem to work from any class file.(ui2 class file for example);
I had a 2 frame setup with some actionscript for each frame. Tried to move it all into one class file and a
1. frame .fla. ; Hiding and showing the resp. moviclips when i virtually move from frame 1 to frame
2. Now I get these ...Error #1069: Property edit_panel_mc not found on flash.display and there is no default value. errors or..
when i thought beeing clever adding the stage. prefix ReferenceError: Error #1069: Property edit_panel_mc not found on flash.display.Stage and there is no default value. The mc's are on the stage... i have a single .as classfile. Why cant I reference them? or how should i do it/ what should i do to change it from beeing .fla script to class script.
I see a lot of tutorials about coding actionscript 3 when they use all the code in a Class.I keep thinking every time why they use it in a class, instead of using actionscript on the stage.why it is more functional to code a class instead of putting code in the stage actionscript?
I'm making a mockup for a client and I need to Load the .swf with the exact stage size so the graphic elements do not float outside the loaded movies stage area. [URL]Basic load code I'm using...
I have a main index SWF that preloads an external video SWF... when i test it offline it works fine..when i test it online it doesnt work fine... Weird observation: Online it worked when the external swf was only 10-20 kb But when i tried with bigger file size about 3.5 mb (which is the actual video i want to load), it doesnt work.... on the preloader it says NAN%... Now...could anybody try to explain to me what the hell is going on? I am attaching the Flash files in CS4 and CS3 format...
I have a preloader(as3) that is working great, I use FlashVars to pass it what movie it is loading, then it loads that movie, and shows it on the stage after loaded. I would like to make this a bit more dynamic. Right now I can use the same preloader for any movie so long as the movie and the preloader is the same size. I would like to pass the size of the movie im loading to the preloader with flashvars just like im passing it the file path for the movie itself. Here is how im passing the movie:
var swfLocation = this.loaderInfo.parameters.flashPath; var myRequest:URLRequest = new URLRequest(swfLocation);
now i just access the variable wherever i want to say load the movie
I tried:
var swfHeight = this.loaderInfo.parameters.flashHeight; var swfWidth = this.loaderInfo.parameters.flashWidth; stage.stageHeight = swfHeight; stage.stageWidth = swfWidth;
then in my flashvars i have a value of flashPath=<?=path?>&flashHeight=<?=height?>&flashW idth=<?=width?> (passing these to the embed and object using php btw)
I'm new to AS3.0 and migrating from AS2.0.I followed the excellent preloader tut by Lee Brimelow HERE Instead of a % increment, I would like a traditional graphics preloader bar which shows how much has loaded.How would you amend Lee's code to show a preloader bar.I have tried a few times and I've been unsuccessful.
I'm going to try to explain this as easy as possible, so that hopefully I get an easy answer back. I'm about to pull my hair out with this one!!In my flash site I have one main swf that is preloaded using:
I have an animation that is contained within a movieclip. It is an animation of a car traveling round a globe. The car is set to a circular motion guide. I would like to use this as a preloader. What is the best way to get an animation to play in time proportionally as it is loading. i.e the animation finishes when the site loads. If this is not possible what other methods are there to create circular loaders as opposed to linear bars that increase in size.
How to preload this: I've made buttons which loads external txt files into textBox (HTML render); Those txt files contains text and pictures, like <img src="..."> (HTML tags); Also, there are some links like <a href="asfunction:...> I've made preloader and it displays bytes total for txt files only. Is it possible to make preloader which will calculate the size of a txt file, and the size of image from image tags inside that txt file?
If i add a preloader code inside the same fla which i have to load. then it takes some time to load its library content first and then it starts loading the other things in Flash.But normal preloader code will not show loading of its library content. So any body have any idea how to make that without loading via other file. i have to add loader on the same file.
My main .swf file is 3 frames with the preloader residing in frame 1. I'm trying to get my preloader to skip frame 2 and jump straight to frame 3 if it's already cached... otherwise, go to and stop at frame 2 if it has not.
Why would I want it to do that? I have a little movie clip on frame 2 that lets the user know that loading is complete but I'm noticing it's always popping up everytime the movie is run -- I only want that movie clip on frame 2 to appear when it's loaded for the very first time. I've been using this code so far:
[Code]...
I'm guessing my problem is that it'll never skip frame 2 and always go to frame 2 followed by 3 regardless because both arguments eventually reach a fully loaded state. I thought about using somekind of loop but not exactly sure how that would solve things.
I've been working on a site where swf's are loaded into main movie with transitions between the sections. I have the following code on the mcContainer...
I've been working on a site where swf's are loaded into main movie with transitions between the sections. I have the following code on the mcContainer...
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)
I set up a preloader like the one in the tutorial "Percentage Preloader with Load Bar". It works fine until I try to use it on my big movie. After fooling around with it for a while it seems to be messing up progressively worse as the size of the movie grows. For example, with a very small movie, no worries. As the movie size grows the preloader will stall before appearing, that is if I test it with the ctrl+enter ctrl+enter method it won't show up right away, and when it does it will already be at 5% or so. Finally if I make the movie size even bigger (still only 700kb) the preloader won't show up at all. The only thing I could think of maybe was that the bytes_loaded variable is overflowing?.
Is there a way to take a compiled SWF file and figure out how much of it's size is used by code and how much is assets (images, etc)? I'd like to see if I can get my Flex SWF smaller but I'm unsure what's taking up the most space.
Below is my code used to load a MiniMap (which changes size)My problem is trying to update the level i have two buttons on the stage for next and previous.I Cannot update the level without the old set of minimap tiles staying there and if i try to remove the MiniMap container it spits out errors or a trace will return multiple times when i only expect it to return once. have been stuck at this point for the past 3 days.I can zip up the project. its only a small class and 6txt files if needed.
ActionScript Code: function loadMap():void {//fucntion for loading the maps- var l1:level1 = new level1();