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








Loading Random MP3 At Site Start


Hello,

OK, I have, let's say, 5 MP3 files resting in a folder on my server /mp3. Now, using a media player I have setup in flash, I would like at least the first song to be picked randomly upon entrance to the site. I would also like it to have the standards:

-- play after 20% loading complete
-- volume slider - know how to do this
-- stop & NEXT buttons - know how to do the stop, but what about the
NEXT?

I didn't find any information on how to do this, so I had to post! Please help!




FlashKit > Flash Help > Flash MX
Posted on: 02-08-2004, 12:20 PM


View Complete Forum Thread with Replies

Sponsored Links:

Loading Random .SWF For My Site
i'm on this since november last year... i thing that can't be done... so this is the last post i'll write on any site... i need to load a random .swf, but this is the dificult part... i whant to put the script at the last frame of every banner... cuz... the banners will be differents... and i cant use the array methot or the random number... cuz.. what about if i have 3 or 4 banners, and i upload 1 or 2 more... i'll need to mod. every single banner!!! what i did right now was put the banner on a iframe, then call another page and this page call a random swf... but after some time it stop working... so i need to call a swf... but with any name... not on a array cuz i want to put the script in the last frame... so that way every new banner can take the time it need to load... and the time to be play... and when it stop, call a new RANDOM banner and repete all the same... NOT ARRAY!!! or RANDOM NUMBER!!! NO!!!

i just think that can't be done on flash...

HO!!! the site is www.rinconesrd.com





























Edited: 08/22/2007 at 05:47:49 PM by amaurisstudio

View Replies !    View Related
Loading A Movie (within A Movie) & Assigning A Random Start Frame
Flash 5

Hello everyone.

After taking almost a year off from web programming Im relearning flash :0

I haven't gone past the basics with Flash 5 and have a couple projects coming up.

The routine I wish Flash 5 to do should be something simple to explain I hope for a vetrin user.

1) Flash Movie A (180 x 60) loads Flash Movie B (60x60) into left most space (say slot 1) and then randomly tells Flash Movie B to start at a particual frame (random(8). Each frame is a simple image with an actionscript Stop; command).

2) Flash Movie A fades in 1st Flash Movie B at slot 1.

3) Flash Movie A loads another Flash Movie B in the middle space (slot 2) and once again randomly tells Flash Movie B to starts at a particual frame (random(8) (just a static picture like in 1).

3) Flash Movie A fades in 2nd Flash Movie B at slot 2.

4) Flash Movie A loads another Flash Movie B into the far right space (slot 3) like the others (tells Movie B which random frame to start at).

5) Flash Movie A fades in 3rd Flash Movie B at slot 3.

My feeble mind is having a problem telling:

1) Where to tell Flash Movie A to position each load of Flash Movie B.

2) How to tell Flash Movie B I wan't it to start at a random frame.

I have the fade in and fade out set

also.... slightly more complex.. Does anyone have experience in doing somethnig similar to this and setting a variable to define which random numbers were selected for each slide so they will not repeat. (i.e. after loading slot 1 it will also define 'slot1' at the same time it creates that random number for slot1 and so on).


TIA
Dan

View Replies !    View Related
Start Up Site Or Else
i know theres alot preloaders out of there.. but i cant find exactly im looking for

is like a as its intro, banner, and anything. The cool effect box comes out animated then the actual preloader start loading in the box or else. then once preload finished. then have it animated like fade out the box or any effect goes to new scene, frame, swf..

each time i learned to make preloader (basic) it loads fine but i cant get do effect cause load forces load or made the whole broswer loads the banner before it start. PRetty lame

Hope someone have a answer for it to help me!

Thanks,

Nick

View Replies !    View Related
Random Start
Hello experts,
how do i make my flash animation start from
a random frame? For example if i have 5
separate frames from which the movie can
"begin" and i want that the visitor seems
random animations..
some use of the math.random() method at
the first frame?

View Replies !    View Related
Random Start
Hello...

I have a simple quiestion for you who know alot in actionscript.

I want in the start of my main movie to either go to movie1_mc or movie2_mc. I want it to be a random witch movieclip it plays in the start.

those two moviclips are on a difrent framelabel so it could be easiest to tell the movie to go to either framelabel "bla" or "blabla". any ideas??? do you know what I mean?

I use mx 2004

