ActionScript 3.0 :: Changing The Background Of The Stage?
Aug 24, 2008What the best way is to add or change the background image of the stage.
View 2 RepliesWhat the best way is to add or change the background image of the stage.
View 2 Repliestrying to print a movieclip with a white backgroundwhile keeping the stage background black.The movieclip,printResults_mc has a white rectangle in the bottom layer, 850pixels x 1100 pixels. The following function scales printResults_mcto the printers printable area but because isimpossible to predict the aspect ratio of the printable area someblack background always leaks out. I tried making the whitebackground 20 pixels larger than I need (870 x 1120) and thensetting 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 backgroundcolor property to white, print, then set it back to black, but I
View 1 RepliesI am wondering if it's posible to set the backgroundcolor of the stage through as3 code.i am also wondering if it's possible to set the stage height and stage width through the code. for the application i wish to develop, the values of the stage color and the stage dimensions are provided by an XML file.
View 8 RepliesComing from java I could manipulate the background pixel by pixel as well as read color values of a certain pixel at coordinates (x,y).Now in flash I seem to be able to load a bitmap image. But I need to change the background color and also be able to read the color value of pixels.
My flash movie size is 800x600, sometimes bigger.I am trying to do simulations (biology) of a moving object leaving a trail (changed background color?) Then other moving objects can detect that trail (read background color) and increase or decrease the color value.
I am trying to learn AS. I have C and C# experience. I have been left with a previous fla/swf/as project. This has 3 images that in a banner website banner rotate. Problem is they have a black background. I would need white or transparent. The page is hereNot allowed to show you the link ?
View 6 RepliesI am trying to change the background color in a flash 8 .exe file that seems to extract setup variables via an xml file. The xml file reads as follows:
*?xml version="1.0" encoding="utf-8" ?**settings* *min*10000*/min* *max*10119*/max* *exclude* *range min="12" max="14"**/range* *range min="16" max="18"**/range* */exclude* *putbackin*false*/putbackin* *titletext**![CDATA[*font color="#000000"
[code].....
I have a Component that has a specific background image. The code looks like:
<mx:backgroundImage>@Embed(source='img1.png')</mx:backgroundImage>
<mx:states>
<mx:State name='state2'>
<mx:SetStyle name="backgroundImage">
[Code]....
But when I change the state to 'state2', it doesn't actually change anything.
I am developing an AIR application and I want to change my project theme to one of the additional included themes that is packaged with Flash Builder 4. So, I went to the Project Theme and changed it and it looks like it is supposed to in the Design View. When I run the application, the components (eg: a button) themselves look like it is supposed to, but the application's background is just white instead of the displayed color in the design view.
View 2 RepliesI am trying to create an application that will display dynamic text formatted with CSS using XML, this part is complete.
changing the background of a movieclip using an external file such as xml, css, or txt files.
I want to make the colour of my browser to change when my swf reaches a certain frame in the time line.
In my flash project I have placed the following actionscript in one of the frames.
ActionScript Code:
getURL("JavaScript:changeBgColor('#000000')")
and I want place the following javascript in my HTML file:
ActionScript Code:
<script language="JavaScript">
<!--
function changeBgColor(newBgColor) {
if (window.document && window.document.bgColor) {
[Code].....
but I don't know where in my HTML file to place it as there is alot of Java I don't understand. I have tried to place it in myself but it won't work. The HTML file I wanna place the Java into, is attached.
I'm actually not an AS nor flex coder, but i'm using Flowplayer and some plugin written in Flex/AS3.i figured its more relevent to AS forum then Flex since the actuall code is in AS3.the plugin called: audiovisual - its a sound visualisation written in AS3:
[URL]
now, the goal is to make the background of it WHITE.i actually did changed the actual effects colors like i wanted but the BG color i can't find it.
I'm creating a website and I want the background to change when the user presses a different button. I've been trying to create this effect but haven't been able to yet. I used the post here and built from there, [URL]. I had it working with two images and two buttons but adding the third kind of messed everything up. I've attached the fla.
View 1 Replieswriting a code that will change a picture base upon the time.
i want to have a picture of the sun rising between the time 6am to 11 am
then from 12pm - 5 pm a pic of the ocean showing
from 6 pm - 10 pm- a pic of the sun setting...
then from 11pm- 5am a picture of the northern lights..
ohh yeah i have the time being called in a # from 1-24, = var = hour
idk if u can write if statments with a range of numbers . ex. if (hour > "range of time/#'s") ....
or have a shape in the backround and have it change as the time changes??
I have a problem with the resizing of the background. This is the code i use
bg_mc._x = 0;
bg_mc._y = 0;
bg_mc._width = Stage.width;
bg_mc._height = Stage.height;
How I can make this background to resize in full screen?
I just want to change the background color of my movie.Is there a way to do this with Actionscript, or should I just create a 'fill' the size of the stage, and do it that way?
View 1 RepliesI'm building a site that will change the background depending time of day. I do want to show the time in the top of my page. What are good codes for showing a time and date in Flash and what would I use to change background depending on if the time is past 7PM or before.
Example.
If the time is before 7PM I want it to show a background with a clear blue sky. If not then the background will be a starry night. I'm using CS3.
I made a movieclip that has 3 plain color thumbnails and 1 image thumbnail pop up when my "change theme" button is clicked. I can't figure out how to go about changing the background color/image when the appropriate thumbnail is clicked. I know I need to set up an addeventlistener, but I don't know where to go from there. Maybe I need to have Flash load a new CSS file for every thumbnail clicked?
View 3 RepliesI wanted to put there a background that will change (fade out and than fade in another one) according to menu position. It would load external *.swf's. For example I'm in "A" and the background is "bg01.swf", after clicking "B" the "bg01.swf" background would unload/stop (fade out) and than the "bg02.swf" would fade in and start to animate. I can't put the right script in the menu system. The source files are attached to this post (Flash CS3 source file and the backgrounds):
View 9 RepliesI've used script -[URL] to open a centralised window on the release of a button. It works brilliantly but how to change the background colour of the opened window to black. I'm no programmer so don't really have much of a grasp of Action or Java script but having looked on the web, I think what I need to do is use document.bgColour('#000000') somewhere in the script but have no idea where to put it or even if it's right!
View 1 RepliesI have just started working in flash and I am having some trouble with a Flash XML Slideshow that I had purchased from "Flash Den". My problem is that I would like to add an element in the XML file to change the background color everytime the slideshow changes to a new slide. I have downloaded the xml gallery from this forum and it works great but on my home page, I would like the same function but only without the thumbnails because my client would like the slideshow to be on the home page but without any thumbnails. She would also like the background color to change as the slideshow changes.
View 8 RepliesI'm having issues changing a TextInput background color after the initial onLoad using AS2.On load, I have no issues setting the background color with this code:
Code:
onClipEvent (load) {
this.background = true;
[code].....
I would like to have flash www page with dimentions 960x653 pixels. There will be 5 scenes navigated by buttons and each of the scene will have different background color. I would like to have fullscreen background also (filling the rest of the space), and to make it I used "Auto-Resizing and Centering Content", based on tutorial:
[URL]
To make it working with my existing animation I made 960x653 UILoader instead the centerRectangle, and I loaded my swf animation there. Fullscreen background is working - when I scale window of the viewer the main scene keeps its dimentions and background fills the rest of the space, what is what I wanted to. My included animation is working perfectly.
But I still have one issue to solve. How to change my fullscreen background while switching scenes? Is it possible to change it from included swf animation?
I am trying to change the background color of a textInput field.
I have tried:
ActionScript Code:
var textInputFormat:TextFormat = new TextFormat();
textInputFormat.color = 0xFF0000;
_textInput.setStyle("backgroundColor", textInputFormat);
However this doesn't want to work.
I have set up ma flash project to have various scenes. One of these scenes is a page whereby when a user clicks on a button he/she can change the background image on every scene in my project.On each scene i have made a layer called 'background' and drawn a black rectangle which is the default background. This has been converted to a graphic using F8.What i'd like to be able to do is when the user clicks on the button he/she can change this default background to 1 of 4 photo's i have in my library.i have tried the code:
on (release)
{
colorchange = new Color("/rectangle");
[code]......
I'm creating a photo gallery from xml with a changing background color and description which i've gotten to work fine, however, the border that goes around my image and the image itself are supposed to be centered on stage and they aren't even though i set their x and y to the center of the stage the line after
View 2 RepliesSo, 8 weeks ago I started with my GameDevelopment branch of the MediaTechnology tree at my school, and I am currently in my 1st week of the 2d Semester (or Period, as we call it here), and AS3 is introduced this time (last Period were GameMaker and XNA). There's a problem though.. I have to work with Arrays now, and last time I worked with Arrays was during PHP last year; almost half a year ago >_<"
Here's what we have to do for the 1st Assignment: Make a sort of lottery system for Christmass; Make sure names aren't drawn more than once, and that someone can't draw him/herself.
This is the code for the first assignment:
[Code]....
I'm making a game...and I want to change my background image depending on where the character is. I thought I would make a MovieClip...with all the different background images on different keyframes. My question is....can I use AttachMovie, and if so...how do I reference the particular frame that I want to...? I've never used AttachMovie before, and wasn't sure of the syntax...and how to reference it...to go to a particular frame.
View 1 RepliesI am trying to find a stand alone flash player/controller to play flash movies on my own computer (windows xp) ideally it would have the usual back stop forward controllers etc and I would if possible be able to change the veiw pane background colour.
View 1 RepliesHow do I make a button rotate or a movieclip play onRollOver without stopping or changing background movie
View 1 RepliesI am doing one completely dynamic interface which is control by an admin module. what i want to do is to control the stage size by this admin module.When i press submit in the admin module it will generate one xml file which is connected to the flash flie, and what ever the size is mention in that xml that has to reflect in that flash file. I don't want any supporting file only one swf. I don't know whether it is possible to adjust the stage size dynamically on fly.
View 3 Replies