Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Anybody Can Help Me Changing Sequencial To Random Load



Im gonna explain, what happened, I have a master '.swf' that loads 'swfs childs'.
when the first '.swf' finishes it goes to the next 'swf', using banner(); the 'swf child' loads in a movieclip, this actionScript works, but I need to change the sequencial order to random order

Anybody can help me??

ide = 0;
_global.banner = function() {
_root.ide++;
if (ide>4) {
_root.ide=1;
}
loadMovie("/Recursos/SWF/a"+_root.ide+".swf", _root.movies);
};
banner();



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 05-19-2005, 12:47 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Sequencial Imagem Loading To Random Loading
I've downloaded a free script that reads several JPG files and it makes a sequencial slideshow.

This is the function used:

ImageFader.prototype.loadXML = function (x) {
var _xml = new XML ();
_xml.ignoreWhite = true;
_xml.path = this;
_xml.load (x);
_xml.onLoad = function () {
for (var a = 0; a < this.firstChild.childNodes.length; a++) {
var _trans = this.firstChild.childNodes[a].attributes.TRANSITION;
var _pause = this.firstChild.attributes.PAUSE
var _img = this.firstChild.childNodes[a].firstChild.nodeValue;
this.path._dataProvider.push ({img:_img, transition:_trans, pause:_pause});
}
this.path.startFading ();
delete this;
};
};

My question is...
How to change that script to it loades random jpg from the xml in stead if loading img1, img2 from xml.

Anyone can help ? Thanks in advance

Sequencial Cliploader
HI I have this code to load in clips, it works fine to load them all in at once but I can't get it to work sequencially. Can anyone help me please?


Code:
//subimage is array variables
MovieClip.prototype.pre = function(subimage){
//ADD VARIABLES FROM ARRAY
subtotal2 = subimage.length
var imgNum = subtotal2;
var imgCur = 1;
var imgSelected = null;
for (isub2=0; isub2<subtotal2; isub2++) {

newclip = projects_mc.projects_holder.attachMovie("pictureholder","pictureholder"+isub2,(isub2+99))
newclip._x=newclip._width*isub2
trace(newclip)
loadImg(subimage[isub2],newclip.picture);
pictureholder._y=120
}}
//////////////////////
/////Declare variables
//////////////////////
var imgLoader = new MovieClipLoader(); //Initialize the loader class
imgLoader.onLoadProgress = function (where, loadedBytes, totalBytes){
where._parent.loadbar._width = (loadedBytes/totalBytes)*450;
}
imgLoader.onLoadComplete = function (where){
where._parent.loadbar._alpha=0
if(imgCur == 1){
eval(what)._alpha = 100;
imgSelected = what;
}
//Incriment imgCur for the next load, and start the process again
imgCur++;
loadImg();
}


/////////////////////
/////Loading Function
/////////////////////
loadImg = function(what, where){

if(imgCur <= imgNum){
imgLoader.loadClip(what,where);
}

}

Sequencial Preloader
I'm looking for some info/code/tutorial to build a sequencial preloader, this is, a main preloader that loads severall swf's that are inside movie clips create on actionscript.

The preloader would be a simple bar 0 to 100% and that when of the swf's are loaded one litle image would fade to 100% to inform the user.

The main preloader should work for all the swf's (external) and only when all the 8 swf are loaded it would play.

Any info/code/tutorial on this issue??

Sequencial Loading Tutorial
i need a good sequencial loading sistem that works in all browsers

Sequencial Loading Tutorial
i need a good sequencial loading sistem that works in all browsers

Sequencial Loading Tutorial
i need a good sequencial preloader sistem that works in all browsers

Sequencial Loading Tutorial
i need a good sequencial loading sistem that works in all browsers

PLEASE HELP - URGENT Load Random Swfs From Individual Random Sets
I have two target mcs I would like to load different random swfs into

I have eight folders (a-h), each with 12 swfs (001-012)

I need to load a random swf (001-012) from a random folder (a-h) into the "card1" mc

I have figured out how to specify which one I want:

loadMovie("a/a001.swf","card1")
stop();

however, I need it randomized....

then, I need to load another random swf into my "card2" mc (001-012) from another random folder (a-h, ...except for the folder from which the first swf was loaded)

can somebody please help??????

Load Random Swfs From Two Differnet Random Sources
I am in the process of creating a VS Card game in Flash. It is basically a game where you can choose either one card or another, each randomly pulled from one of the eight different sets. The first card (or swf) can be pulled from any of the 8 sets (out of a total of 12 cards in each set))..and will load into a targetMC, and the second must be pulled randomly from any of the 8 sets except from the folder where the first card was chosen and load onto the second targetMC.

after the winning card is chosen, it will display winning animation (and send data off to a dynamic bargraph program), and then the main movie will reload two random cards from differnt sets.

can anybody help me on how to set this up??

Random Opacity Changing
hi!

i would to change the opacity of an MC randomly, giving it a sort of fade effect...can anyone help?

cheers

Changing Math.random Function
Hello,

Have anyone tried to modify the Math.random function to return a static value?
Or where the functions libraries are located on my PC?

Thank you.

Changing The Random Distance Movement
hi

I have used Random Movement in Flash MX script, managed to get it working fine and made it move slower.

What I need to do is change the distances the clip moves to make it move a shorter distance and change, move a shorter distance and change. to give more of an irratic movment.

Is this easy to change?

thanks

Random Loading, Help With Changing This Code
Hello,

This code works. However. I'm curious how I would change it so that I could load random movieclips, that are in the current library of the movie I'm loading into?

Filenames?
What would the path be?

filename = ["imageone.swf", "imagetwo.swf", "imagethree.swf"];
path = "";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], randomphotos);

Changing The Random Distance Movement
hi

I have used Random Movement in Flash MX script, managed to get it working fine and made it move slower.

What I need to do is change the distances the clip moves to make it move a shorter distance and change, move a shorter distance and change. to give more of an irratic movment.

Is this easy to change?

thanks

Changing Random Images In A Mask
Hi!

I have a whole bunch of images that I want to change randomly in a mask movieclip (have to be a speciafic shape). I want it to be done dynamically - no tweening!!! I also want them to fade in - stay for about half a minute and then fade out to the next one, etc etc...

can anyone please help?
Thanks

Load A Flash Movie To A Random Frame Each Load
I have created a flash file that fades from one picture to the next. However, I would like to find an actionscipt that will allow the flash movie to load to different each time the page is visited/refreshed. That way visitors don't have to see the same image each time the visit the my page, but can still sit and watch all of them if they want. Also I would want to be able to specify which frames are available for load. That way the page will always load at the begining of each image animation... not right in the middle of it switching to the next image.

Any help is greatly appreciated!

Load A Flash Movie To Specified Random Frames Each Load
Group:
I am trying to find a Actionscript where I can specify random frames and have the movie randomly load to the specified frames each time the page is viewed. The below scrip was given last time I posted this question, but it doesn't seem to load at the specified frames. Sometimes it does, sometimes it load right in the middle of an animation. You can see in the code below I would like the movie to load at frames 1, 116, 231, 346. Any suggestions?

_____________________________________________________

Array.prototype.shuffle = function() {
for (var ivar = this.length-1; ivar>=0; ivar--) {
var p = random(ivar+1);
var t = this[ivar];
this[ivar] = this[p];
this[p] = t;
}
};
ASSetPropFlags(Array.prototype, ["shuffle"], 1, 1);
var Array_ar:Array = new Array(1, 116, 231, 346);
Array_ar.shuffle();
index = 0;
function load_random() {
gotoAndPlay(Array_ar[index++]);
if (index == Array_ar.length) {
(index=0);
}
}
load_random();

Random Changing Swf File On Page Reload
I really hope someone can help here... and quickly if possible.
I have a HTML page with a simple flash animation loop playing at the bottom. I want to make this flash movie randomly change each time the page is reloaded or refreshed...

Is this something I need to code in an empty Flash movie? Or in the actual HTML page itself?

Cheers,

Changing Properties Contingent On Random Numbers
Hi there,
I'm fairly new at this, so I'd really appreciate any community help. I am trying to make a script which graphically displays the results of random number operations. Specifically, I am trying to make a small ball grow on the screen if my random number argument returns a 1 and shrink if it returns a 0. I am hoping to generate many, many of these operations per second, in an effort to replicate and extend a set of interesting experiments on human-machine interaction done by the Princeton Engineering Anomalies Research laboratories. Anyhow, after scouring the tutorials, I came up with the following program, which basically results in a stationary green ball.

The green ball is an instanced movie, "ball", and all of the script is contained in this object. It is set to run for 30 frames, and I would like a new random number and adjustment of the ball every frame. Right now, I'm only adjusting width until I figure out how this works. You may have to break it down for me a bit, if you don't mind. Thanks for your help!

onClipEvent (enterFrame) {
random_number = Math.round(Math.random());
if (this.random_number==1) {
setProperty (this.ball, _width,
getProperty (this.ball, _width)+1)
} else if (this.random_number==0) {
setProperty (this.ball, _width,
getProperty (this.ball, _width)+1)
}
}

