Solved

Changing background image dynamically

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
enable compression/gzip on oracle XML DB HTTP Server 3 568
Is this doable in Flex/AIR - pointers? 5 276
displaying tif image on flex side 1 308
Adobe Experience Manager 4 201
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…
Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 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