Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 21, 2012, 03:37:08 AM
Home
Forum
Documentation
Search
Help
Login
Register
Gaia Framework for Adobe Flash
>
Forum
>
Support
>
Gaia AS3 Support
(Moderators:
Nemo
,
Ramiro
) >
Easiest way to change background images from index
Pages: [
1
]
« previous
next »
Print
Author
Topic: Easiest way to change background images from index (Read 291 times)
wrkwrk
Gaia Novice
Posts: 6
Easiest way to change background images from index
«
on:
August 18, 2011, 04:27:29 AM »
I want to change background on 3 pages i have "home, info, contact"
I know how to do this in pages themself, but as soon as using scrollbar and liqiuid layout there is a conflict.
So if i could keep all 3 background images in index it should work.
Any help on this please?
Logged
Nemo
Moderator
Gaia Addict
Posts: 594
Freelancer for hire
Re: Easiest way to change background images from index
«
Reply #1 on:
August 18, 2011, 11:10:41 AM »
let assume that you images are loaded as assets
img1, img2, img3
Now you need to add listener to index ( for example afterGoto), check current branch, and depend on branch show image.
Logged
!
wrkwrk
Gaia Novice
Posts: 6
Re: Easiest way to change background images from index
«
Reply #2 on:
August 19, 2011, 06:41:40 AM »
Thanks for the reply but for a rookie your explanation is a bit too loose.
Anyhow i solved it mostly by reading through some comments on
http://totallynerdy.com
Ive attached my indexpage.as for anyone who needs it, might not be the most elegant way to do this but it works
Logged
dmschenk
Gaia Novice
Posts: 4
Re: Easiest way to change background images from index
«
Reply #3 on:
August 19, 2011, 08:40:32 AM »
I'm not seeing it. the code I originally wrote switched the backgrounds but it couldn't scale properly if the browser was re-sized.
When I look through your code on index.as I don't see where you are switching to the alternate variables? Did you make a change somewhere else that affects the index.as page?
lsb, areab, lsc & areac are not called anywhere so I'm guessing that they are not being used at all.
Logged
dmschenk
Gaia Novice
Posts: 4
Re: Easiest way to change background images from index
«
Reply #4 on:
August 19, 2011, 09:07:22 AM »
Well.... I'm not seeing what's happening but it is working!
Logged
wrkwrk
Gaia Novice
Posts: 6
Re: Easiest way to change background images from index
«
Reply #5 on:
August 23, 2011, 06:50:06 AM »
lsb, areab, lsc & areac is only for liqiud stage so they dont have the same name like if you had:
var ls:LiquidStage = new LiquidStage(this.stage, 900, 700, 900, 700);
var area:LiquidArea = new LiquidArea(this, 0, 0, 900, 725);
area.attach(bg1, {scaleMode:ScaleMode.PROPORTIONAL_OUTSIDE});
ls.update();
var ls:LiquidStage = new LiquidStage(this.stage, 900, 700, 900, 700);
var area:LiquidArea = new LiquidArea(this, 0, 0, 900, 725);
area.attach(bg2, {scaleMode:ScaleMode.PROPORTIONAL_OUTSIDE});
ls.update();
it wouldnt work, so everytime you add a new liqiudstage in index you need to change the "ls" and "area" to something else
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Downloads and Information
-----------------------------
=> * Download Gaia *
=> Lessons, Examples, Tips+Tricks, Mods and Utilities
=> Gallery
-----------------------------
Support
-----------------------------
=> General Gaia Support
=> Gaia AS3 Support
=> Gaia AS2 Support
=> Feature Requests
=> Non-Gaia Questions
-----------------------------
International Support
-----------------------------
=> Deutsche
=> Español
=> Français
=> Italiano
=> Português
=> 日本語
TinyPortal v1.0 beta 4 ©
Bloc
Loading...