PDA

View Full Version : Example: Animated Backgrounds Using Flash


Corey
05-17-2004, 07:50 PM
Example : Creating projects with animated backgrounds using Flash

This is a popular request so I thought I'd post an example. Attached are two seperate files, the Macromedia Flash project source file and the AutoPlay Media Studio project source file. You can download them and follow along or edit them for your own usage if you like. Here's a basic overview of how I built the project:

Step 1. Building The Flash Project File:

a) Locate a good royalty-free video clip.
b) Create a new project file in Macromedia Flash the same size and frame rate as the video clip, i.e. 320 X 240 at 15fps.
c) Import the video clip into your Flash project. Flash will prompt you to ask if it should automatically extend the frame length to match your video, select 'yes'.
d) Create a new layer, and place two buttons on it. Create a new layer and add text labels for the buttons to it.
e) Add fscommands to each button one at a time. This is done by selecting a button and then typing into the actions editor something like:

on (release) {
fscommand("web");
}

* in our case we used "web" and "exit" for our two fscommands.

f) Publish your Flash file as a .swf file.

Step 2. Building the AutoPlay Media Studio Project File.

a) Create a new project file, in our case we made it the same size as our flash file and used the "bordered" window option.
b) Drag and drop your .swf file into your AutoPlay Media Studio project's "Flash" folder.
c) Drag your .swf from this folder into your AutoPlay Media Studio project, it will automatically become a Flash object. Align this to your stage and, if you like, lock it's position/size.
d) Double click the Flash object and then under the "Actions" tab in the "On FSCommand" area add your button actions. This is done by using an if statement to check the fscommand and then trigger the appropriate function. For our project that looks like this:

if e_FSCommand == "web" then
File.OpenURL("http://www.indigorose.com", SW_SHOWNORMAL);
end

if e_FSCommand == "exit" then
Application.Exit();
end

Anyhow that's it, enjoy! If you have any questions just start a thread in the general discussion forum and I'll be happy to assist...

Corey

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

pata
01-27-2005, 01:08 PM
Hi!!! I found this thread today because i was looking for some help for my project:

I want to build an AMS5 project with an animated background (an swf file created with swishmax). Then i will insert buttons in AMS5 to jump to other pages that will have the same animated background.

I´m really really new to AMS5, have almost no experience with script and besides my native language it´s not english.

Please be patient with me....

Corey
01-27-2005, 05:50 PM
Hi, Flash objects take precedence in the Z order so you can't really use them as backgrounds although forum user Ron (rhosk) figured out a way to do it using a web object. Try searching for posts containing "Flash background" from rhosk, you should be able to find it. :)

yosik
01-28-2005, 02:27 AM
An additional thought.
Now that Worm has made his SetMask "plugin" available, you could actually make a button ontop of a flash object ("think outside the bun, baby").
Here is how:
1. Make you flash movie as Corey described.
2. For design purposes, use an empty layer in flash and draw the mask (covering the movie, but with "holes" corresponding to where you want your buttons to be (white=opaque, black=transparent).
3. export this layer only as a bmp file.
4. publish your flash movie into a html page (use margin=0 in the html)
5.in AMS, use a webobject containing the html file above.
6. use SetMask for the webobject, using the above bmp mask.
7. put your buttons in the "holes" of the mask.

That's it.
Good luck
Yossi

Corey
01-28-2005, 02:30 AM
"think outside the bun, baby"

HAR! Classic yossism... :D

That's definitely a cool idea Yossi, big time power thinking. :yes

Worm
01-28-2005, 07:24 AM
:) http://www.indigorose.com/forums/showpost.php?p=47648&postcount=11

An additional thought.
Now that Worm has made his SetMask "plugin" available, you could actually make a button ontop of a flash object ("think outside the bun, baby").
Here is how:
1. Make you flash movie as Corey described.
2. For design purposes, use an empty layer in flash and draw the mask (covering the movie, but with "holes" corresponding to where you want your buttons to be (white=opaque, black=transparent).
3. export this layer only as a bmp file.
4. publish your flash movie into a html page (use margin=0 in the html)
5.in AMS, use a webobject containing the html file above.
6. use SetMask for the webobject, using the above bmp mask.
7. put your buttons in the "holes" of the mask.

That's it.
Good luck
Yossi

pata
01-29-2005, 09:17 AM
I have the swishmax swf file as a background. How can i include buttons to access the pages of my project? I wan to to use a hotspot in the buttons

Worm
01-29-2005, 09:30 AM
Here's an example that does exactly what you are asking.
Download it, take a look at it, and post any questions you might have. It is very simple to do. Create a 2 color image, one color represents the areas that you want to show, the other color will be transparent. The color in the upper left corner will be the transparent color.

http://www.indigorose.com/forums/showthread.php?t=10117

yosik
01-29-2005, 11:11 AM
Sorry Worm. I guess I forgot about your post.
No ill intentions here...
Yossi

Worm
01-29-2005, 12:23 PM
Hey Yos,

No problem here on my end. If I came across wrong with my post I apologize. Your step-by-step of how to use the DLL is much appreciated. For me, I learn faster by looking at an example.