Changing Random Colours Of A Sprite In A Loop
Hi
I am trying to create a loop that changes the colours of my dynamic vectors inside my sprite
however I am not sure if I putt the following var names in the right place in the end of my statement attached
or if i need another variable :

var cross : Sprite = new Sprite();
var crosses:Array = new Array();
crosses.push (cross);

or help is greatly appreciated!
mt









Attach Code

var rows:Number = 60;

var columns:Number = 70;

var crosses:Array = new Array();

for (var i = 0; i < rows; i++) {


for (var j = 0; j < columns; j++) {


var cross : Sprite = new Sprite();
addChild ( cross );
var g : Graphics = cross.graphics;
g.lineStyle( 1 , 0x000000 , 0.8 );

g.moveTo( 20 , 20 );
g.lineTo( 30 , 30 );

g.moveTo ( 20 , 30 );
g.lineTo ( 30 , 20 );

var startX = 70;
var startY = 10;

cross.x = startX + cross.width*j;
cross.y = startY + cross.height*i;

crosses.push (cross);
}
}

//TIMER EVENT The times is calls the changeColor() method every 10 milliseconds
var timer:Timer = new Timer(10 , 8000000);
timer.addEventListener (TimerEvent.TIMER, changeColor);
timer.start ();

//This function changes the color for random tiles
function changeColor (e:Event):void {
for (var i = 0; i < 2048; i++) {

//*****I am not sure if I have my var names in the right place here*****//
var randomIndex:int = Math.floor(Math.random() * crosses.length);


var cross:Sprite = (Sprite)(crosses[randomIndex]);


if (cross.currentFrame == cross.totalFrames) {
cross.prevFrame ();


}

else {
cross.nextFrame ();
}


}



}

Load Random Mc.. Wait.. Then Load Following Mc
Last edited by [X]Silver : 2005-03-30 at 00:50.
























Is this possible?

I'm doing a flash site, that loads a random movie at startup;

ActionScript Code:
filename = ["test_0.swf", "test_1.swf",
"test_2.swf", "test_3.swf", "test_4.swf"];
path = "mc/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget);


Is it then possible to assign a linked movie to each of the randomly loaded movies, and have it load after a 4 second wait?

Page loads -> random movie -> 4 sec wait -> Random movie unloads and is replaced by the movie in same category (linked)


Does this make sense?

Hope someone can help me...
thanks

Changing Screen RESOLUTION On Load
Does anyone know a code that will set/change the users screen resolution when a Flash exe is Loaded?

Changing Size Of Load Movie
when u load a movie using target is there a way to size the movie being loaded and is there also a neat trick to using masks with the load movie... i can't seem to get any of these to work.
thnx

Code Not Changing X,z, Load Position, ? Why?
With the highlighted lines I'm trying to change the position on the page that the .swf loads to. This is the button code that calls up the external .swf.

Any help?


}
on(release){
loadMovieNum ("scroller1.swf",1);
_root.onEnterFrame = function(){
if (_level1 != undefined){
_level1._x = 300;
_level1._y = 200;
delete _root.onEnterFrame;
}
}
}

Changing Movie Level After Load
I am still trying to come up with a solution for this problem.

I need to change a swf's level after it is loaded.

I have been able to conduct a swap with the below code.
_level19.swapDepths(20);

But it results in the swf in _level19 becoming non functional like it jumped to some random level. All script to control the timeline of level_19 after the swap becomes non functional. An unloadmovieNum command for every single level in the piece won't unload it.

This is my 4th forum I have posted on. So I am assuming the code does not exist.

Is there a command that can control the stack level of just one single swf or movie clip? Like
_level19.goto(5);

Creating A Changing Level To Load To
Hey everyone,

I am creating a navigation system that is comprised of multiple swf's, and I am trying to create a transition. My goal is to have the currently loaded swf play an outro while the new swf plays it's intro. My idea was to do this by rotating the levels that each of the swf's load into with a variable. As you will see from my code . . . I am still fresh to AS, I keep getting an error. I think I have the right idea, but I am missing something in the syntax.

currClip is a variable that will change when the corresponding button is pressed.

I am getting the syntax error on the _level + "currLevel" + .play;

**Error** Scene=Scene 1, layer=a, frame=1:Line 13: Operator '+' must be followed by an operande
_level + "currLevel" + .play;

Total ActionScript Errors: 1 Reported Errors: 1

Am I on the right track?









Attach Code

currLevel = 4;
function changeLevel() {
if (currLevel == 4) {
currLevel = 3;
} else {
currLevel = 4;
}
}

function loadLevel() {
_level + "currLevel" + .play;
changeLevel();
_level0.myMCL.loadClip("currClip", "currLevel");
}

























Edited: 03/18/2007 at 04:52:06 PM by BushyMark

