views:

174

answers:

2

Hello all. I'm adding a small .swf object (XSPF Web Music Player) to a site I'm working on. I need to add two lines of code to make external javascript calls, so, I guess I need to re-compile to actionscript (please forgive me, I'm extremely new to flash). I'm using MTASC to compile at the command line. I'm getting errors at the start of the file, pretty much at the first thing not-commented. The .as file is posted here http://pastebin.com/f3c4a4a03 and it produces an error(characters 0-4 : parse error Unexpected stop ) at stop. As I'm new to flash, is there anything you guys see in there which would make it break at stop()? or any other pointers at all?

A: 

Just went through the file and it is very clear that you have some syntax error in the code. Is there any reason why you are using MTASC? . You can actually complie this in Flash 9 , using a nice IDE called FlashDevelop (windows only).

Are you sure you copied the file correctly? . the stop(); function on works on objects called MovieClips in flash , and that file does not extend the object, so thats why you are getting that error message.

sayjava
I downloaded the slim player files from http://musicplayer.sourceforge.net/ which I believe is a pretty popular flash mp3 player. The .as file is what was included with the other files, so if that has errors, I have no idea. I assume that it's coded correctly. Is it possible I'm not including the proper libraries or something?I'm using MTASC because it's super light weight and I'm trying to develop the site using only linux, however, doing the flash stuff in windows is looking better and better
danwoods
There's also an .fla file included. Should I be doing something with that?
danwoods
A: 

The fla file is what you need to open and compile in the flash environment (IDE) to get that code compile successfully . The code was originally written for Actionscript 2 but Actionscript 3.0 has a different structure than that. The solution, if you can grab an Adobe flash IDE to compile the file . that will solve the problem

sayjava
Ah, thank you. As I said, I'm a complete newb when it comes to anything flash-related. So I need to be re-compiling the .fla file. Thanks again...
danwoods
Could you recommend a nice flash IDE? or whatever the latest is called, is it CS4 now? also I'm compiling actionscript 2.0, will the latest IDEs compile that, or do I need to get an earlier version?
danwoods