[CS3] How Do I Change The HTML Background Image From Flash?
Hi,
I'm new to the whole forum thing, but i'm running out of ideas of how to resolve this issue.
I've created a transparent flash movie, for a new portfolio website. I've dropped it into an html page with a full bg image (2000x1500) but i want to change the html bg image each time i click on a new area of the flash movie.
Can this be done? I know it requires javascript and actionscript, but as a designer i am having a real hard time trying to find any solutions or understanding any code thats out there.
Please help if you can...
Cheers in advance.
FlashKit > Flash Help > Flash Newbies
Posted on: 10-12-2008, 08:28 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Background Color Change From Swf To HTML-image
I've been having problems with some color changes.
The background picture in the flash movie has a color which is similar to that of a picture that lies in a scaleable HTML-table beside the swf in the indexpage.
The problem is that on lowres/low color monitors, you can see the transition from swf to the HTML table. There's a slight color change that is only visible on low color monitors.
How can I avoid that? Does anybody know that...
Change Hmtl Image Background From Flash
Hi all!
I have my transparent swf with behind the html image background.
I would like to know if I can make a button that will change this html image background.
Thanks.
Change Td Background Image With Flash Button
i have a flash file sitting in a html file...
a table td within this html file has the following: <td id="bgTable" style="background: url(images/strip_black.gif)">
i have a button in the flash file, and when it is clicked i want it to change the html td background from images/strip_black.gif to images/strip_white.gif .
does anyone know the correct getURL javascript call to do this???
Thanks and kind rgds!
mitcho
Change Html Background With Flash Button
I've found a few scripts but none seem to work for me. This tutorial does it- http://www.echoecho.com/flashjavascript.htm But it seems to be a bit beyond me. I tried but no go. Anyone know of any simpler ways to do it and work in multiple browsers? I'm on a Mac and the above site worked in Firefox and Safari.
Another site that does it- http://www.philipharvey.com . Click on a tab and the background changes color.
Edited: 12/29/2006 at 09:16:25 PM by smaudlin
Change Html Background Color With Flash Button
I've found a few scripts but none seem to work for me. This tutorial does it- http://www.echoecho.com/flashjavascript.htm But it seems to be a bit beyond me. I tried but no go. Anyone know of any simpler ways to do it and work in multiple browsers? I'm on a Mac and the above site worked in Firefox and Safari.
Another site that does it- http://www.philipharvey.com . Click on a tab and the background changes color.
Background Image In Flash Or HTML
Hi there!
I've got a Flash movie with a photo background for added effect, the problem is, this is bumping my movie up to 118 K, its 72K without the background.
I've tried putting the background in HTML, but it won't scale to fit the screen. I've also tried using layers with a 100% sized image, but this screws up if the browser is resized.
Should I put my background in Flash or HTML? Which will be faster at downloading?
Changing The Background Image In Html From Flash
I have several frames of a flash movie. I want the back.jpg image in the html page to change to back1.jpg when I click in my flash movie to frame two.
I'm a designer, and not a programmer, but, I assume it's a simple javascript issue.
M
Changing An HTML Background Image From Flash
Hi all,
I am building a site right now that gives the users the option to change the color scheme of the site.
The problem I am running into is my footer an image outside of flash as the background colour of a table.
Is there a way that I can create some sort of function in flash that speaks with the html of the page to change that table cell's background image? I assume it would be javascript if it's possible.
Can Flash Change HTML Bg Image?
I have a flash file that has two different layouts. One for the home page and one for the interior pages. Each layout needs a slightly different background image in the HTML file. Is there a way I can change the background image from Flash with JavaScript or something without needing to open a different HTML page?
Html Background Image Covered By Flash Stage
http://rufushale.com/test.html for example.
I am using Flash Pro 8 and DW 8 on ibook g4.
The problem is that i cannot seem to prevent the Flash "stage" from taking up most of the screen, covering the bg image, which is the green stripes. It does not matter how small I make the stage in Flash.
Here is the page code:
<html>
<head>
<link rel="shortcut icon" href="Assets/Images/favicon.ico" >
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function createWindow(cUrl,cName,cFeatures) {
var xWin = window.open(cUrl,cName,cFeatures)
}
//-->
</script>
<style type="text/css">
<!--
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
.style7 {font-family: Arial, Helvetica, sans-serif; color: #996600; }
.style8 {font-family: Arial, Helvetica, sans-serif}
body,td,th {
background-image:url(http://rufushale.com/vertstripes.jpg);
background-attachment:fixed;
background-repeat:repeat;
background-position:center;
}
{font-family: Arial, Helvetica, sans-serif;
color: #3399CC;
}
.style12 {font-family: Arial, Helvetica, sans-serif; color: #FF9900; }
.style13 {
color: #FF9900;
font-weight: bold;
}
.style14 {color: #FF9900}
-->
</style>
</head>
<body bgcolor="#FFFFCC">
<div align="center">
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
<param name="movie" value="test3.swf">
<param name="quality" value="high">
<embed src="test3.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%"></embed>
</object>
</div>
</body>
</html>
Change A Background Image
I basically have 10 pictures in JPEG / or GIF , and want to show the pictures for 5 secs each, then swap to another picture. That's all I really need in the movie, nothing else..
I have imported them into the library,, but beyond that, I'm kinda flustered...
I'm not entirely sure if I shouldn't just use javascript for this, but I would like not to have an annoying 'navigate' sound everytime I want the picture to change...
How To Change A Background Image
We just inherited a web site with a flash animation. One is a location map. How do I edit the background image of the United States? I need to change the color of some of the states.
Randomly Change Background Image
Hi all!
I would like my home page to randomly change its background image every time someone visits the site.
Is there any way to do that?
Thanks!
Change/Fade Background Image
I have 5 different buttons that I would each to change the background image, fading in the new one. Each button takes the user to a different 'section' of the website, and each 'section' has a different background picture. How can I make the picture change, fading in new one?
I just can't figure out the logic behind it - what would be the most efficient/easiest way to do this?
Chandler
Background Color/ Image Change
my client would like to see a different image each time someone logs onto his website [i am using flash]. also, he wants the background color to change as well....
was wondering if it is possible to have the background COLOR [in html] change automatically each time someone visits a website.
also, how do i have a background image automatically change each time a person visits a flash website. i've seen it done but not sure what coding to use....
Change HTML Background Colour
From within my flash movie, I need to change the background colour of the html page it is embedded in. I know I should use the FSCommand() function, but I can't figure out the correct syntax.
I've tried FSCommand("bgcolor", "#003300") but it does not work.
An easy one for a flash guru.
Thanks in advance,
Dean
Change HTML Background Color?
Hello!
I have a flash movie embedded in an HTML file (see rough example : http://www.studio209.com/color.html )
When you click on the links ("movie 1", "movie 2", "movie 3") the background color of the flash movie changes.
is there a way to change the background color of the HTML to match the background color of the Flash file?
Thanks!
Html Background Change Issue
how do you make a button in flash tell the background color of an html page to change, like the javascript code:
document.bgcolor = #xxxxxx;
... i dont understand how to get flash and the html page it is displayed in to communicate w/ each other.
Html Background Change Issue
how do you make a button in flash tell the background color of an html page to change, like the javascript code:
document.bgcolor = #xxxxxx;
... i dont understand how to get flash and the html page it is displayed in to communicate w/ each other.
Background Change From Solid Color To Image.
Hi everyone,
I have mx, and what i needed to do is when the mouse rolls over object I would like the background to change from a solid color to an image. does anyone out there know how to do that. I appreciate any advice. Thanks Good Day
JJ
Button Change Font And Background Image
Hello,
I dont know if this question has been posted before, but I couldn't find it. I am going to develop a flash movie that I want the user to be able to change font, font size and background image, using different buttons, but I don't know how to go about this.
Can anyone help me? what do I need to do? or is there a guide or a link somewhere that I can use? I'd appreciate your help very very much...
Eduardo
Whats The Way To Dynamically Change Background Image?
Whats the way to dynamically select background image so that on original background it gets replaced??? i need something like this -
http://www.27bobs.com/components/PenPad_online.html
But in this thing I want an option for the user to change background color if he wants??? Please help.....
Using A Button To Change The Color Of A Background Image?
I have a background image which is a movie clip. "bodybg"
I have a button "m1" that when clicked would change the "bodybg" clip to a different color.
Here is my code, but I'm getting errors?
Code:
import flash.geom.ColorTransform;
m1.addEventListener(MouseEvent.ROLL_OVER, onRoll2);
m1.addEventListener(MouseEvent.ROLL_OUT, onRollout2);
m1.addEventListener(MouseEvent.MOUSE_DOWN, colorTransform);
function onRoll2(event:MouseEvent):void
{
event.target.gotoAndPlay(11);
}
function onRollout2(event:MouseEvent):void
{
event.target.gotoAndPlay(22);
}
m1.buttonMode = true;
function colorTransform()
{
var colorTransform:ColorTransform = this.transform.colorTransform;
bodybg.colorTransform.color = 0x00FFFF;
this.transform.colorTransform = colorTransform;
}
this is the error I get when I click my button
Code:
ArgumentError: Error #1063: Argument count mismatch on Untitled_fla::MainTimeline/colorTransform(). Expected 0, got 1.
Change Html Page Background Color
Is there any way from Flash to change the background color of the HTML page it is embedded in?
Basically I want the html page background color to be white whilst my preloading animation displays and then change to brown once the site has loaded.
Currently the preloading animation and associated code is contained within the main movie.
Any help or tips much appreciated
P
Scrolling Text Field To Change Background Image
I would love some help on this one. I have a scrollable text field of about 100 lines that are controlled with an up and down button. What I want to do is when you get to a certain point in the text, I want the background image to change. Can anyone suggest the best way to do this?
Thanks in advance!
Action Script To Change Background Colour Of Html Page
Hi, I'm trying to create a button in my flash move that would be able to change the background colour of the html page that holds it. I don't know if that's even possible and if it is how I would go about it. Can anyone help?
Action Script To Change Background Colour Of Html Page
Hi, I'm trying to create a button in my flash move that would be able to change the background colour of the html page that holds it. I have posted this question before and someone gave me this code to use:
<html>....<head>
<SCRIPT LANGUAGE=JavaScript>
<!--
function NEWbg(newcolor) {
document.bgColor=newcolor;
}
//-->
</SCRIPT>
Button action in flash :
on(release){
getURL("javascript:NEWbg('#FFFFFF')");
}
/////////////////////////////
or from flash w/o any code in html :
on(release){
getURL("javascript:document.bgColor='#FFFFFF'; void(0);");
}
The problem with this is that it brings up a dialogue box about flash security settings when you press the button which obviously won't do. does anyone know another method? Thanks in advance.
Action Script To Change Background Colour Of Html Page
Hi, I'm trying to create a button in my flash move that would be able to change the background colour of the html page that holds it. I have posted this question on another site and someone gave me this code to use:
<html>....<head>
<SCRIPT LANGUAGE=JavaScript>
<!--
function NEWbg(newcolor) {
document.bgColor=newcolor;
}
//-->
</SCRIPT>
Button action in flash :
on(release){
getURL("javascript:NEWbg('#FFFFFF')");
}
/////////////////////////////
or from flash w/o any code in html :
on(release){
getURL("javascript:document.bgColor='#FFFFFF'; void(0);");
}
The problem with this is that it brings up a dialogue box about flash security settings when you press the button which obviously won't do. does anyone know another method? Thanks in advance.
Action Script To Change Background Colour Of Html Page
Hi, I'm trying to create a button in my flash move that would be able to change the background colour of the html page that holds it. I have posted this question on another site and someone gave me this code to use:
<html>....<head>
<SCRIPT LANGUAGE=JavaScript>
<!--
function NEWbg(newcolor) {
document.bgColor=newcolor;
}
//-->
</SCRIPT>
Button action in flash :
on(release){
getURL("javascript:NEWbg('#FFFFFF')");
}
/////////////////////////////
or from flash w/o any code in html :
on(release){
getURL("javascript:document.bgColor='#FFFFFF'; void(0);");
}
The problem with this is that it brings up a dialogue box about flash security settings when you press the button which obviously won't do. does anyone know another method? I'm using action script 1. Thanks in advance.
Html Background Image?
How would you do a background like this and make it line up with the flash movie? -----> EXAMPLE Woul I use CSS or what? Thanks for the help!
Background Image Question (HTML)
Hi, I'm trying to achieve creating a Flash movie which has its background set to transparent, then having a background image loaded into the HTML. (Partly inspired by being impressed with a similar effect on Less Rain
I am just about to grips with basic HTML & my transparent movie works fine on top of the image. The problem I have is that the 800 x 600 background image begins to tile on the edges of the page. Does anyone know how I can make the HTML auto-size the backgrond image to fit the entire browser please?
Alternatively, are there ways of getting Flash to embed an image instead of a colour as the background? I use both Flash 5 & 8 depending on project- though I'm relatively intermediate on both.
Hope someone can help, thanks in advance
Hiab-x
Background Image For The Published Html
hi guys...super basic, i know. i even looked around the forums, google, etc with no luck (likely cause i just didn't know how to verbalize this). I am curious how to create a background with gradient onto my published html. Must it be an image in the body tag (<body background="image.png">)? i tried this but no luck. I'm hoping the answer may avoid an image for these reasons:
1-i don't know how big the image will need to be
2-it takes longer to load
3-it looks funny trying to fit the flash movie ontop of the image...it's not smooth
any thoughts? thanks
Adding A Background Image With HTML?
Just a quick one. Want to add a background image to the html of a flash site so the background image can scale and the content of the flash site not scale. Any ideas anyone??
Thanks all!
|