1 Reply Latest reply on Dec 13, 2012 5:37 AM by kennethkawamoto2

    How to replace a jpg onClick and load a swf file?


      I'm working on my portfolio web site. I have 3 banner ads (300 x 250) that I would like to load and play when clicked.


      I'm using DW CS5.5 on a Mac OS 10.6.8.  I've designed a page with jpegs of key frames of the banner ads. I've added rollover behaviors, and would like  to load and play the swfs when the jpegs are clicked.


      I tried creating a duplicate page of my static design for each of the three swf files, and embedding each swf in place of it's jpeg, then linking from the static page to the corresponding new page. When a jpeg is clicked on the static page, the the page header disappears for a brief second and causes a quick white flash then the page reappears and the swf happily starts playing.  I assume this is a brief delay in loading the new page as the browser finds and loads the swf file, but it's not a pleasant sight to behold.


      If the separate page idea is a good solution, is there a way to preload the swf files on the static page so they are in the cache and ready to play when the static jpegs are clicked? Or is it possible to use a frame or some type of object and swap out the static jpeg with the swf file "onClick" on the static page?


      Note that I've spend a couple of hours looking online for a way to solve this. There were suggestions for other people with a similar situation to add a static jpeg and a button to the swf in Flash. I have the .fla files. Do I just add a frame to the beginning?


      Note also that the existing swf files start to play immediately when the page has loaded, and unclicking the autoplay button in the DW properties panel on the page that embeds the swfs doesn't work to turn them off.


      My web skills are in the development phase -- I know the basics of DW, html, css and Flash, and not much about javascript. I'd appreciate any assistance.