Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

84 users online



Flash to HTML (Switching out Table backgrounds)

Flash to HTML (Switching out Table backgrounds)

Currently viewing this thread: 1 (0 members and 1 guests)


helcon

helcon

Neverside Newbie
Status: Offline!

Flash to HTML (Switching out Table backgrounds)

I am trying to build a flash controller which changes out a background located inside a table inside of my html document.

Currently I have the Flash trying change the background to my html file through javascript.

In javascript, I am using document.write(' ' +args ' ') and having it controlled by a function inside of flash to keep switching out the background(text). . . I am having Flash pass this data out, and I can call it from an alert, but I am not able to write out that information using the document.write command (like above).

I think document.write is called only once on the page load. I need it to be called anytime I hit the next button inside of flash.

Does anyone know of a way to cycle out the background image of my table using flash as the controller (javascript or other language)?

Thank you for your time.

--J

nykoelle

nykoelle

Crazy Pants
Status: Offline!

I'm confused as to what you're trying to do. Is your page in flash or html? If it's primarily in HTML, that can be achieved very easily with php. If the table and background is flash, then you can pass variables through php to the swf i believe ( believe, I've never done it before, but I think I've read it being done on kirupa )

___________________

:: pop ::

TheClincher

TheClincher

Lost in Berkeley, CA
Status: Offline!

I think he wants to make a flash movie that has some options/buttons that execute javascript functions to change the html page's background.

___________________

There is no theory of evolution. Just a list of creatures Chuck Norris has allowed to live.

Agatio

Agatio

Neversidian
Status: Offline!

- Give the table an ID
- Make as many css as you want, each giving that table a different background
- Make a CSS switcher.

helcon

helcon

Neverside Newbie
Status: Offline!

I want to build a very robust image viewer which is controlled by flash and can dynamically load in a image and switch em out, as well as switch out the background. part one is done, that was easy, getting the background to switch out is proving the problem.

I have uploaded a zip file to my server to help you get a better idea. It includes the .FLA's, SWFs and html files. Any help you can provide on this is much appreciated.

http://www.jonbojangles.com/downloads/background-switcher.zip

Once this beast gets moving I will post the end result for people to download. Its pretty cool, it reads an xml file for the content and then flash controls all the images to be displayed.

Thanks

--J

devonair

devonair

Neverside Newbie
Status: Offline!

Wow.. nice to see this joint back up and running..

Anyway, helcon, have you considered making the app 100% Flash? it would probably be easier to load in new backgrounds rather than try to communicate between your Flash and html..

d.

___________________

obod | weapons of mass dysfunction

helcon

helcon

Neverside Newbie
Status: Offline!

I would like to build it all in flash, but this particular project requires me to change out a table background as well as as a image with flash as the controller.

I have got it coded to where I can change the background controlled by flash using the geturl function, but I can only get it to change the background based off of a static string. I need it to read in a variable instead.

Here is what I have
getURL("javascript:setIdProperty('news_background', 'backgroundImage', 'bg1.jpg');");
===This works but it changes the property to bg1.jpg. I need it to change it to a variable in my flash file called BG

Here is what I tried, but it didnt work.
var bg
bg = _root.myXML.childNodes[0].childNodes[i].attributes.file_src

arrowForwardOnRelease = function () {
getURL("javascript:setIdProperty('news_background', 'backgroundImage', +bg);");

Bg does equal the appropriate value and that is not the problem, the only problem is passing that variable through the geturl function.

Any help with this is much appreciated.

Thank you

--Jon

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0078 seconds.