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




[MX04] Making A Countdown STOP



Hey all,
I've been making a countdown clock, and I have that code down. The problem I'm having is making is stop when it hits zero! It goes into negative numbers! I know it has something to do with an if statement like this:


Code:
if (What code goes here?) {
stop()
}
I can't figure out what code goes into that spot, I tried entering the ending date, but then is just stops at every frame.

Here is the actual countdown code:


Code:
currentDate = new Date(); eventDate = new Date(2007,5-1,14,12,16,00,00); var sum = 0; total = eventDate-currentDate; days = Math.ceil((total)/(1000*60*60*24)) - 1; sum += days * (1000*60*60*24); hours = Math.ceil((total - sum) / (1000*60*60)) - 1; sum += hours * (1000*60*60); minutes = Math.ceil((total - sum) / (1000*60)) - 1; sum += minutes * (1000*60); seconds = Math.ceil((total - sum) / (1000)) - 1; if (seconds == 60) seconds = "00"; if (length(minutes) == 1) { minutes = "0" + minutes; } if (length(seconds) == 1) { seconds = "0" + seconds; } calltime = (days+" days, "+hours+":"+minutes+":"+seconds+" ");

Thanks, all!
-Pippykk



FlashKit > Flash Help > Flash ActionScript
Posted on: 05-14-2007, 03:27 PM


View Complete Forum Thread with Replies

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

Making Countdown When Mouse Stop Move
Hello i would like to make an action when the mouse stop moving
could someone help me thank

[MX04] [MX04] Action Script To Stop A Movieclip Playing
Does anybody know of any actionscript to put on a flash button that will make a movie clip stop playing when rolled over (not an offstate in the clip) but separately on the main timeline? Kind of like a stopallsounds but for a specific movieclip? I have something that is making me crazy!!

[MX04] Countdown From SpecificDate1 To SpecificDate2
Hey peeps! I'm trying to create a countdown timer, a doomsday time some might say, that starts on April 3rd and should end roughly 46hours, 22minutes and 38seconds later once the movie is played.

I built the counter based off Senocular's awesome tutorial. I manged to not screw up any of the code when using the getTime(); function and using X-Mas as the ending date. However, this is useless to me since I need a specific time frame to count down.

How can I establish the new Date() function to create a currentDate var of 04/03/2005? What am I doing wrong in trying to use the getTime(); to bastardize its milliseconds count?

Ugh....

Thanks, oh, and I attached my AS damage

Rick

[MX04] Countdown From SpecificDate1 To SpecificDate2
Hey peeps! I'm trying to create a countdown timer, a doomsday time some might say, that starts on April 3rd and should end roughly 46hours, 22minutes and 38seconds later once the movie is played.

I built the counter based off Senocular's awesome tutorial. I manged to not screw up any of the code when using the getTime(); function and using X-Mas as the ending date. However, this is useless to me since I need a specific time frame to count down.

How can I establish the new Date() function to create a currentDate var of 04/03/2005? What am I doing wrong in trying to use the getTime(); to bastardize its milliseconds count?

Ugh....

Thanks, oh, and I attached my AS damage

Rick

[MX04] Mardi Gras Countdown Clock?
Hi:

I'm posting to see if anyone knows or can guide me on how to make a Flash countdown clock. I'm specific looking for one for Mardi Gras 2008.

The graphics don't have to be too fancy, but something that animates the days, weeks, hours, minutes, and the seconds in a countdown fashion until Mardi Gras 2008.

Can anyone help me with this?

Thanks,

SP

Making A Countdown
Hey all. I've been working on a personal website, but i've run into some problems with action scripting. I took the tutorial in action scripting to make a countdown, but this tutorial only gives the countdown to a certain hour, i would like to make one until a certain day. is there anyone out htere that can help me?!

Help Making A Countdown
hey everyone, this is pretty much my first time using ActionScript and I am having a couple of problems that im hoping someone could help me with. Im trying to make a file that will basically countdown from 4 minutes to zero displaying minutes, seconds, and milliseconds. They way that i went about doing it (which may be way more complicated than i need) was to get the current date and then add four minutes to it. It would then countdown from that point. The more i think about it though, the more that i realize that this is basically a loop in which every time it runs through it will get the new current date and then add 4 minutes to that, so it would never be counting down. Im not really sure if that is what is happening and what the solution to it would be. Here is the code that I have been working with, thanks for all your help in advance!







Attach Code

this.onEnterFrame = function () {


var today:Date = new Date();
var currentTime = today.getTime();
var currentYear = today.getFullYear();
var currentMonth = today.getMonth();
var currentDay = today.getDay();
var currentHour = today.getHours();



var targetTime = currentTime + new Date(currentYear, currentMonth, currentDay, currentHour, 4);

var timeLeft = targetTime - currentTime;

var ms = targetTime;
var sec = Math.floor(timeLeft/1000);
var min = Math.floor(sec/60);

ms = string(ms % 1000);
if(ms.length < 2) {
ms = "0" + ms;
}

sec = string(sec % 60);
if(sec.length < 2) {
sec = "0" + sec;
}

min = string(min % 60);
if(min.length < 2) {
min = "0" + min;
}

var counter:String = min + ":" + sec + ":" + ms;

time_txt.text = counter;
}

Countdown Stop
I'm running a countdown clock from a minute and 30 seconds. There are 3 fields ("min", "sec1", "sec2").

I want the timer to stop when it reaches 0, instead it restarts. So in order to solve this I wrote a logically correct code, however, there is a glitch.


Code:
if (/:sec2 and /:sec1 and /:min == "0") {
stop();
}


So it just tells the clock when all of the numbers are "0" to stop. However, in countdown it goes 1:01, 1:00, 0:59...and so on. The problem is when it switches from 1:00 to 0:59 all the numbers are 0 for a split second and the timer stops.

What to do...?

Stop Countdown At 0
Hello all,
I've got this niffty little timer here, It works fine but for some reason I can't seem to stop it on 0 just on 1 or anything above.
Any ideas?


Code:
// Countdown Timer code

onLoad = function () { timer = 20;};
function countDown() {
timer -= 1;
if(counter = 1){
clearInterval(timer);
}
}

setInterval(countDown, 1000);
I have of course tried changing the value of counter to 0 but it dosen't work.

I attach a working file too so you can have a play around.
If you have any other countodown timer code around that works that would be great too.

Thanks everyone.

Countdown Don't Stop
Hi!

I'm having a trouble with a game countdown, it starts counting down when the game starts, but when time's up, countdown shows -1:010'', and it should show 0:00''

What am I doing wrong.
Here goes the fla

PS: It's a game about plastic and metal recycle. Yellow balls are correct, purple balls are wrong.

Making A Countdown With Text
Hi all,

This weekend, my boss dropped a bomb on me, asking me to figure out a way to make a countdown for a Flash ad. This is a bomb for me because I'm normally an animator and I can hardly understand ActionScript.

So after many confusing "make a countdown" tutorials, I've come before you all with what may a more simple task than I'm making it out to be.

Basically, I just need a string that reads:
"ONLY ## DAYS UNTIL..."
But when it gets down to one day, I want it to become:
"ONLY ## DAY UNTIL..."
And when time's up, get it to say:
"_____ IS NOW AVAILABLE BLAH BLAH BLAH YOU GET THE IDEA"

Most tutorials tend to confuse me with all the milliseconds and minutes when all I need are days, and none of them address how to change text according to date.

If anyone knows a script I can use to solve my problems, as well as tell me how to implement it, I would be forever in your debt.

Making A Countdown Timer
hello everyone, i am a beginner in flash. I want to make a flash page that has a jigsaw, and a timer. When the user completes the jigsaw i want them to be able to click on the finish button and if they have completed the jigsaw sucessfully the jigsaw will come together without any gaps. I want it also to display a message like
you successfully completed this activity in x seconds.

a similar example to what i want is in this link

http://www.hitentertainment.com/bobt...k/jigsaw1.html


Help would be appreciated thanks!

Help With Countdown In Making A Movie
Hi,

