ActionScript 2.0 :: How To Create Random Pictures
Jun 24, 2003Yes i used the search feature and found a topic for it, but the link they said the help was on, did not work..How can i create random pictures?
View 8 RepliesYes i used the search feature and found a topic for it, but the link they said the help was on, did not work..How can i create random pictures?
View 8 Repliesi know this code loads movies dynamically:
choice = Math.round(Math.random()*3);
switch (choice) {
case 0 :
[code].......
I got 4 different pictures that I'd like to load randomly. The thing is that I don't want to load the picture from an external .swf file. I'd rather load them inside the same .swf document that I'm working on.
View 1 RepliesIn this game I dynamically load 9 random pictures onto the stage. They all start off with maximum blur. The idea is that when the user hears a sentence the pictures gradually lose their blur. The sooner the correct picture is clicked on, the higher the score. My problem is, I can't stop the tween when the user clicks on a picture. I've tried it successfully on a much simpler fla, where the images are already on the stage and not loaded from an external source.
Here's my extracted code - the source fla is way too long to attach.
Actionscript Code:
import mx.transitions.Tween;
import mx.transitions.easing.Strong;
import flash.filters.*;
import mx.controls.Loader;
var totalBlur:Number = 100;//100 is maximum blur,
[Code] .....
i know this code loads movies dynamically:
[Code]...
but how would you load movies that are already imported in the library???
Making a random number between lets say 0 and 99 is relatively straight forward using the Math.random class What is the best way to create 100 unique random numbers from between 0 and 99 where no random number is repeated?Would I make a random number, chuck it into an array then the next random number created is checked against the array, and if the number has been created before try for another number?
View 2 Repliesi would like to create an animation of pictures in flash to integrate (to put) in an html page but i would like that the background of my flash animation would be clear (without color)
View 1 RepliesOk so I'm a noob when it comes to Flash so this may be really simple but then again it could be extremely difficult I don't know. I need to create a Flash document that contains an object that can be rotated 360 degrees using a scroller using pictures of the object probably in jpeg format.
View 2 RepliesHow can i create a random number without using Math.random() I think this can be done with a array... i just don't know how.
i need it for a google banner. they don't allow Math.random() of random() in the sript
I looked at many books but I can't find how I can make a slide show using flash.
View 1 RepliesI am new to flash, but the main reason I got it was so I could create an object to put on a webpage. I want to be able to create a revolving website list, with pictures of the sites in the list, like on the main page of this site: [URL]
View 1 RepliesI am new to flash and action script - My target is to make a website with flash. Everything was good until I get to the actions step. I need to create animation with pictures. I am using labels, so when you are on some label and pressing to move to other one it have to create sorting animation which exactly contains the image you have now and to change it to new image of the pressed label.
View 8 RepliesI have what I hope is a fairly straight forward question that I hope you can answer if you write code with a Mac or are at least familiar with the process on a Mac? The person I have been working with to create my photography website uses a PC. Here is the problem. I am trying to use my Mac in order to create frames so that I can add 5 more images to a portfolio that presently has 15 images.
The code is in an index.fla file. If I want to create a new frame in the index.fla, let's say LOAD CODE 381 and want to use the same text that is already present in LOAD CODE 380 but with a few edits, I have no trouble going to the Action-Movie Clip and finding LOAD CODE 380 in the left hand column. The problem is, on a Mac, how do I create frame LOAD CODE 381 and then how do I copy and paste the text from LOAD CODE 380 into LOAD CODE 381? It looks like on a PC one can open LOAD CODE 380 in the Action-Movie Clip, highlight the text then right click on the red rectangular box in the timeline. By doing so (on a PC) one sees a drop down menu that gives the option to "copy key frame". What is the equivalent of the "copy key frame" on a Mac? I can see where on the Mac you can go to Edit >copy. Is this the equivalent of "copy key frame" on a PC? If so, once I "copy" the text how do I create the new LOAD CODE 381 so that I can paste the text into the new frame?
[URL]. It's a tutorial that shows how to create a photo gallery and load the pictures and comments via XML. My problem is the following, the gallery and everything works well, but I when I try to load it into a container then everything messes up. Here's what I have: I have a main movie (the main .swf file) with a container in it, when clicking on one of the buttons from that movie the gallery.swf loads into the container (the gallery is the exact gallery from the tutorial) and it works well, until I press the button to load it again.
It seems that it messes up the value of "p". I tried tracking it, on the first load it tracks normally p=1, 2, 3, 4.... but on the second load it reacts as if it's double tracking it p=0 1, 2 2, 3 3, 2 4 ... It seems that Flash somehow keeps the old value of "p" in mind. I tried reseting it somehow or something but I can't seem to make it work (or maybe I have to rebuild the whole thing?).
It works perfectly if I load it only once but if I load the gallery.swf twice or more times then it goes crazy (or since I have more buttons on the stage, after pressing one and coming back to the gallery, it does the same, it's messed up). How can I "reset" the value of 0 on every load or something? I even tried playing around with unloadMovie but can't figure out how to use it.
I am trying to create a table of thumbnail pictures from an xml. I have made the table load from from the file though when the items are created the other layers (e.g background and text field) only show in the first thumb. I also want to be able to click the thumb and have it go to the corresponding url from "curl[]". I just can't work it out. At the moment it will only go to the last url added in the array! I have a clip on the main stage with instance name thumbnail Here is the code I am using
[Code]...
I have created a gallery that loads pictures from the server into a movie clip within Flash MX. This works fine. Now I have been asked to take those pictures that load dynamically and allow them to be a static image so that they can be clicked on enabling the user to view them at an enlarged state.Can I create a button that talks to the movie clip allowing the pictures being loaded to pull a pop up window enlarging it?
View 3 RepliesI'm having two problems. First of all, the gallery loads all pictures at once. The more pictures in the XML file, the slower they all load. Secondly, I wanted the pictures to scroll in its _y coordinate, similar to Sugar Rhyme's website portfolio (see url]...).
View 1 Replies[URL] Take a look at that website. See whe you rollover one of the pictures, the other pictures fade out...Well how can I do that? I've tried some swapDepths techniques but it gets a bit confusing.
View 2 RepliesI have created a flash ad, that cycles through 3 different ads, in order, always starting at 1.
I'm trying to find script to generate a random number, say between 1 and 3. Then, based on that number, it will start playing at a predetermined frame. [code]...
I'm looking to create a random number that is between -3 and 3
View 1 RepliesHow would I create a random number that is between 0 - 360, that is also divisible by 45? I have 8 spots on a wheel that I want to stop at randomly with a button click.
View 4 RepliesSo what I'm trying to do is create a random red colour. I thought it would be as easy as
Math.random()*0xFF0000
I'm creating a series of banners for a website. There are 3 so far with more to be made. I have made each banner as a separate swf file.The thing I would like it to do it create a randomly ordered array of the banner swf names and then load the banners in that order. Once the banners have been played or loaded through, I would l simply like it repeat that same order again.I have managed to create an array and play through that array in an ordered loop, but how do I create a random array that will do the same thing?[code]
View 1 RepliesI need some actionscript that will give me a random number between -50 and 50. Been looking at it for a while now.
The main thing is, I need to create a random value which could be a neg or a positive number, on every frame. So far I can create a random value, but can't get it to be neg one frame and positive the next.
I have a simple multiple question quiz with 100 questions. I want the questions to be randomly asked, without repeating a questions as the end works on a scoring system out of the 100 so it needs to ask all the questions.Question one starts on frame 5 of the timeline and the last question is on frame 105.
View 1 Replieshow to create a random name picker in flash?
View 2 RepliesI have a simple multiple question quiz with 100 questions. I want the questions to be randomly asked, without repea ting a questions as the end works on a scoring system out of the 100 so it needs to ask all the questions. Question one starts on frame 5 of the timeline and the last question is on frame 105.
how to write this script with the checks?
What's a simple way to generate random numbers with a range?
View 2 Replies[code]I follwed i tutorial the other day on how to create random bubble movement snd it works but the bubbles generate across the page, but i just want them to generate between around 300 x 500 pixels
View 8 RepliesI want to create a random name generator from a list of certain names seems simple but i'm not really sure [code]...
View 2 Replies