Solved

Changing background image dynamically

Posted on 2010-09-07
3
487 Views
Last Modified: 2012-05-10
Hello All,

I have a Flex application . when ever the page is loaded i need to load the page with different background image everytime.totally there would be 6 images. everytime when user refresh the page the background image should be changed.
Using timer i hope i can manage that one but inspite of this is there any other way to make this possible.
If any solutions for this please let me know.

Thanks In Advance.
0
Comment
Question by:srujanmiryala
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
andreMariano earned 500 total points
ID: 33670853
You can't guarantee that the bg image will change, if you don't save the last one somewhere, but you can try a random function...
create an arrayCollection in your application and add to it, all the bgImage source adress (ex: "assets/bg1.png")
then, in your creationComplete method, just do a random

for a random function, check:
http://www.flex-blog.com/random-number-in-flex/
0
 

Author Comment

by:srujanmiryala
ID: 33689020
Thank you andreMariano

It worked . Thank You Very much.
0
 

Author Closing Comment

by:srujanmiryala
ID: 33689024
Thank you
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AdvancedDataGrid 4 354
enable compression/gzip on oracle XML DB HTTP Server 3 561
Flex Builder 4.5 3 407
Flash AS3 & random animation 7 853
First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
How do we balance the user experience (UX) with reasonable security measures? It can be done, if you keep these fundamentals in mind.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question