ActionScript 2.0 :: Creating Background Preloader To Load Stuff Of User Choice?
Apr 25, 2008
Its meant to be a background preloader, so it loads stuff in, but if the user selects something it stops, loads the choice item and removes it from the "to be loaded"...loadArray. so when it restarts it knows not to load it again
Setback/feature 1: if a user choices to select an item, it will continue to load whatever is loading and start to load the item they want.
Setback/feature 2: the preloader will not restart until the user calls userCont().... should I have a timer so after awhile it kicks back in?
Error: just realised I have to stop it when it gets the end of the list.
Code:
stop();
//loadArray = stuff to load
//targetArray = target for stuff to load into
//loader(loadArray, targetArray);
// call loader function
[Code] .....
I have a flash project where I have two movies that are supposed to synchronize, depending on user choices. Most of the time they do, randomly they do not. So I thought perhaps there is something wrong with the code I am using.
Code: on (press){ this.movie1.gotoAndPlay(random(this.movie1._totalframes)); if(this.movierandom.enabled == false){ this.movie2.gotoAndPlay(this.movie1._currentframe); }}
What's supposed to happen is, when the button is pressed, movie1 goes to a random frame and plays. If movierandom is not enabled, movie2 is supposed to go to the same frame as movie1 and play. Movie1 and movie2 have the same number of frames. Occasionally, movie2 goes to a different frame.
I want to make a flash form where the viewer/user can watch a video clip of their choice (from a drop-down control or something else if there's a better way). I've found myself totally unable to find our how to do this. I mean, frankly, I don't even know what kind of file to start from the "New..." form at the beginning of Flash (CS 3.0, btw)!
I know how to create a Flash Player and link it to a single video. What I envision is that after the page comes up, with a single player component (initially empty), the user chooses a video from the drop-down list and that video starts playing in the player. What kind of file should I be starting with? {I kinda assume I'll be making an SWF to put on a web page.} Where on earth do I learn how to get the simplest things (e.g., button clicks, etc.) to work?
Is 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);
I'm developing Flash for a CD.I want to create a button for the user to click and then have a choice to save or open file (like PDF or Word file).
i have the following code: Code: myButton.onRelease = function() { getURL("abc.doc"); }
I can't see anything wrong with the above. I intend to use the code for a CD ROM.abc.doc will sit on the CD ROM. When I click on the button, it opens a browser window and tries to go to google.com.I had it working the other day.
I have a free text which allows the user to enter stuff. But that text box needs to be a 24bit hex string ONLY.How do I restrict this so that it only allows 24bit hex strings.
Code: 000000 . .
FFFFFF
I've thought about creating a regular expression to parse the whole string then return a message. But what would be even better is if the thing worked at run time so that the user can never enter an invalid string.
how to pre-load the stuff flash loads from xml -.- (actually the thumbnails, that need to be ready at cache for the roll-over effects). After looking a few tutorials and scrpts i have found in the i came to some conclusions but, fortunately, what i found checks the loading process for the individual items, while i need to get the sizes all together to add them in the loader.... I'm pretty clueless right now how to do that.
What i think i need is to create an array for the thumb attribute of my xml's nodes, and find a way to process the size of that all together using something like a shift + a variable for total size.... but well... i right now only think " i need to do that" but i have no clue of how =.=.
I'm working on a portfolio site that loads external images and swfs (using loadClip). Many of the swfs are banners that have stuff that's viewable off the stage...whoever developed them wasn't smart enough to mask it off, and I don't have the source files.
The first problem I have is the extra stuff is showing up when i load it. The second is that its messing up the width and height properties of the clip (which I need to use to resize a frame that fits around the loaded swf/image). Is there anyway to get the size that the swf document was actually set to with actionscript? That way I can set up a mask. Otherwise I think I'd have to manually create an fla with a mask and correct size for each existing swf that externally loads that swf. Unless anyone can think of a better solution?
So what I'm looking to do now is to actually get that movie clip - in this case an arrow -to rotate around another object - a ship - at a radius of 150 pixels and facing the mouse.This basically means to get the arrow to follow where the mouse goes around the ship - limited by the 150 pixel radius circle it can follow.p.s. This is the code so far:
I'm no professional flash designer but I've got a partially built site at url... and I've used a piece of generic javascript to make the background scaleable, but it doesn't seem to be the most appropriate thing to be doing as it doesn't detect any scaling of the browser while the preloader is running,(eg. if you resize the browser while its loading it wont have resized the background once its loaded), could anyone direct me to a script or tutorial in AS3 that would resize even if adjusted while the preloader is running? I've found a couple in AS2 but i'm not quite smart enough to make it in AS3 myself yet.
Is it even possible to make the background adjust automatically to users screen resolution from the center of the pic (I have a big background pic and I would like it to be fullscreen without any margins).
I made a flash animation (click here) and I put a preloader made by an user by drag'n'drop. So all works ok but after animation if I refresh the page (by F5) preloader loops without load nothing!
I have a custom preloader that I designed in flash. When I load it in flex, it loads with a white background. When I try to change the background to black in my flash file & load it in Flex, the background color remains white. I've also tried to update the compiler settings in Flex, adding "-default-background-color #000000" but I still get a white preloader background. I am using Flex 4. Here is my Pre.as file:
Im making a preloader for a game, which is meant to do this: [URL] But for some reason as soon as i add a progress bar to it, The animation freezes when it appears.
It should look like this:[URL]
It does this: [URL]
Ive tried multiple methods to attempt to fix it, but have failed.
If you require the .fla, i can only compile it with cs5, so older versions wont be supported.
i have my movie set up to load an external swf or image into an empty movieclip which allows the image to streach to the full size of the browser window.the question is that i want there to be a preloader on the transition between the images as they will be relatively large sizes, i want to recreate something similar to:...where the preloader takes up the whole window similar to how the images will be working
I am looking to build a Flash/Flex application that would allow users to edit certain portions of an application and then be able to download a swf when they are finished customizing. Is it possible to embed content in swf files and save them on the fly? Or would I need to have them download the generic swf that points to an xml file to load the custom data? I know you can save out generated images from a Flash app using server side scripting, but I'm unaware of anything similar for swf files.
I tried to create this preloader and test it but it seems not to work. I saw this tutorial, i tried to do it but unfortunately it doesn't work for me. I want to do it the easiest way possible. just : a loading bar ( white line) a background bar ( a blu background bigger line ) a AS ( which i am not able) i sent the file in attachments please look at the AS inside the symbol, an tell me where i'm wrong
What are the best (considered by professionals) approaches while creating a platformer based game for Creating game levels & background (static ones).Create a single background and scale it?or Display it on-the-fly by loading objects (probably repeating them often).
If the first one is the choice then it would become essential to create each level manually of the game & putting level editors difficult. Also if the later is the choice I find it too processor intensive....my frame rate almost breaks into half, while trying to manage so many objects together on screen.
I have a simple jukebox section on site and need a preloader, to let the user know that something actually is happening when they click on play, and wait for mp3 to load. What is best way to create preloader based on the code I am using (which is as simple as can be!) here is the code:
I am not sure why the following code is not working. If I keep the ns.play("flv/movie/flv"); line outside of the PlayerStatusHandler the movie plays fine but I am trying to create a preloader for the flv using ns.bufferTime. My first switch statement works fine, but the second case is never called.
var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc);
I'm new to using flash and actionscript, but i'm looking to learn how to make a video or a series of videos play using flash. Where the user has to click on a specific part of the screen to play the next video. I'm using Flash cs3 to do this and again i'm new to this so i don't know how to navigate very well. If anyone could provide me with a tutorial or walkthrough on this that'd be amazing.
I would like to know if its possible to create a background flash that is dynamic while keeping the bars static?for an example checkI would like someone to build a home page for me to be exactly like the samsung site above except using my images. Is this possible?
I am using the blitting technique that jeff from uses for creating tiles. I am trying to paint 2 layers of bitmapdata onto a bitmap. One the first layer is the background ( 1 image). and the second layer is the tiles. In that class below. the updateMap is the method that gets called in the loop to repaint the image.
At run time, Is it possible to detect the 'Connection Speed of the user' and change the way my preloader works? Say If the user is on a Dial up connection then play the initial 50% of the movie that has been loaded while loading the remaining 50% in background, If the user is on DSL or cable then load the entire 100% movie and so on.
the image I load using the tutorial loads really fast (it's only 240kb) which basically means that the progress bar just blinks and completes so fast that people who don't know what's going on won't know what just blinked.
My question therefore is this:Is it possible to tell the preloader, that even if the image is already loaded, the progress bar will take for example 2 seconds to complete?
That way people with fast connections will see the preloader for 2 seconds and people with slower connections will see the preloader for whatever time it takes to load the image.
Here's the code from the tutorial:
Code: var imageLoader:Loader; function loadImage(url:String):void { // Show Preloader preloader_projekt1.visible = true;
I've tried a variety of tutorials and had no success in creating a preloader for my game.I can't seem to get all of my library items to load in frame 1 properly. Any tutorials that I try do not achieve the preloader effect that I desire.What I would really, really like is this:A .swf file that wraps my .swf game and puts in a preloader.That's it.How do I do this, or specifically, what should I be typing into the search window of this forum?
how to create a mask like this with ActionSript.It looks like a curtain opener and i would like to do this completely programmaticly if its possible.I am using TweenLite as my Tweening Framework.[URL]