FORUMS: list search recent posts

Two swf's communicating

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Two swf's communicating
on May 31, 2007 at 12:36:32 pm

Hi everyone,

Just wanted to make sure that this was possible before I told someone it would be ok to do on their site.

The site currently has a navigation on the left and content that scrolls vertically on the right.

He wants the content to be centered no matter what the screen size. The only way I can figure to do this is too split the content and navigation into two swf files, position them using CSS and have the navigation swf send variables to the content to make it move.

Is this possible using php or something? Are there any tutorials avaliable?

Thanks alot

Return to posts index

Re: Two swf's communicating
on May 31, 2007 at 1:32:34 pm

1. Does Flash 'have' to be used for the navigation?
2. Maybe it's taboo, but a centered table and an iframe would work.
3. You can communicate from one swf to an html frame just using the target name in the getURL and pass variables to that swf in the frame with loadVars and javascript.

Or, just build the whole thing in Flash and use attachMovie method or loadMovie to bring up content as needed (to help cut down on overhead of loading)

Return to posts index

Re: Two swf's communicating
on May 31, 2007 at 1:42:23 pm

Here's something I had in my archives about passing variables that might lead to inspiration:

To skip animations already seen, such as a neat drop in of a navigation bar or any animation, pass a single variable into the Flash movie thru the embed code in the HTML.

for example:

*Don't forget to do the same in the Embed tags.

Simple pick a variable name, give it a value and add that after a question mark in both the Object and Embed tags in the HTML. This passes that variable and its value directly into the root of the Flash movie.

From there all you need is a switch-case of simple if/Else statement inside of Flash near the front of your movie to set up multiple animation options depending on the value you passed in.

if(skip == "1") {
} else if (skip == "2" {
//create as many of these as you want to expand your options

This is how you can build one Flash navigation or movie and have it animate differently on various pages.

Since it will be cached from its first download on the homepage, the selection of which animation to play or skip can be instantaneous depending upon the structure of the FLA and where the if/else statement is.

This allows you to use the same Flash navi on all pages but allow yourself the abillity to play or not play animations or create page specific animations with one file.

Return to posts index

Re: Even better info..
on Jun 3, 2007 at 5:10:56 pm

Cheers, this looks perfect, will have a look over this tonight. Thanks alot

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved