Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Make Canvas Transparent 2

Status
Not open for further replies.

bsquared18

Technical User
Jun 10, 2001
329
US
I'm new to LiveMotion 2. In Adobe's help screens, I wasn't able to find the answer to my question below:

I have a simple animation comprised of an oval object behind another object that slides in and out of view (i.e., on and off the canvas).

I'd like to make the canvas transparent so that only the oval object and sliding object show against the background on the web page. How do I make the canvas transparent when the file is exported as a Flash file?

Thanks!

Bill B.
 
How about copying the background of the web page into your animation?

SWF files are treated as opaque objects in browsers.
 
Jimoblak,

Normally that would be a good way to go, or just match the color using the same hex code. But in this case, the background is a textured color swatch, so I doubt if I could get them to match. I suppose I could try it.

Is there no way to make the canvas transparent, the way you can in Illustrator, for example, when saving a file for the web?

Bill B.
 
This possible ONLY in later versions of Internet Explorer. The following is an example of how to do it. Simply add the information in bold to your object and embed tags in the HTML. (Remember to take out the spaces after and before the &quot;<&quot; and &quot;>&quot;)

< object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;200&quot; height=&quot;200&quot; >

< param name=&quot;wmode&quot; value=&quot;transparent&quot; >

< param name=&quot;movie&quot; value=&quot;yourfile.swf&quot; >
< param name=&quot;quality&quot; value=&quot;best&quot; >
< param name=&quot;play&quot; value=&quot;true&quot; >
< embed src=&quot;yourfile.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;200&quot; height=&quot;200&quot; pluginspage=&quot; wmode=&quot;transparent&quot; >
 
Pixelchik,

Thank you! It worked. It's a shame, however, that it works only in later versions of IE. When I tried it with Netscape Navigator, there was only a white box; not even an animation. So, decisions, decisions. To have the animation for those with IE or go without the transparent background.

There's no other way to make the canvas transparent????

Bill B.
 
jimoblak,

I copied/pasted the textured background swatch into the LiveMotion file, and it worked better than I had expected. Not perfect, but not bad. Most viewers wouldn't notice the difference.

Pixelchik,

I noticed one problem with your solution. The scroll bar and everything below the animation disappeared. Go figure! Also, I decided that the limitation to later IEs was a bit too constricting.

Thanks to both of you for your help. If anyone has a more elegant way to get a transparent canvas, please let me know.

Bill B.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top