Random Images Not Repeated In Other Mc's
hi,
I'm not really a coder so i'd love any help you could give. Basically I have 9 empty movie clips and I want them to be randomly filled with a jpg from external swfs which is fine but I don't want any of the 9 movie clips to show the same image as any of the other 8.I think I should set up arrays but am not sure how they would work. here is the code for loading theempty movie clips
choice = Math.round(Math.random()*24);
switch (choice) {
case 0 :
location.loadMovie("image0.swf");
break;
case 1 :
location.loadMovie("image1.swf");
break;
case 2 :
location.loadMovie("image2.swf");
break;
case 3 :
location.loadMovie("image3.swf");
break;
case 4 :
location.loadMovie("image4.swf");
break;
case 5 :
location.loadMovie("image5.swf");
break;
case 6 :
location.loadMovie("image6.swf");
break;
case 7 :
location.loadMovie("image7.swf");
break;
case 8 :
location.loadMovie("image8.swf");
break;
case 9 :
location.loadMovie("image9.swf");
break;
case 10 :
location.loadMovie("image10.swf");
break;
case 11 :
location.loadMovie("image11.swf");
break;
case 12 :
location.loadMovie("image12.swf");
break;
case 13 :
location.loadMovie("image13.swf");
break;
case 14 :
location.loadMovie("image14.swf");
break;
case 15 :
location.loadMovie("image15.swf");
break;
case 16 :
location.loadMovie("image16.swf");
break;
case 17 :
location.loadMovie("image1.swf");
break;
case 18 :
location.loadMovie("image18.swf");
break;
case 19 :
location.loadMovie("image18.swf");
break;
case 20 :
location.loadMovie("image18.swf");
break;
case 21:
location.loadMovie("image18.swf");
break;
case 22 :
location.loadMovie("image18.swf");
break;
case 23 :
location.loadMovie("image18.swf");
break;
case 24 :
location.loadMovie("image18.swf");
break
thank you for your time and help
KirupaForum > Flash > ActionScript 3.0
Posted on: 09-18-2008, 10:56 PM
View Complete Forum Thread with Replies
Sponsored Links:
Random But No Repeated
I have 10 images I want to load randomly into 3 separate movieclips just once (as to perpetually rotating). I want to be sure that during the random shuffling and placement, that an image is not repeated.
For exampe, I would like the following sampling set of numbers to come up:
1,2,3
1,5,9
I don't want the following to happen:
2,2,5
7,7,7
How do I avoid having numbers repeated when using 'random'? Any tips or pointers for tutorials? Thanks.
View Replies !
View Related
Random But No Repeated
I have 10 images I want to load randomly into 3 separate movieclips just once (as to perpetually rotating). I want to be sure that during the random shuffling and placement, that an image is not repeated.
For exampe, I would like the following sampling set of numbers to come up:
1,2,3
1,5,9
I don't want the following to happen:
2,2,5
7,7,7
How do I avoid having numbers repeated when using 'random'? Any tips or pointers for tutorials? Thanks.
View Replies !
View Related
Load All Images From The Images In 1 Folder (named By Random Number)
Hi Guys,
I've got a gallery style viewer, you click on an image and it enlarges. It pulls in images which are numbered 1 to 12 in a folder called 'images'. I want it to pull in randomly numbered images instead. so i suppose i want it to search the folder for images named 1.jpg up to 1000000.jpg and pull them in.
I've uploaded it to: www.dhardy.co.uk/gallery.zip as it'll become clearer then!
Thanks in advance! dave.
View Replies !
View Related
Help With Unique Random Images - Multiple Images At A Time
Ok so what i would like to do is set up a page that has 36 images on it. But every time anyone goes to the site i want them to show up in random order. I have jpgs they are all labeled 1.jpg, 2.jpg 3.jpg and so on. I have used code that pulls the images form a folder that the swf isnt in like /images/1.jpg. So what im saying is i want to pull them externally. Any one have any ideas on how to do this?
View Replies !
View Related
Random Images + Random Timing
Is it possible to display random images, along with a unique amount of air time for each image?
I have a section that will display a company logo for a particular amount of time, according to its sponsorship level – being either 20, 10, 7, or 5 seconds.
Approximately 20 images are being used (JPEG, at 240px wide x 200px tall).
View Replies !
View Related
Random Images, Random Positions?
Hey there.
I want to add some depth to my background and what I was thinking was to have a simple animation appear at random each time a differant size, position angle ect, and if possible have it attach the animation more the once at a time.
Cheers.
View Replies !
View Related
I Think Its A Repeated Question
hi there
can each one of u tell me in easy steps the basic structure of any FLASH project.. it mean
What i need to make a good flash site or project?
How can i orgnize my scenes & bottons??
and please visit my homepage and tell me if i walk in the correct way.. and can i continue to be a master in this domain?
Regards
View Replies !
View Related
AttachMovie Repeated
I'm building a movie where attachMovie should be repeated but it works once only.
The final result should be that mc slide up continuously every time I press the buttons.
Can you help?
View Replies !
View Related
Repeated KeyPress = Bad
hello future saviours,
i've been trawling round the net for far too long now, trying to find a way of making a little movie that basically replicates the old 'track and field' style button-bashing frenzies.
I've made a movie that moves along when you press two keys, and it hapily 'resists' this movement by continuously shifting backwards (to a certain extent), but the game is exceptionally easy to beat - you just need to hold down the two keys.
So, in a nutshell, I'm trying to find a way of stopping the repitition of the normal keyPress() function thing.
Any ideas?
md
View Replies !
View Related
OnPress Repeated?
I've made a flash player that relies on the timeline using embedded flvs, and there are fastforward and rewind buttons. As of now, clicking it skips ahead or behind about 75 frames. I would like it so when you hold the button, it skips repeatedly until it is released, is there a simple way to do this, or will I have to use a listener etc?
Thanks
View Replies !
View Related
Repeated Classes
Hi,
used to know this but forgotten...
If I import same classes many times within a project because I need them in many of the project's classes eg EventDispatcher, am I adding unnecessarily to the filesize? Or does flash only import them the first time they are used?
Thanks
View Replies !
View Related
Repeated Actionscript
Hello. I'm doing a simple flash game. Anyway, I have in different frames the same object, yet the anctionscript changes. However, it does not change completeley. The begining changes in every frame (must me imputed by me) yet, the end is ALWAYS the same. I was wondering weather there was a way to store this peace of script somewhere and then insert it in the ebjects after the changing part, so I can save space and, mostly, so it becomes much easier to edit the changing part.
View Replies !
View Related
Actionscript Being Repeated On One Pc And Not Another
Hi Folks,
I've got a strange problem. I've come back to a bit of flash I was doing for my wife's photography site in January ( http://www.lilaclily.co.uk ).
I have bought a new PC since then and installed flash today. I tried the fla file on the old PC and it works normally (as it does on the website), but on the new PC when I preview it it seems to repeat the actionscript again and again - confirmed by some trace I added in.
I do most things in actionscript, I have a small amount in the fla to start everything off and assign visual instances to variables in the actionscript + assign a couple of callbacks. It seems to be the initialisation stuff in the fla that gets called again and again.
Any ideas what i've done wrong?
Thanks for your help
All the best,
Ash
View Replies !
View Related
Help With Repeated Keydown
I have 2 swfs - in these, on any keypress, it advances to the next frame. I have a setInterval delay on each frame so it doesn't go too fast. Both files work fine on their own.
I then load each swf into 2 different frames of a container swf. If I press keys fast on one frame and then switch to the other and press keys fast again and so on and so forth, it gets into a weird loop where it just keeps going faster and faster without any keyboard interaction. Any ideas?
View Replies !
View Related
Simplify Repeated AS
Is there away to make a function or something so I don't have to repeat all those button _alpha settings every time?
Notice each selected button will NOT be set to 0 (commented out for now).
Sorry about the wacky dot paths...
btn01.bbtn01.onRelease = function() {
loadMovie("content/part01intro.swf", "_root.viewer.content");
//_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn02.bbtn02.onRelease = function() {
loadMovie("content/part02company.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
//_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn03.bbtn03.onRelease = function() {
loadMovie("content/part03security.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
//_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn04.bbtn04.onRelease = function() {
loadMovie("content/part04shopLogs.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
//_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn05.bbtn05.onRelease = function() {
loadMovie("content/part05reports.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
//_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
View Replies !
View Related
Simplify Repeated AS
Is there away to make a function or something so I don't have to repeat all those button _alpha settings every time?
Notice each selected button will NOT be set to 0 (commented out for now).
Sorry about the wacky dot paths...
btn01.bbtn01.onRelease = function() {
loadMovie("content/part01intro.swf", "_root.viewer.content");
//_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn02.bbtn02.onRelease = function() {
loadMovie("content/part02company.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
//_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn03.bbtn03.onRelease = function() {
loadMovie("content/part03security.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
//_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn04.bbtn04.onRelease = function() {
loadMovie("content/part04shopLogs.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
//_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn05.bbtn05.onRelease = function() {
loadMovie("content/part05reports.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
//_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
View Replies !
View Related
Repeated Questions
SEARCH BUTTON:
on (release) {
_root.gotoAndPlay("search");
_root.searched = true;
}
POST BUTTON:
on (release) {
if (_root.searched) {
_root.gotoAndPlay("post");
_root.searched = false;
} else {
_root.gotoAndPlay("search");
}
}
I'm not a mod so I don't know if it's my place to say this, but many questions get asked nearly every other day, and they have already been answered - although everyone - esp the mods - is very helpful, sometimes the answer to a question can be found by using the search button
View Replies !
View Related
URL Is Repeated In Browser Address Bar
Link works to target nicely when I click on the link in the .swf file. When I embed the same .swf in Dreamweaver, however I get the URL repeated in the address bar ...something like http://www.science-ed.com/ch1/activi...y1b/index.html
I'd sure feel blessed if someone get shed some light on this behavior. The .swf file is found at http://www.science-ed.com/ch1/ch1.swf
View Replies !
View Related
Movie Ending To Be Repeated
ok how do make the last sequence of my movie repeat itself until the viewers decides that it aint worth watching no more. i want one basically i have about 8 layers that need to remain on the screen, one of which needs to repeat a simple movement across the screen i tried playing around with the goto function but had trouble with it can someone gimme like an idiots guide or something?
View Replies !
View Related
Repeated Text In Scrollbars
I had a friend customize a scrollbar for me so i may use it on a site (www.trio-of-leos.com). IT worked great for the first page, but when i tried to use it anywhere else in the website (on different layers for different pages) whatever text i inputed into the second scrollbox would be copied into the origional, thus stopping me from using more than one of these scrollbars. Please, if anyone can help me i would be appriciated, and, because my friend was doing it, i know next to nothing about flash. If you can, please keep it simple for me. If you wish, i can email the file to you, as it is just a bit to big to attatch here.
Thanks
View Replies !
View Related
Repeated Style And Feel....
I cant help noticing how alot of higher end website designs have a very similiar look such as font... and beveled windows etc... Even down to a new dotted pattern that runs through tabs and graphics. I was wondering if designers are using a certain component set or skin filters or what... Is there a certain web design package which has tool to create these nice and smooth looking graphics?.. Thanks...
View Replies !
View Related
Button/Repeated Animation
Hi,I have 5 buttons in my timeline. Each time you press a button it takes you to frames 2-10 followed by a different animation specific to each button. How can I have every button lead me to frames 2-10 and then to their different animations? thanks for any help.
View Replies !
View Related
[F8] Repeated MovieClip Animation
It seems so simple- and yet I can't figure out what to do...
I have a few animations that slowly move across the top of the screen. They are the first things I ever did in Flash, so I thought I'd go back to them and optimize them a bit.
There is a single graphic used in 2 different movieClips. The 2 movieClips do the exact same thing- move across the screen in the exact same place. The only reason there are multiple movie clips is I want them to start at seperate times. The second one starts when the first one is about 75% of the way across. Surely there is a better way to do this to reduce file size- by having instances of the same clip, but I don't know how to have one start as the other is 75% across continually.
I'm certain this is going to be cake but I can't figure it out!
View Replies !
View Related
Navigation Menus - Should They Be Repeated?
hello,
i've been wondering about this one for a while. I have a main navigation menu where one of the items is "training & conferences." when you click it you are taken to the training & conferences section where there is a sub menu on the side:
- member academy (this is one of our member things)
- earning credits
- degree of certification
- programs available
- program registration
- program cancellation
- directions to programs
- ... etc..
the person requesting this section to the website wants me to put that sub-navigation as a dropdown from the main nav menu. so it would actually be on all pages 2x's when in the "training & conferences" section.
how do you guys treat navigation? i mean do you try and not have redundant menus or is it ok? i feel like i should cut down on the main nav menu to generalize it all or something like combining all the "programs" options into one link..
any suggestions?
monkeybrainz
View Replies !
View Related
Components - PropertyInspectorSettingUpdate [repeated]
Hi, all!
I passing hard times trying to build a simple test component with live preview...
I followed the three first parts of a very big tutorial (http://www.adobe.com/devnet/flash/articles/creating_as3_components.html) and I keep getting this runtime error:
propertyInspectorSettingUpdate error Error #1056: Cannot create property propertyInspectorSetting on test.CellRepresentation.
Firs of all, what could I do to make it works and what in the h* is that propertyInspectorSettingUpdate error?? I google it and didn't find anything!
Second point, is there a easier way to make components with live preview in AS3?? All I need is a test component, just to put in the stage and test the layout...
Thank you all in advance.
CaioToOn!
Attach Code
package test
{
import fl.core.UIComponent;
import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
public class CellRepresentation extends UIComponent
{
private var _text:TextField;
private var _bg:MovieClip;
public function CellRepresentation()
{
}
/**
* As in the tutorial
*/
override protected function configUI():void
{
super.configUI();
_bg = new Bg();
addChild(_bg);
var textFormat:TextFormat = new TextFormat();
textFormat.align = TextFormatAlign.CENTER;
_text = new TextField();
_text.height = 21;
_text.x = 2;
_text.defaultTextFormat = textFormat;
addChild(_text);
}
/**
* As in the tutorial
*/
override protected function draw():void
{
super.draw();
}
/**
* Draw a "<" or ">" character according to this option.
*/
[Inspectable(name="NEXT",defaultValue=false)]
public function set direction(value:Boolean):void
{
this._text.text = value ? ">" : "<";
}
public function get direction():Boolean
{
return this._text.text == ">";
}
/**
* Width handler.
*/
override public function set width(value:Number):void
{
this._bg.width = value;
this._text.width = value - 4;
}
override public function get width():Number
{
return this._bg.width;
}
/**
* Height handler.
*/
override public function set height(value:Number):void
{
this._bg.height = height;
this._text.y = Math.ceil((value - this._text.height) / 2);
}
override public function get height():Number
{
return this._bg.height;
}
}
}
Edited: 10/02/2008 at 05:30:42 AM by CaioToOn!
View Replies !
View Related
Repeated Movie - Different Variables
I have a PHP script returning a list of variables to flash. The variables are named something like this:-
photo1
photo2
photo3
price1
price2
price3
modelnum1
modelnum2
modelnum3
there is also a variable n returned to flash which is the maximum number of movieclips required i.e
if n = 7 then there needs to be 7 movieclips and in the seventh movie clip there variables would be something like
photo7
price7
modelnum7
What I want to do is replicate the same movie clip with the necessary graphics and layout etc but show a the different variables in each so it would look something like this:
(movieclip 1)
price1
photo1
modelnum1
(movieclip 2)
price2
photo2
modelnum2
upto
(movieclip n)
price (n)
photo (n)
modelnum (n)
How can I create n number of identical movieclips with say three dynamic text boxes in each to show the three variables price, photo and modelnum but will vary with the value of n for each one.
Thanks for you help
View Replies !
View Related
Problem With Repeated Sounds
i currently have a sound playing repeatedly and pretty rapidly, it's a sound effect for a machine gun, but when i start shooting my gun it there will be a slight pause between the first shot sound and the subsequent shot sounds. it's almost as if flash waits for the first sound effect to finish before playing the next ones (which will repeat and play on top of each other just fine). i'm using the following code:
Code:
testshot = new Sound(this);
testshot.attachSound("gunshot");
// and on the gunshot event:
testshot.start(0,1);
anyone know what i could do so that my sound effects will play, evenly spaced apart?
View Replies !
View Related
Repeated Movie - Different Variables
I have a PHP script returning a list of variables to flash. The variables are named something like this:-
photo1
photo2
photo3
price1
price2
price3
modelnum1
modelnum2
modelnum3
there is also a variable n returned to flash which is the maximum number of movieclips required i.e
if n = 7 then there needs to be 7 movieclips and in the seventh movie clip there variables would be something like
photo7
price7
modelnum7
What I want to do is replicate the same movie clip with the necessary graphics and layout etc but show a the different variables in each so it would look something like this:
(movieclip 1)
price1
photo1
modelnum1
(movieclip 2)
price2
photo2
modelnum2
upto
(movieclip n)
price (n)
photo (n)
modelnum (n)
How can I create n number of identical movieclips with say three dynamic text boxes in each to show the three variables price, photo and modelnum but will vary with the value of n for each one.
Thanks for you help
View Replies !
View Related
Random Images
I want to load a random image into my flash movie.
Obviously download speed is a main priority and by that token, i don't want to have to load up all the images to be chosen from in order to display one random one.
What is the best way of doing this in flash?
View Replies !
View Related
Random Images
Hi guys.
I'm new at actionscript and am struggling with something that I hope someone can help with.
I have a map of the world made of 2 colours - green for the land and blue for the sea (imaginitive, eh?!)
I want to randomly make houses appear on the map, but only appear on the land.
I can generate the houses okay, but how do I make sure they only appear on land?
Thanks in advance for any help you can offer.
Regards,
Damian.
View Replies !
View Related
Random Images
This is driving me crazy. I am trying to recreate an effect found at the following website:
http://www.sentinelpartners.com/seco...news/index.htm
In this effect, each time a user loads a page, a different image will appear on the left side; the picture has an animated flash or swish text on top of the picture. On the page I am developing, I want to load both a random picture AND a random animated text quote. I have already developed a MC that will randomly load the quotes; of course, that text MC is very small. But a similar MC I developed for the pictures is way too large and causes an unacceptable delay in the page loading. I need a MC that will randomly load a .jpg (or swf files if I convert the pix to swf) from a specific directory (call it sflash). The webpage itself will have a flash file that uses the loadMovie function to load the pix MC and then the text MC. So... how do I create an MC that will randomly load my pix (1-14) from the external file sflash? Thanks in advance. KD
View Replies !
View Related
Random Images
hi there
i have six mc'c that i want to randomly display and have used this code
gotoAndPlay(random (7));
if (_currentframe==1) {
gotoAndPlay(random (7));
}
this works fine but sometimes the random code above displays what i have just seen, is there an easy way to make these six movies randomly display without displaying what has just been displayed?
many thanks
tasvino
View Replies !
View Related
Random Images
I have 20 images that i want to rotate in and out randomly with a fade effect on each. How would i go about doing that. They will all be in a row in a flash movie that is 775x397. Thx in advance.
View Replies !
View Related
Random Images
I have heard that in Flash MX is now possible to do random images. I know how to random swf files, but the life of my I can not find any documention on how to the random images. Where do I need to look?
Thanks
Tim
View Replies !
View Related
Random Images
Hey,
I figured out how to load random images in Flash MX, but the image loads on top of everything. How you keep that from happening? Does it have something to with the location?
Here is the code I used.
Code:
onClipEvent (load) {
ran = Math.floor(Math.random()*9);
loadMovieNum("files/"+ran+".jpg", "");
}
Here is an example.
Here is the fla file.
Thanks
Tim
View Replies !
View Related
I Need Some Help With Random Images.....
I'm working on a project which involves randomizing multiple pictures. My client wants these to be in a random loop rather than a standard timeline order but I'm having a hell of time getting an action script created to do this.... can someone help me out?
I have 4 photoshop file each containing 4 seperate images 1-2-3-4
When the number one image transistions to another image, it should transition to another number 1 image - from the next photoshop file. the number two to a number two - three to three until all images are used. This should be random, not one after another. I'm having a problem in flash changing the lineup and the order of the transitions. Each transition need to hold unchanged for 2-3 seconds until the next one changes. I'd like to keep all the images grouped - in other words, one at a time, the images in flash1.psd would all transition to the images in flash2 and then all would change to flash3 and so on until flash4.
Help!! please???
View Replies !
View Related
Random Images
The code below is suppose to load randomly select jpgs but doesn't work. Any suggestions?
//
randomLoad = Math.round(random(5));
myPic = "newPic" + randomLoad +".jpg";
emptyClip.loadMovie(myPic);
View Replies !
View Related
Random Images
I am working on a client update. Right now they have a slide show of 3
images but they want to have the images rotate. One goal is to have the
model image appear randomly (one of the three) on each load.
I know there is a javascript with this function in HTML. Does anyone
have the code for this for Flash MX?
TIA
View Replies !
View Related
Random Images
Hello Guys,
it there an easy way, to make a random images each time a user is login on the main page of the site. I'm using Flash MX 6, and I'm really not good for coding , any help will be really appreciated,
cheers,
View Replies !
View Related
Random Images?
My client requested a simple movie that shows 3 images in a row but randomly switches out the images from a library of about 20. What would be the best way to do this? Thanks!
View Replies !
View Related
Random Images
Hey,
I have 10 images which I want to use in a header. But I do not want all 10 showing at the same time, what I want to be able to do is, have an image showing, then randomly it fades out, and another one fades in. Does any one know a simple actionscript for this?
Thanks,
Paul
View Replies !
View Related
[F8] Random Images
Hey,
After looking for hours on how to find some ActionScript that will load a random image and display is for me, I found a post on this forum with the folling script.
I am a newbie to AS and eager to learn, however I would like to adapt this cool script to be able fade in an image everytime a random is displayed. Does anyone have any ideas to point me in the right direction?
The script:
Code:
// create array to hold images, add more if needed
var picArray:Array = new Array();
picArray[0] = "http://www.google.com/intl/en/images/logo.gif";
picArray[1] = "http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif";
picArray[2] = "http://wwwimages.adobe.com/www.adobe.com/images/shared/product_boxes/112x112/box_fl8pro_112X112.jpg";
picArray[3] = "http://www.adobe.com/images/shared/product_boxes/112x112/box_studio8_112X112.jpg";
// set random number range so that it won't exceed
//the number of images in picArray
var randomRange: Number = picArray.length;
// generate random number
function genRandomNum(num) {
num = Math.floor(Math.random() * randomRange)
return num;
}
// create mc to hold images
this.createEmptyMovieClip("mcImage", getNextHighestDepth());
mcImage.createEmptyMovieClip("mcHolder", mcImage.getNextHighestDepth());
// every time you press the image, it'll load a new image. You can remove
// this function if you wish.
mcImage.onRelease = function() {
trace(picArray[genRandomNum(x)]);
mclLoader.loadClip(picArray[genRandomNum(x)], mcImage.mcHolder);
}
// init ## Load a random image when swf is first loaded.
var mclLoader:MovieClipLoader = new MovieClipLoader();
mclLoader.loadClip(picArray[genRandomNum(x)], mcImage.mcHolder);
View Replies !
View Related
Random Images
Hey guys,
this is my first post for actionscript.org, was needing alittle help with this-
could someone please be able to do two(or one thing if you can)
1. in the following code
choice = Math.round(Math.random()*2);
switch (choice) {
case 0 :
location.loadMovie("image0.swf");
break;
case 1 :
location.loadMovie("image1.swf");
break;
case 2 :
location.loadMovie("image2.swf");
break;
}
could anyone tell me how to count how many swf there are in a target folder
and putting the value in like this
choice = Math.round(Math.random()*ValueCalledin);
instead of listing all the files and
2. set a limited time for that swf to play before it calls in the next random swf
im my very unexpert like way i thought (im a total AS beginner) that the script may look something like this
this.location = "Myfolder/";
choice = Math.round(Math.random(".swf")*value);
switch (choice) {
case random :
this.location.loadMovie(".swf");
for the first bit, i dont know lol
dont laugh too hard at my attempt lol
cheers
MCKTJ
__________________
View Replies !
View Related
Random Images
I created a flash piece with three images that rotate. So first image1 is displayed, fades out and then image2 displays, fades out then image3 displays, fades out, then image1 displays, etc...
What Im trying to do is when the application first starts it will randomely select one of the three images to start on. I plan on using the Random command to handle this but I am unable to figure out the actionscript command that I use in order to go into a function. I tried using OnStart and OnLoad but that didnt work. Any suggestion?
View Replies !
View Related
Random Images
Hi,
I am loading images into flash from a mysql database using php, can you code it so that a random image is selected from a table when you press a button in flash?
thanks
Gavin
View Replies !
View Related
Random Images (Help)
So.. I've changed the size of my site (most of you won't know what it looked like anyway) and it fits perfectly with some (cropped) photos of mine.
But that's not really the point, I want the image to change every time you load the page up (visit or reload the page).. I've tried making something like
if (_root.pic = 1) {
this.stop
}
if (_root.pic = 2) {
this.gotoAndStop(2)
}
if (_root.pic = 3) {
this.gotoAndStop(3)
}
'Cept I don't know how to make numbers random either...
(but I did try
_root.pic = random(3);
Which didn't work.)
So, can anyone help?
View Replies !
View Related
Random Images
Hey guys, I don't know if this has ever been asked before. Can anyone help me out or point me in the right direction on how to display random (unique) images using the slide show from this tutorial (http://www.kirupa.com/developer/mx20..._slideshow.htm)? Thanks!!
View Replies !
View Related
Is This Possible? (Random Images)
I am pretty new to actionscript, but I am trying to learn as much as I can. I have an idea to make a flash movie that loads 25 random pictures (5 pictures by 5 pictures). Also, somehow, after 5 seconds or so, I want to have a random (any of the pictures) to change into another random picture. Is that possible, too? What I would love to do is specify the folder where the pictures are, so that I can select any picture of the 200 or 300 or 400 pictures that are in that folder. Is that possible? I have been seeing so many times in the XML files that the pictures are already specified, meaning that no other pictures could be added with out altering the file.
If I am going to be able to do this, I need to know how to:
1. load 25 random pictures
2. after 5 seconds or so, have 1 picture change... and keep the process repeating.
3. If I am loading pictures from a folder in a computer, I wont change the attributes of the pictures. Is there a way in flash so that it would automatically adjust the size of the pictures. Does the "scale (matrix.scale)" have anything to do?
4. Will I have to make 25 individual "movie clips" and name them holder0, holder1, etc... to hold each file?
If anyone knows where I can read about any of this, that would be great.
Thanks in advance,
Evan
View Replies !
View Related
|