Load Movie Without Changing Scene
Here is what the site is supposed to look like minus a few buttons that will go at the bottom.  http://hombru.com/test/whole.html
 

The two view windows in the middle, one on the left with the text scroller and the one on the right will change according to the option you click.  My delima is that when I try and get Load Movie to work it works but it changes the whole page to the movie I told to load.  How can I get the movies to load into the windows instead of changing the whole page?  

Dynamically Changing Values To Load Different Info?
I want to design a flash movie that will have 100 plus Titles, for example. When a user clicks on a title a clip will be loaded with several dynamic elements (text and images)related to that title.

When a different title is clicked the same clip will load, but I want the contents inside this new title to load it's related information.

I am starting from scratch. I just want to do this in the best possible way. I don't want to enter different info for each and every clip.

I would like to enter all the info in one place (database or something?) and have all the elements of a particular title load automatically when that title is clicked.

Furthermore I would like to dynamically list all the titles when the swf file is loaded.

If someone can point me to a tutorial or give me any clues on where to get started, I'd appreciate it. Any thing?! Please help.

Just want to know the best way to go about it. I'm willing to learn.

Changing .alpha On A Loader.load() Image
I'm just now playing with Loaders and am loading external .jpg images to my movie. I can get the Loader to .load and display the image..that's all working. However, I'm trying to fade the image down by 2 on every enterFrame event. The EnterFrame handler that I've worked is running because trace() messages show up. But the loaded image doesn't fade.

Can anyone point me in the right direction?

Thanks,

---DamianHart

Changing Level Of A .swf After Load / Not Swap Depth
I have looked everywhere, gone through actionscript books and posted to about 5 forums.

I need script to move .swf file to a different level after load / . . . loadMovieNum ("xxxx.swf", 25);

swapdepth has not been a workable solution because it freezes one of the .swf files. As I believe depth swap is not intended to work in this manner.

I am looking for a command that can push say ("piecetwo.swf", 20); to _level19 . . . something like. _level19.swapLevels(20);

When I do a swap depth. The level change takes place. But it also ceases all functionality with the one of the .swf files.

If you can help. I would really appreciate itText

Will GetURL Load The Same File From A Directory Thats Changing Location?
Wanting to know if I can use the get URL action to load files from a CD. I can get it to work on my system its just that once I specify a url location it will change depending on the drive name of the person viewing the CD...Any help?

All the files including the movie that is activating the getURL action will also be on the CD. Basically a website on CD.. Desperately need help...

Thanks
Cougar.

Changing Images In Flash Movie To Load Externally?
Ok, the link to the swf is below (because the fla is MASSIVE - too massive to attach) and what I want to know is this:

in the swf, all the images (intro and galleries) are simply slideshows. is there a quick way that I can make all these images load externally from an "images" folder? I hope I'm explaining this right. It's just the fla is so huge, to muck about with it much will take too long....so can I simply put some as or something where each image should be in the movie, or........?????

Please help, I don't want to have to rebuild this whole damn thing lol

Changing Code To Load External Swfs Instead Of Html Links
Hi

So I've purchased a flash nav menu with some actionscript that's a lot more advanced than my skills. All I want to do is change the code so that i can make the buttons load external swfs instead of launching an html window. Any help would be really apreciated, I suspect it's some thing minor, but I can't figure it out. I've posted the script below, alot of it controls the look of the menu, I trimmed a bit off the end because the post was too long, I'm just concerned with the links part. Thanks in advance.