View Replies !    View Related
Random Start
I have several move clips that I have set up in one flash file so when the first clip is done it goes into the second one.
How would I do it so it randomly starts at the beginning of any one of my clips, meaning that it starts at frame 300 and next time refreshed/loaded it starts as 850 and next time 1? Does that make sense? Any input would be great!!

View Replies !    View Related
Build A Web Site,where Should I Start From?
hi,i'm a newbie..i'd like to learn to use flash mx for website developing. to start a project,i've heard about multiple scenes, single scena and more layers, multiple swf,,,
can anyone tell me which is the right and best way to start developing a website?!
thank you m8s!
soren

View Replies !    View Related
[F8] Advice For Where To Start With A Site...
Hi All,

I have been requested by a client to build a portfolio website for a photographer, but I'm not quite sure where to start.

The client has requested a fairly simple looking site built in flash to allow for fancy loading effects on the gallery images. This is easy enough as I know how to implement a variety of galleries so this shouldn't be too hard.

The problem occurs when it comes to making this gallery editable for the client. The site should allow for images to be removed and uploaded without any help from myself. My first thought is to implement a CMS as this seems the most professional and precise solution (unless I am just thinking too big!)

So where do I start?!

He has also requested that the site have a login section for clients to view their own photos which I assume I can build with the help of a database and mySQL (please correct me if I am wrong)

I have not yet agreed to take on the project and am just considering the different ways this can be implemented and overall costs so I can provide a quote.

So anyone have any suggestions?

Thanks in advance

View Replies !    View Related
Start Sounds At Random
I am just trying to figure out if i have a 5 swf files loaded already into the main movie, and i have a button to fade the current song to a stop. My question is how would u set the next button that turns sound back on so on the press it will start 1 of the 5 music tracks at random. (tracks are loaded by levels in their own swf)..

Thnx in advance to all who reply

n.u.r.v

View Replies !    View Related
Random Start Of Flash
I am totally new to this and need some help.

I have a flash that contains a number of pictures. I want it to show a random picture on each load/reload of my pages on 3 places. I have tried some of the downloads and tutorials and help files, but still don't get it to work.

Here you can see what I mean www.iggnorge.com . The flash is to be put on the top of the page replacing the .jpg I have there now.

Any help is appreciated.

View Replies !    View Related
Random Start Scene?
Hello

I hope someone can help me with this:

I have made a small presentation flash which features 25 different posters from the year 1981 and through to 2004 in running order.

I would like to start the flash at a random year every time it is loaded

Thankyou in advanve

Mikado

View Replies !    View Related
Random Frame Start
Hi guys!

I've got a flash movie, and I want it to start randomly on either one of three frames.

I've labled the frames "rndStart1", "rndStart2", "rndStart3".

Can anyone tell me how this can be done?

Cheers.

View Replies !    View Related
Random Start Frame For MC
Hello,

I have an MC and on it's timeline there are three different pieces of text on frame 1-3 with stop actions on each. I would like when the MC loads on the main timeline to randomly go to one of the three frames so that the text is not always the same. A good tutorial be a great help, or if you know some script that would do the trick I would greatly appreciate it. Thanks in advance,

Llyfre

View Replies !    View Related
Creating A Random Start
Hello,

