View Full Version : Sliding flash ad over html content
rhamej
12-09-2006, 01:37 AM
You know those annoying flash ads that you see sliding over the html content with the close button? Well, I was asked to make one. Personally I hate em, :sigh: but I have seen threads on here asking how to do it, so I thought I post up a quick example. It uses the swfObject. Tested in IE6, IE7, FF 1.5+, Opera9.0 and NetScape. Nothing really ground breaking but thought someone might be interested =)
Preview here <-- (http://2210media.com/uploads/slide_ad.html)
Source attached.
phorte
12-09-2006, 03:43 AM
neato. Yeah hate those type of ads too, but it could for a thumbnail gallery, having the full size pic popup in that.
gonzolo
12-09-2006, 02:19 PM
those are evil i hope they die a horrible horrible death!
allthough i will use it ;)
rhamej
12-09-2006, 03:38 PM
neato. Yeah hate those type of ads too, but it could for a thumbnail gallery, having the full size pic popup in that.
That kinda a cool idea! =) hmmmm, gears are starting to turn in my head now :P
darkmotion
12-09-2006, 10:01 PM
Good god that is horrendous and annoying. GREAT WORK :D
rhamej
12-10-2006, 02:43 AM
:lol:
hybrid101
12-10-2006, 08:38 AM
:lol:that's awesome, yet so horrible! i can't believe you were forced to make that
good job:thumb:
rhamej
12-10-2006, 02:34 PM
:lol:that's awesome, yet so horrible! i can't believe you were forced to make that
good job:thumb:
Omg, I hope yall don't think that was what I made for the client? :lol: Thats just a very basic sample to show how it works. The one I made for the client I can't show due to contract reasons and so on =)
somnamblst
12-11-2006, 11:07 AM
Can you make it "retreat/disappear" into a fixed ad on the same page the way Pointroll ads do?
rhamej
12-11-2006, 01:44 PM
What I did was the exact same thing they are doing. They just have some extra javascript to resize the divs when the add shrinks.
Check out http://www.mustardlab.com/developer/flash/objectresize/
Esseti
12-12-2006, 08:19 AM
Im having problems under Opera. When I click it the hand cursor stays, and I have to move it far away from the browser, or change pages for the hand to dissapear.
rhamej
12-12-2006, 03:15 PM
Thats opera for ya.
somnamblst
03-07-2007, 10:39 PM
What I did was the exact same thing they are doing. They just have some extra javascript to resize the divs when the add shrinks.
Check out http://www.mustardlab.com/developer/flash/objectresize/
Thanks, I am going to get into that link in depth tomorrow.
How would you go about giving the user the option of replaying after close? Say they had 2nd thoughts after they closed the sliding div?
Jasninder
03-08-2007, 01:57 AM
i am using opera...no problem for me
somnamblst
03-10-2007, 10:27 PM
Nothing I have changed has changed the direction or position.
rhamej
03-10-2007, 11:56 PM
Nothing I have changed has changed the direction or position.
And you changed what?
somnamblst
03-11-2007, 11:58 AM
Nevermind I got it
Stage.scaleMode = "noScale";
Stage.align = "LT";
slideOut._x = 10;
slideOut._y = -slideOut._height;
function slideIt() {
this.onEnterFrame = function() {
slideOut._y += (10-slideOut._y)/5;
if (slideOut._y>9.5) {
delete this.onEnterFrame;
trace('slid');
}
};
}
slideIt();
slideOut.close_btn.onRelease = function() {
getURL('javascript:hideDiv();');
};
Say you wanted to have the sliding ad be a part of a "leave behind" visual component. How would you go about giving the user the option to replay the slide?
Like this?
<a href="#" onclick="slideOut('flashcontent'); return false;" >Replay</a>
vinayvasu
03-15-2007, 03:51 AM
Thanks! I have been searching for this...:cool:
What I did was the exact same thing they are doing. They just have some extra javascript to resize the divs when the add shrinks.
Check out http://www.mustardlab.com/developer/flash/objectresize/
thanks.. for link.
I had need this method.
tornado
10-03-2007, 04:37 AM
People! this is the Greatest Forum on the GLOOOOOOOOBE :beam:
Thank you for this sweet post ;)
Ianrc2000
10-16-2007, 04:35 PM
You know those annoying flash ads
Preview here <-- (http://2210media.com/uploads/slide_ad.html)
Source attached.
Many thanks for your script it works great for me.
Ian:s:
thats all folks
10-16-2007, 04:40 PM
rhamej,
Thank you sooooooooooooo much!
atodd66
10-17-2007, 12:19 PM
rhamej,
How could I use this for an "expanding" button? I want to create a menu with 6 to 8 buttons that expand or stretch when you roll over them. I want the buttons to be able to expand over the html. The space I have to work with is 640X150 but the buttons need to expand past that. The problem I have now is that the flash covers the html around it. I just set the swf to wmode transparent and am using layers in html. Visually it's great but there are some html buttons right above the menu that you can't even click on. Any help would be great! Thanks!
Andrew
atodd66
10-23-2007, 02:43 PM
rhamej,
Ok forget the expanding button. Could this ad be modified to expand instead of slide when you rollover that could have buttons inside it? You would always see the ad, it would just be smaller until you rolled over it. Please help if you can!:worried:
syragon
01-06-2008, 09:14 PM
great post... and for those who use opera... all i have to say is you are "speshul"
nubreed
09-18-2008, 06:47 AM
nice tut thanks
alex298
10-23-2008, 07:39 AM
Hello,
Excellent example!
This would be wonderful if somebody can use AS3 to do the same effect, or use AS3 to re-write the codes.
Best regards
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.