Seanx
09-28-2006, 06:28 AM
Hi guys and um, hi guys -
I have a bunch of old buttons that I used to use to play mp3 files - but when I first made them, I didn't know of the wondrous cornucopia of alternatives there were to putting the mp3 in the hit frame - so I made a few thousand that way by hand, totally unaware both that jsfl files could create hundreds of buttons in seconds, and that better codes would play the file as it sat in the root folder, making the flas/swfs much much smaller...
At any rate, thanks to all of you, I don't do buttons that way anymore - but I've got piles of old flas with these buttons, and rather than export the mp3s from each swf using some decompiler, go through and rename them all (because decompilers just use Sound01.mp3, Sound02.mp3... rather than what the sound is called in the library) and then import them into a new fla, use my jsfl file to turn the library mp3s into movie clips - then import all the new buttons back into their original flas and put them all back on the many frames they were originally in -
I'd like to turn them into movie buttons where they are - and put some kind of code on them that tells the regular old button inside the movie clip to go to the hit frame when its holder movie clip button is pressed (onRelease-d that is)
I don't know if I was right to post this in the jsfl forum, because I am asking for an AS code as well, but the making of movie clips from buttons is something that JSFL can do, I just don't know how yet
Basically I need the jsfl to:
1. convert all selected buttons on a given frame's main stage in such a way that the new buttons all stay where the original old buttons were
2. put some AS code on all the new movie clips that tells them each to (in english):
"go to the hit frame of the regular button inside you because there's an mp3 in there that needs to be played"
it may seem a little noobish to do it this way - but I have thousands of buttons - and the old naming convention I used was kinda dumb. I don't want to have to export/rename just so I can use the more efficient mp3-playing-root-folder codes I have now
At any rate, the AS part doesn't have to be included in what I'll call the 'converter' jsfl - I can use a different one to paste on the appropriate AS, which brings me to my final predicament.
the AS code I need for the buttons must have onRelease functionality like this:
onClipEvent(mouseUp){
if(this.hitTest(_root._xmouse,_root._ymouse)){
this.pressed=true;
//NEW CODE WOULD NEED TO GO RIGHT HERE
//so I can release on the new movie clips because I'm getting to them by
//pushing a regular button on another frame
//and it needs to go back to frame 1 while the sound is playing
_root.gotoAndStop(1);
}}
Once again - sorry if this method sounds rediculous, but believe me, cobbing it like this is much better than my having to do all that other crap...
If nobody can help with the AS "play the mp3 in the hit frame of the button inside you" part, I'll just repost over on the 2.0 forum, but I figure anyone well-versed enough in JSFL to help me with a 'converter' code can whip out the AS button code I need in no time
I don't care what the new movie clips are called when made by the jsfl - I just need the AS on them to go to the button inside it and simulate a hit when the movie clip is onRelease-d
sorry for the tome, and thanks so much in advance for any help you guys can give. :)
I have a bunch of old buttons that I used to use to play mp3 files - but when I first made them, I didn't know of the wondrous cornucopia of alternatives there were to putting the mp3 in the hit frame - so I made a few thousand that way by hand, totally unaware both that jsfl files could create hundreds of buttons in seconds, and that better codes would play the file as it sat in the root folder, making the flas/swfs much much smaller...
At any rate, thanks to all of you, I don't do buttons that way anymore - but I've got piles of old flas with these buttons, and rather than export the mp3s from each swf using some decompiler, go through and rename them all (because decompilers just use Sound01.mp3, Sound02.mp3... rather than what the sound is called in the library) and then import them into a new fla, use my jsfl file to turn the library mp3s into movie clips - then import all the new buttons back into their original flas and put them all back on the many frames they were originally in -
I'd like to turn them into movie buttons where they are - and put some kind of code on them that tells the regular old button inside the movie clip to go to the hit frame when its holder movie clip button is pressed (onRelease-d that is)
I don't know if I was right to post this in the jsfl forum, because I am asking for an AS code as well, but the making of movie clips from buttons is something that JSFL can do, I just don't know how yet
Basically I need the jsfl to:
1. convert all selected buttons on a given frame's main stage in such a way that the new buttons all stay where the original old buttons were
2. put some AS code on all the new movie clips that tells them each to (in english):
"go to the hit frame of the regular button inside you because there's an mp3 in there that needs to be played"
it may seem a little noobish to do it this way - but I have thousands of buttons - and the old naming convention I used was kinda dumb. I don't want to have to export/rename just so I can use the more efficient mp3-playing-root-folder codes I have now
At any rate, the AS part doesn't have to be included in what I'll call the 'converter' jsfl - I can use a different one to paste on the appropriate AS, which brings me to my final predicament.
the AS code I need for the buttons must have onRelease functionality like this:
onClipEvent(mouseUp){
if(this.hitTest(_root._xmouse,_root._ymouse)){
this.pressed=true;
//NEW CODE WOULD NEED TO GO RIGHT HERE
//so I can release on the new movie clips because I'm getting to them by
//pushing a regular button on another frame
//and it needs to go back to frame 1 while the sound is playing
_root.gotoAndStop(1);
}}
Once again - sorry if this method sounds rediculous, but believe me, cobbing it like this is much better than my having to do all that other crap...
If nobody can help with the AS "play the mp3 in the hit frame of the button inside you" part, I'll just repost over on the 2.0 forum, but I figure anyone well-versed enough in JSFL to help me with a 'converter' code can whip out the AS button code I need in no time
I don't care what the new movie clips are called when made by the jsfl - I just need the AS on them to go to the button inside it and simulate a hit when the movie clip is onRelease-d
sorry for the tome, and thanks so much in advance for any help you guys can give. :)