ActionScript 2.0 :: Change Body Background From Within Flash
Jan 15, 2003is there a script that alows you to change the backgroundimage you use in your html from within flash?
View 14 Repliesis there a script that alows you to change the backgroundimage you use in your html from within flash?
View 14 RepliesI have a main character in my Box2d game that has a b2PolygonShape collision. When the player crouches I am changing the body to a smaller b2PolygonShape. The logic works fine, but when I change the size (height) of the collision the character starts to fall.
Is it possible to create the new body with an offset (localPosition?) so the position of the body stays the same? This way I can play the crouch animation and change the collision without worrying that the position will change and make my sprite go bananas.
what i'm trying to do is to change the color of the body of my fish.png to a colorpicker selectedColor.but then i'm encountering problem with the floodfill method...Whenever I pick a color, it would change the body to transparent.and there seems to be little information, hence my posting here.. fishfishfish is the linkage of fish.png in library.
import fl.controls.ColorPicker;
import fl.events.ColorPickerEvent;
import flash.events.*;[code]......
im new to flex, so naturally I would just create a dynamic sprite using the drawing api and put it behind the text... but my app is really buggy using the rawChildren to addChild.So is there a better way to have a bg for a piece of text though actionscript? like modifying an existing component?
View 1 RepliesI am attempting to change the background of a pre-developed slide show a client sent over. In the attachment the original background is gray (called "back"). I want to change it to the background called "bluebg". It works (somewhat) when I import it to the same layer that the gray background is on and convert it to a movie clip, but it covers up the navigational buttons on the top right side of the movie. It appears that these pieces are a part of the background and not on their own layer, but they are clearly flash elements required to make the show work properly, so I am unable to replace the background with the blue and keep those navigational items. Can someone take a look and tell me what I could be doing wrong? Or better yet what I can do to achieve the feat of apply the new blue background?
View 2 RepliesI am using pure AS3 to build my project. I was wondering if there are anyways to change the stage background color through AS3...
View 5 RepliesA standard Flash CS5 document with one layer called background. The document is associated with a class called 'Game' which extends MovieClip.
I am executing some logic in the 'Game' class after calling an 'Initialize' method.
I want to change the background color of the document at runtime to something else (e.g., a different color, a gradient, or a picture).
Is it possible to change the stage's background through actionscript?
View 4 RepliesI have a flash file that I'm trying to change backgrounds for each page. The background itself changes nicely but I'm having a problem getting the background to scale to the stage size. I'm using Greensock's Liquid Area to try and handle it and it does well with a single background but as soon as I introduced more my code choked..
package com.picturesite.pages {
import com.gaiaframework.api.*;
import com.gaiaframework.debug.*;
import com.gaiaframework.events.*;
import com.gaiaframework.templates.AbstractPage;
[Code] .....
I have a TabNavigator with custom skins on the buttons and inside the content. I want to put an image behind the individual Tabs. One long bar of about 20px high that runs the width of the control. The buttons and the navigator content are both spark components while the actual tab navigator control group is of type mx. The only property I can change is the background color. Is there a way I can just tell the background to position itself as top="-10" or something similar or do I need to go the CSS route?
View 1 RepliesThis may sound stupid, but does anyone know if is possible to change the background of an html page in which the flash movie resides via a script in the movie?
View 3 Replieshow do make it so no matter how big my stage is, my background will tile on the stage AND off the stage forever and ever and ever and ever?
View 3 RepliesI used a theme to change the colors of my code and background, but all the other panels are still white on background. I would like to set a dark background on all my panels/windows, is that possible?
View 1 RepliesTrying to code my graphic design portfolio and wish to to have embedded flash movie with thumbnails, change the html background to the specific clicked image.
Have been searching and read there is a way to have the flash button talk to javascript to change the current background image.
it's possible to dynamically change the background of the holding HTML page from Flash?I thought it would be possible through making a Javascript call from Flash?
View 1 Repliesthere is a way to change movie bacground color with action script in flash MX.
View 5 RepliesIm using this code to change the HTML background color from Flash:
In Flash:
Code:
on (release) {
getURL ("javascript:changeBgColor('#ff00ff')");
}
[Code].....
It does work when i publish flash till Flash Player 7- for 8 or 9 it does not work. What else i can do to make it work for Flash Player 9..
how to change the background colour of a flash slide-show. I am trying to post a slide-show on a website, but some of the pictures do not fit the box well and, as a result, there are black bars surround them. Is there a way that I can change the background colour so that it blends with the background colour of the website?
View 1 RepliesI'm trying to change the background color of a TextArea Component.Does anyone know how to do this?
function processXML(e:Event):void { var strTextBox:String; myText.visible=true; myText.setStyle("contentBackgroundColor", 0x000000); //Does not work..nor does myText.setStyle("backgroundColor",0x000000); myXML = new XML(e.target.data); strTextBox = "<a href='" + myXML.Branch[0].linkURL + "'> More Info...</a>"; myText.htmlText=strTextBox;}
I'm looking for a very specific tutorial, Basically I want to create a flash 'rollover, image background change type thing' which I will display photos on. A very good example of what I mean can be found here:[URL]. You will see 6 small thumbnails which, when you mouse over them, change the background image to match. My design, I want to be a lot simpler. If you look at the following image you should see what I'm after: [URL]. 5 small thumbnails on the left, when you hover over them, they animate and the big 'red' rectangle changes to display the image.
View 0 RepliesThere are a few posts around this topic but not on exactly what I'm trying to do. At various points in my flash app I want to try to affect a change in the containing html. basically I want to be able to change the background colour of a div. I understand i will probably have to use external interface to call a javascript function, but I'm strugging to get the js right, I'm imagining something like this[code]...
View 2 RepliesI've seen a tutorial for changing the background inside of flash based on buttons to click. However, these colors were palettes and not of backgrounds such as jpeg. What I'd like to do is to create 3 buttons and place them on my flash website. These three buttons allow the user to click on them thus changing the background. So if you're visiting the about page and click one of these buttons, I don't want the user to go back to the home page after clicking.
View 1 RepliesI am colorblind.I need to change either the color of the background or the color of the text on the layers section on the Timeline.I simply cannot read/see what is currently showing.It is a very light blue background with white text and white dots for seeing, locking, or setting the outline color.I need to either change the text color and dots to black so I can see them, or try to change the background color to a dark blue so I can read the white text.Changing the text color would really be my preference. Adobe hasn't been very concerned about colorblindness when developing these products. I can barely make out all the light grey/grey/dark grey/grey stuff.
View 7 RepliesI have a Box2D world with a mixture of static and dynamic bodies. On collisions, I can only get the positions of the dynamic ones.
Is it possible to get the positions of static objects?
N.b., this is a development of a previous question, Box2D: How to get the position of a sensor?
I've got a fun problem for ya'll. I've got an XML flash menu with sub menus and all. When you click and menu item with a sub menu, the menu expands nicely. When you click to navigate to a new page the menu "closes" to its basic appearance...
What I'm trying to do is have the menu expanded at the appropriate point automatically if you're on a sub menu page. I've been thinking how to do this and I'm guessing CSS would be the key. Could the flash menu detect a BODY ID and expand appropriately should it detect the right body id.Check out the ZIP file for source files HTML/CSS/FLASH/XML.
This clients site has a flash menu, but the content of the page is in html. I know how to write the actionscript so that each menu button links to a different html page. However, I would also like the flash menu to show each page buttons link as "Active" when its on that certain page.For example, I'm on the home page. The "home" link in the flash menu is hilited. I click "products", and the products.html loads. I'm not sure how to write the actionscript so that the "products" link in the flash menu is now hilited. The only way I know to do it, would be to create a different menu.swf for each page. But I'm sure there's a way to do it using only one menu.swf.
Also, I'm doing the menu.swf on a timeline in the fla. I'm not sure how to do it otherwise or if what I need can be done on a timeline.
I've got a simple YouTube API client put together, written in Flex, that uses a plain ol' URLRequest object to handle Google's "ClientLogin" authentication scheme. Everything works perfectly, except for one case: when Google responds with a 403 and a response body indicating that I should prompt the user for additional information (specifically, a CAPTCHA request).
The problem I'm having is that in this case, I need to be able to retrieve the body of the 403 response, as the body contains information Google expects me to use to assemble the CAPTCHA (e.g., an image URL, etc.). It looks like Flash fails to populate the URLLoader's data property when it encounters a 403 (which is where the response body would normally show up), so I can't tell the difference between a "403: Login Failed" and a "403: Login Succeeded, but We Want a CAPTCHA".
As a backup, I figured I'd have a look at as3crypto's TLSSocket code, but I haven't been able to make any of that stuff work with Google (or even one of my own SSL certs, for that matter).
Is it possible to access the body ofa 403 response with Flash (and if so, how)? And if not,Does anyone have personal experience with a suitable workaround?
I'm trying to replace some contents in a website by using the following code:[code]The problem is that I have some flash embedded on the DOM and whenever I try to do the replacement the browser crashes.Somebody should thing that a prepend or append in the right place should be a better method
to achieve this, but the elements I'm trying to locate and replace are html comments and the append prepend methods do not seem to work with this kind of nodes so they have to be treated as literal strings.
Is it possible to modify a shape within a body after assigning it, for example I have a box shape for my game hero body, and when I press the down arrow I want my hero to crouch witch means that I need the body shape to be resized.
I've already searched in google but it appears that the topic of modyfing shapes is not so popular. If it's impossible maybe you know a better way of doing this.
Is there a way that I could change the background colour using the "ColorPicker" component in flash CS5? I want to be able to change it from within the swf once it is published.
View 2 Replies