Results 1 to 5 of 5
  1. #1
    rforte is offline Member
    Join Date
    Apr 2010
    Posts
    3
    Rep Power
    0

    Default Beginner. What's wrong in my applet declaration?

    The following code is used into a HTMLl page to call an applet:

    <applet id="PanoAPPLET" archive="ptviewer.jar" code="ptviewer.class" width="480" height="360">
    <param name="file" value="ptviewer:0">
    <param name="wait" value="foto/wait.png"> <!-- immagine durante il downloading dell'immagine selezionata -->
    <param name="view_width" value="480">
    <param name="view_height" value="300">
    <param name="bar_x" value="40"> <!-- coordinata x iniziale della "progress bar". Fare in modo che (bar_x + bar_width < width) -->
    <param name="bar_y" value="280"> <!-- coordinata y iniziale della "progress bar". Fare in modo che (bar_y + bar_height < height) -->
    <param name="bar_width" value="400"> <!-- larghezza della "progress bar" -->
    <param name="bar_height" value="8"> <!-- altezza della "progress bar" -->
    <param name="frame" value="foto/BarraStrumenti.gif">
    <param name="barcolor" value="000fff">
    <param name="bgcolor" value="ffffff"> <!-- definizione shotspots -->
    <param name="shotspot0" value="x15 y305 a50 b355 u'ptviewer:ZoomIn()' ">
    <param name="shotspot1" value="x70 y305 a105 b355 u'ptviewer:ZoomOut()' ">
    <param name="shotspot2" value="x125 y305 a150 b355 u'ptviewer:startAutoPan(0, 0.2, 1)' ">
    <param name="shotspot3" value="x155 y305 a195 b355 u'ptviewer:stopAutoPan()' ">
    <param name="shotspot4" value="x200 y305 a220 b355 u'ptviewer:startAutoPan(0, -0.2, 1)' ">
    <param name="shotspot5" value="x240 y305 a300 b355 u'ptviewer:moveTo(0,0,90,50)' ">
    <param name="shotspot6" value="x325 y305 a365 b355 u'ptviewer:startAutoPan(-0.2, 0, 1)' ">
    <param name="shotspot7" value="x375 y305 a415 b355 u'ptviewer:stopAutoPan()' ">
    <param name="shotspot8" value="x420 y305 a460 b355 u'ptviewer:startAutoPan(0.2, 0, 1)' ">
    <!-- definizione lista immagini panoramiche -->
    <param name="pano0" value=" {file=foto/pano0.jpg} {pan=0} {tilt=0} {fov=90} {fovmax=100} {fovmin=80} {auto=0.2} {panmin=-115} {panmax=90} ">
    <param name="pano1" value=" {file=foto/pano1.jpg} {pan=0} {tilt=0} {fov=90} {fovmax=100} {fovmin=80} {auto=0.2} ">
    <param name="pano2" value=" {file=foto/pano2.jpg} {pan=0} {tilt=0} {fov=90} {fovmax=100} {fovmin=80} {auto=0.2} ">
    <param name="pano3" value=" {file=foto/pano3.jpg} {pan=0} {tilt=0} {fov=90} {fovmax=100} {fovmin=80} {auto=0.2} {panmin=-75} {panmax=75} ">
    <param name="pano4" value=" {file=foto/pano4.jpg} {pan=0} {tilt=0} {fov=90} {fovmax=100} {fovmin=80} {auto=0.2} {panmin=-95} {panmax=65} ">
    <param name="pano5" value=" {file=foto/pano5.jpg} {pan=0} {tilt=0} {fov=90} {fovmax=100} {fovmin=80} {auto=0.2} {panmin=-95} {panmax=65} ">
    <param name="pano6" value=" {file=foto/pano6.jpg} {pan=0} {tilt=0} {fov=90} {fovmax=100} {fovmin=80} {auto=0.2} {panmin=-95} {panmax=65} ">
    </applet>


    When I use Safari browser (4.0.4), the following error report is generated into the Java Console:

    java.net.MalformedURLException: no protocol:
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at sun.plugin.liveconnect.SecureInvocation.checkLiveC onnectCaller(Unknown Source)
    at sun.plugin.liveconnect.SecureInvocation.access$000 (Unknown Source)
    at sun.plugin.liveconnect.SecureInvocation$2.run(Unkn own Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin.liveconnect.SecureInvocation.CallMethod (Unknown Source)


    It's important to note that with other browsers (ie: Internet Explorer, Firefox, Chrome) no error is generated.

    Can somebody help me? Please consider that I'm a very beginner.

  2. #2
    iluxa is offline Senior Member
    Join Date
    Mar 2010
    Posts
    266
    Rep Power
    5

    Default

    My guess would be that Safari doesn't like your parameters (perhaps the way you're using both single quotes and double quotes...) try removing all the "shotspot" parameters and see if that helps. If it does, you can try encoding your single quotes as &apos;

  3. #3
    cselic is offline Senior Member
    Join Date
    Apr 2010
    Location
    Belgrade, Serbia
    Posts
    278
    Rep Power
    5

    Default

    try this (I don't know if it's working)

    <APPLET id="PanoAPPLET" archive="ptviewer.jar" CODE="ptviewer" WIDTH=480 HEIGHT=360>

    ....
    ....

    </APPLET>

  4. #4
    rforte is offline Member
    Join Date
    Apr 2010
    Posts
    3
    Rep Power
    0

    Default

    Quote Originally Posted by iluxa View Post
    My guess would be that Safari doesn't like your parameters (perhaps the way you're using both single quotes and double quotes...) try removing all the "shotspot" parameters and see if that helps. If it does, you can try encoding your single quotes as &apos;
    I followed your suggestion removing all "shotspot" parameters but situation didn't change. Any other suggestion? Many thanks for your help.

  5. #5
    rforte is offline Member
    Join Date
    Apr 2010
    Posts
    3
    Rep Power
    0

    Default

    Quote Originally Posted by cselic View Post
    try this (I don't know if it's working)

    <APPLET id="PanoAPPLET" archive="ptviewer.jar" CODE="ptviewer" WIDTH=480 HEIGHT=360>

    ....
    ....

    </APPLET>
    I followed your suggestion changing the applet declaration as per your suggestion but situation didn't change. Any other suggestion? Many thanks for your help.

Similar Threads

  1. Database declaration
    By simontkk2005 in forum JDBC
    Replies: 4
    Last Post: 12-08-2009, 04:40 PM
  2. What's wrong with this applet?
    By Arnold in forum New To Java
    Replies: 9
    Last Post: 11-22-2009, 05:21 PM
  3. whats wrong with this class declaration?
    By blossompark in forum New To Java
    Replies: 5
    Last Post: 11-30-2008, 02:18 AM
  4. Declaration
    By asifahmed in forum New To Java
    Replies: 1
    Last Post: 04-05-2008, 05:38 AM
  5. JSP Declaration Directive
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-10-2007, 05:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •