Flash Button Background
Does anyone know how to replace a background colour of a button with an image? i have tried but with no luck. The code I have tried is;
Code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="105" height="54" background-image: "url(My%20Documents/Disertation/VB%20Project/Images/background.JPG"> <param name="BGCOLOR" value=""> <param name="movie" value="button1.swf"> <param name="quality" value="high"> <embed src="button1.swf" width="105" height="54" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" src="My Documents/Disertation/VB Project/Images/background.JPG" ></embed> </object>
DevShed > Flash Help
Posted on: January 30th, 2006, 08:18 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Making A Flash Button Fit The Background
i made an oval button on flash and would like to use it on my webpage...but the buttons has a white background around the edges that i can't seem to get rid of since flash can't seem to save images in anything except rectangles....
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 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 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.
HTML Background Matching Flash Background
Hey, I have a flash website that opens as a pop up, the pop auto fullscreens. The background in the flash document is a gradient, and I have a gradient in the background of the html. My question is how would I get the background of the HTML to always match up with the flash background using a percentage?
www.flippingsweet.net/index2.html
Button Foreground Over Button Background
Hello, long time reader first time poster (he he he)
anyway, I've created a background as a button in which plays a MC on the UP and OVER states. To be more specific, it's a picture that blurs on RollOver and returns to normal on RollOut.
Also, I have little buttons that float on the foreground which are links to videos. On RollOver these play a short MC. No big deal so far, right?
My problem is that when I RollOver the buttons in the foreground, the button in the background considers this as a RollOut. Resulting in the background effect of blurring in and out to occur in any interaction with the foreground buttons!
Now, is this something that can be solved using actionscript, or is it simply fixed by modifying layers or maybe hit spots(by the way, my hit spot for the background is all over).
All of you are great, keep up the good work and thanks for any help.
Button No Background
hey AGAIN. i just finished creating a button and was about to add it to my website, but it has a huge background. How to i add just the button ???
Thanks guys, here is the button i created. Here is the HTML Code and the url, hope somebody can help me out.
http://i68.photobucket.com/albums/i15/luishicks/gd1.gif
Attach Code
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled-4</title>
</head>
<body bgcolor="#cacaff">
<!--url's used in the movie-->
<!--text used in the movie-->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="760" height="420" id="Untitled-4" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="Untitled-4.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#cacaff" />
<embed src="Untitled-4.swf" quality="high" bgcolor="#cacaff" width="760" height="420" name="Untitled-4" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
Edited: 12/28/2006 at 07:03:04 PM by LuisDesigns
A Transparent Background Button How?
hi!!
how can i create a button with a transparent bg??
i have a bg at my html page, and i´d like the button to show only the text i´ll use. is it possible? how can i do it?
thanx!!!
Button For Background Music
How can I set up a button to turn off background music on my flash site? Now my whole site is going to be flash so will this be a problem?
Changing Background Through A Button
does anyone know how to change the background of flash through the use of a button (on a click)... i am wanting to change the color to a custom color as well. a different button will change the background to a different color. i would appreciate any help you could give me.
thanks,
jeff
Loading A JPG As Button Background
I'm trying to loading a JPEG as a button background. Depending on the event (up, over, press) I have to strech or mask it. (Attached the effect)
How can I prevent to load the jpeg every time I change event ?
Not using a button but a movie controlled by this function (button is the movie holder, pre is the movie to be changed by the image):
Code:
button.pre.loadMovie(label+".jpg");
preInt = setInterval(preLoad, 500);
function preLoad() {
if (button.pre._width > 0) {
button.onRollOut = function() {
bottone.gotoAndPlay(10);
};
button.onRollOver = function() {
bottone.gotoAndPlay(20);
};
bottone.onPress = function() {
bottone.gotoAndPlay(30);
};
clearInterval(preInt);
}
}
Why does it load the image only once and after an "onSomething" event it forget about it ?
Button Background Fade
If you look at this page:
http://motion-wave.com/
the background of the buttons in the menu is fading when you roll over/out. Can someone please help me out how you can actionscript that? Maybe you can show with some code example or a tutorial?
Thanks in advance
Background Acting Like A Button
Hi,
I have created a website with Flash on a Mac. I use dreamweaver to place the flash into an html page. On the Mac the site works fine, but on a PC you have to double click the buttons for them to work. The background is acting like a button but it isn't. The home page doesn't even have a background. The address is: http://www.graceofspringhill.net so you can see what I am talking about.
Any help would be appreciated.
Button Background Rollover.
Hey Guys,
I am tying to build a nav with some button that overlap, and they have drop shadow on them. How can I create a custom shape that the button uses?
buttonClip.Shape.blabla..
Thanks.
I just nested a clip in the button, and called that in the rollover.
Background Scolls On A Click Of A Button
Okay... here's my question.
I want to figure out how to create a site where the background scrolls anytime the user clicks any button on the page.
So I know to create a long image for the background that consists of all of the images I want the background to be. But then how do I scroll it a set amount when a button is pressed?
I have vague notions, but nothing seems to be working in practice.
Flash 5.
Thanks.
Tex
How To Change Background Color With A Button ?
Hi,
I have trouble figuring out how to change movie background color. Here what I want to do: If someone click on a button, the movie's background color will change to the color of the button clicked.
Thank you very much
Button Over Tiled Background Image?
Good Day.
I have created a tiled background using the following script:
tileBG = function () {
tile_width = 34;
tile_height = 34;
//
x_max = Math.round(Stage.width/tile_width);
y_max = Math.round(Stage.height/tile_height);
trace(x_max);
trace(y_max);
for (x=0; x<=x_max; x++) {
for (y=0; y<=y_max; y++) {
bg = _root.attachMovie("square", "bg"+x+y, this.getNextHighestDepth());
bg._x = tile_width*x;
bg._y = tile_height*y;
}
}
};
tileBG();
Next, I created a layer named 'button' and imported an image to the stage. And when I test the movieclip, the button doesn't appear on the screen. Why is this so?
Tq.
Background Change Triggered By Button
Hi!
I have calmed through the forum but didn't seem to find the full answer for my problem.
Here it goes. I have a movieclip which on rollover triggers the whole background picture to change, but when I would rollout the movieclip, the background picture should change back, or if I rollover other movieclips, the background picture of should change too.
My problem is, that the background picture is part of the movieclip and whenever I rollover it and then rollout it, the background picture stays the same because it fills the whole background, hmm.
I have received help, but not so I would be able to solve the issue.
Please help
Thanks
Preventing Background Button Presses
does anyone know of an easy way to put a button on the stage then put a movie clip in front of it so that you cannot click the button through the movie clip? thanks
Can't Animate Background Of Button Class
I've made a class that creates a simple button with a label and background. When I rollover the button the background should tween to a color and that's where it's going wrong. It's probably something simple I'm missing but I can't find it.
The text label does tween correctly, but the background doesn't do anything. It also doesn't give any errors when I test it.
ActionScript Code:
package classes
{
import flash.display.Shape;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import gs.TweenFilterLite;
import gs.easing.Circ;
public class NavButton extends Sprite
{
private var _text:String;
private var _background:Sprite;
private var _label:Sprite;
public function NavButton(textLabel:String)
{
_text = textLabel;
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event):void
{
buttonMode = true;
mouseChildren = false;
addLabel();
drawBackground();
addEventListener(MouseEvent.ROLL_OVER, onOver);
addEventListener(MouseEvent.ROLL_OUT, onOut);
}
private function onOver(e:MouseEvent):void
{
TweenFilterLite.to(_background, 0.2, {tint: 0xfff59b, ease: Circ.easeOut});
TweenFilterLite.to(_label, 0.2, {tint: 0x333333, ease: Circ.easeOut});
}
private function onOut(e:MouseEvent):void
{
TweenFilterLite.to(_background, 0.3, {tint: null, ease: Circ.easeOut});
TweenFilterLite.to(_label, 0.3, {tint: null, ease: Circ.easeOut});
}
private function addLabel():void
{
_label = new Sprite();
var tf:TextField = new TextField();
tf.autoSize = TextFieldAutoSize.LEFT;
tf.selectable = false;
tf.x = 5;
tf.y = 2;
var format:TextFormat = new TextFormat("Arial", 16, 0xffffff, true);
tf.defaultTextFormat = format;
tf.text = _text;
_label.addChild(tf);
addChild(_label);
}
private function drawBackground():void
{
_background = new Sprite();
var w:Number = _label.width + 10;
var h:Number = 24;
_background.graphics.beginFill(0x333333);
_background.graphics.drawRect(0, 0, w, h);
_background.graphics.endFill();
addChildAt(_background, 0);
}
}
}
Exported Button Transparent Background
Hello y'all!
I am just experimenting with FLASH and its various basic features. I hope to adopt it down the road as I am also working with ColdFusion.
I created a simple image a rectangle with rounded corners. I then exported it as .jpg ... When I loaded this image in a html file, the edge around it is white.
Is there any way I can get rid of that or at least make it transparent?
Thank you all in advance!
josel
If you have the knowledge, consult and educate those who need it! - Jose Lerebours
Make Background Music Stop With Button
I have an entire site in Flash MX and all is perfect except one thing...the sound.
When the intro starts some background music starts, and it loops 999 times so that it continues to play throughout all the scenes. I want the user to be able to press a button to stop and a button to start the sound when they get tired of it or want to restart it. I have created the buttons, but have no idea how to get the actions to work. (I want to make sure the sound starts off playing on the intro..not to be turned on by the button..and that part works just fine)
My sound starts on the main timeline of the first scene by dragging it onto the stage and looping 999 times. There is no "linkage" set. I want to place the buttons on every scene. My sound name is 'background'. I have not set variables or anything, dont know if i need this. I have tried everything but the right thing. I need HELP! Thanks....I can send file if you need it.
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
Scrolling Background In Accordance To Button Press
can anybody help with explaining how the images position can be "tweened" (rather than just jumped to!) in accordance with button selection, as shown in the site below ?
un.titled
thanx in advance
Ted
Play Movie In Background With Mouseover On A Button...
Hello everyone...
Do anyone know how to play a movie by moving your mouse over a button? (I have a scoccer ball jumping - a movieclip) And i´d like to make the ball jump, but only when you put your mouse over a button. And still use the button as a link to a webpage.
Hope someone can help me.... Thanks
Btw: Sorry 4 my poor english ;o) Hope yu can read it ;o)
Flah Movie Button And Background Sound On Off
I have a problem with sound, I have one background sound and some other sounds are running on button rollover in a flash move i want turn off and on all sounds with a single button
please help
sajith
Rollover A Button Control A Background Image
I am pretty new to AS3 and I am trying to create a site with a 3D background image (which I converted to a MC). I created 2 buttons that, when rolled over should move the background image ('bgMC') to pan either right or left (depending on if the user rolls over the right button or left). I've attached the code I'm using below, if anyone has a better code or knows how to use btnRt or btnLeft to make bgMC pan to the X,Y coordinates in 'goLeft' and 'goRight', I would greatly appreciate it. Thanks.
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.geom.Point;
var goLeft:Point = new Point(602, 250);
var goRight:Point = new Point(202, 250);
var goCenter:Point = new Point (400, 250);
function rollLeft(e:MouseEvent) {
new Tween (e.target, 'x', null, e.target.x, goLeft.x, 1, true);
}
function rollRight(e:MouseEvent) {
new Tween (e.target, 'x', null, e.target.x, goRight.x, 1, true);
}
function rollCenter(e:MouseEvent) {
new Tween (e.target, 'x', null, e.target.x, goCenter.x, 1, true);
}
btnLeft.addEventListener (MouseEvent.ROLL_OUT, rollLeft);
bgMC.addEventListener (MouseEvent.ROLL_OVER, rollCenter);
btnRt.addEventListener (MouseEvent.ROLL_OVER, rollRight);
Scrolling Landscape Background On Button Action
I've been developing a new interface for my website in which the stage scrolls when a button is clicked to show a landscape for each section. The scroll is seamless sort of thing. I found that i couldn't just put each section next to each other as the area in Flash MX around the stage won't let me.
Take a look at the header to this site when a button is clicked, how do u think this was achieved? It seems as if there is just one long strip of graphics and a different point is scrolled to when a button is clicked.
I would like to do this, at the moment i have been using AS to move the movieclips with the landscapes to one side and easing them but i can't simulate a long strip of landscape scrolled through.
sorry if thats a bit non-sensical but i'm confused.
Start And Stop Background Music With One Button
I'm working on a small problem, but I can't solve it!
I'd like to have a button or even a picture called music
which should stop and play the background sound. To stop is no problem,
but to start it again if the sound has stoped, is quiet difficult!
How can I start the sound again?
Could anyone give me a hit, how to program that?
Thank's a lot for helping me!
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.
Button - RollOver/rollOut - Background Color
I got my hands on Macromedia Flash MX Professional 2004 today and I've been playing around with it. Anyway, I have this problem - and I assume there's an easy solution to it.
I can't get rollOver/rollOut to change the background color of a button.
This is what I've done. I've drawn a box with Rectangle tool -> Convert to Symbol -> button
Then I'm trying to add an action....
Code:
on (rollOver) {
mycolor1 = new Color (_root.button1);
mycolor1.setRGB (0xFF0000)
}
.... but it doesn't work. What am I doing wrong? What should I do?
Oh, and if any of you know some online tutorials, I'd appreciate the urls
Thank you in advance
- Kimppa
URGENT: Putting Name Labels On A Button With Opaque Background.
Hi:
I have buttons that change colors whe you roll-over them and display different information related to each button.
What i need in addition is.....to have a box with text in it as a graphic—pop-up when u roll-over each button as well.
I have my original fla. file i would like to send for reference but it is too big to load on your forum (1MB thatexceedsd your 70KB limit) IS THERE ANYWAY I COULD EMAIL THIS FILE TO YOU so you can help me figure out this simple problem?
PLEASE HELP, I HAVE A DEADLINE FOR THIS & NEED THIS URGENTLY!
Thanks.
Transparent Background/ XML Code To Change The Background Colour
Hi,
In a bit of a pickle here; I need a way to insert a swf file into any color background website, so it automatically matches up.
Now, can one make the swf files background transparent? And match the background of any given websites background?
Or, can one use some sort of XML file and simply change this xml file to match the background color of the website?
Now, what if the website uses a particulare pic background? How would one match this?
As usual folks, I am stuck between a rock and a hard place, so any help deeply apprecaiteed!
Kind Regards,
Boxing Boom
Printing A MC With White Background, Not Stage Background?
I’m trying to print a movieclip with a white background while keeping the stage background black. The movieclip, printResults_mc has a white rectangle in the bottom layer, 850 pixels x 1100 pixels. The following function scales printResults_mc to the printer’s printable area but because it’s impossible to predict the aspect ratio of the printable area some black background always leaks out. I tried making the white background 20 pixels larger than I need (870 x 1120) and then setting a crop rectangle in addPage of (10,10,850,1100), no luck, the black stage background just fills in the area outside the crop. A simple solution would be to temporarily set the stage background color property to white, print, then set it back to black, but I can’t find any such property. Anyone have some ideas?
Attach Code
function printResults(e:MouseEvent):void {
var myPrintJob:PrintJob = new PrintJob();
var result:Boolean = myPrintJob.start();
var pageMargin:Number = 0;
if (result) {
prepPage();
var cropRect:Rectangle = new Rectangle(pageMargin,pageMargin,printResults_mc.width-pageMargin,printResults_mc.height-pageMargin);
printResults_mc.width = myPrintJob.pageWidth;
printResults_mc.scaleY = printResults_mc.scaleX
myPrintJob.addPage(printResults_mc,cropRect);
myPrintJob.send();
} else {
//User does not have printer or user canceled print action
};
}
How Do I Disable All Sounds Including Background Music And Button Rollover Sounds?
Hey, you don't know how long I've been on this forum last night and no one was able to help me with this. I have no clue how to do this. Basically what I want to do is create a site with a bunch of buttons with a Over State Sounds and a Down State Sounds. I have done so already with the file I have been working on at home. Now, I also have background music playing on my flash site. I already have a button that says, turn off music which is using the stop all sounds command. But now, I want a button that disables all the sounds on the whole entire site including background music and button over and down state sounds. I have tried the stop all sounds action but that DOES NOT WORK. Another action that I tired was the globalsound action where it puts the volume to 0, but all that does is stop the background music. It doesn't kill the button over and down state sounds. So what action script would I need in this case? I have been looking for this action scrpt for hours on end and havn't had any luck with anything.
Please help.
Thank You.
Chris
Disable Background Sounds And Button Over And Down State Sounds With An Action? How?
Hey, you don't know how long I've been on this forum last night and no one was able to help me with this. I have no clue how to do this. Basically what I want to do is create a site with a bunch of buttons with a Over State Sounds and a Down State Sounds. I have done so already with the file I have been working on at home. Now, I also have background music playing on my flash site. I already have a button that says, turn off music which is using the stop all sounds command. But now, I want a button that disables all the sounds on the whole entire site including background music and button over and down state sounds. I have tried the stop all sounds action but that DOES NOT WORK. Another action that I tired was the globalsound action where it puts the volume to 0, but all that does is stop the background music. It doesn't kill the button over and down state sounds. So what action script would I need in this case? I have been looking for this action scrpt for hours on end and havn't had any luck with anything.
Please help.
Thank You.
Chris
'Layering' Html/css Over A Flash File (flash Aplet As Background)
so i know VERY little about website design and html/css/flash blah blah - but i was wondering if anyone knew if it's possible to create a .swf flash file and use it as a background on a webpage - i.e. put links and text over it using html and such rather than creating them in flash. am i talking crazy?
Transparent Background And Going Outside The Original Flash Boundaries With Flash
Alright I made a post last week about this... how I've been seeing sites with flash that had transparent backgrounds... like one where a flash caterpillar flew across the screen... I found a site where the flash commercial just expanded when I put my mouse over it... The dimensions slowly turned from about 500x200 to about 500x600...
The site is here hopefully the advertisement is still there
http://www.news.com.au/story/0,23599,20706043-2,00.html
I've been looking into something called Flash with alpha channel recently I believe this is how these guys are doing it. Once again I'm not 100% sure but if anyone knows about this post some information. Maybe list some sites with some good alpha channel information.
Flash Browser Background W/ Centerd Flash Website
Hi all... I've been searching for this.. and also looked in some forums.. but nobody seems to know the answer to this..
How do I get this effect
www.robertreich.de
www.lechateau.com
www.hi-res.net
www.revolvercreative.com
If you stilll don't get me.. the effect is simply the flash background fills the whole browser window.. and also resizes with it while the main content (the site also flash btw) remains centered and doesn't resize with browser...
HELP!!
tnx..
Flash Background?
Hi, I am wondering how to add flash as a background.
I have the file and need to add it as a background. Any help is appreciated.
Flash Background
OK. I am still fairly new to Flash so dont think this is a stupid question. And yes I know I could make my flash movie transparent but that is an IE only product which is something I am trying to stay away from. I need to know if there is a way in Flash to use an image as a background like you do in HTML. I have a new site I am doing for my business and it has a earth globe on it and I am wanting to make the background use my star image I have. Any help would be appreciated.
Using Flash As A Background
What I am trying to do, is have a flash animation on one (HTML) layer, and having a content layer on top of that animation. Now I tried this, and the content does not appear, even with visibility set, and z-ordering done right. Text and images on the content layer above th flash animation does not appear, does anyone know why this is?
Can layers be seen over flash objects at all? If not, how might I do this?
Flash Background Help Please...
Hi,
How do i make flash movies fully transparent that are going 2 dreamweaver, if they are not like shapes, like say they are a cropped photo animated. Please note, i am using Flash 5.
Thanks.
JPG As Flash MX Background?
Hey whats up people!
im having a bit of trouble! My gf is giving me daily beatings
But yeah, i need to make sure im doing this right, im trying to use
a jpg image as my background for my flash site BUT! do i put it on the first layer and the put a layer over it and work away or do i have to do soemthing else? also, i gotta resize it dont i ! ?
cuz i cant for some reason use the selection tool and delete what i need to get the jpg fit my resolution/dimensions for my flash site.
any help would be appreciated!
No Background On Flash .swf
Hi guys and girls!
A while back I read on a tutorial on this website how to make a flash file contain no background at all. All that would be shown are the objects on the flash file.
For example, if I made a dot on the file and placed it over a photo using HTML, it would only show the ball moving over the photo without any background to block the rest of the photo.
I rememeber the code was weird and had loads of numbers in it. Maybe there's another way? I'll leave it to you Flash pro's out there to help me out. Any help would rock. Thanks in advance.
|