Any thoughts on how to create the lead-up to a movie .. the part where you have 5...4...3..2..1 like in old fashion projection-type movies and there's an arm that makes a 360 before counting down to the next number.

Cheers,
Orlee

Making A FLash Countdown
i went through the tutoril @ http://www.kirupa.com/developer/mx/countdown2.htm and still have some questions.

where does the code go on the second page of the tutorial. we put it in an HTML file but the actual code is displayed onscreen.

also, do you have to upload the two .fla files to the server in order to run the countdown?

please help

thank you

Making A Timer Countdown
Following is a script that I'm using for a count-up timer, I would like to convert it to a count-down timer (from 12 minutes). Any suggestions?


Code:
//initial variables
var countdown:Number=720000;
var miltonscore:Number=0;
var themscore:Number=0;
var timing:Boolean = false;
var paused:Boolean = false;
var remaining:Number;
var elapsedTime:Number;
var elapsedM:Number;
var elapsedS:Number;
var startTime:Number;
var remaining:Number;
var minutes:String;
var seconds:String;


//////////////////////

_root.play_btn.onPress = function() {
if(!_root.timing) {
if (_root.paused) {
_root.startTime =getTimer()-_root.elapsedTime;
} else {
_root.startTime =getTimer();
}
//start timer
_root.paused = false;
_root.timing = true;
}
//pause timer
else{
_root.timing = false;
_root.paused = true;
}
}

/////////////////////////////////////

