Public Voice Network
- Shit QBNers Say 120120
- Steve Jobs FBI file 66
- Shit QBNers think 6969
- Your Last Concert 374374
- What are you listening to… 41734173
- Park Slope 22
- The Elder Scrolls V: Skyr… 7676
- Pic of the Day 5937159371
- Vid of the Day 1096010960
- ♥ Things girls like ♥ 9696
- AE shadows won't work 99
- Suggest a good movie... 935935
- Politics 1759717597
- Chick of the Day 1431414314
- Skateboarding. 598598
- intern -> job 2020
- TYPO San Francisco 44
- Shit Photographers Say 44
- Trailer Of The Day 388388
- Skillz of the day 2121
- Smart Phone #2 88
- Show some recent work 47664766
- QBN+ Challenge 26 4343
- the gif animation thread 1132111321
JS Style Switcher for BG Images 77 Responses
Last post: 2 years ago | Thread started: Jan 28, 10, 9:15 p.m.
- acescence
this should get you started..
http://culturekiller.com/qbeans/…

- Dog-earJan 28, 10, 9:55 p.m. – Permalink
- noiseisthis
var bgList = ["http://src.to.bg.com.jpg", "http://src.to.bg2.com.jpg",...]
$(document).ready(function(){
$("body").css("background", bgList[i]);
$("#button").click(function(){
i++
if(i>bgList.length) i=0;
$("body").css("background", bgList[i]);
});
}you need to dl jquery to do this ^^^^


- Dog-earJan 29, 10, 12:04 a.m. – Permalink
- BusterBoy
Thanks for everyone's help on this. The code that is working is below - it triggers on mouseover:
<script type="text/javascript">
$(window).load(function(){
$("#linky").mouseover(function...
$('body').css("background-image... bg-pink.gif )");
return false;
});
});Then the HTML trigger:
a href="#" id="linky">clicky</aJust wondering how I could accomlish the trigger from within flash?


- Dog-earFeb 3, 10, 7:35 p.m. – Permalink
- noiseisthis
flash:
import flash.external.ExternalInterface...
import flash.events.MouseEvent;trigger_mc.addEventListener(Mous... onTrigger);
function onTrigger(event:MouseEvent):void {
// the method that you want to call in javascript goes in the quotes
ExternalInterface.call("trigger...
}--------------------------------
javascript:
<script type="text/javascript">
$(window).load(function(){
$("#linky").mouseover(
trigger();
});
});function trigger() {
$('body').css("background-image... bg-pink.gif )");
return false;
}
</script>

- Dog-earFeb 3, 10, 8:42 p.m. – Permalink
- noiseisthis
use this instead http://pastebin.com/m716b9290

- Dog-earFeb 3, 10, 8:48 p.m. – Permalink


