Public Voice Network
- the gif animation thread 1282812828
- Letterpress process video
- paper trail 88
- ATTN: Greedy Republicans 88
- Pic of the Day 6329663296
- New York 11
- Facebook IPO 156156
- Vid of the Day 1203212032
- Diablo III 8383
- Coda 2 3434
- Chick of the Day 1537615376
- Euro Crisis 66
- In Dallas for a month 1212
- Show your latest Pics 32933293
- shopped? 66
- Oh Amazon. 22
- blog 5626456264
- pdf portfolio 99
- I can see it in the pixel… 1919
- TransFatty @Brooklyn Bowl 1717
- wot dis font? 11
- News of the day... 135135
- What is THEIR work? 33
- EC: From Love to Bingo 1515
JS Style Switcher for BG Images 77 Responses
Last post: 2 years, 3 months 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