function subnum(i)
{
var inNum = 1;
var maxNum = 0;
while (inNum > maxNum)
{
if (this["sub" + i]["sub" + i + inNum] == undefined)
{
maxnum = inNum + 1;
continue;
} // end if
++inNum;
} // end while
max = 0;
return (inNum - 1);
} // End of the function
function onNout(n)
{
if (!n && _root.page)
{
n = _root.page;
benm = _root.page;
if (_root.page)
{
this["sub" + _root.page]["sub" + _root.page + _root.spage].frm(1);
} // end if
}
else
{
this["sub" + _root.page]["sub" + _root.page + _root.spage].frm();
} // end else if
for (i = 1; i <= num; i++)
{
if (n)
{
if (n == i)
{
this.ma.coloring(this.ma, i, 1);
this["mtxt" + i].alphaNfrmNmovXY(0, 1, undefined, undefined);
this["omtxt" + i].alphaNfrmNmovXY(100, undefined, undefined, undefined);
this.bar.subControler(_root["omtxt" + i]._x, _root["omtxt" + i]._width + 7, 100);
this["mline" + i].alphaNfrmNmovXY(0, 1, undefined, undefined);
this["mline" + (i - 1)].alphaNfrmNmovXY(0, 1, undefined, undefined);
this.bg._x = this["mtxt" + i]._x - 20;
this.bg._width = subw[i] + 20;
this["sub" + i]._y = 62;
this["sub" + i]._x = Math.round(subx[i]);
this["sub" + i]._alpha = 100;
this.bw.alphaNfrmNmovXY(100, 1, undefined, undefined);
}
else
{
this["mtxt" + i].alphaNfrmNmovXY(100, 1, undefined, undefined);
this["mline" + i].alphaNfrmNmovXY(100, 1, undefined, undefined);
this["omtxt" + i].alphaNfrmNmovXY(0, undefined, undefined, undefined);
this.bw.alphaNfrmNmovXY(0, 0, undefined, undefined);
this["sub" + i]._y = 400;
} // end else if
this.nbtn.frm(1);
continue;
} // end if
this.ma.coloring(this.ma, 0, 0);
this.bw.alphaNfrmNmovXY(100, 0, undefined, undefined);
this["mtxt" + i].alphaNfrmNmovXY(100, 0, undefined, undefined);
this["omtxt" + i].alphaNfrmNmovXY(0, undefined, undefined, undefined);
this["mline" + i].alphaNfrmNmovXY(100, 1, undefined, undefined);
this["sub" + i]._y = 400;
this.nbtn.frm(0);
} // end of for
} // End of the function
function init()
{
_global.num = 6;
_global.onum = 4;
_global.sub = new Array();
_global.subw = new Array();
_global.subx = new Array();
counter = 1;
for (i = 1; i <= num; i++)
{
this.nbtn.gotoAndStop(1);
this["mtxt" + i].gotoAndStop(1);
sub[i] = subnum(i);
subw[i] = this["sub" + i]._width;
subx[i] = this["sub" + i]._x;
this["sub" + i]._alpha = 0;
this.ma.gotoAndStop(1);
this["btn" + i].onRollOver = function ()
{
pagerControl(1);
nm = benm = this._name.substring(3, 4);
onNout(nm);
};
this["btn" + i].onRollOut = this["btn" + i].onReleaseOutside = function ()
{
pagerControl(2);
onNout();
nm = benm = this._name.substring(3, 4);
};
this["btn" + i].onRelease = function ()
{
name = this._name.substring(3, 4);
getURL(_root["connURL" + name + "0"], _root["connGET" + name + "0"]);
};
for (n = 1; n <= sub[i]; n++)
{
this["sub" + i]["sub" + i + n].gotoAndStop(1);
this["sub" + i]["sub" + i + n].onRollOver = function ()
{
pagerControl(1);
nm = benm = this._name.substring(3, 4);
onNout(nm);
this.frm(1);
};
this["sub" + i]["sub" + i + n].onRollOut = this["sub" + i]["sub" + i + n].onReleaseOutside = function ()
{
pagerControl(2);
onNout();
this.frm(0);
};
this["sub" + i]["sub" + i + n].onRelease = function ()
{
name = this._name.substring(3, 5);
getURL(_root["connURL" + name], _root["connGET" + name]);
};
} // end of for
} // end of for
this.bg.onRollOver = function ()
{
pagerControl(1);
nm = benm;
onNout(nm);
};
this.bg.onRollOut = this.bg.onReleaseOutside = function ()
{
pagerControl(2);
nm = benm = undefined;
onNout();
};
this.nbtn.onRelease = function ()
{
if (counter == 1)
{
this.frm(1);
nBtnControler(1);
this._parent.masd.Check = true;
++counter;
} // end if
};
this.nbtn.onRollOver = function ()
{
this.frm(1);
};
this.nbtn.onRollOut = function ()
{
this.frm(0);
};
this.bg.useHandCursor = false;
this.masd.inbt.onRollOver = function ()
{
};
this.masd.inbt.useHandCursor = false;
for (i = 1; i <= onum; i++)
{
this["obtn" + i].onRollOver = function ()
{
};
this["obtn" + i].onRollOut = this["obtn" + i].onReleaseOutside = function ()
{
};
this["obtn" + i].onRelease = function ()
{
name = this._name.substring(4, 5);
getURL(_root["oURL" + name], _root["oGET" + name]);
};
} // end of for
} // End of the function
function nBtnControler(st)
{
var i = 1;
while (i <= num)
{
if (st == 1)
{
onNout();
this["btn" + i]._visible = true;
this.bg._visible = true;
this.m_mask.xwidth(Stage.width);
this["obtn" + i]._alpha = 100;
this["oline" + i]._alpha = 100;
}
else if (_root.page != undefined || _root.spage != undefined)
{
onNout();
}
else
{
this.m_mask._width = 0;
this["mtxt" + i]._alpha = 0;
this["btn" + i]._visible = false;
this.bg._visible = false;
this.bar._alpha = 0;
this["mline" + i]._alpha = 0;
this["obtn" + i]._alpha = 0;
this["oline" + i]._alpha = 0;
} // end else if
++i;
} // end while
} // End of the function
function pagerControl(st)
{
if (st == 1)
{
_root.pager.gotoAndStop(1);
_root.page = "";
}
else if (st == 2)
{
_root.pager.play();
} // end else if
} // End of the function
Stage.align = "";
Stage.scaleMode = "noScale";
Stage.showMenu = false;
_root.connURL10 = "125.html";//COMPANY
_root.connURL11 = "125.html";
_root.connURL12 = "125.html";
_root.connURL13 = "125.html";
_root.connURL14 = "125.html";
_root.connURL15 = "125.html";
_root.connURL16 = "125.html";
_root.connURL20 = "125.html";//BUSINESS
_root.connURL21 = "125.html";
_root.connURL22 = "125.html";
_root.connURL23 = "125.html";
_root.connURL24 = "125.html";
_root.connURL30 = "125.html";//PRODUCTS
_root.connURL31 = "125.html";
_root.connURL32 = "125.html";
_root.connURL33 = "125.html";
_root.connURL34 = "125.html";
_root.connURL35 = "125.html";
_root.connURL40 = "125.html";SERVICE
_root.connURL41 = "125.html";
_root.connURL42 = "125.html";
_root.connURL43 = "125.html";
_root.connURL44 = "125.html";
_root.connURL45 = "125.html";
_root.connURL50 = "125.html";SOLUTION
_root.connURL51 = "125.html";
_root.connURL52 = "125.html";
_root.connURL53 = "125.html";
_root.connURL54 = "125.html";
_root.connURL60 = "125.html";SUPPORT
_root.connURL61 = "125.html";
_root.connURL62 = "125.html";
_root.connURL63 = "125.html";
_root.connURL64 = "125.html";
_root.connURL65 = "125.html";
_root.connURL66 = "125.html";

