Jump to content

Help regarding Slideshow


laxmi
 Share

Recommended Posts

HI, In my project i want to do the slide show of the uploaded photos.Im saved the image links in the database and tried to pass those values to the slide show array.But it s not working properlyIm using the following javascript and jsp codings:

<%@ page import="java.sql.*,java.io.*,java.util.*,java.util.Date" %><HTML><HEAD><script LANGUAGE="JavaScript">var browserName = navigator.appName;var browserVer = parseInt(navigator.appVersion);var browserOK = (((browserName == "Netscape") && (browserVer >= 3)) ||	((browserName == "Microsoft Internet Explorer") && (browserVer >= 4)));var slideURL;var slideDelay = 2000;var curSlide = -1;var curTimeout;function showSlide1(name1) {slideURL = Array(name1);showSlide();}function showSlide() {	if (browserOK) {	curSlide = ((curSlide + 1) % slideURL.length);		document.images["slideImg"].src = slideURL[curSlide];		curTimeout = setTimeout("showSlide()", slideDelay);	} else {		alert("This page requires Netscape 3.0+ or IE 4.0+");	}}function goNext() {	if (browserOK) {		clearTimeout(curTimeout);		showSlide();	}}function goPrev() {	if (browserOK) {		clearTimeout(curTimeout);		curSlide = (((curSlide - 2) + slideURL.length) % slideURL.length);		showSlide();	}}</SCRIPT></HEAD> String name=(String)(session.getAttribute("theName")); Connection con=null; Statement st=null; String sql=null; ResultSet rs=null; try   {      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");  con=DriverManager.getConnection("jdbc:odbc:foto");st=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);  sql="select * from album_bookmark where username='"+name+"'";  rs=st.executeQuery(sql);  while(rs.next())  {  //out.println(rs.getString(2));  } }catch(Exception ert){out.println(ert.toString());}*/%><BODY ONLOAD="java script:showSlide1('rs.getString(2)');"><CENTER><IMG NAME="slideImg" SRC="" width="150" height="150"><BR><BR><INPUT TYPE="BUTTON" VALUE="<< Previous Slide" onClick="goPrev()"><INPUT TYPE="BUTTON" VALUE="Next Slide >>" onClick="goNext()"></CENTER></BODY></HTML>

Can u tell how to do this and where im did mistake?thanx in advance

Edited by Jonas
Link to comment
Share on other sites

HI lakshmi...i have two suggestions for your query, hope they would help you out.1) make a flash file with all your images embedded onit with your time out specification.if you make this the users can not download the iamges they can see and get info.2) the second one is the same to make to a powerpoint presentation and and build a PDF.create a link to open the document in a seperate window.before opening the document it prompts an alert to OPEN or to SAVE the file.if this works for your query ...i can move you the code regarding.but what i feel is as you are going to present the project ..using multimedia would be more safe and asthetic.or else the scripts and code will mess you up if any thing goes wrong.....hope this will get you out of your confusion

Link to comment
Share on other sites

here, you have an ending %> without starting it first.

</SCRIPT></HEAD> String name=(String)(session.getAttribute("theName")); Connection con=null; Statement st=null; String sql=null; ResultSet rs=null; try  {    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");  con=DriverManager.getConnection("jdbc:odbc:foto");st=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);  sql="select * from album_bookmark where username='"+name+"'";  rs=st.executeQuery(sql);  while(rs.next())  {  //out.println(rs.getString(2));  } }catch(Exception ert){out.println(ert.toString());}*/%><BODY ONLOAD="java script:showSlide1('rs.getString(2)');">

I don't know the language, but that might be it.LG
Link to comment
Share on other sites

Hi thanx padmapraveen_vasili for ur valuable suggestion.I need one more help from u.My team mate told that the first way u told is better implement.In that case he is telling to get the image link from the database we need to add flash script.Is it like that?(i think u r ving exp in this field)If so can u give some useful hints r materials to implement this idea in my project.Thanx a lot in advance

Link to comment
Share on other sites

After creating a Flash movie you choose File > Save As from the top menu to save your movie. Save the file as "Somefilename.fla". To embed the Flash movie you just made into an HTML page, you should go back to your Flash program and do the following steps:Step 1Choose File > Open. Open a Flash movie you have created.Step 2Choose File > Export Movie.Step 3Name the file "somefilename.swf". Choose the location where the file is to be stored (in your Web folder). Click OK.Step 4Open the HTML page where you want to insert your Flash movie. Insert this code:<object width="550" height="400"><param name="movie" value="somefilename.swf"><embed src="somefilename.swf" width="550" height="400"></embed></object> Note: This is the minimum code you need to embed a Flash movie in a browser. A broken icon will appear on the Web page if the user does not have the Flash plug-in installed.Note: In the code above there is both an <embed> tag and an <object> tag. This is because the <object> tag is recognized by Internet Explorer, and Netscape recognizes the <embed> tag and ignores the <object> tag.Step 5Type in the address of the HTML file in your browser and look at your first Flash movie.but lakshmi....i am not so efficient as u think ...iam an electrical engineer doing my VLSI and Embeded systems.iam fresher to IT industry iam only 23 years old.but i worked as software engineer in iGATE global solutions...i worked on oracle and java scripts...and i learn a lot from this forum....do keep posting your issues....thanks a lot for the reply......but one thing lakshmi..iam not clear about the data base you are speaking about...if you do this way ..you need to keep the file ....where you store the source code and all the web components.....hope it will clear your query.....if not please ..kindly ignore....

Link to comment
Share on other sites

sorry lakshmi.....i ahve one more thing taht is of the same way if you get success in this way then no problem i have a detailed document how to do the other way...but it is bulky dont know how to transfer...any how iam trying to paste it down...but the thing is that you need to use the software called MIX-FIX falsh playerAdding a custom Flash animation created with Mix-FX is a snap in Cool page HTML editor. By following these simple steps, you will be up and running in no time at all and impressing all of your visitors with your talents!1. Create an animation in mix-fix2. Go to Save/Publish for web, and save the file with the filename animation. When you use publish for web in mix-fix you will create 2 files, namely the SWF file and the HTML file containing the SWf file. The HTML file will include the proper HTML Flash tags. Make sure that you save the animation files to the same directory that contains or will contain your website.In Cool Page HTML Editor, do the following. 3. Open Cool Page4. Open or create a new the HTML page into which you want to insert the Flash animation.5. Save the HTML file to your web site directory 6. Go to Insert/HTML Object7. Make sure the HTML Tab is active. In the respective text field area you must copy and paste the HTML code that you generated with Mix-FX when you used the "publish for web" save option.8. To do this Launch Notepad and open the just created animation.html file. Now select the HTML code between the <object> </object> tags. This is the code that you must copy and paste into the Cool Page HTML Object Properties text field area.9. To assign the SwF file you must click on Browse and select the created animation.swf 10. Now you are done with the HTML settings. The next step is to set the correct size of the SWF file.11. To do this Click on the General Tab button.11. Go to the width and height input fields and enter the same width and height that you used in the HTML code that you just pasted into the HTML area.12. Click On OK13. Finally save and preview your file. It's important that you save the file first before you click on preview, or else you will see nothing. There you have it, a nice simple way to add a little extra pizzazz to your Flash presentation!Hope this will give some clearance for you/…….PADMAPRAVEEN.VM1Software engineeriGATE Global solutionsHyderabd

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...