_root.onEnterFrame = function() {
_root.home_text=miltonscore;
_root.them_text=themscore;

if (timing) {
//calculate values
elapsedTime =getTimer()-startTime;
//hours
elapsedHours = Math.floor(elapsedTime/3600000);
remaining = elapsedTime-(elapsedHours*3600000);
//minutes
elapsedM = Math.floor(remaining/60000);
remaining = remaining+(elapsedM*60000);
//seconds
elapsedS = Math.floor(remaining/1000);
remaining = remaining-(elapsedS*1000);
//hundredths
elapsedH = Math.floor(remaining/10);
//output to text box
//add a 0 on the front of the numbers if the number is less than 10
if (elapsedHours<10) {
hours = "0"+elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM<10) {
minutes = "0"+elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS<10) {
seconds = "0"+elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH<10) {
hundredths = "0"+elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
_root.timer_txt = minutes+":"+seconds;



}
};

Making A Countdown Timer
hello everyone, i am a beginner in flash. I want to make a flash page that has a jigsaw, and a timer. When the user completes the jigsaw i want them to be able to click on the finish button and if they have completed the jigsaw sucessfully the jigsaw will come together without any gaps. I want it also to display a message like
you successfully completed this activity in x seconds.

a similar example to what i want is in this link

http://www.hitentertainment.com/bobt...k/jigsaw1.html


Help would be appreciated thanks!

Help With Countdown In Making A Movie
Hi,

Any thoughts on how to create the lead-up to a movie .. the part where you have 5...4...3..2..1 like in old fashion projection-type movies and there's an arm that makes a 360 before counting down to the next number.

Cheers,
Orlee

[MX04] How To Make Timer Countdown With Minutes, Seconds, Milliseconds/nanoseconds
How to make Timer Countdown with minutes, seconds, milliseconds/nanoseconds

anybody can explain the difference between milliseconds and nanoseconds

Countdown Timer Stop
I'm trying to figure out how this work for hours. Does anybody know how to make the countdown timer stop at 0:0:0:0? or make it go to certain frame? It should be an easy thing, but i'm just not too familiar with all this actionscript stuff.

I attach the flash file..

Countdown With Specific Start/stop Point
I am trying to make a counter that starts at
310.100 and counts down to
305.100 counting by .1
Any suggestions on the best way to go about this?

Help On Making Countdown Timer Work For My Middle East Game? Plzzz
hya all, cheers for helping.

im making a middle eastern game, i have a start page and on that page ill have a button which sends the user to the game page (scene 2) how exactly do i integrate a countdown timer that i downloaded off this site to run so when the game starts it displays 2:00 minutes and counts donw. do i write this stuff in my action script??
not sure what to do, im not too great with flash and would appreciate any help!!!


thank you very much.

Hellllp, Newbie Making Middle East Game. Help With Countdown Timer
in the attached file, im trying to make the timer stop when it reaches 0:00 instead of repeating itself, and when that happens i was wondering how to put a command so it plays my GAME-OVER sequence ('gameover') when the time has ended...you are a legend if you can help me with this problem....


thank you.

shroomly

[MX04] Is It Possible To Stop This?
Hi, I'm using a bubble effect on an intro but I don't know how to stop them. I want the movie to continue but without bubbles once the intro is over. I've made a button that take me to a keyframe where I put this:

stop();

for(i=0;i< bubblecount;i++){
_root.unloadMovie("bubble_" + i)
}


But in fact it unload the whole movie and as I've build all the site in the same movie I can't use that.

Does anybody have an idea?

Is it a good idea to build the bubbles in a external movie and to call it when i need on the site and then unload it using this script? in that case how can I do that?

Panchoskywalker.

[MX04] Help Making A Game
Hi, as the title says I need some help in making a game.
Currently i need to know the following:
How to make it so if I came in a certain range of an object, a dynamic
text box says a something.

How to do the shooting and weapon part. Where the weapon points
towards the cursor, so when the left mouse button is down it creates
the object (bullet) and it goes towards where the cursor was when it
was shot.

How to do the hp and collisions, where if the bullet hits an enemy it
loses hp and if it's hp goes to 0 it dies. There's a hp bar for you, and if
you get hit my a enemy bullet you lose hp, and your hp bar goes down,
when it goes down it goes reder. Basically if you have max hp, then it is
green, if you have half hp, you have a yellowish orange hp bar, and if
you're nearly dead, the bar is red.

And how to make it where it shoots every so seconds, like shotgun
once a second and a fast gun like 5 times a second.

If you can help with any of the following, please do!

[MX04] Making A Menu?
I'm in the middle of making a flash website for my cartoons, and I ran into a problem...

I'd like to have a scrolling menu from which you can select which cartoon you want to watch. A perfect example of such a menu is http://www.homestarrunner.com/toons.html.

If anyone can tell me how or link me to some type of tutorial, that would be great! Thanks to anyone who replies.

[MX04] How To Stop These Bubbles
Hello, I'm using these bubbles for an intro, but this is not a movie clip but a script, so I don't know how to stop them once the intro is finished.

I want to be abble to stop them and eventually restart them, by using a button or a keyframe script.

Please help me.


Panchoskywalker.

the file is attached!

[MX04] Stop Scaling Of Mc
Hi
I have a flash movie that scales to fit browser window.
Using stage.scalemode = "noborder"
and 100% settings in html.

However i have 2 mc's that i dont want to scale with it(stay fixed)
How can i do this?

Thanks

[MX04] Can't Stop Timeline
Hey All,
This will probably be a very simple answer but I just can't figure out what I'm doing wrong. I recently created a drop down menu by following this tutorial:

http://www.tutvid.com/tutorials_page...?v=VHVYWcNitq4

Everything went great! It all worked like it should. I created the menu after my intro in the main timeline (menu starts at frame 299). I was even able to use:

on (release) {
_root.gotoAndPlay(1);
}

instead of the getURL command to have the buttons start the intro again. The problem is when I put keyframes after the drop down menu (after frame 299) the timeline just blows right by the menu. I've tried adding an "actions" layer to the main timeline and putting the "stop();" command there but it still won't stop. It plays to the end of the main timeline. I'd like to have the timeline stop at the menu and then link the buttons to frames after 299 but I don't know what I'm doing wrong. I'm somewhat of a "Newbie" so any help would be so greatly appreciated. Thank you for taking the time to read this.

Bryan

p.s. Should I consider using more than one scene? I heard that wasn't such a great idea.

iMac 2.16 GHz intel core 2 duo, OS X 10.4.11, Flash MX 2004 Pro

Making A Stop Button, Or Telling A Button To Stop A Streaming Video
Hello,

I've searched the forums and tried to find an answer to this question, but most of the posts go unanswered or are way beyond my understanding.

I'm using a form based application in Flash professional 8.

I have a .flv video of a movie trailer that I created from Quicktime. I intend to stream this video.

I also have a button called "Trailer". When I click on the "Trailer" button, I see the .flv video I created along with the play/pause control skin that I added in the import video wizard. I press the play/pause button, and the movie plays.

This is as I had expected it to be.

Now, when I want to go to something different, for example clicking a "Photos" button that displays a slideshow, the video continues to play.

Is there a way I can tell the "Photos" button to stop the streaming video?

I've searched the forums, and found a few answers, but I don't really understand them. I added them to the script of the "Photos" button anyways to see if they did anything, and every time the video still kept playing.

Here's what I've tried so far:
------------------------------------------
button.onPress = function (){
player_mc.clearVideo();
}

Where player_mc is the instance name.
-------------------------------------------
Adding a stop component, but this isn't really what I want. I'd like the "Photos" button to stop the movie without the user having to hit a separate stop button.
-------------------------------------------
.stop() and ._visible=false;

I don't really understand this.
-------------------------------------------
removeMovieClip("component_mc");
-------------------------------------------
instance.stop()

From what I understand this is only for adding to a keyframe to stop a movie that's looping, and not for what I would like to do. Is that correct?
-------------------------------------------

I would greatly appreciate any help, not only just for me, but for any other newbie who may run into this problem.

Thanks!

[MX04] Help Making Global Array
Can someone help me make this array statement global? I've been searching through the forum, but can't figure it out.


Code:
var aItem:Array = new Array();

[MX04] Stop Sound Actionscript?
Is there some actionscript i can use so somebody will click a button and all the sounds playing will stop? any help appreciated!

Thanks,
~Justin

[MX04] Stop All Child Clips
Hi,

I have lots of child clips within one main movieclip, and I need to stop all the child clips. I don't want to put a line of code to stop each child clip separatly, so how do I do stop them all in one go? I'm sure there's a way.

Thanks

[MX04] Buttons Stop Working
I have a named instance of a movieclip, an animated graphic of the button (next_btn_mc) with; on, over and off states. It is triggered by a named instance of an invisible button (in page_01it's named next1_btn, in page_02 it's named next2_btn, in page_03 it's named next3_btn, etc.). Clicking the next_btn_mc should advance to a point marked by a label on the main timeline ("page_02").

Problem is after the first click it stops working!

All my ActionScript is in the top layer, frame 1.

Question: each of these different buttons effects the same visual button MC that runs through the entire timeline, and also goes to the next page, is that OK?. What else could be the problem??

[MX04] Stop Globe OnMouseOver?
Hi:

Can someone tell me how to make the Globe in the attachment "stop" when the mouse goes over the "H" button, and then resume spinning when the mouse goes off the "H" button.

I've been trying this:

on (rollOver) {
my_globe.stop();
}

on (rollOut) {
my_globe.play();
}

But no luck.

Also, is there a way to make a pop-up layer for a description when the mouse goes over the "H"?

Thanks in advance for the help.

SP

PS - I added the .fla as an attachment

[MX04] - Loading Picture Into MC And Making It Clickable
Hi All,

I have an MC called a_mc. Inside which I have another MC called b_mc. My flash is reading data from asp and depening on the number of items it duplicates a_mc.

I am loading Jpeg's in b_mc.

My questions are:

1. How can I make the pictures clickable?

2. How can I find the name of duplicated a_mc that is being clicked? I need this to do further action based on the selection.

Your replies or links much appreciated.

regds
David.

[MX04] Making Enemies In A Platform Game HELP
ok so i have a pretty good start a platform game. but before i start creating the whole first level i want to know how i can add in some enemies and i want to know if i can make it sorta like mario and jump on their heads. if not thats fine i can deal with a simple shooting them, thats fine.

i will attach my .fla so you guys can take a look
i have not created a enemy MC yet but i will soon
he will be called "monster"

but here is my code so far:

PHP Code:




onClipEvent(KeyUp){
    gotoAndStop(1);
}
                

onClipEvent (load) {
    speed = 7;
    isJumping = false;
    isFalling = false;
    gravity = 7;
    jumpAmt = 12;
    gotoAndStop(1)
}
onClipEvent (enterFrame) {
    if (Key.isDown(Key.RIGHT)) {
        _root.ground._x -= speed;
        _root.bg._x -= speed;
        Play();
        setProperty ("_root.char", _xscale, 100);
    } else if (Key.isDown(Key.LEFT)) {
        _root.ground._x += speed;
        _root.bg._x += speed;
        Play();
        setProperty ("_root.char", _xscale, -100);
    }
    if (_root.ground.hitTest(this._x, this._y, true)) {
        if (!isJumping) {
            jumpAmt = 12;
        }
        if (Key.isDown(Key.SPACE) && !isJumping) {
            isJumping = true;
        }
    } else {
        if (isJumping && jumpAmt <= 1) {
            isJumping = false;
            isFalling = true;
            _y += gravity;
        } else if (!isJumping) {
            isFalling = true;
            _y += gravity;
        }
    }
    if (isJumping) {
        _y -= jumpAmt;
        jumpAmt -= 0.5;
    }
}







thanks for any help in advance

[MX04] Buttons Under LoadMovie Still Work? How Do I Stop This?
Hi, I wouldn't say I'm an expert at ActionScript but I have some knowledge there, one thing that has always got me - because I've never been taught otherwise, is something to do with loadMovieNum.

I want the visitor to click a button which then loads another Movie clip ontop of the Movie clip where the Button is but the original button still works even though the Movie Clip is covered - how do I stop it doing this?

I have this on the button,

Quote:




on (release) {
myArt.stop();
myArt.onEnterFrame = function() {
this.prevFrame();
if (this._currentframe == 1) {
delete this.onEnterFrame;
}
loadMovieNum('/portfolio/college.swf',3 );

};
}






So College.swf loads into Level 3, over the current Clip in Level 2. It animates in over the top then in College.swf a button lets you go back, so it animates back as above only with unloadMovieNum. I got that but how do I stop the buttons on Level 2 from working while Level3 has something there?

Anyone? I sense I have to unload Level2 and load it back up from College.swf?

[MX04] Music Issue When Stop Is On A Frame
I'm trying to make the music continue playing while there is a stop on the frame. I want the music to loop until they play button is pressed and then it is to jump to the frame to play the animation and then different music.

Looking For Slick Play Stop Controller[MX04]
Hi all,
Does anyone know where there is a good one? I saw one once for flash video that was really smart but canīt remeber where I saw it. ideally I would also like to include a slider so that users can change the frame speed as well.

Thanks a lot for any help

[MX04] Stop Letters In Input Text Box
Hi, I need a way to keep users of a flash movie from entering letters in an input text box, so that they can only enter numbers. Is there a way to do that? Or a way for a piece of code to check for characters other than numbers in the input text box? Thanks.

[MX04] Making My Button Only Appear When Initial Part Is Selected
i have a button than expands when scrolled over. the only thing is that it appears when i go over any part where the rest of the animation is but i only want it to appear when the first part is scrolled over
anyone got any help

-bibby-

[MX04] Penner Tween Help. Making Some Start Later/earlier Than Others?
I'm using penner tweens more often, but am confused as to how to use them in relation to different start/end times.

For instance....i have this script in the first frame of my actions. However I want the last line of code to actually START a little later than the previous lines of code. Is there anyway to place a time action here?

var easeType = mx.transitions.easing.Regular.easeOut;
myTween = new mx.transitions.Tween(mask, "_width", easeType, 0, 364,38);
myTween = new mx.transitions.Tween(mask, "_height", easeType, 0, 364,38);
myTween = new mx.transitions.Tween(bg, "_alpha", easeType, 0, 100,13);

[MX04] Buttons To Stop & Play A Movie Clip
The stupidest question ever. Can someone please post the code to do this:

When a certain button is pressed I want a movie clip named "equalizer" to stop, and when another button is pressed it has to start again.

What do I write in those two buttons action panel?

Thanks and forgive me if you can.

[MX04] Stop Reloading Flash When A Link Is Clicked
Hello everyone!

I have a flash header that I am using for the menu of my site. Right now when I click on a link, the link loads but the entire flash reloads again replaying the beginning animation; I want to stop this.

The layers in the menu are as follows:

Layer 1
But 1
But 2
But 3
But 4
But 5
But 6

Layer 1 has an action script with this:


Code:
stop();
_root.menu["but"+_root.button].gotoAndPlay("s1");
_root.link = _root.button;
Each of the Buttons (But 1-But 6) has this in the action script:


Code:
onClipEvent (load) {
num = 3;
}
on (rollOver) {
if (_root.link<>num) {
this.gotoAndPlay("s1");
}
}
on (releaseOutside, rollOut) {
if (_root.link<>num) {
this.gotoAndPlay("s2");
}
}
on (release) {
if (_root.link<>num) {
_parent["but"+_root.link].gotoAndPlay("s2");
_root.link = num;
}getURL("board.html");

}
It is the same for all of them except for
Code:
num = 3;
and
Code:
}getURL("board.html");
So once again, what I need to do is NOT have the flash reload when the link is clicked so that the page (such as board.html) loads under the flash and the flash doesn't play the beginning animation.

[MX04] NetStream.Play.Stop & Flash Crashes
Hi,

I've developped a small flash webpage in order to have my showreel online. I need to stream some flv, so I'm using a NetStream object (see code below).

The problem is that Flash crashes when I test the end of the flv in my onStatus function . It takes a long time to trace "NetStream.Play.Stop" onto the output window, then it crashes immediately.
It's even more bizarre as it works fine when I test it in debug mode.

Any help would be very welcome as this drives me crazy and I need to have this online by the end of the weekend.
Many Thanks !!
Kz.



Code:
var connection:NetConnection = null;
var stream:NetStream = null;

function initStream()
{
this.connection = new NetConnection();
this.connection.connect(null);
this.stream = new NetStream(this.connection);
this.stream.setBufferTime(5);

stream.onStatus = function(infoObject:Object)
{
trace(infoObject.code);

if(infoObject.code == "NetStream.Play.Stop")
{
stream.close();
_level0.videoStopped();
}
}

this.embeddedVideo.attachVideo(this.stream);
}

function startVideo(url:String, widescreen:Boolean)
{
this.embeddedVideo._visible = false;
_level0.resizeTransportBar(widescreen);
if(widescreen)
{
this.embeddedVideo._width = 400;
this.embeddedVideo._x = 0;
}
else
{
this.embeddedVideo._width = 300;
this.embeddedVideo._x = 50;
}

this.bufferingMC.go();
this._visible = true;

this.stream.close();
this.stream.play(url);
this.stream.onMetaData = function(infoObject:Object)
{
_level0.setLoadingBar(this, Number(infoObject.duration));
}

var bufferInterval:Number = setInterval(checkBufferTime, 10, this.stream);
function checkBufferTime(ns:NetStream):Void
{
var bufferPct:Number = Math.min(Math.round(ns.bufferLength/ns.bufferTime*100), 100);
if(bufferPct > 90)
{
bufferingMC.gotoAndStop("stop");
embeddedVideo._visible = true;
clearInterval(bufferInterval);
}
}
}

[MX04] Do You Know How To Give The User The Option To Stop Background Audio?
there is background audio playing in a loop in my project. how can i give the user the option to turn it off?

[MX04] Action Script To Pause/stop Multi Submovie
What kind of action script to make a pause/stop button on multi submovie in the main movie.submovie place many frame in the timeline.
plz help me..this is complex action script knowledge..plzzz

Making The Movie Stop
I have a button and on the over and down states, a movie of a box opening plays. I only want the box movie to play once? How do I do that?

Help please!??

Thank you

Oh I am spending a lot of time on these forums. just want to say thanks to everyone who has helped me !

Making A Stop Watch
hey,
I need to make a stop watch that starts at zero, and keeps going up the hours quite fast paced. The stop watch does not need to have any buttons...just count up to 12 o'clock and then start again,
thanks,
t.

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