_root.connGET10 = "";
_root.connGET11 = "";
_root.connGET12 = "";
_root.connGET13 = "";
_root.connGET14 = "";
_root.connGET15 = "";
_root.connGET16 = "";
_root.connGET20 = "";
_root.connGET21 = "";
_root.connGET22 = "";
_root.connGET23 = "";
_root.connGET24 = "";
_root.connGET30 = "";
_root.connGET31 = "";
_root.connGET32 = "";
_root.connGET33 = "";
_root.connGET34 = "";
_root.connGET35 = "";
_root.connGET40 = "";
_root.connGET41 = "";
_root.connGET42 = "";
_root.connGET43 = "";
_root.connGET44 = "";
_root.connGET45 = "";
_root.connGET50 = "";
_root.connGET51 = "";
_root.connGET52 = "";
_root.connGET53 = "";
_root.connGET54 = "";
_root.connGET60 = "";
_root.connGET61 = "";
_root.connGET62 = "";
_root.connGET63 = "";
_root.connGET64 = "";
_root.connGET65 = "";
_root.connGET66 = "";
_root.oURL1 = "125.html";//HOME
_root.oURL2 = "125.html";//LOGIN
_root.oURL3 = "125.html";//JOIN
_root.oURL4 = "125.html";//SITEMAP
_root.oGET1 = "";
_root.oGET2 = "";
_root.oGET3 = "";
_root.oGET4 = "";
MovieClip.prototype.xwidth = function (tw)
{
var speed = 2.000000E-001;
tw = tw == undefined ? (this._width) : (tw);
this.onEnterFrame = function ()
{
this._width = this._width + (tw - this._width) * speed;
if (Math.abs(tw - this._width) < 1)
{
delete this.onEnterFrame;
} // end if
};
};
MovieClip.prototype.coloring = function (name, n, pb)
{
chg = new Color(name);
var confirm = 0;
this.color0 = "255, 255, 255";
this.color1 = "167, 190, 0";
this.color2 = "0,169,190";
this.color3 = "146, 23, 237";
this.color4 = "255, 5, 81 ";
this.color5 = "255, 102, 0";
this.color6 = "227,0,16";
col = this["color" + n].split(",", 3);
cRed = col[0];
cGreen = col[1];
cBlue = col[2];
var spd = 4;
this.onEnterFrame = function ()
{
confirm = 0;
if (pb == 1)
{
this.nextFrame();
if (this._currentframe == this._totalframes)
{
++confirm;
} // end if
}
else
{
this.prevFrame();
if (this._currentframe == 1)
{
++confirm;
} // end if
} // end else if
with (name)
{
thisColor = chg.getTransform();
thisColor.rb = thisColor.rb + (cRed - thisColor.rb) / spd;
thisColor.gb = thisColor.gb + (cGreen - thisColor.gb) / spd;
thisColor.bb = thisColor.bb + (cBlue - thisColor.bb) / spd;
chg.setTransform(thisColor);
if (Math.abs(thisColor.rb - cRed) <= 8)
{
thisColor.rb = cRed;
thisColor.gb = cGreen;
thisColor.bb = cBlue;
chg.setTransform(thisColor);
++confirm;
} // end if
} // End of with
if (confirm == 3)
{
delete this.onEnterFrame;
} // end if
};
};
MovieClip.prototype.mcAlphaMove = function (txa, txb, tyc, tyd, al)
{
var speed = 2.000000E-001;
al = al == undefined ? (0) : (al);
txa = txa == undefined ? (this._x) : (txa);
txb = txb == undefined ? (this._y) : (txb);
tyc = tyc == undefined ? (this._x) : (tyc);
tyd = tyd == undefined ? (this._y) : (tyd);
al = al == undefined ? (this._alpha) : (al);
this.onEnterFrame = function ()
{
this._x = this._x + (txa - this._x) * speed;
this._y = this._y + (txb - this._y) * speed;
this._alpha = this._alpha + (al - this._alpha) * speed;
if (Math.abs(this._x - txa) < 1 && Math.abs(txb - this._y) < 1 && Math.abs(al - this._alpha) < 1)
{
this._x = tyc;
this._y = tyd;
delete this.onEnterFrame;
} // end if
};
};
MovieClip.prototype.frm = function (pb)
{
this.onEnterFrame = function ()
{
if (pb == 1)
{
this.nextFrame();
if (this._currentframe == this._totalframes)
{
delete this.onEnterFrame;
} // end if
}
else
{
this.prevFrame();
if (this._currentframe == 1)
{
delete this.onEnterFrame;
} // end if
} // end else if
};
};
MovieClip.prototype.alphaNfrmNmovXY = function (al, pb, x, y)
{
var spd = 4;
var confirm = 0;
al = al == undefined ? (0) : (al);
x = x == undefined ? (this._x) : (x);
y = y == undefined ? (this._y) : (y);
this.onEnterFrame = function ()
{
confirm = 0;
if (pb == 1)
{
this.nextFrame();
if (this._currentframe == this._totalframes)
{
++confirm;
} // end if
}
else
{
this.prevFrame();
if (this._currentframe == 1)
{
++confirm;
} // end if
} // end else if
this._alpha = this._alpha + (al - this._alpha) / spd;
if (Math.abs(this._alpha - al) < 4)
{
this._alpha = al;
++confirm;
} // end if
this._x = this._x + (x - this._x) / spd;
this._y = this._y + (y - this._y) / spd;
if (Math.abs(this._y - y) < 1 && Math.abs(this._x - x) < 1)
{
this._x = x;
this._y = y;
++confirm;
} // end if
if (confirm == 3)
{
delete this.onEnterFrame;
} // end if
};
};