I have three different texts I would like to have randomly selected to appear on frame one of the MC they're inside of. I thought if I used dynamic text inside the MC I could have an actionScript randomly call one of the three texts to appear in the dynamic text window, but I'm having trouble with the script. Here's a start though it isn't functioning (I've attached the .fla):

txt1 = "first text appears here";
txt2 = "second text appears here";
txt3 = "third text appears here";

var i:Number = Math.ceil(Math.random()*3);
mc.mc_text = eval("txt"+i);


Perhaps a simpler design without the dynamic text could have texts 1-3 inside the MC on frames 1-3, and when the MC loaded, a script could randomly direct frame 1, 2, or 3 to be the starting frame. Again, I'm not sure how to script the random function...

Any help would be appreciated. Thanks,

Llyfre

View Replies !    View Related
[F8] Random Start In Timeline
I was wondering if it was possible to make a movie start from a random frame in the timeline every time it was loaded. I can't seem to make it work.

Thanks

View Replies !    View Related
Random Start Problem.
I have a movie clip that i would like to start at a random frame.
Everytime i load the file, i would like it to start at 1 of 10 frames, either at frame (30,200,370,540,710,880,1050,1220,1390,1560), i just want it to continue after but the first starting frame must be random on one of those frame numbers...maybe an onEnterFrame command??

Any help is very grateful!

View Replies !    View Related
Random Key Frame Start
Does anyone know how to set up where a flash file will start on random key frames and not start at the begining of the timeline everytime it is reloaded on a webpage?

Example:
http://www.comfortpetproducts.com

not the flash in the body, but in the header is what I am refering to.

Any time you click a different link to go to another page there is a differnt picture that starts in the timeline. This is one swf file in a header.php file that is has a include statment on all the pages of the site. So there are not multiple swf for every differetn webpage.

View Replies !    View Related
Random Start On Timeline
HI!

I have made a 10 picture slideshow witch loads on the main site. My question is how I make the slideshow begin with a different picture each time you open the site. The slideshow is a really simple timeline with motiontweens. So im looking for a script in the first frame of the timeline that jumps to a random picture in the slide show.

Thanx

K

View Replies !    View Related
Random Start + Stop
Sorry for all the questions...
Is there a way to have a movie randomly play and pause?
I tried looking for a random command and found random.math and random.depricated
I'm guessing that i could set some kind of a function where if the number selected was even then play if odd then stop... but once the movie stops the scripts stops too... is there perhaps a PAUSE and CONTINUE of some sort?

View Replies !    View Related
Start On Random Frame
Can anyone please help me with getting the correct code in AS3 for starting a swf-file on a random frame? In my file, it should randomly start on frame 2 or 3.

I found a code for AS2, which is

Code:

function randRange(min, max){
var randomNum= Math.round(Math.random()*(max-min))+min;
return randomNum; }
{
var say; say = randRange(2,3); gotoAndStop(say);
}
It works in IE, but not in Firefox and Netscape by some reason.
And anyway, I need it in AS3.

Please help!

View Replies !    View Related
Random Start + Stop
Sorry for all the questions...
Is there a way to have a movie randomly play and pause?
I tried looking for a random command and found random.math and random.depricated
I'm guessing that i could set some kind of a function where if the number selected was even then play if odd then stop... but once the movie stops the scripts stops too... is there perhaps a PAUSE and CONTINUE of some sort?

View Replies !    View Related
Start On A Random Frame
I am working on a flash document for my employer. Basicly the document contains 19 frames each from with a Agent picture on it and next to the picture a testimonial. At the bottom of each frame tehre is a next and previous button so you can go thru all of the agents.

Here is the flash http://www.househuntawards.com/

What I am trying to do with it is make it so it starts on a random frame. That way the same agent doesnt show up first every time you go to the page. What I tried first was adding a blank frame at the begining and putting a script on it that says this

minNum = 2;
maxNum = 20;
rndNum = Math.ceil(Math.random() * (maxNum - minNum)) + (minNum + 1);
gotoandplay(rndNum);

For whatever reason this works fine in the flash player on my computer. But when I embed it into the website and you view it with Internet Explorer I get a agent picture from one page a testimonal from another page and the previous and next buttons disapear.

NOTE: This only happens in IE, in firefox the flash document works fine.

Any idea? Thanks in advanced.

View Replies !    View Related
How Do I Put A Flash Intro In The Start Of My Site?
Hello everyone if anyone can give me a hand on showing me how to add in a flash intro to the start of my site i would thanks you's so much.

I am runing a php web site with the e107 core system installed and would like to know how can i add in a flash intro before going into my site any help i will take thanks everyone.

View Replies !    View Related
Quiz - How Many Of You Use Templates To Start A Site?
I have seen many nice templates online. I was wondering if it was common to start with a template with a client. Then change out colors, slight artwork changes, add pages, and add the specific content of the client. This seems like a fast and effective way to produce a very nice site. What does everyone think of this as an option for a freelance designer?

View Replies !    View Related
Random Cards At Start Of Game
Hi all,

I am pretty new to action scripting and am stuck on randomly creating cards. I am creating a memory type game with 10 cards for a website using 5 movie clips involving the card rotating and whitening out when a pair has been selected.

I have got the scripting working to match pairs etc. but cannot get the cards to randomly generate at the start. Do I need to create a mock array and is so what is thebest way to do this.

Thanks

View Replies !    View Related
Random Start Point, Same Destination
I have a movie clip that duplicates its self so man times and starts of in random locations this is the code that makes it move:
onClipEvent (load) {
function reset(){
this._y=00;
this._x=random(200)+100;
Speed=random(1)-2;
}
reset();
}
onClipEvent (enterFrame) {
this._y-=Speed;
this._y-=Speed;
}
How can i direct them all to the same location, the location being another movie clip, if u need the .fla just say

View Replies !    View Related
Set Start Movie On Random Frame
How is possible set up playing the movie for random frame?

Thanks jan

View Replies !    View Related
Semi-random Timeline Start?
Hi again,

Is it possible to semi-randomly start a a swf and different points in time each time the page loads, the broswer refreshes? I'd like the movie to start at either frame 1, 2, 3, or 4. Any ideas? Also, I'm stuck with Flash 5, if that matters.

Thanks!

View Replies !    View Related
Help With Random MC Start At Specific Frames
Hi,

I have read many posts on how to script a random frame choice at the beginnning of a movie clip, but am stumped on how to choose from only a specific number of frames.

Lets just say I need the MC to randomly start from frames 5, 10, 15, or 20 each time someone visits the site. Can anyone help with the whole script for that?

thanks in advance,
code-tarded.

View Replies !    View Related
Start Movie On A Random Frame?
I've seen similar posts to this - but none really accomplish what i want - which I hope is fairly simple.

I have a simple movie that is a series of pictures fading in and out. Each picture begins at 10% opacity, goes to 100% and then back to 10% and then the next picture... and so on.

I've labeled the beginning frames of each picture as "a" through "v" (792 total frames)

Can I put a script in the first frame which will start the movie on a random labeled frame each time the web page is refreshed?

I'm just above beginning with actionscript. I'm using Flash MX.

Thanks.

View Replies !    View Related
Simple Random-clip-start
hi again... im trying to make simple random-clip-start animation but it seems very hard to me since im not good at AS

i have 5 clips name mc1, mc2, mc3, mc4, mc5. then i have this code to trigger all of my clips randomly


Quote:




function delay() {
i = Math.ceil(Math.random()*5);
mc[i].gotoAndStop ("ok");
}
delay_var = setInterval(delay, 1000);




the question is, why its not working..? i have the same delay function on my other project and its working.

can anyone help me with this? i'd be very grateful

thx

View Replies !    View Related
Random Start Position Movieclip
Another question beside my webshop question...

In my webshop I have 2 places where I can show special offers.
I have 10 special offers.
This mean that I want to display 5 offers per place.

I made a movieclip in Flash that contains all the special offers and they fade-out and in, so people get to see al of them.
I'm now looking for a script that will make the movieclip start playing at a different advert each time a person loads the website.

So I need an couple of Actions that make the movieclip start random at either frame number 0, 24, 48, etc.

In short: a script that makes my movieclip start at one of the 5 given frames at random.

Hope I made myself clear

View Replies !    View Related
Random Sound Start Position
Hi Guys - I am wanting to create a function that will start my sound loop from a random position. I have created the sound obje3ct and loaded the sound via the identifier, etc... I also have this bit sussed : soundloop.start(secondOffset , loop); ... I have tested this to make my sound play from the 5th second, now i would like to make the onPress event of my sound button start the sound from a random point. i thought about using arrays, and checked out Mr Kirupas tut' on this, but im very much stuck on making it all happen... any advice would be greatly appreciated. Cheers.

View Replies !    View Related
Random Start Frame - MX 2004
Hey!!

I have red the privious threds but I do not get this thing working.

I have built i slideshow with pictures. I want a random startframe everytime the page is loaded. The labels of the frames that i want to randomize in start are named 1, 2, 3 etc.

Would be thankful if someone could give me some help with this.

View Replies !    View Related
Flash 8: Random Start With Control
I have a simple movie were I load one picture after the other with an alpha motion tween in between. I load the external pictures into a movieclip. I want to use this to promote six differemt blogs on my site. But it doesn't look so dynamic as it always start with the same picture, I have tried an Action script to start the movie on a totally radom keyframe. And it works but often leaves the movie white for a while in the beginning since it starts without loading a picture if it doesn't starts on a keyframe with the loading ActionScript.

So - to get to the point... How can i get my movie to start radomly on keyframe 1 or 100 or 200 or 300...?

View Replies !    View Related
Random Start Position Movieclip
Another question beside my webshop question...

In my webshop I have 2 places where I can show special offers.
I have 10 special offers.
This mean that I want to display 5 offers per place.

I made a movieclip in Flash that contains all the special offers and they fade-out and in, so people get to see al of them.
I'm now looking for a script that will make the movieclip start playing at a different advert each time a person loads the website.

So I need an couple of Actions that make the movieclip start random at either frame number 0, 24, 48, etc.

In short: a script that makes my movieclip start at one of the 5 given frames at random.

Hope I made myself clear

View Replies !    View Related
Random Start/stop Of Easing Eq.'s?
Hi all, am curious how to go about randomly starting dynamic scripted tweens. I have a fla with a bunch of bees in it and they need to move randomly at different times.

I have the following on each bee instance::

Code:
onClipEvent (load) {
start = this._x;
change = 615;//this is variable
duration =150;//this is variable
t = 0;
}

onClipEvent (enterFrame) {
t++;
if (t <= duration) this._x = Math.easeInOutQuad(t, start, change, duration);
}
And all the bees are on the main timeline.... So how can I randomly start them AND have them play again after a random period of time?

Any help is greatly appreciated!

Tnx US!.....

View Replies !    View Related
I Might Start To Make My Own Full Flash Site...
Well I was just sitting here thinking Shall I or shall I not make a full flash website... So what I really need is some key points on how to go about making a full flash site... maybe even a couple of tutorials...

View Replies !    View Related
What Would Be The Best Way To Start A Web Site To Make It 50/50 Actionscript And Flas
Hi,
I have been learning actionscript 3.0 (trying) for the last three months and have learned a little bit about it.

I was wondering what would be the best way to start a web site to make it 50/50 actionscript and Flash.

I have created websites before but using only little actionscript, I have never done something using classes.

What would be the procedure - start with a class attached to the Document Class?

Is there any tutorial, book or something I can refer to that explains how to create a website using actionscript 3.0?

Thanks,
fs_tiger

View Replies !    View Related
I Might Start To Make My Own Full Flash Site...
Well I was just sitting here thinking Shall I or shall I not make a full flash website... So what I really need is some key points on how to go about making a full flash site... maybe even a couple of tutorials...

View Replies !    View Related
Random Sound Clip At Start Of Movie... Possible?
hey, is it possible to use somekinda actionscript to randomly load say, from 3 MP3 clips (either exterior or interior) at the start of a movie, like a preloader?

would be nice.. just havn't seen it done before.

View Replies !    View Related
Duplicate Mc Movement/random Start Times
I've got an mc of a animal that i'm using in the background of a site. at the moment 5 of these mc's move across the screen inside another mc, using this code on the mc:


Code:
onClipEvent (load) {
//set initial x pos of clip
this._x = 0;
}
onClipEvent(enterFrame){
//this moves our clip 1 pixel to the right every frame
//up to a certain point
if (this._x<670)
{
this._x+=0.08;
}
if(this._x == 670){
wait+=1;
// Wait 100 frames before resetting things
if(wait>100){
//Reset actions here
wait=1;
this._x = 0;
}
}

}



This is all good but the 5 animals all walk in tandem which gives an unnatural look to it all. I was thinking that it would be better to just have one mc and duplicate this where needed. a random number between 2 and 5 could be chosen and this number of animals would move across the screen having all started at random times (but within confines so that they still move as a group. i would also want the delay to remain so that the effect remains subtle.

Any hints on the actionscript would be much appreciated.

Thanks.

View Replies !    View Related
Start Movie Clip Instances At Random
i have a movie clip of a rotating wind turbine that i want to be used in a field of turbines.

the problem is that when i put the turbines onto the stage they all run at the same speed with the blades all turning together which doesn't look natural.

how do i get them to turn at different start times (not necessarily different speeds)?

View Replies !    View Related
How To Make A Movie Go To A Random Frame At Start?
Please, could anybody explain how to make a flash-movie go to and stop at a random frame at start?

Thanks in advance!

View Replies !    View Related
HELP: Random Selection Of Specific Frames To Start MC
Hi,

i posted this about a week ago and am still having trouble. I have 5 MC's on a timeline. I would like the movie to randomly select which frame to start from each time someone visits, but from a selected group of frames.

For ease, lets say I need the MC to start on either frames 5, 10, 15 or 20 at random. Someone posted this script:

// pick a random number and store it in the variable "randomnumber"
randomnumber = random(4);
// Make some if statements

if (randomnumber=1)
gotoandstop(5);
else if (randomnumber=2)
gotoandstop(10);
else if (randomnumber=3)
gotoandstop(15);
else if (randomnumber=4)
gotoandstop(20);

but it seems incomplete and doesn't work... PLEASE HELP!

much obliged...

View Replies !    View Related
Start From A Random Frame When Movie Loads..
Hello to all!

Let's cut to the chase... I have a flash movie where I would like when it loads to take the user to a random frame specified by some numbers... Say I want the movie to start either from frame 14, or 54, or 79; there should be a way to put all these numbers into variables and I guess call them randomly using Math.round() function but how I put it at the gotoAndPlay() funtcion so the movie will go at the frame from the specified random number?

Any help will be very apreciated!

View Replies !    View Related
Random Start Point In A Looping Movie
Hi all-

I have created a Flash movie that loops. The animation is a simple frame by frame animation with a few tweens here and there. My Question is this: Is there a way that the movie can start at a random keyframe everytime the page is visited? Any help would be greatly appreciated.

View Replies !    View Related
Load Random Mc, Mc Doesn't Start In The Beginning
I'm having a problem with a little banner where i want 3 mc to load in randomly. I think I managed the random part. Now when i play my banner, the movieclips dos not start at the first frame of that mc... I don't know how to get this worked...

Here is my code so far:

// import the classes needed for the tweens
import fl.transitions.Tween;
import fl.transitions.easing.None;
import fl.transitions.TweenEvent;

stage.scaleMode = StageScaleMode.NO_SCALE; // set the stage scale to 'noScale'
stage.align = StageAlign.TOP_LEFT; // align the stage to TOP_LEFT
stage.showDefaultContextMenu = false; // hide the default context menu

var fadeAnimation:Tween; // Tween instance
var fadeSpeed:Number = .10; // set the fade speeds
var timerDelay:Number = 2700; // set the the timer delay

// create an instance for each quotation ( move clip )
var instanceMc1:MovieClip = new mc1();
var instanceMc2:MovieClip = new mc2();
var instanceMc3:MovieClip = new mc3();

// a container that will hold your quotations
var container:Sprite = new Sprite();

// hold all your quotations ( movie clips ) in an array
var mcArray:Array = [instanceMc1, instanceMc2, instanceMc3];

var customTimer:Timer = new Timer(timerDelay); // create a Timer instance

var rMcHolder:Number; // hold rMc in a variable

// create a new array that has the same values as mcArray
var newArray:Array = mcArray.slice();

// onTimer function ( called when tween ends )
function onTimer(event:TimerEvent):void
{
fadeOutAnimation(); // call the fadeOutAnimation function
customTimer.removeEventListener(TimerEvent.TIMER, onTimer); // remove the listener

} // end of onTimer

// the main function that call everything else
function init():void
{
// if mcArray is empty...
if (mcArray.length == 0)
{
mcArray = newArray.slice(); // asign newArray to mcArray
getRandomQuotation(); // call the getRandomQuotation function
}
// ...if it's not then get a random movie clip
else
{
getRandomQuotation(); // call the getRandomQuotation function
}

} // end of init

function getRandomQuotation():void
{
// pick a random movie clip from mcArray
var rMc:Number = Math.floor(Math.random() * mcArray.length);
container = mcArray[rMc]; // add the movie clip to the container
mcArray.splice(rMc, 1); // remove the movie clip from the array

addChild(container); // add the container to the stage
fadeInAnimation(); // call the fadeInAnimation function

// center the container
container.x = Math.round(stage.stageWidth / 0 - container.width / 1);
container.y = Math.round(stage.stageHeight / 1 - container.height / 0);

} // end of getRandomQuotation

function fadeInAnimation():void
{
// fade in the container
fadeAnimation = new Tween(container, "alpha", None.easeNone, 0, 1, fadeSpeed, true);
// listen for MOTION_FINISH, once the fade finishes call onFadeInFinish
fadeAnimation.addEventListener(TweenEvent.MOTION_F INISH, onFadeInFinish);

} // end of fadeInAnimation

function fadeOutAnimation():void
{
// fade out the container
fadeAnimation = new Tween(container, "alpha", None.easeNone, 1, 0, fadeSpeed, true);
// listen for MOTION_FINISH, once the fade finishes call onFadeOutFinish
fadeAnimation.addEventListener(TweenEvent.MOTION_F INISH, onFadeOutFinish);

} // end of fadeOutAnimation

function onFadeInFinish(event:TweenEvent):void
{
customTimer.addEventListener(TimerEvent.TIMER, onTimer); // add a TIMER listener
customTimer.start(); // start the customTimer
// remove the fadeAnimation listener
fadeAnimation.removeEventListener(TweenEvent.MOTIO N_FINISH, onFadeInFinish);

} // end of onFadeInFinish

function onFadeOutFinish(event:TweenEvent):void
{
// remove the fadeAnimation listener
fadeAnimation.removeEventListener(TweenEvent.MOTIO N_FINISH, onFadeOutFinish);
init(); // call the main function

} // end of onFadeOutFinish

stage.addEventListener(Event.RESIZE, onStageResize); // listen for stage RESIZE

function onStageResize(event:Event):void
{
// center the container
container.x = Math.round(stage.stageWidth / 2 - container.width / 2);
container.y = Math.round(stage.stageHeight / 2 - container.height / 2);

} // end of onStageResize

init(); // call the main function

View Replies !    View Related
How Can I Start The Flash Movie At Random Frame
do any 1 have any idea on how ti design an swf file the will be embedded in a web page, so that whenever the page is loaded or reloaded the swf file will start at a rendom frame.

View Replies !    View Related
(HUGE) How To Go About Creating A Flash Site From Start To Finish
Hi, all.

Sometimes i find myself questioning whether i'm going about a flash site the most efficient or streamlined way. So, I'd like to explore different ideas behind the Process of completing a flash website from start to finish.

For example sake. How would you complete this site:

Imaginary Client Asks:I need a killer flash website with 4 pages.

-Home Page
-About Us Page
-Photo/Sound Gallery
-Contact PageBe as descriptive and as possible of your process and perhaps even why it may be better than other processes. (Maybe some ways save time, limit rework, or spurn creativity, i dunno)


I'll share my own soon once i have a good chance, i just had the idea so i came to post it.

View Replies !    View Related
Disecting A Good Site - Big Ideas Start Small
This both a call for answers and an outline for a type of forum discussion.

Reading through the very popular Full-Screen Centred Flash Thread got me thinking.

This thread is so popular because it created a working dialogue that started with a small idea and with the help of Nutrox developed into a full on community resource, And the whole underpinning reason why was because it started as a "HOW DO YOU DO THAT?" thread based on recent flash sites that were doing it.

The coolest part is it seemed to help alot of people learn some really good code.

So with that in mind maybe we could start more of these type of threads. Threads that go past the "how do I make this button work?".

It's a bit of the rich giving to poor idea - the rich being the Flash Gods and Mods and the poor being the Flash newbies and the designers with not alot of programming experiece.

So with that in mind lets get to the nuts!

-------------------------------------------------------
-------------------------------------------------------
KPF.COM - HOW DO YOU DO THAT?
http://www.kpf.com/main.asp

In breaking down this site there are a bunch of scripting ideas that work individually and in tandem with each other.

1-obviously it's full sceen so go check out Nutrox's ideas on that in the other thread.

2-the mouse tracking and resizing of the white border box - this has got a couple of moving parts - can anybody break down how this • tracks • resizes and moves?

3-image transitions. this is the biggie. how do they get all of these images to load, mask, animate and transition over one another so seamlessly through out this entire site?
* also anybody gt any ideas how they handle the transition from regular size image to the full screen image and back.

4- dynamic resizing - there are resources all over the web on how to tackle resizing but the larger question here is how do they take these ideas and apply them on such a large scale to every image on the site. Such as the transition of going from a thumbnail to a large image the image bitmaps in the transition and then snaps into a better rezzed version. HOW?

5- in the top right there is a button to swap the design between black and white. while it's easy to understand how the background swaps how do you structure the files so that all the other elements will swap aswell.

6- ANYBODY ELSE see stuff that they might want explained on this site?

-------------------------------------------------------
-------------------------------------------------------
RECAP

The Goal here is two-fold.
1-to provide insight and ideas on how each of these ideas is tackled and solved.
2- to Also resolve how these ideas work togther to build a complete website -- how does part A fit with part B to make part C work?

So since I fit into the poor or lowly designer I leave these questions to the Gods and Mods and hope a really kick ass thread develops from this.

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved