PDA

View Full Version : Pop-Up Animation Windows[Javascript][Coding]



Fretspider
09-02-2006, 04:39 AM
This code is javascript. It is a basic code which displays a flash movie in a pop up box.


<a href="javascript:window.open('blahblah.swf','_blank','to olbar=0,location=0,directories=0,status=1,menubar= 0,scrol
lbars=0,resizable=0, width=550, height=400'); void('');"><img src="url.jpg" alt="alternatetext" style="border:1px solid #333333;"><BR />Title of anim<BR />Title of author</a>

I will now explain the code.



<a href="javascript:window.open('blahblah.swf','_blank','to olbar=0,location=0,directories=0,status=1,menubar= 0,scrol
lbars=0,resizable=0, width=550, height=400'); void('');">

This part of the code is basically setting up the window, as you can see by the 'javascript.window.open' How do I make it open MY animation, you say?


('blahblah.swf','

In the code, replace that with the URL of your animation. That will make it so that when clicked, it will open the animation at that URL in a small window, like you see on many good animation websites. Now I will move on.


<img src="url.jpg" alt="alternatetext" style="border:1px solid #333333;"><BR />Title of anim<BR />Title of author</a>

This is the screenshot. It will show a small screenshot of your animation (which you must have already, it wont automatically make one for you) and show it next to the title of your movie.


src="url.jpg"

Replace that, with the URL of your little screenshot. Now, on to how to show the title and author of your movie.


Title of anim<BR />Title of author

Replace 'Title of anim' with the title of your animation, and 'Title of author' with the movies author. Just for those who arent completely sure still, I have set up a little list of things you can change to suit your movie.


('blahblah.swf', < Change that to the URL of your movie.


width=550, height=400' < The dimensions of your movie.


img src="url.jpg" The URL of your movies screencap.


alt="alternatetext" < Change 'alternatetext' to the text you want the viewers to see if they cant see the screencap.


<BR />Title of anim<BR />Title of author</a> < Changes the title of the animation, the author of the animation.


#333333 Change to the colour of the text you want.


Thats my tutorial. I hope you like it. If there are any problems you can see, please let me know. Thanks.

Lgolos
09-13-2006, 05:53 PM
That's actually pretty cool. Good tut, very explanatory.

It could be used for evil, though.

LN3uq
09-13-2006, 06:23 PM
Neat code, thanks for sharing! =D

Lgolos
09-20-2006, 09:28 PM
It saddens me that this gets 2 posts when shit gets 10 pages.

Fretspider
09-22-2006, 04:12 AM
Neat code, thanks for sharing! =D


That's actually pretty cool. Good tut, very explanatory.

It could be used for evil, though.

Heh, thanks guys =) Someone finally posted some feedback.

It works with images too, so it will work for .gif and artwork.

Once again, thanks for comments.

=D