Solved

Changing background image dynamically

Posted on 2010-09-07
3
486 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
calling one function after another 4 307
[Q] XML to Object/Dictionary class available? 3 704
Button sound on mouseover 4 470
Display PHP content using Adobe AIR 9 464
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…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

914 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now