3 Replies Latest reply on Oct 20, 2013 9:57 AM by kglad

    Trying to build a better Expandable ad

    JonnyDL Level 1

      we've started to use exandable ads, using two files (swf) a small pencil, on mouseover expands a billboard below(second swf). I think the flash files were built quickly for function, not presentation. when you mouse over the top, it appears to load the swf in a lower expandable div. There is a delay so the billboard dosen't appear smoothly (it just appears).

      The other is the billboard is set to only run any animation (on a timeline) on a mouseover of the billboard.

       

      Id like to build a better expandable, and I was hoping for some suggestions guidence on a better way.

       

      Would it help if the pencil swf perloaded the billboard swf, using something like loadclip

           [there is appears some Javascript, in the flash file that I can't seem to find  (found it on a spell check) to see/learn what its doing. Could it be           telling the billboard to load into the div]

      Is there a way for the pencil swf to communicate with the billboard swf to start an animation when the pencil is mouseover (the expansion)

       

       

      Any suggestions/guidence, are appreciated

        • 1. Re: Trying to build a better Expandable ad
          kglad Adobe Community Professional & MVP

          it's pretty simple to dynamically expand a div using javascript but it's even easier using jquery. i'd recommend learning jquery and the basics of javascript.  you should also have some understanding of html and encoding.

           

          the javascript is either injected in the swf file or is contained in the embedding html file.

          1 person found this helpful
          • 2. Re: Trying to build a better Expandable ad
            JonnyDL Level 1

            I found the Javascript call it uses. Our web developers used animatedcollapse which appears to be a prebuilt.plugin that they added to that animates the div (using Jquery). I have a good unestanding of the code, and it appears the billboard swf is not preloaded, and also being placed on every mouseover.

            Since I can't get at the script, I will try and improve it using AS.

             

            I was going to use onloadint and/or onloadcomplete to try and improve it. on the int I can use the hide method (load the swf, but not open), and then on complete to use the toggle method.

            Any better way?

             

            *The filename can be dynamic. the script creates a new object  expandingAd and then uses .largeid

            to give it a name. I'd like to access this varibale to use in the get url function. I can't seem to find a way to get it? it appears to be global.

            • 3. Re: Trying to build a better Expandable ad
              kglad Adobe Community Professional & MVP

              it would probably be easiest to just fade-in or expand a mask to reveal billboard. 

               

              but i'm not sure about that plugin.  jquery already includes an animation (animate) that can animate any div property (including height).

               

              i'm not sure what variable you want to use.  the file name that's loaded can be retrieved using javascript's href.location property: window.href.location

               

              the div you want may have id = largeid (though that would be indicated by #largeid and not .largeid which would indicate an object with class = largeid).

              1 person found this helpful