Setting Html Bg Image From Flash...
Hey All,
I am setting up random "themes" for a flash site and each theme requires a unique background image to be used on the html page the flash piece resides. Any ideas how I could maybe pass a javascript to trigger this?
Any help would be greatly appreciated.
cheers -jub-
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-28-2006, 01:20 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Setting Flash ID In The HTML
I'm following a tutorial it which it says
"you must set both the name and ID properties of the Flash movie on you html page to "shootthemup"
I've managed to set the name of the file to shootthemup, but how tdo I set the ID properties in HTML?
Any help would be greatfully received.
Leroy
Setting Var In HTML For Flash
I know there is a way to add some HTML in the object tag to set a var in a Flash movie.
But I can't remember what it is and can't seem to find the info again.
Can anyone refresh my memory?
Setting A Flash Variable From HTML
I need to set a variable in my flash movie. The variable is going to be A line of text that will be on the html page in which the flash movie is on. Any help or ideas would be great. thanks
Setting Flash Video Preview Image?
When I encode video is it possible to set the preview image to something other than the 1st frame of the video. I know it's possible because I see others do it.. Please help me.. I've searched everywhere for an answer.
THanks..
Setting HTML Window Size From Flash....?
Hi all - does anyone know how to set the window size of a HTML page opened from flash? I've just used
on (release) {
getURL("my_page.html", "_blank");
}
to get the page to open from the swf and that works fine, but can't figure out how to get it to open at the size that i want. Any ideas? Thanks guys : )
Setting Flash Variable With HTML Param
I know this had to of been asked sometime before, I just can't seem to, for the life of me, find out where though.
So I want to get a single dynamic integer from my HTML.
It's pretty simple really. One Dynamic text feild in the Flash AS, one param setting in the HTML right?
What is the actionscript code that I am going to need to pull this off?
thanks
Jimmy
Setting Up Static Image If Flash Doesn't Play...
This is probably a simple solution.. but I can't seem to find the code for it.
HOW do I code my HTML file to have a static image come up instead of a blank screen if the flash doesn't play????
THANKS!!!
Photo Gallery Using XML And Flash - Setting Image Size
Hi guys. I've read Kirupa's tutorial located @ http://www.kirupa.com/developer/mx20...otogallery.htm
I've set the stage size to be 800x600px and my images are the same size.
My queries are:
1. If the image is smaller than 800x600px, can i set the image to load in the middle of the stage instead of the top left corner?
2. If the image is bigger than 800x600px, can i set the image to the same size (ie. 800x600px)?
I've tried adding code into the ActionScript but whatever i've tried, i've had no luck. I've also tried changing properties within Flash MX 2004 but still no luck.
The reason i want to add these changes is because not all the images used will be exactly 800x600px in size, some will be smaller and some will be bigger.
Here is the ActionScript from the tutorial:
Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
Thanks for your help and it's very much appreciated.
Cheers!!
Using Flashobject.js Rather Than Html Embed, Help Setting Flash To Tranparent
I am using javascript to put a flash file on my html page rather than using the embed tags (a work around for the "gray box" problem in IE)
I have a drop down menu that is going behind my flash piece and I want it to go over the top. Now I normally know how to fix this by changing the wmode in the html, but I do not know how to set this property in the javascript.
Here is my code:
Code:
<script type="text/javascript">
var fo = new FlashObject("staff.swf", "firstflash", "530", "500", "8", "#afb0ac");
fo.addParam("quality", "best");
fo.write("firstflash");
</script>
XML Image Gallery - Setting X,y Of Image Via XML?
I'm working on version of Kirupa's XML Image Gallery, only I want to be able to set the x,y coordinates individually for each image. How do I do this via the XML.
I'm trying this to no avail:
XML looks like this:
<pic>
<image x="0" y="0">001.jpg</image>
<caption>description line 1</caption>
<caption2>description line 2</caption2>
<caption3>description line 3</caption3>
</pic>
<pic>
<image x="100" y="200">002.jpg</image>
<caption>description line 1</caption>
<caption2>description line 2</caption2>
<caption3>description line 3</caption3>
</pic>
Actionscript looks like this:
function placeImage() {
var image_x:Number = Number(picture.attributes.x);
var image_y:Number = Number(picture.attributes.y);
}
Can anyone let me know what I'm doing wrong, what I'm missing?
Or how better to go about this?
Thanks!
Using Flash In HTML, Alt-image?
Currently, I'm using flash for a navigation bar on a otherwise HTML only page. The owner doesn't wish the entire site to be in Flash and also wants non-flash compatability. Is there a way using dreamweaver, frontpage, or some HTML code that would allow me to display an image or possibly even an image-mapped graphic if the user doesn't have flash installed.
I suppose there would be a way to change the content if I ran a javascript to check for the exsistance of the plugin but I havn't explored Javascript plug-in checks for a long time.
The Html Image Tag In Flash
Hi
I was messing around with html in flash and to test what it can do I made a little swf.. there are to textfields, an input text and a dynamic.. type in your html and press "til html" the dynamic box shows the html formatted..
This works fine except for the img tag, I put up a picture in this folder and type this but nothing happens..
try it here:
html formatter
the path of the pic:
<img="http://www.ors.dk/html/pic.gif">
anyone?
HTML With Image And Flash
Hi, I have a Flash file with the following code in it:
Code:
// Create a new style sheet object and set styles for it.
var styles:TextField.StyleSheet = new TextField.StyleSheet ();
styles.setStyle ("html",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'12px', color:'#0000FF'});
styles.setStyle ("body",{color:'#00CCFF'});
styles.setStyle ("h1",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'24px', color:'#006600'});
styles.setStyle ("p",{color:'#000000', fontSize:'14px'});
styles.setStyle ("a",{color:'#0000FF', fontSize:'14px', fontWeight:'bold', textDecoration:'underline'});
//
/* Assign the style sheet object to myTextArea component. Set html property to true, set styleSheet property to the style sheet object. */
myTextArea.styleSheet = styles;
myTextArea.html = true;
myTextArea.focusTextField = null;
//
var myVars:LoadVars = new LoadVars ();
// Define onData handler and load text to be displayed.
myVars.onData = function (myStr:String):Void {
if (myStr != undefined) {
myTextArea.text = myStr;
} else {
trace ("Unable to load text file.");
}
};
//
myVars.load ("references.htm");
//
THEN, I have the file references.htm to be loaded:
Code:
<p>Text text text. <br/>[<img src='images/imagepopup.gif' width='15' height='15' vspace='0' hspace='0'/><a href="http://www.cnn.com" target="_blank">Link to CNN</a>]</p>
The problem is that the image that is in the HTML code does not appear in the same line with the text (inside the []). Instead, it appears in a line below.
It looks like this:
Text text text.
[Link]
Image
But it should look like this:
Text text text.
[Image Link]
Is there anything wrong with the code? Please advice.
Thanks,
Flash Html Help (image Tag)
Hi,
I am working with the Image tag in the textfield. when i load the image it always take the left or right alignment. i want the image tag where exactelty i place the image tag . In Html it shows fine but the same code i added in flash it dosent work . Please let me know if any solutions for this.
Thanks,
B.Srinivasa Rao
srinu_multi@rediffmail.com (email)
send2srinu@hotmail.com (msn chat)
HTML With Image And Flash
Hi, I have a Flash file with the following code in it:
// Create a new style sheet object and set styles for it.
var styles:TextField.StyleSheet = new TextField.StyleSheet ();
styles.setStyle ("html",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'12px', color:'#0000FF'});
styles.setStyle ("body",{color:'#00CCFF'});
styles.setStyle ("h1",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'24px', color:'#006600'});
styles.setStyle ("p",{color:'#000000', fontSize:'14px'});
styles.setStyle ("a",{color:'#0000FF', fontSize:'14px', fontWeight:'bold', textDecoration:'underline'});
//
/* Assign the style sheet object to myTextArea component. Set html property to true, set styleSheet property to the style sheet object. */
myTextArea.styleSheet = styles;
myTextArea.html = true;
myTextArea.focusTextField = null;
//
var myVars:LoadVars = new LoadVars ();
// Define onData handler and load text to be displayed.
myVars.onData = function (myStr:String):Void {
if (myStr != undefined) {
myTextArea.text = myStr;
} else {
trace ("Unable to load text file.");
}
};
//
myVars.load ("references.htm");
//
THEN, I have the file references.htm to be loaded:
<p>Text text text. <br/>[<img src='images/imagepopup.gif' width='15' height='15' vspace='0' hspace='0'/><a href="
Flash + HTML + Image
Hi,
I want to load an image in a dynamic textfield from xml. The problem is, when i execute the flash file i can see the image getting displayed. But when i publish and make an html, i cant see the image getting loaded in the browser (IE 6.0) but other text without the image is getting displayed.
I am getting image as a String containing text as well as image path as below:
Quote:
<P align='center'>Ashish Chandras</P><BR><P><IMG src='image.jpg' /></P><P>Address:Bla Bla Bla..</P>
I can see the text but couldnt see the image when i publish the file. I am using flash mx 2004 and publish settings are AS 2.0 and Player is 7.0.
Any pointers towards this...???
Thanks in adv
-------------
aShIsH
HTML With Image And Flash
Hi, I have a Flash file with the following code in it:
Code:
// Create a new style sheet object and set styles for it.
var styles:TextField.StyleSheet = new TextField.StyleSheet ();
styles.setStyle ("html",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'12px', color:'#0000FF'});
styles.setStyle ("body",{color:'#00CCFF'});
styles.setStyle ("h1",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'24px', color:'#006600'});
styles.setStyle ("p",{color:'#000000', fontSize:'14px'});
styles.setStyle ("a",{color:'#0000FF', fontSize:'14px', fontWeight:'bold', textDecoration:'underline'});
//
/* Assign the style sheet object to myTextArea component. Set html property to true, set styleSheet property to the style sheet object. */
myTextArea.styleSheet = styles;
myTextArea.html = true;
myTextArea.focusTextField = null;
//
var myVars:LoadVars = new LoadVars ();
// Define onData handler and load text to be displayed.
myVars.onData = function (myStr:String):Void {
if (myStr != undefined) {
myTextArea.text = myStr;
} else {
trace ("Unable to load text file.");
}
};
//
myVars.load ("references.htm");
//
Then, I have the file references.htm to be loaded:
Code:
<p>Text text text. <br/>[<img src='images/imagepopup.gif' width='15' height='15' vspace='0' hspace='0'/><a href="http://www.cnn.com" target="_blank">Link to CNN</a>]</p>
The problem is that the image that is in the HTML code does not appear in the same line with the text (inside the []). Instead, it appears in a line below.
It looks like this:
Text text text.
[ Link]
Image
But it should look like this:
Text text text.
[Image Link]
Is there anything wrong with the code? Please advice.
Thanks,
CH
Flash + HTML + Image
Hi,
I want to load an image in a dynamic textfield from xml. The problem is, when i execute the flash file i can see the image getting displayed. But when i publish and make an html, i cant see the image getting loaded in the browser (IE 6.0) but other text without the image is getting displayed.
I am getting image as a String containing text as well as image path as below:
Quote:
<P align='center'>Ashish Chandras</P><BR><P><IMG src='image.jpg' /></P><P>Address:Bla Bla Bla..</P>
I can see the text but couldnt see the image when i publish the file. I am using flash mx 2004 and publish settings are AS 2.0 and Player is 7.0.
Any pointers towards this...???
Thanks in adv
-------------
aShIsH
Flash Moving On HTML With Image Only
Does anyone know how to have a Flash movie appear after a certain amount of time on a normal html page, with no background or border or anything except an image, ie. the only image was say a car appearing and moving across the screen and thats it - but as the car moves you can still see the html text behind it.
I saw this when i was on excite.com and wonder how this can be done.
Thanks in advance!!
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/Flash Image Conversion
I made a banner in flash mx that is a link to a site and I want to put it on a html page would this be possible I hosted the swf on my hoster and tried the img src code but that did not work can someone help me with the right code or how to do it
Flash Control HTML BG Image
Can Flash control the bg image on a HTML page? I basically have 6 menu items within Flash and when the user clicks on a new button, I want the bg to change, the bg is inside a the HTML page... I realise I could just add the bg image to the Flash file, but want to keep the combo of HTML and Flash... Any ideas?
Flash Control HTML BG Image
Can Flash control the bg image on a HTML page? I basically have 6 menu items within Flash and when the user clicks on a new button, I want the bg to change, the bg is inside a the HTML page... I realise I could just add the bg image to the Flash file, but want to keep the combo of HTML and Flash... Any ideas?
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?
Flash Image And Html Pages
I do have an SWF sequence of images in the main html page. In the second page I do have sections. Each section has a title of an image of the SWF file. The role of this section is to describe the image.
I trying to whenever I click on each image of the SWF in the main page, I should be directed to its description in the second page, meaning, that the second page should be loaded and its scroll down bar should go down and stop where the specific section (describing the image I’ve just clicked on) starts.
Flash Control HTML BG Image
Can Flash control the bg image on a HTML page? I basically have 6 menu items within Flash and when the user clicks on a new button, I want the bg to change, the bg is inside a the HTML page... I realise I could just add the bg image to the Flash file, but want to keep the combo of HTML and Flash... Any ideas?
Flash Control HTML BG Image
Can Flash control the bg image on a HTML page? I basically have 6 menu items within Flash and when the user clicks on a new button, I want the bg to change, the bg is inside a the HTML page... I realise I could just add the bg image to the Flash file, but want to keep the combo of HTML and Flash... Any ideas?
Flash Control HTML BG Image
Can Flash control the bg image on a HTML page? I basically have 6 menu items within Flash and when the user clicks on a new button, I want the bg to change, the bg is inside a the HTML page... I realise I could just add the bg image to the Flash file, but want to keep the combo of HTML and Flash... Any ideas?
Html Setting
Hello
My flash movie is very high (height = 2000px), and the width is regular ~ 800;
The page should be displayed in both 1024, 800 resoultion.
i can't find an html setting that will put a vertical scroll and scale the width.
is there any soultion?
adi
HtML Setting
I'm designing a site in Flash CS3 and publishing the HTML in Flash. I''m not crazy about the default layout of the HTML and I have to keep rearranging it in Dreamweaver, Is there anyway to make my layout in Dreamweaver the default in Flash? Any help would be appreciated.
Setting Html To 100%
I have noticed that most of you use a fixed width rather than making the html file fill the screen at 100%. Just out of curioisity, is there any reason why?
Setting Background Image Help Please
I'm trying to make an image serve as the background. Every time I try to preview it looks as if it will only cover a small area of the browser window. I want it to dynamically fit the browser window (automatically resize as needed.) I think I'm lacking the terminology or something because I cannot seem to find any help topics on this. Any help would be appreciated.
Cheers
Setting Image Dimensions
I am trying to incorporate a blurred transition with images using photoshop and flash. Thats the easy part and is already taken care of. Check out my beginner site. At the bottom is a picture of my head (LOL).
My ultimate goal is to use actionscript or whatever i have to soi that when the mouse is over the image, it not only fades into the picture, but enlarges the picture.
Can i do this?
All help is appreciated
I have attached the FLA file.
Setting Background Image
Hello! How can I set a jpg repeat itself for the background!. Also How do set the jpg as a background!
Thanks!
Map Pan, Setting Limits To Image
hey I have a large map in an mc and navigation buttons to control the map.
2 questions:
1.Does anyone know how to set limits on this? my image is w2200 h2980? stage is 1000w x 740h I am using code like this? Th buttons are either 1 or a 0 so i think the limit function needs to be in this section.
2. does anyone know how to adjust the script for zoom so that the image will zoom in n out without refocusing on a specific point. my large map move to a specific location as it zooms. it would be cooler if the the map zoomed in and out based on current location.
Thanks again. I have been trying but no luck.
demo version is here: http://www.tmtrestoration.com/demo/main/main.htm
onClipEvent (enterFrame) {
if (_root.map._width > "2200") {
_root.map.larger = 0;
} if (_root.map._width < "726") {
_root.map.smaller = 0;
} if (_root.map.up == 1) {
_root.map._x = _root.map._x+5;
_root.map._y = _root.map._y+5;
} if (_root.map.up2 == 1) {
_root.map._y = _root.map._y+5;
} if (_root.map.up3 == 1) {
_root.map._x = _root.map._x-5;
_root.map._y = _root.map._y+5;
} if (_root.map.up4 == 1) {
_root.map._x = _root.map._x-5;
} if (_root.map.up5 == 1) {
_root.map._x = _root.map._x-5;
_root.map._y = _root.map._y-5;
} if (_root.map.up6 == 1) {
_root.map._y = _root.map._y-5;
} if (_root.map.up7 == 1) {
_root.map._x = _root.map._x+5;
_root.map._y = _root.map._y-5;
} if (_root.map.up8 == 1) {
_root.map._x = _root.map._x+5;
} if (_root.map.larger == 1) {
_root.map._xscale = _root.map._xscale+2;
_root.map._yscale = _root.map._yscale+2;
_root.target_x = (Stage.height/2)-(this._x+_root.map._x);
_root.target_y = (Stage.height/2)-(this._y+_root.map._y);
} if (_root.map.smaller == 1) {
_root.map._xscale = _root.map._xscale-2;
_root.map._yscale = _root.map._yscale-2;
_root.target_x = (Stage.height/2)-(this._x+_root.map._x);
_root.target_y = (Stage.height/2)-(this._y+_root.map._y);
}
}
Setting Background Image
Hello! How can I set a jpg repeat itself for the background!. Also How do set the jpg as a background!
Thanks!
Setting Swf As Background Image
i need to set a swf as a background image, there is a number of different swf that are pulled at random everytime a user logs onto the site, so they get a different background everytime.
The main site then loads over the back ground swf.
Has anyone got any ideas how this might be done, through any coding method
thanks
jon
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
[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.
Can FLash Clear Image In HTML Textfield
Hi all.
When the image loaded into HTML textfield via <img> tag, say, aligned to the left, text floating it right. When i need the text to below the image, without floating it, i've used <br clear="all"> for browsers, and it worked well. Is there any way to simulate such behaviour in Flash HTML textfield?
Thanks.
HTML File Substitute And Image Instead Of Flash
HELP! I already uploaded the website and it contains flash for the header. I just found out that people who do not have flash it just shows a blank box. How do I detect the if the audience has flash and if they don't just have a picture show up.
PLEASE HELP!
Thanks,
Heather
Website: www.jacobusenergy.com
Pass Image Name And Path To Flash From Html
Hello Flash Forum,
I would like to use Flash to display a larger image in an HTML page that opens on top of a window with
thumbnail images. The thumbnail page will be a php page. If the user clicks the thumbnail, I would like to open a swf that diplays the larger image. I would like to pass the path and name of the image to display to my swf. It would open a browser page (or just a swf file) over the thumbnail page. The use could then close the larger image display, and click another thumbnail, etc.
How could I do this? I have a swf file that will display the image, but I would like to pass the image name from outside the swf file.
Thanks for any tips,
eholz1
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.
HTML Publish Setting Help
Hi,
I've been playing around with the html publish settings for my website and I can't seem to get the website to display how I want it. Right now the height and width of the .swf scale proportionally as you resize your browser like I want it to, however in certain browser sizes, offstage items can be seen as they tween off the stage. I've tried adjusting many of the publish settings but nothing seems to work. Please help. Here are my current publish settings...
Template: Flash Only
Dimensions: Percent
95 by 95
Window Mode: Window
HTML alignment: Default
Scale: Default (Show All) //changing this to other settings solves the offstage problem but the proportionality of height and width gets screwed up in different ways.
Flash Alignment: Center, Center
I am using a Mac with Safari.
Thanks.
|