PDA

View Full Version : Swiftmp3


intravenus
08-11-2003, 09:36 PM
Hey guys,

here's a Flash MX script for an EQ for audio SWFs.
The audio SWF is generated by SwiftMP3 so it contains ID3 data and S data for the EQ.

This file works perfectly if I import it to Swish and use the "lev" MovieClip contained in the FLA, but, I would like to make the EQ in Swish and this is where the problem starts.
This script takes the MovieClip "lev", duplicates it and spreads the new MovieClips through levels, and then makes the new MovieClips move according to the S data contained in the audio SWF.
So I figured, if I make a Sprite in Swish, call it "lev" and change the references in the script from "lev" to "/lev", it would work the same as it does in Flash.

It doesn't!

Anyone have any idea why?

here's the script

[Frame 1]

if (_root.audio.Id3 == 1) {
title = _level1.Title;
artist = _level1.Artist;
album = _level1.Album;


width = getProperty("lev", _width) + 3;
for(i=0; i<18; i++) {
duplicateMovieClip ( "lev", "l"+i, 10+i );
setProperty("l"+i, _y, 68);
setProperty("l"+i, _x, 74+i*width);
}
gotoAndPlay (4);
}

[Frame 3]

gotoAndPlay(1)


[Frame 5]

for (i=0; i<18; i++) {
setProperty ("l"+i, _y, 68-eval("_root.audio.s" add i)*3.5);
}


[Frame 7]

gotoAndPlay(5)


The Swish movie looks like this:

audio (where I load the Audio SWF)
eq (where I load the SWF containing the flash script)
lev

Any help will be very gratefully recieved.

Intra.

intravenus
08-11-2003, 11:19 PM
*BUMP*

the_real_tisse
08-12-2003, 12:32 AM
Hi intravenus

I'm a real beginner at this scripting, well, that's an overstatement actually.

But, I see you have [Frame1] in there, isn't that supposed to be something like:

onFrame (1) { the rest of your script
}

Also the gotoandPlay you have there, I believe that should be something like:
onFrame (33) {
gotoAndPlay("",1);
}

What I am trying to say is, you can't simply copy a FlashMX script and put it in SWISHmax, there are things that need to be adjusted to the SWISHscript.

Sorry, but that is about all the help I can offer at this time.

kind regards
Tisse

intravenus
08-12-2003, 12:57 AM
Hi Tisse,

sorry if i was unclear but when I wrote [frame 1] i simply meant that the following actions all happen on frame 1 of the movie.

Sorry for the lack of clarity, i know I can't just copy script into Swish, experience has taught me that ;)

Thanks for paying attention tisse, you're the first of 23 views to post an answer.

the_real_tisse
08-12-2003, 01:02 AM
No problem, and as I said, really can't help more at this time.

Could very well be that, since one can't export, the internal viewer of SWISHmax doesn't support that kind of scripting.

kind regards
Tisse

ps: could be helpful for others to post your exact script maybe because if there is a mistake in the script itself, the only way to find out is to look at the exact script.

ps2: moved to SWISHscript forum, sorry, didn't catch that earlier

intravenus
08-12-2003, 01:09 AM
Just to clarify further,

i'm not using this script in SwishMax, I'm creating an SWF from the script in Flash and importing it into a movie in Swish 2, and the script posted above is the exact script that I'm using.

dammitjanet
08-12-2003, 03:23 AM
Im not sure how this would work, but if you import this movie into swish, its going to be inside its own sprite yes?

if this sprite is named say musicsprite, then I guess you will need to either reference the flash clip like so

_root.musicsprite.lev or perhaps use _parent.lev

if you post the SWF and the FLA, im sure either myself or someone with better Swish knowledge could help.

intravenus
08-12-2003, 09:04 AM
Hi DJ :)

In your post, wouldn't those references point to the "lev" already contained in the external (flash created) SWF?

What I'm trying to do is to point it to a sprite contained in Swish. I'll go and zip the files and post them here.

Back in a minute :)

intravenus
08-12-2003, 09:21 AM
Here are the files, I included the FLA, the SWF created from the FLA and the SWI file for Swish to show you what I'm trying to do. One point though, (I've written some instructions in the SWI) you MUST use an audio SWF created in Swift MP3 because this converter puts S data into the SWF which the FLA reads and uses to move the EQ bars.
If you don't have Swift MP3, let me know and I'll send you an SWF created in Swift.

Peace and many thanks,

Intra

intravenus
08-12-2003, 09:28 AM
Dammit!

I forgot the files again! I ALWAYS do that! grrrrr

anyway, HERE are the files.

intravenus
08-12-2003, 01:03 PM
bump

Frets
08-12-2003, 04:14 PM
I know this sounds crazy but.

Why not contact http://swift-tools.net

I can believe that they are working on sample
versions for swish.

Also as mentioned earlier your going to need
a loop to refresh the vars

On frame 1 get vars
On frame 2 goto frame 1