PDA

View Full Version : Design question, loading video files


Cocytus
10-02-2008, 03:50 PM
I have a project I started in AS1 (Flash MX 2002). It's a rotating menu wheel that basically looks like the wheel-of-fortune wheel. The menu items scroll vertically up or down, and the one in the front may be clicked on. Doing this loads a new .swf a layer above the wheel, and has more info. This allows the wheel to remain in its place. Exiting the 2nd screen clears that layer, so back to the wheel you go. This part all works well.

The problem is that the powers-that-be want to add the ability to play a video file from the 2nd screen. They want it to be at least 720x480 resolution, and about a minute in length. Previous video animations I'd used (ie: to animate menu choices on the wheel) were done by embedding the video in the .swf. Unfortunately, I've been completely unable to do this for the larger videos, because the files are huge, requiring upwards of 2500 frames (24fps project), and ultimately locking up/crashing Flash. Also, the .swfs were hundreds of mb in size (this is a locally run project).

So, I did some research and discovered that running an FLV from the swf would work. The FLV video is much smaller, and the swf is now much smaller. I couldn't find a way to make this work in AS1 (I don't think it was supported, at least, no information I found showed that it was), so the boss upgraded to Flash CS3, so I have the latest.

I've made a few AS3 based files to test loading an FLV, and they work. Then I discovered that all of my code for the original project would have to be rewritten, and I'd need to learn all about classes and importing methods, etc, for AS3. Also, I can create a swf that plays an FLV, but I can't seem to create a swf that loads another swf on top of it that plays an FLV, which is basically what I'd be doing in my project. So, I'm stuck there. The rewriting of code requires me to relearn a lot of stuff, and so would take up more time right now than they want.

Here are the things I've considered to make this work:

1. Go through the project and attempt to reformat/rewrite for AS3: Not sure what I'm doing, could take a long time, may not work anytime soon.

2. Have project load an AS3-made swf that loads the FLV: Apparently AS1 swf's can't load/talk to AS3 ones, due to AS3 using a new virtual machine? Also, I can't even get an AS3-made swf to load another AS3-made swf that plays an FLV (loads, no FLV playing, though), even though the 2nd swf will play the movie if I just start that up by itself.

3. Boss suggested that I use the original project and just have the 2nd screen button run the avi movie file, as if it were double-clicked. It won't be loaded into the player file I made with all the nice rewind/play/etc buttons, but it'll at least run the movie, so I can have a mostly-complete project. I'm pretty certain that Flash will only load .swf's, and that it has to be imported somehow into it, right? The only two other things I've seen Flash can load is a url into a browser window (tried this and browser doesn't take focus, so it appears behind the flash file, and so is useless), and an .exe with the FSCommand line, but I've tried making an .exe of the FLV-loading .fla, and it doesn't play the FLV (again, even though simply running that exe plays it normall).

Any suggestions at all? Is our design impossible? It already seems fundamentally flawed, but is it really? How would anyone else do this? I self-taught myself Flash over the past 4 months, so I'm pretty new, and having to transition to AS3 to get these larger movies to play has made me hit a wall.

The files I'm using are generally too large to be posted here, but I can link to zips on my FTP, or paste specific lines of code as requested. I've been scouring the web for the past 2 weeks, looking for and attempting various solutions, and I seem to be stuck completely.

MUCH thanks in advance for anyone that can help!!!

eg19689
02-23-2009, 03:11 PM
I have been working on a "Wheel of Fortune" code already. It is in AS3. The video can be handled using flv streaming. It will be much smoother and faster this way. I would like to see the AS1 code you have though. Interested? Let me know.:cool: