all groups > coldfusion flash integration > july 2007 >
You're in the

coldfusion flash integration

group:

Using background images in flash forms


Using background images in flash forms pope on acid
7/10/2007 12:00:00 AM
coldfusion flash integration:
<cfform format="flash" action="upload.cfm"
style="background-image:url(../images/BuyAndSell.png);
background-repeat:no-repeat; background-position:top right; text-align:center;
border:1 solid black;">
</cfform>

Is there a way to use background images in a flash form?
Re: Using background images in flash forms BKBK
7/10/2007 4:46:45 PM
Re: Using background images in flash forms pope on acid
7/11/2007 5:54:34 AM
Well guess what, it doesn't:

http://www.ctc-belgium.be/TEMP/test.cfm

This is the code (images are in the same subfolder):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<cfform format="flash" action="../upload.cfm"
style="background-image:ero1.jpg; background-repeat:no-repeat;
background-position:top right; text-align:center; border:1 solid black;">
<img src="ero2.jpg" />
</cfform>
</body>
</html>


Re: Using background images in flash forms BKBK
7/11/2007 7:26:52 PM
I copied your picture ero1.jpg to my web-root and was able to display the
background using

<cfform format="flash" action="../upload.cfm"
style="background-image:url('/ero1.jpg'); background-repeat:no-repeat;
background-position:top right; text-align:center; border:1 solid black;">
</cfform>

The following also worked, without me having to first copy the image

<cfform format="flash" action="../upload.cfm"
style="background-image:url('http://www.ctc-belgium.be/TEMP/ero1.jpg');
background-repeat:no-repeat; background-position:top right; text-align:center;
border:1 solid black;">
</cfform>




Re: Using background images in flash forms pope on acid
7/12/2007 12:00:00 AM
For some strange reason only the full path works for me. So far so good, thx :).
But now I have a new problem:
background-repeat and background-position doesn't work with it.

Re: Using background images in flash forms BKBK
7/13/2007 5:06:37 AM
[i]I have a new problem: background-repeat and background-position doesn't work
with it. [/i]

I have just verified. Many styles are not valid for Flash forms. Alas,
background-repeat and background-position (or, in ActionScript terms,
backgroundRepeat and backgroundPosition ) are among those that are not valid.
In fact, I even wonder why background-image works at all. Here is the
http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000677.htm.




Re: Using background images in flash forms pope on acid
7/16/2007 12:00:00 AM
This is how I do it now. But it would be a lot easier if it was possible to style the flash forms a bit more.
But for now it is clear I don't have to spend more time to this issue.

Re: Using background images in flash forms Alex Br
7/16/2007 4:22:42 AM
For more complex background styles you could set the Flash background to
transparent, then surround the form with a div (or whatever) that contains the
appropriate background... something like this:

<div style="background-image:url(../../images/some_banner.gif);
background-repeat:no-repeat; background-position:top right; width: {width of
form}; height: {height of form};">
<cfform format="flash" wmode="transparent" style="backgroundAlpha: 0;" {other
form parameters...}>
{form stuff}
</cfform>
</div>

You can then set the backgroundAlpha style to 100 for the panels and other
formgroups in the form so the the background doesn't show through them.

True, it's not as neat as having more styles supported natively within flash
forms, but transparent backgrounds can lead to some interesting possibilities.

Hope this is helpful.
AddThis Social Bookmark Button