Solved

Changing background image dynamically

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
flex - list item renderer 7 669
Adobe license 6 260
Adobe X Reader 6 334
Indesign Data Merge 1 165
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 company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

759 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

21 Experts available now in Live!

Get 1:1 Help Now