Random Load
I'm building my first all Flash site for myself.

The background is an image/.swf.

When someone hits the page, I want a unique and random image/.swf to pop into the background.

I've built the whole site off of an 'empy' base movie. Everything else loads into various layers or MCs of those layers.

My base image movie is layer 1. What would be the random script needed to have layer 1 rotate randomly through 5 or 6 different images/movies on load?

Any guidance, to tutorials or suggested scripting, would be greatly appreciated.

Thanks in advance.

Load Random SWF
I would like to randomly load a series of external images into my Flash file. Since Flash 5 does not support external linking to image files, I have to place images into a SWF movie, and then randomly load the external movies.

If anyone knows a script for this, or could tell me where to find it, I would appreciate it.

Thanks

Load Random Mc ( HELP PLEASE)
HI.....
I have exernal (mc.swf)
when i update it....
the old mc still in the cash ..
any action script code for it ?
I don't want meta html code... only action script!!
Thanks...

Random Load
i want a movie with random movieclips going of at random intervals, is it possible? And can you call for these movieclips to load when they get called so you dont have to load everything right away?

Also, do you need to clear it after each event has played so it doesnt take up space (ram)?

Load Random .swf In?
Hi. I was wondering if someone could help me with my problem. I have a movie with about 6 different sections which are loaded in from external .swf's. For the moment being my AS is...

loadMovie("news.swf",_root.wNEWS.newsMC);
_root.wNEWS.newsbutton.enabled = false;

