JavaScript - Interactive Graphics
Similar TutorialsHi all, I was asked by a friend if I could help with a school kids website. The general website stuff I am fine with however they are looking for some interactive content. Stuff they seem interested in are e.g.quizes, like 10 questions and after you finish you see how many you got right and the correct answers perhaps. Are there Javascripts available that will do this? Any ideas on recommendations or any other scripts/content that could be good on a kids site is of interest. Thanks Hi everyone, I'm pretty new to JS and I was wondering if anyone could put me on the right track to developing a slideshow which you can flip between the images manually or let it run through itself (and preferably contain links to other pages). Basically, like the one at the top of the Valve website: http://www.valvesoftware.com/index.html Thanks all Can anyone suggest a non-Flash USA map that allows for popup? I've only found one online.
Hi there, for a site I'm working on I needed an interactive crossfading slideshow (one that doesn't just run automatically, but with 'previous' and 'next' links) and noticed that all the solutions I stumbled upon fall into one of two categories: 1.) the ones that in some way or other break if the user clicks too fast through the images (i.e. fast enough that the previous crossfade is not completely finished when triggering the next one) 2.) the ones that block any user interactions until the last crossfade is finished Obviously neither is very useful, so I wrote my own. I'm just wondering now, does anyone of you know of any good reusable crossfading slideshow that not only works as it should, but does so without blocking user interaction while fading? As a user, I don't have the patience for those time wasters any more. If there's nothing good out there, I'm tempted to make it a jQuery plugin, but I wouldn't much like to find out later that there has been a perfectly good plugin out there all along. So, if you know of one or have any other helpful suggestions, please tell me. I need to create an interactive map similar to the one on this site: http://viewers-guide.hbo.com/game-of-thrones/#!/map/ It is a map of a fictional area ( a real area but there are fictional buildings and characters on it) so I don't think google maps plugins are suitable. I don't want to reinvent the wheel, so if anybody has a good suggestion of a good jquery/javascript solution for interactive maps, please refer me to the relevant information. In other words, I need a map where by clicking the objects on the map, a popup window pops up with additional information about the 'scene' or a 'character'. In addition, the map will be dark from the beginning and more and more sites and characters will be revealed on it every week. Thanks for any tips! I would appreciate if anyone could guide my point by point on how one could create a category picker just like gumtree (preferably in jquery): http://www.gumtree.com/add_posting.html?location_id=uk Specifically the points How clicking on a category opens another to the right How clicking on a category appends a variable like "#cat-10201" into the url (and vice versa) How css lists are used instead of form select menus (making it easily styled) How clicking on a deep subcategory automatically preselects all parent categories I'm not looking for anyone to actually code it for me (that would be outrageous ) but tips on how it's actually structured and steps on how it can be coded would be highly appreciated. I can do PHP and I know CSS also. I don't know plain javascript but I'm sure I can do most of it in jQuery hey guys i have graphic on the right side of the screen that is not in view and i am scrolling it to the left. Is there away to remove the bottom scrollbar permanently through using a mask or something. if i have an item scrolling from the left the scroll bar does not show, but on the right it does. an help be appreciated. Folks, I have been in IT for many years, but completely new to javascripting and ajax etc. I develop web sites and the php, html coding etc is no issue, its just that I have never needed to do any javascript coding and therefore have not used it at all. Picking it up should present little problem, but as of this moment, I am a complete tyro, and I need to get moving on this requirement ASAP. I have a requirement which I haver never before needed to address. I would be grateful for some pointers to resources (I have searched and searched..... ) which I could use to develop the functionality I need. After that rambling intro, here is the actual issue..... I need to have a variety of areas on a single picture on the website, each of which if clicked on, will go to a different article. Rather than try to explain, here is a link which does a similar thing, although this one is in Flash (which I also don't know): http://www.comcare.gov.au/virtual_wo...fice/reception I need to do pretty much the same thing, though with a different picture and words of course. The website will be a Joomla based site. I hope I have gived enough information, and indeed, hope that I have posted to the right area! Any assistance or thoughts at all would be greatly appreciated. regards to all, Mike I am looking to create a Stylesheet for YouTube, to make it look nicer and customise it completely I wanted to change the logo, but its a graphic. I was wondering if it would be possible to do this by linking to one hosted on Flickr? Or is there another trick? As it is, I'm using Walter Zorn's JS Graphics Library in an attempt to write a small screensaver-type-thing for jailbroken iPhones/iPod touches. However, on my mom's AMD Athlon 64 3000+, the drawing gets pretty laggy, so you can imagine how utterly choppy it is on my iPod. The look I'm going for is the Windows XP Mystify screen saver, with corners bouncing around the screen. So, my first question is this: are there any alternatives for this sort of thing, short of manually generating a video, gif, or multiple images to switch through, or is there any way to make my code more efficient for the CPU? (Code below) NOTE: I know I could make it look a lot nicer by making a 'corner' class, and having each corner be an object (and even nicer by using an array of 'corners'). But I'm not sure that would help the CPU's calculations much, and make the code more efficient as a whole. Code: <div id="Mystify"> <script type="text/javascript"> var mystifyCanvas = new jsGraphics("Mystify"); var tetraCorner1x = Math.floor(Math.random()*300) + 5; var tetraCorner1y = Math.floor(Math.random()*460) + 5; var tetraCorner2x = Math.floor(Math.random()*300) + 5; var tetraCorner2y = Math.floor(Math.random()*460) + 5; var tetraCorner3x = Math.floor(Math.random()*300) + 5; var tetraCorner3y = Math.floor(Math.random()*460) + 5; var tetraCorner4x = Math.floor(Math.random()*300) + 5; var tetraCorner4y = Math.floor(Math.random()*460) + 5; go1x = true; go1y = false; go2x = true; go2y = true; go3x = false; go3y = true; go4x = false; go4y = false; function MystifyJavaScript() { mystifyCanvas.clear(); mystifyCanvas.setColor("#ff0000"); mystifyCanvas.setStroke(2); if (go1x) { tetraCorner1x++; if (tetraCorner1x > 315) { go1x = false } } else { tetraCorner1x--; if (tetraCorner1x < 5) { go1x = true } } if (go1y) { tetraCorner1y++; if (tetraCorner1y > 475) { go1y = false } } else { tetraCorner1y--; if (tetraCorner1y < 5) { go1y = true } } if (go2x) { tetraCorner2x++; if (tetraCorner2x > 315) { go2x = false } } else { tetraCorner2x--; if (tetraCorner2x < 5) { go2x = true } } if (go2y) { tetraCorner2y++; if (tetraCorner2y > 475) { go2y = false } } else { tetraCorner2y--; if (tetraCorner2y < 5) { go2y = true } } if (go3x) { tetraCorner3x++; if (tetraCorner3x > 315) { go3x = false } } else { tetraCorner3x--; if (tetraCorner3x < 5) { go3x = true } } if (go3y) { tetraCorner3y++; if (tetraCorner3y > 475) { go3y = false } } else { tetraCorner3y--; if (tetraCorner3y < 5) { go3y = true } } if (go4x) { tetraCorner4x++; if (tetraCorner4x > 315) { go4x = false } } else { tetraCorner4x--; if (tetraCorner4x < 5) { go4x = true } } if (go4y) { tetraCorner4y++; if (tetraCorner4y > 475) { go4y = false } } else { tetraCorner4y--; if (tetraCorner4y < 5) { go4y = true } } mystifyCanvas.drawLine(tetraCorner1x, tetraCorner1y, tetraCorner2x, tetraCorner2y); mystifyCanvas.drawLine(tetraCorner2x, tetraCorner2y, tetraCorner3x, tetraCorner3y); mystifyCanvas.drawLine(tetraCorner3x, tetraCorner3y, tetraCorner4x, tetraCorner4y); mystifyCanvas.drawLine(tetraCorner4x, tetraCorner4y, tetraCorner1x, tetraCorner1y); mystifyCanvas.paint(); window.setTimeout("MystifyJavaScript()", 10); } MystifyJavaScript(); </script> </div> Please keep in mind, there's a LOT of repeat code, so you only have to read any one part once. To test/see/use the code, you'll need to download wz_graphics.zip. Then download the attached txt file to the same directory as the unzipped wz_graphics, change it to .html instead of .txt, and open it. http://vietnamthereandback.com/mainpage.html The arrows next to the songs previews are randomly appearing/disappearing on page refresh. There are always 8 arrows, but each refresh shows the arrows in different places. This has really got me stumped. If anyone has any thoughts, I'd really appreciate hearing them. The basic button/arrow code is below. The only thing that changes in the MP3 file name. <code> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="30" height="30"> <PARAM NAME=movie VALUE="http://www.vietnamthereandback.com/Clips/audioplay.swf?file=http://www.vietnamthereandback.com/Clips/reflections.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.vietnamthereandback.com/Clips/buttons/negative_small&bgcolor=0xffffff&mode=playpause"> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent> <embed src="http://www.vietnamthereandback.com/Clips/audioplay.swf?file=http://www.vietnamthereandback.com/Clips/reflections.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.vietnamthereandback.com/Clips/buttons/negative_small&bgcolor=0xffffff&mode=playpause" quality=high wmode=transparent width="30" height="30" align="" TYPE="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object> </code> |