Stupid Sounds Problem
OK... well i want to play a sound 5 times but not by using
Code: my_sound.start(0,4); but by making it play until a variable =5;
Code: function my_start(k:Number) { i=1; while (i<=k) { my_sound.start(); while (my_sound.position==my_sound.duration) { //wait until the sounds stops playing } i++; } } the problem is.. plays the sound twice if k is greater than or equal to 2...if k is 5 it plays 2 times.. the first time is normal and the second time plays 4 times at once..why?? PS: I do not want to use Interval(...) as well...
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 03-30-2005, 07:44 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
This Sounds Stupid
This to me even sounds stupid but i have to ask as its driving me mad. Ok so in Flash CS4 i have created a selection of movie clips with fades, tweens etc etc. now i want to compile them into one big movie to work as an interactive website. easy enough.. so far..
problem one. my "intro movie" has lots of animation for buttons (as graphics) title bars, 3d graphics etc.. what i want to do is run this animation as frame 2 (after a preloader) then automatically follow on to frame 3 where a static version will be stopped and a button layer can be overlayed. The issue is if i put a stop on an action layer above frame 2 i need an input before it will move to the static image (frame 3). however if i dont put the stop there it skips my frame 2 and moves onto frame three and stops there... this seems ridiculous to me so i figure something is way out..
does anyone have any idea? and i missing something silly? i assumed that if u placed, for example, thre movie clips on subsequent frame it would play each one before moving onto the next and playing that? am i wrong?
This Sounds Stupid
This to me even sounds stupid but i have to ask as its driving me mad. Ok so in Flash CS4 i have created a selection of movie clips with fades, tweens etc etc. now i want to compile them into one big movie to work as an interactive website. easy enough.. so far..
problem one. my "intro movie" has lots of animation for buttons (as graphics) title bars, 3d graphics etc.. what i want to do is run this animation as frame 2 (after a preloader) then automatically follow on to frame 3 where a static version will be stopped and a button layer can be overlayed. The issue is if i put a stop on an action layer above frame 2 i need an input before it will move to the static image (frame 3). however if i dont put the stop there it skips my frame 2 and moves onto frame three and stops there... this seems ridiculous to me so i figure something is way out..
does anyone have any idea? and i missing something silly? i assumed that if u placed, for example, thre movie clips on subsequent frame it would play each one before moving onto the next and playing that? am i wrong?
Stupid Sounds Problem
OK... well i want to play a sound 5 times but not by using
Code:
my_sound.start(0,4);
but by making it play until a variable =5;
Code:
function my_start(k:Number) {
i=1;
while (i<=k) {
my_sound.start();
while (my_sound.position==my_sound.duration) {
//wait until the sounds stops playing
}
i++;
}
}
the problem is.. plays the sound twice if k is greater than or equal to 2...if k is 5 it plays 2 times.. the first time is normal and the second time plays 4 times at once..why??
PS: I do not want to use Interval(...) as well...
Stupid Question Coming From Stupid Newb...
Yeah, I know this is probably the stupidest question you're ever going to here, but I'm desperate and I can't find out anywhere, so as embarassing as it is, this is my last resort.
How do you increase or decrease the thickness of lines in Flash MX?
Stupid Workspace Changing After I Save It (Or Stupid Me)
I have a dual-monitor setup and I have my timeline, stage, and properties panel on one monitor. That's all fine.
On the other monitor, I have the actions panel in one group and about 3 panels grouped into another group. The actions panel takes up the left 2/3 of the screen and the other panels take up the right 1/3 of the screen. That works fine.
I want to switch the actions panel with the other group of panels, so that the actions is on the right 2/3 of the screen and the other group of panels are on the left 1/3 of the screen. Problem is when I save my workspace layout, it somehow defaults the actions to the left side of teh screen and the other panels to the right side of the screen! It's driving me crazy. Anyone have any tips? Run into similar problems?
Stupid Question,,, But Feeling Stupid
why wont " ' " show up in my text which is dynamically imported from an html formated text file.
i know that " means " but what is a single quote?
helllppp
Stupid Employer, Stupid Question
hey there. my current employer currently has a header on an html page with a banner inside it. it looks like crap but his "web guys" have told him that the banner must stay in the exact place that it is otherwise it will destroy his flux capacitor or something along those lines. so im stuck trying to design a flash header for this guy with an animated gif banner inside of it. kinda like the gif banner is the hole in the donut. i guess my question is how do i leave the hole in the donut blank for the gif to be tossed into it without having to make 8 "sliced" flash movies that work together? sorry and i know theres an easy way to do this, i just havent touched flash in a few months and im rusty as all tarnation. thanks in advance
Stupid Question Hopefully Not Stupid Answers
I have put a trace on a variable that i use as a counter in a loop.
Everytime the loop in initialized it shows "undefined" before counting.
Can I ignore this or will it have some future impact on my work????
Stupid, Stupid, Stupid Question
But I need to know.
I'm learning actionscript.
How come sometimes the script is placed in ( ) and sometimes in [ ] what does each mean?
ex. (if move ==1)
or _root.Array [_root.arraysize]
thank you
How Do I Disable All Sounds Including Background Music And Button Rollover Sounds?
Hey, you don't know how long I've been on this forum last night and no one was able to help me with this. I have no clue how to do this. Basically what I want to do is create a site with a bunch of buttons with a Over State Sounds and a Down State Sounds. I have done so already with the file I have been working on at home. Now, I also have background music playing on my flash site. I already have a button that says, turn off music which is using the stop all sounds command. But now, I want a button that disables all the sounds on the whole entire site including background music and button over and down state sounds. I have tried the stop all sounds action but that DOES NOT WORK. Another action that I tired was the globalsound action where it puts the volume to 0, but all that does is stop the background music. It doesn't kill the button over and down state sounds. So what action script would I need in this case? I have been looking for this action scrpt for hours on end and havn't had any luck with anything.
Please help.
Thank You.
Chris
Disable Background Sounds And Button Over And Down State Sounds With An Action? How?
Hey, you don't know how long I've been on this forum last night and no one was able to help me with this. I have no clue how to do this. Basically what I want to do is create a site with a bunch of buttons with a Over State Sounds and a Down State Sounds. I have done so already with the file I have been working on at home. Now, I also have background music playing on my flash site. I already have a button that says, turn off music which is using the stop all sounds command. But now, I want a button that disables all the sounds on the whole entire site including background music and button over and down state sounds. I have tried the stop all sounds action but that DOES NOT WORK. Another action that I tired was the globalsound action where it puts the volume to 0, but all that does is stop the background music. It doesn't kill the button over and down state sounds. So what action script would I need in this case? I have been looking for this action scrpt for hours on end and havn't had any luck with anything.
Please help.
Thank You.
Chris
Rand Generate Sounds Multiple-sounds
I got background sound playing (looped) in a movieclip. How could I randomly play other sounds while the background sound is playing? No mouse actions involved here. My objective is to play other sounds while bgsound is playing at any given time or specific times.
Example: playing looped sound and have a short sound clip play when the looped bgsounds hits 20th loop.
Dunno if this is even possible, but hopefully someone can explain how and show a example. thx
Set Variable Stupid.user="stupid Question";
right... i got a bit of help with this yesterday but i need some more now....
lets say i have 1 button with 10 instances of it in a movie.
when you point to each instance, i want different text to hover over it.
with help from someon on here yesterday, i have now set up a dynamic text field on the 'over' frame of the button, and i have done the set variable lines saying:
button1.text = 1 banana
button2.text = 2 bananas
button3.text = 3 bananas
and so on, but i don't know how to tell each instance of the button what button it is.... so in other words, how do i tell button 1 that it is button 1 and button 2 that it is button2, etc?
Stupid Says As Stupid Does (variables)
I have an actionscript question::
I need to pass variables from html to flash but have run aground......
in the html :
username='ted'
in the flash movie
button action: http://www.happy.com/username
(obviously the username is equal to 'ted')
How do I do this????
please respond w/ a solid answer - 'cause boy it looks easy , but man am I stumped!!
Thanx
Stupid Stupid Preloader
I have a simple preloader animation that is suppossed to loop as my main page loads (take note, this IS NOT a progress bar!!).
As the animation is looping, the percentage of the movie loading is suppossed to be displayed. However the preloader never advances past the first frame in the preload scene (I'm keeping the preloader in its own scene to keep from adding keyframes to every layer in the main scene).
Here is the scripting I'm currently using:
Preload scene>>
frame 01:
percent = Math.floor(getBytesLoaded()/getBytesTotal()*100);
myOutput.text = percent + "% is loaded";
frame 02:
if (percent == 100){
gotoAndStop(3);
}else{
gotoAndPlay(1);
}
frame 03:
gotoAndPlay ("xscene:, 1)
Is there something missing? Something I did wrong? Help!!
Stupid, Stupid Masking.
Im kinda at a loss, and am thinking my problem lies somewhere in the software.
Im trying to animate a mask over a button. The mask works but the button is having issues. Whenever the animated mask hits one of its keyframes, the button stops working for (1) frame; ie, the up state becomes visible for (1) frame. Kinda sucks if you happen to be pressing or rolling over the button at the time.
The mask isnt a gradient or a symbol, just a crappy shape that moves.
Anyhow, when I publish the movie in Flash6 it works just fine but anything less and I get the glitches. Is there a workaround or something?
Sounds.. Help Needed With Sounds And Actions..
alright i need some help on starting and stopping sound with a toggle switch, using this code on the toggle button:
on (press) {
if (music=yes) {
tellTarget ("soundtrack") {
gotoAndStop ("stop");
}
} else if (music=no) {
tellTarget ("soundtrack") {
gotoAndPlay ("go");
}
}
}
soundtrack contains 4 frames: 1st frame label = "go" actions = music="yes"
2nd frame music event is there
3rd frame action = stop
4th frame action = music="no", stop all sounds, stop
im also using an animated movie clip for a button, and im trying to when the music is off, have it animate, and when the music is on, have it still. my code for this is on the instance "clip" and is basically the same as above except it uses gotoAndStop ("raystop") if music="yes"
can anyone please tell me why none of this seems to work at all?
Linkage - Sounds Stopping Other Sounds?
Hi all,
OK
i have a Christmas Card game that i am trying to put a "jingleBell" sound to. I am using linkage. I dont know if this is the right way to do this but i have put the call to the "jinglebell" sound in a movieclip with the first frame having the following actions
===============================================
bellSound = new Sound(this);
bellSound.attachSound("bells");
bellSound.start();
===============================================
the sound is 5 seconds long and i am trying to loop the sound. My framerate is 60 fps so at the 300th frame of the jinglebell MC, i have a simple gotoAndplay (1).
I also have a cannon on the main stage - if someone not of flash mind was reading this they would think i was doolally!!!! - The cannon fires snowballs and on firing i have another linked sound "fire". the code for the snowball sound is on it's timeline and is as follows
================================================
throwSound = new Sound(this);
throwSound.attachSound("throw");
throwSound.start();
================================================
1. My jinglebell sound only plays once and does not loop again
2. Sometimes the bell sound comes back, but when the cannon is fired, the bells disappear
3. The cannon sound is always present and works as required
Any ideas as to how to get the jingle bell sound to loop and not be effected by the cannon fire sound?
I know that using ActionScript to stop a sound that is linked on the main timeline will stop all others on the main tomeline too, but the sounds here are all located within seperate movieClips.
Any help gratefully recieved
Thanks in advance
gilseb
Stop All Sounds = Play All Sounds
Ok, I'm pulling my hair out
I have 3 movies Layered togehter.
1- Sound file with someone speaking
2- Index moive that loads the Sound file
3- Sound On/Off button
On the Sound On/off moive I would like the button to stop all sounds and then continue playing the same sounds when clicked one again. (Basically pick up where the animation currenlty is.)
Attached is what I have been currently trying. I stops the sounds, but dose not continue to play when - click to start the sound again.
What gives GGGGRRRRRRRRRRRRRRRRRRRRRRRR!
Sounds: Faders And Stopall Sounds
Hi can any one help me with sound in flash
I 've created an 8 track mixing deck with 8 separate faders which fade in attached/linked sounds. I have also created a master
volume fader that I would like to beable to control the master volume. I can't seem to get the master volume control to work.
is there a specific script for the master volume???
summary: 8 faders, 1 master control volume. Would like master control volume to fade all 8 sounds up or down in volume.
(but not changing the actual separate fader volumes...just over all master sound!
StopallSounds(part of the same project)
with in the movie of the 8 track mixer I have a stop and play buttons,
I have attached the script 'stopallsounds' to the stop button which stops the sounds but I cant seem to restart the sounds,
is there a script like playall sounds which will restart the sounds?
can any one help
kind regards
paul
Backgrounds Sounds Vs. Button Sounds
Hi!
I have tried browsing briefly through the forum, but failed locating anything similar to my issue.
I have a background music playing, and buttons that makes different noises when you roll over them. The issue is that I can't stop ONLY the buttonsound when you scroll away from the button.
The code looks like this:
------------------------------
on (press, release) {
gotoAndStop(215);
}
on (rollOut)
{stopAllSounds();}
------------------------------
I'm aware that it is the stopAllSounds that makes all sounds stop, the key is to make a code that stops only the button sound.
Cheers!
-David
Play Sounds After Stop All Sounds
Dear all,
I have a question which I hope someone can answer: my flash animation starts immediately when a visitor comes to the page. I have a stop button which stops the animation and the sound which comes with it (speaker voice). A play button plays the animation after the stop button was pressed. But the play button only plays the animation, not the speaker voice. How do I do this? I want the sound to start were it was stopped, just like the animation.
I'm using Flash mx 2004, version 7.2
Thanks in advance for your replies
/Bo from Sweden
Stop All Sounds And Start All Sounds
I have one button with the "stopAllSounds" actionscript on it. what would the actionscript be if I want to use the same button to start the sound again?
Looping Several Sounds... A Gap Between The Sounds
Hi,
I planned to use several loops in a presentation, and queue them so it will sound like a longer piece of music.
I planned to use onSoundComplete with the following basic behavior :
ActionScript Code:
snd1 = new Sound(this);
snd1.attachSound("loop1");
snd2 = new Sound(this);
snd2.attachSound("loop2");
snd1.onSoundComplete = function() {
snd2.start();
}
snd1.start();
The same principle has been suggested several times on this forum, like here :
http://www.actionscript.org/forums/s...d.php3?t=32921
But it doesn't work fine for me : there's a gap between the two sounds when I do so, a brief silence that cuts the music flow.
So I am considering using the setInterval function instead, something like this :
ActionScript Code:
att = setInterval(function() {
clearInterval(att);
snd2.start();
}, snd1.duration-150);
which works, but I'm not found of it. Plus notice that I have to set the callback 150 milliseconds shorter than the snd1 duration in order to loop fine, otherwise it doesn't loop well.
So you're gonna tell me : there is something wrong with my loop files. Nope, if I make them one file, pasting the second sound at the end of the first, it works fine.
Please, does anyone has a solution ?
Thanks,
_marabout_
Stupid Stupid Stupid Stupid Arg
Well, I obviously suck.
In the tutorial for making a scrolling text box in Flash 5, I'm not understanding something. The following code.
onClipEvent (enterFrame){
if( scrolling == "up"){
daTextBox.scroll--;
}
if( scrolling == "down"){
daTextBox.scroll++;
}
}
How on earth do you get the "daTextBox.scroll--;" line? Do I use the Operator "--"? or do i use the Function "scoll"? or something totally different?
My efforts end up looking like this....
onClipEvent (enterFrame){
daTextBox.scroll--"
if(scrolling == "up" scrolling == "down" daTextBox.scroll++{
This no work :-P
Basicly... wht do I use to the get the
daTextBox.scroll--;
and
daTextBox.scroll++;
to appear as it said it should in the tutorial....or does it matter?
Thanks for your help...
Justin
OK, I'm Stupid
I created a file called data.txt with the following:
&test=#test#&eof=1
My flash movie has 3 frames and two dynamic text boxes named First and Second the frames have the following code:
loadVariables ( data.txt, 0); //frame1
if(/:eof=1) {
play();
} //frame2
else {
gotoAndPLay (1);
}
First = _root.test;
Second = "Check3"; //frame3
stop();
The textbox First remains blank!
Please help the idiot
I Am Stupid
I have no clue how to even get started I am a fully licensed pilot so I can be trained in flash tech stuff lol Please help me get started My ICQ is 126212199
Got To Be Something Stupid
I've got a .swf with a preloader on it that is giving me problems. The .swf is composed of 2 scenes. scene 1 = preload and scene 2 = (lol well)scene 2. Here is the code for the preloader. It's a real simple one. Just has the word loading with 5 periods apearing then disapearing.
if (this.getBytesLoaded() != this.getBytesTotal()) {
nextScene ();
}
I also tried putting Scene 2 (1) in the code for the target. But when I test the .swf the preloader well just keeps going and going and going. It's like its not recognizing the target.
By the way i have to keep the movie set up this way, with two scenes i mean.
Any ideas what the problem could be? HELP please.
::::::really Stupid:::::::
I lost my customer support card. To make a long story short
I need the product code. It start with:
FLW-500
if any know the rest please help me!!
I Think I'm Being Stupid Can Someone Help.
I'm trying to make a nodeValue show up in a text box called diaplay. It's so that I can have some xml containing a load of short news articles. I'm falling down at the first hurdle though. I can get it to display the nodeType, but when I put in the bellow code and run it the text bax remains blank.
Here's the actionscript:
news = new XML();
news.onLoad = show;
news.load("buncle.xml");
function show() {
article = new XML();
article = news.firstChild;
text = article.nodeValue;
display = text;
}
and here's the xml
<?xml version="1.0" ?>
<newz>
<article>Display me!!!!!!!!!!</article>
</newz>
I'm sure I'm just being really dumb and the answer is simple, so can anyone tell me what it is?
Because Im Stupid....
i need some help.. i made a banner thing using swish 2.0 for my website. for my website i use geocities so is there anyway to put the banner thing i made onto my website? please help me cause im knowledge impaired...
Really Stupid...i Don't Know How...
Does anybody know how you can position a movie loaded by loadMovie???
I know it will automatically position according to the parent movie but i want to reposition it....but how??
I searched the web but couldn't find the answer. Hopefully somebody can help me.
Thanks!!!
Im I Stupid Or Not?
Please feel free to tell me.....
I have some dynamic text fields in movie clips with names assigned to them (movie clip has an instance name and the text field has a variable name).
When i try to call them from the root (using the correct path and syntax)It doesn't work!!
has anyone had this problem?? Dos anyone know how to do it?
Cheers
I'm New And Stupid
OK. Hi everyone! I'm baby-stepping my way through Flash5 and have run into something that I can't figure out. I'm working on a project in which if you drag and drop something into a specific place, the movie continues. I have the drag and drop button all done, but I have absolutely no idea how to set up the rest. How can I get the movie to recognize when the object is in the right place, and then continue playing the movie?
Hopefully that makes sense as I described it.
Thanks in advance for anyhelp on this matter that I get.
-Sandy
PS - I know absolutely nothing about action scripting yet, but am learning. So if you have an answer, it would be a big help if it can be explained as simply as possible.
I'm New And Stupid
OK. Hi everyone! I'm baby-stepping my way through Flash5 and have run into something that I can't figure out. I'm working on a project in which if you drag and drop something into a specific place, the movie continues. I have the drag and drop button all done, but I have absolutely no idea how to set up the rest. How can I get the movie to recognize when the object is in the right place, and then continue playing the movie?
Hopefully that makes sense as I described it.
Thanks in advance for any help on this matter that I get.
-Sandy
PS - I know absolutely nothing about action scripting yet, but am learning. So if you have an answer, it would be a big help if it can be explained as simply as possible.
Is This A Bug Or Am I Stupid ?
I have to create some textfields with as, using the command:
_root.createTextField (newname,t,110,150+(t*20),180,128);
only instead of "_root" I want to use "this" or whatever the name of my movie clip is.
But this does not work...
it only accepts "_root"
what's the deal ?
Am I This STUPID?
Hi.. had flashMX for a while now, but im just starting to use it.. Im soo comfortable with Flash 5's layout..
anyways, i have this stupid problem..
you know when you extend the frames? I tried to select the excess and delete it.. but it doesnt just delete what i have selected.. also the KEYFRAME itself! SO ANNOYING!!!
if you dont get it, lemme explain..
say I have this cute ball starting at frame 1 - 30
now, I decided to just have the from Frame 1 - 15..
so i select Frame 16 - 30, then press 'delete'.. in flash 5 this works, but in MX, it not only deletes the selected fram, but includes the whole darn unselected frames (1-15)
so, What I did was hit F7 (blank KF) on the 16th. now, I like to get organized, so I usually delete blank keyframes.. so i selected the blank key frame and press 'delete'.. now the Darn thing wont get deleted!!!!! and I cant seem to find a way to get rid of the blank key Frames!!!!
This is freaking annoying me!!!!!!
*hypertenz*
Stupid Me
ok i know it sounds stupid but its verry late and just want to finish this. how do i rotate al line (stupid me). i mean. i need a line to rotate like a airplaine propellor hope u guys know what i mean. alsow it needs to come to a line from 1 point. wonna go to bed
Am I Stupid
I have macromedia flash MX and i need to make an intro for my site but i don't know how the animation process works I need step by step info on making an intro for my site. If maybe you know what to do could you tell me what you know about it. Or if you have any sugguestions about my site it would be most helpful. The URL is: http://www.thelaw.cjb.net
Stupid Mx
for some reason i cant get my custom cursors to work in my... what exactly is that actionscript?
Mouse.hide();
w/ startdrag the cursor instance name?
What Is This Stupid Bug ?
can someone explain this to me ...
i'm doing a small website for a friend where i want to fade photos in and out, now everytime the photo is complete it moves strangely in itself...
check it out at http://www.verklangwelt.de/vio - go to "KOLLEKTION" and choose a picture in the scroll menu and you will see what i mean.
strangely enough when you zoom in it des not happen....
any clues on that one ?
it's driving me up the wall !
I Must Be Stupid
okay, i don't know what i'm doing wrong. i've been working with AS for a little while, but apparently i have not had to approach this problem yet, and it's driving me crazy, because it should be so simple! i'm trying to call a function that is defined inside a movie clip on the main timeline. i know that you can do this, i've seen examples from people on this site discussing calling functions and how to reference them, but i just can't make it work in my movie. but i won't even discuss what i have in my movie that might be acting strangely - i'll just discuss this test file i made to prove to myself that it works (but that sadly failed).
1 frame, 1 layer. in the frame, the function testFunction(); is called. in this frame, there is also a movie clip with the instance name functiontest_mc. in functiontest_mc there is 1 frame, 1 layer and the function is defined in the frame as:
function testNewFunction(){
trace("pleeeease load the function!");
}
i have tried to call the function from frame 1 of the main timeline multiple ways. i tried:
_root.functiontest_mc.testNewFunction();
functiontest_mc.testNewFunction();
i also tried to trace both of these, but they're always undefined. HOWEVER, if i try to trace functiontest_mc._x with or without the _root, i get a value. so it can see the MC, but it can't see the function. can anyone tell me why??? this is driving me nuts! in my other file, i thought maybe it was an issue with frames, but that obviously isn't the case here. is there an issue with how i'm defining, or where i'm placing the function? thanks in advance for ANY help anyone can throw my way!!
I Know This Is Stupid... But PLEASE Help Me
I really need to learn how to load outside SWF's into a main SWF.
I dont know how this is done.
How do you controll where it goes? Whats the command?
How do you give it a transparent backround?
Id REALLY appreciate some help.... thank you EVERYONE!!!!!
eFM
I Must Have Done Something Stupid :(
Well at least that's what I think. I was trying to see the attachment about the Stickman moving (posted in the Newbie forum). Downloaded it but when I double-click on the file, nothing happens. The icon has the blue "E" Internet Explorer symbol on it, if that is of any use.
I might have accidentally asked the computer to "open every file with that extension with IE". If that's what I did, how do I undo that?
Thanks!
Stupid ?
If I have my domain registered under register .com and my site hosting by glyto.com. how does that work . Do I have to enform regisiter .com the deal or do the hosting company take care of this . I'm lost
Thanks for your help
|