The reason I have the button thing is to disable the button of that clip once it's loaded, I'm sure you knew that though. But what I want to do is instead of loading that clip in everytime have it randomly load in one of my 6 sections everytime you visit or refresh. I was wondering if someone could show me the AS for what I want to do? I would appreciate it alot. Thanks!

Load Random
does anyone know how to have flash files( swf ) load random into a table. i am setting up a page and would like if every time someone goes to this page have a different swf show up . i would like to be able to call these swfs from a folder they are placed in. thanks for the help

Random Load Swf
Hi folks,
here's my dilema. I trying to have my site stream my songs and then I want to put in a code to have it open another swf in the same window/level at random.
I'm looking for an actionscript code to do the following.
I need it to load my swf files in random order. <-don't make since
"is there a such thing as, Random order, order is not Random"
anyway
I have been searchin sites and forums and I keep getting real close to what I'm looking for. However, the code must be too complex for my newb @$$, or either they're half complete. Please, I know that it's a simple code to load my swf's, I just need a lil assistance.

ver: Flash 5
OS: Winderz (windows2k)

examples I found on the net!
r=random(12)+1;
filename="movie"&r&".swf";
loadMovie("http://your-server.com/swf/"&filename, _root, );

Load Random .JPG
hey all..
can anyone tell me the script to load a random .jpg...
i have 5 diff. bg images..

1 of them now is at > http://members.rogers.com/chrisp/wor...h/aurora2.html
and i just want it to load a diff random bg image each time someone visits..

thx for the help

Random Load
Hi all,

I have a empty mpovieclip on my stage and I want to be able to load a random external image or movieclip each time the page is refreshed or the flash movie goes back to the frame that has the empty clip.

I have a folder that has 3 to 4 images at this stage and I want to know what code I would need to get my flash movie to randomly call one of the images from that series of images.

How can I do this using actionscript.

Any helo would be appreciated ro if anyone knows of a working example somewhere.

I am most grateful

Pixel Magik

Load Random Swf
i m new at this and i m having a problem with:
how can i load random swf from another swf?
thnks

Load Random Jpg
HI all


Is there a way I RANDOM
can load a jpg from a folder


What I want to do is a movie on my deafult page, that call/load
a random thumb from my gallery and because I uploading new once
a week I would be great that it just took the xxxxxx.jpg and
mabye could loop


Some have a Idea

:-) Pauk

Random Swf Load
hello

i have MX 2004 pro and have built a site with a database. The site has a flash header which appears at the top of every page. I want to mix it up a bit and make flash load a selection of movie clips randomly from a folder. how would i do this?

for example if the homepage loaded up and showed movie 1, if i clicked on the contact us link could i make flash show movie 2,3 or 4 instead on a random cycle?

Random Load JPG's
Hi please can anyone help.
I urgently need a little script to randomly load a jpg from a folder of say 10. However I need it to fade in the jpg once its loaded.?

Random Swf Load
Can anyone help please?

I need to randomly load 1 out of 30 different swfs on an action.

Basically, when clicking into the photography section on my site, I want to load up a random photo (each photo is a swf).

Any ideas?
Thanks

Help With Random Pic Load
how do i use this script to load a random picture into my movie. i have the pics in a clip all on separate frames. i don't know what i need to make it work

i successfully used the gotoandstop(random()+1) but it will load pictures repeatedly. i want there to be no repetition in the sequence.

http://www.flashkit.com/tutorials/Ac...1050/index.php

here is the script if you don't feel like going to the link

numberOfElements = 50;
myNumbers = new Array(numberOfElements);
randomNumbers = new Array(numberOfElements);
for(i=0;i<numberOfElements;i++){
myNumbers[i] = i+1;
}
i=0;
while(myNumbers.length > 0){
thePosition = Math.round(Math.random()*(myNumbers.length-1))
randomNumbers[i] = myNumbers[thePosition];
i++;
myNumbers.splice(thePosition,1);
}
for(i=0;i<numberOfElements;i++){
trace(randomNumbers[i]);
}

Load Random *.jpg
i can't get this to work. i want it to load any random jpg file that end with exension jpg

//Random images
pics = new Array("*.jpg", "*.jpg", "*.jpg", "*.jpg");
var randNum = getRandom(0, 3);
_root.containerMC.loadPic(pics[randNum], pics[randNum], 100);
pics[randNum]._x = 0;
pics[randNum]._y = 0;
// function to generate a random integer
// between minimum and maximum, inclusively
function getRandom(minimum, maximum) {
return Math.floor(Math.random()*(maximum-minimum+1)+minimum);
}

Copyright © 2005-08 www.BigResource.com, All rights reserved