Im wondering how you go about attaching a sound to a variable. Im probably being very vague in this question sorry... but any help would be appreciated.
I do however have another question, I guess I should have elaborated more on my original question.
I want to create this variable when a startDrag is initiated. ultimatly im trying to pass (push?) this variable to an array when it is dropped onto a droptarget. then a for loop to play off all the sounds sequencially.
any thoughts on how I could use what you just taught me in the manner I am trying for?
Thank you vey much
take a look at the fla. its very dumbbed down due to its original size, but it may help.
(ps. as of now, all my drag and drop script are on the buttons....*i dont script well...)
well, I will be honest, I could only use the .swf, I can not open the .fla...
but from what I have seen I think all the component are there that I am looking for. would it be possible to save that .fla down to mx2004? then I could take a long look on what is happening and if I can change it to the way I want it.
Thank you so much for taking yout time to do these things for me!
I was able to get the .fla....kinda round about way though, I put it onto my server then decompiled it with *******....
Im going to look through it now.
after reviewing the .fla that you so kindly made for me, im sorry to say but it is not what I had in mind. It may be a little deciving from my .fla because I had to really trim it down, but there are about 50 of those word tiles. Im tring to make a general drop target that reads a variable which is associated to the word tile, this variable is then in turn written into an array which can be played by a button. here is what I have.
//the variable to be passed
on (press) {
startDrag(tile_i);
this = tile;
//tileSound = new Sound();
//tileSound.attachSound("I");
tile.attachSound("I");
}
on (release) {
stopDrag();
if (tile_i._droptarget == tile_1.DropZone)
trace("test");
soundSeq.push("tile");
}
--------------------------------------------------------
//the array to write to
If you try to add sound to an Array i am afraid it will become more complex since in a for loop, all the sound will start at the same time (they actually started sequeantially but human ear cannot recognize) .So you sentence will not be whole.
So just describe your goal more clearly.What you are really trying to do?
OK, sorry my end goal may have not been described clearly.
here it is.
I want a droptarget area to able to play in a seqential order any of the word tiles I place on it.
I am thinking now it may be better to devide my droptarget into areas but the other problem is that it is going to be completly up to the user what goes into the droptargets, they will be able to choose from up to 100 different words. I have included a new .fla that has additional word tiles so you can get a better idea, I also wrote a few descriptions onto the stage its self, so please take a look.
I must say that the .fla you provided me was amazing, I think it has potential but to be honest, I could't undertand what was going on in the code..(-_-,)
Thanks!
Actually this has caused me to study much more scripting.
I thought of another possibility.
If I were to devide the droptarget into zones so that there is only one sound pushed to the array, would it be easier to play the seperate from eachother, say of example, do a for loop then a delay then the next for loop...
or would that be harder?
Just a thought that I am looking into aswell.
That's what I tried at first but after that I decide to add an event to the Sound,when it finish playing.It will play the next (if that word has been plcaed correctly)
I see, Thats pretty much what Im looking to do, except without having to have words in the "right" place. (so close I can smell it)
Im also wondering what the text box and button on the the first frame? I ll take a breeze through your code and see if I can find what to change.