Need help with JavaScript "Galleria" gallery coding

I am trying to create a clickable gallery with the filmstrip either on the top or on left hand side for people to click to see my portfolio. I want the first photo to be auto loaded. I downloaded the javascript from;
http://galleria.aino.se/
I have the coding for;
galleria.js
galleria.classic.js
jquery.min.js
I try the basic tutorial given on the website http://galleria.aino.se/
but it seem more coding are needed.
I want the similar gallery as shown on the above website without the black void space on the side of the large photo. I do not want the Rewind and Fastforward buttons as shown on the side of the large photo (not on the thumbnail)
I have tried downloading few similer files and trying to use their html coding but there werent the full tutorial.
The coding below only shows two small photos left top of the page without the large photo either on top of them.
I dont understand much about coding. Only been doing this for like few months and still learning but i am stuck now. Much apperciated if you can help me out here with what code need to go where. Many thanks.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="test/jquery.min.js"></script>
<script src="test/galleria.js"></script>
<script>Galleria.loadTheme('test/galleria.classic.js');</script>
<script>$('.gallery').galleria();</script>
</head>
<body>
<div class="gallery">
<a href="_images/home/Bridge.png"><img src="_images/home/Bridge.png" width="100"></a>
<a href="_images/home/Haz_Restaurant.JPG"><img src="_images/home/Haz_Restaurant.JPG" width="100"></a>
</div>
</body>
</html>

Using the same files, i have found a different code where they place the tumbnails at the bottom of the slideshow rather than on the side. Here is the code;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title>Galleria Demo 1</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="imagetoolbar" content="false">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link href="test/galleria.css" rel="stylesheet" type="text/css" media="screen">
    <script type="text/javascript" src="test/jquery.min.js"></script>
    <script type="text/javascript" src="test/jquery.galleria.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
        $('.gallery_demo_unstyled').addClass('gallery_demo'); // adds new class name to maintain degradability
        $('ul.gallery_demo').galleria({
            history   : true, // activates the history object for bookmarking, back-button etc.
            clickNext : true, // helper for making the image clickable
            insert    : '#main_image', // the containing selector for our main image
            onImage   : function(image,caption,thumb) { // let's add some image effects for demonstration purposes
                // fade in the image & caption
                image.css('display','none').fadeIn(1000);
                caption.css('display','none').fadeIn(1000);
                // fetch the thumbnail container
                var _li = thumb.parents('li');
                // fade out inactive thumbnail
                _li.siblings().children('img.selected').fadeTo(500,0.3);
                // fade in active thumbnail
                thumb.fadeTo('fast',1).addClass('selected');
                // add a title for the clickable image
                image.attr('title','Next image >>');
            onThumb : function(thumb) { // thumbnail effects goes here
                // fetch the thumbnail container
                var _li = thumb.parents('li');
                // if thumbnail is active, fade all the way.
                var _fadeTo = _li.is('.active') ? '1' : '0.3';
                // fade in the thumbnail when finnished loading
                thumb.css({display:'none',opacity:_fadeTo}).fadeIn(1500);
                // hover effects
                thumb.hover(
                    function() { thumb.fadeTo('fast',1); },
                    function() { _li.not('.active').children('img').fadeTo('fast',0.3); } // don't fade out if the parent is active
    </script>
    <style media="screen,projection" type="text/css">
    /* BEGIN DEMO STYLE */
    *{margin:0;padding:0}
    body{padding:20px;background:white;text-align:center;background:black;color:#bba;font:80% /140% georgia,serif;}
    h1,h2{font:bold 80% 'helvetica neue',sans-serif;letter-spacing:3px;text-transform:uppercase;}
    a{color:#348;text-decoration:none;outline:none;}
    a:hover{color:#67a;}
    .caption{font-style:italic;color:#887;}
    .demo{position:relative;margin-top:2em;}
    .gallery_demo{width:702px;margin:0 auto;}
    .gallery_demo li{width:68px;height:50px;border:3px double #111;margin: 0 2px;background:#000;}
    .gallery_demo li div{left:240px}
    .gallery_demo li div .caption{font:italic 0.7em/1.4 georgia,serif;}
    #main_image{margin:0 auto 60px auto;height:438px;width:700px;background:black;}
    #main_image img{margin-bottom:10px;}
    .nav{padding-top:15px;clear:both;font:80% 'helvetica neue',sans-serif;letter-spacing:3px;text-transform:uppercase;}
    .info{text-align:left;width:700px;margin:30px auto;border-top:1px dotted #221;padding-top:30px;}
    .info p{margin-top:1.6em;}
    </style>
</head>
<body>
<h1>Galleria Demo 01</h1>
<div class="demo">
<div id="main_image"></div>
<ul class="gallery_demo_unstyled">
    <li><img src="test/img/flowing-rock.jpg" alt="Flowing Rock" title="Flowing Rock Caption"></li>
    <li><img src="test/img/stones.jpg" alt="Stones" title="Stones - from Apple images"></li>
    <li class="active"><img src="test/img/grass-blades.jpg" alt="Grass Blades" title="Apple nature desktop images"></li>
    <li><img src="test/img/ladybug.jpg" alt="Ladybug" title="Ut rutrum, lectus eu pulvinar elementum, lacus urna vestibulum ipsum"></li>
    <li><img src="test/img/lightning.jpg" alt="Lightning" title="Black &amp; White"></li>
    <li><img src="test/img/lotus.jpg" alt="Lotus" title="Fusce quam mi, sagittis nec, adipiscing at, sodales quis"></li>
    <li><img src="test/img/mojave.jpg" alt="Mojave" title="Suspendisse volutpat posuere dui. Suspendisse sit amet lorem et risus faucibus pellentesque."></li>
    <li><img src="test/img/pier.jpg" alt="Pier" title="Proin erat nisi"></li>
    <li><img src="test/img/sea-mist.jpg" alt="Sea Mist" title="Caption text from title"></li>
</ul>
<p class="nav"><a href="#" onclick="$.galleria.prev(); return false;">&laquo; previous</a> | <a href="#" onclick="$.galleria.next(); return false;">next &raquo;</a></p>
</div>

Similar Messages

  • Need help with this xml gallery !!!

    i have build a gallery but its very simple...... it takes images from xml file.
    i have attached all files in zip.
    i just want two things if anyone can help.
    first when i press next button it goes to next image but with no effect. it just displays next image ... i want to incorporate a sliding effect when the image is changed to another.
    and second i want to use autoplay feature.
    as soon as swf starts the images came one by one with difference of few seconds.
    thx in advance... i really need help in this....!

    You're welcome.
    I don't have an example to offer for the autorun.  You should be able to think it thru.  One key, as I mentioned is to preload all of the images first, that will allow for smooth playing of the show--no waiting for images to load between changes.  You can load them into empty movieclips and hide them (_viisible = false) until they are needed.  You could load them when called for, but you would have to put conditions on the displaying of things until the image loads, which will change when they are all loaded, so I recommend just loading them all first.
    For the timing you can use setInterval.  If something is going to be allowed to interupt the autorun, then you will need to make use of the clearInterval function as well, so that you stop the clock.
    Since you will be wanting to know when things are loaded, you will need to use the MovieClipLoader.loadClip method for loading the images instead of using loadMovie.  This is because the MovieClipLoader class supports having an event listener.  If you look in the help documents in the MovieClipLoader.addListener section, there is an example there that provides a fairly good complete overview of using the code.  The only difference is you'd be looking for the onLoadComplete event rather than the onLoadInit event.

  • Need help with uploading web gallery

    When I try to upload a gallery, I recieve the following error message: An error occured sending the file: a response was not received in time.
    How do I correct this?

    Find the exported gallery on the hard drive, and open the index file in a web browser. If that works correctly, then yes, it's a problem that you'll need to discuss with your web host, rather than a Lightroom problem that we can help with, sorry.

  • Need help making javascript thumbnail gallery function in javascript tab menu

    Hello all,
    I have implemented a css/javascript tab menu on one of my html pages thanks to Chris Coyier (http://css-tricks.com/learning-jquery-fading-menu-replacing-content/), and within one of the tabs, which I labeled GALLERY, I am trying to place a thumbnail gallery curtosy of Trent (http://www.twospy.com/galleriffic/).
    Before trying to place it in the menu, I made the gallery on a seperate html page to make sure that I could get it to work.  It does. But when I place it in the menu it shows up on page load under the content of the first tab (labeled TOUR) and not in the gallery tab.  In addition, once I click on the "gallery" tab the other tabs stop showing their content.  I feel like I am missing something obvious. But I just can't figure out what.  If anyone can help I would greatly appreciate it.
    Thanks,
    Natalie
    Below is the code of my whole page:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Tour template</title>
    <!--TABS-->
    <link rel="stylesheet" type="text/css" href="MenuFader/style.css">
    <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
    <script type="text/javascript">
            $(function(){
                $("#tour-button").css({
                    opacity: 0.3
                $("#gallery-button").css({
                    opacity: 0.3
                $("#page-wrap div.button").click(function(){
                    $clicked = $(this);
                    // if the button is not already "transformed" AND is not animated
                    if ($clicked.css("opacity") != "1" && $clicked.is(":not(animated)")) {
                        $clicked.animate({
                            opacity: 1,
                            borderWidth: 5
                        }, 600 );
                        // each button div MUST have a "xx-button" and the target div must have an id "xx"
                        var idToLoad = $clicked.attr("id").split('-');
                        //we search trough the content for the visible div and we fade it out
                        $("#contents").find("div:visible").fadeOut("fast", function(){
                            //once the fade out is completed, we start to fade in the right div
                            $(this).parent().find("#"+idToLoad[0]).fadeIn();
                    //we reset the other buttons to default style
                    $clicked.siblings(".button").animate({
                        opacity: 0.5,
                        borderWidth: 1
                    }, 600 );
    </script>
    <!--End Tabs-->
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <style type="text/css">
    <!--
    #realtor panel {
        width: 1000px;
    body {
        background-color: #282828;
        margin: 0px;
    .style4 {color: #A1A1A1}
    -->
    </style>
    <!-- InstanceBeginEditable name="Gallery" -->
    <title>Example tour page</title>
    <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="Gallery/js/jquery.galleriffic.js"></script>
    <script type="text/javascript" src="Gallery/js/jquery.opacityrollover.js"></script>
    <script type="text/javascript">
                document.write('<style>.noscript { display: none; }</style>');
    </script>
    <link rel="stylesheet" type="text/css" href="Gallery/css/galleriffic-2.css">
    <link rel="stylesheet" type="text/css" href="Gallery/css/basic.css">
    <!-- InstanceEndEditable -->
    </head>
    <!-- InstanceBeginEditable name="body" -->
    <body>
    <div id="realtor panel"><table width="100%" border="0">
      <tr>
        <td width="18%"> <div align="center"></div></td>
        <td width="82%"> </td>
      </tr>
    </table>
    </div>
    <div id="page-wrap">
            <div id="tour-button" class="button">
                <img src="MenuFader/images/TOUR.png" alt="tour" class="button" />
            </div>
            <div id="gallery-button" class="button">
                <img src="MenuFader/images/GALLERY.png" alt="property gallery" class="button" />
            </div>
            <div id="info-button" class="button">
                <img src="MenuFader/images/INFO.png" alt="info" class="button" />
            </div>
            <div id="specs-button" class="button">
                <img src="MenuFader/images/SPECS.png" alt="specs" class="button" />
            </div>
            <div class="clear"></div>
      <div id="contents">
        <div id="tour">
          <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','1270','height','443','src','swf files/Tudor Arms interative floor plan','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','swf files/Tudor Arms interative floor plan' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="1270" height="443">
            <param name="movie" value="swf files/Tudor Arms interative floor plan.swf" />
            <param name="quality" value="high" />
            <embed src="swf files/Tudor Arms interative floor plan.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1270" height="443"></embed>
          </object></noscript>
        </div>
        <div id="property gallery">
             <div id="container">
                    <div id="gallery" class="content">
                        <div id="controls" class="controls"></div>
                        <div class="slideshow-container">
                            <div id="slideshow" class="slideshow"></div>
                        </div>
                    </div>
                    <div id="thumbs" class="navigation">
                        <ul class="thumbs noscript">
                            <li>
                                <a class="thumb" href="Gallery/images/example/apt entrance1.jpg">
                                <img src="Gallery/images/example/Tudor thumbs/apt face1.jpg" alt="apt entrance1" />
                                </a>
                           </li>
                          <li>
                                <a class="thumb" href="Gallery/images/example/apt entrance2.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/apt face2.jpg" alt="apt entrance2" />
                                </a>
                          </li>
                          <li>
                                 <a class="thumb" href="Gallery/images/example/apt entrance3.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/apt face3.jpg" alt="apt entrance3" />
                              </a>
                          </li>   
                            <li>
                                 <a class="thumb" href="Gallery/images/example/apt sign.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/apt sign.jpg"  alt="apt sign" />
                              </a>
                          </li>
                          <li>
                                 <a class="thumb" href="Gallery/images/example/entryway1.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/entry.jpg" alt="entry" />
                              </a>
                          </li>
                            <li>
                                 <a class="thumb" href="Gallery/images/example/living room1.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/living1.jpg"  alt="living1" />
                              </a>
                          </li>
                           <li>
                                 <a class="thumb" href="Gallery/images/example/living room2.jpg" >
                                 <img src="Gallery/images/example/Tudor thumbs/living2.jpg" alt="living3" />
                              </a>
                          </li>
                            <li>
                                 <a class="thumb" href="Gallery/images/example/living room3.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/living3.jpg"  alt="living3" />
                              </a>
                          </li>
                          <li>
                                 <a class="thumb" href="Gallery/images/example/dining1.jpg" >
                                 <img src="Gallery/images/example/Tudor thumbs/dining1.jpg"  alt="dining1" />
                              </a>
                          </li>
                            <li>
                                 <a class="thumb" href="Gallery/images/example/Dining2.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/dining2.jpg"  alt="dining2" />
                              </a>
                          </li>
                          <li>
                                 <a class="thumb" href="Gallery/images/example/dining3.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/dining3.jpg" alt="dining3" />
                              </a>
                          </li>
                            <li>
                                 <a class="thumb" href="Gallery/images/example/Kitchen1.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/kitchen1.jpg"  alt="kitchen1" />
                              </a>
                          </li>
                          <li>
                                 <a class="thumb" href="Gallery/images/example/Kitchen2.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/kitchen2.jpg" alt="kitchen2" />
                              </a>
                          </li>
                            <li>
                                 <a class="thumb" href="Gallery/images/example/bedroom1.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/bed1.jpg"  alt="bed1" />
                              </a>
                          </li>
                           <li>
                                 <a class="thumb" href="Gallery/images/example/bedroom2.jpg">
                                <img src="Gallery/images/example/Tudor thumbs/bed2.jpg"  alt="bed2" />
                              </a>
                          </li>
                            <li>
                                 <a class="thumb" href="Gallery/images/example/bedroom3.jpg" >
                                <img src="Gallery/images/example/Tudor thumbs/bed3.jpg"  alt="bed3" />
                              </a>
                          </li>
                            <li>
                                 <a class="thumb" href="Gallery/images/example/bathroom.jpg">
                                <img src="Gallery/images/example/Tudor thumbs/bath.jpg"  alt="bath" />
                              </a>
                            </li>
                        </ul>
                    </div>
                <div style="clear: both;"></div>
            </div>
        </div>
        <div id="info">
            <p class="style4">Content for info</p>
        </div>
        <div id="specs">
            <p class="style4">This content is for specs.</p>
        </div>
      </div>
    </div>
    <!--script for gallery-->
    <script type="text/javascript">
                jQuery(document).ready(function($) {
                    // We only want these styles applied when javascript is enabled
                    $('div.navigation').css({'width' : '400px', 'float' : 'left'});
                    $('div.content').css('display', 'block');
                    // Initially set opacity on thumbs and add
                    // additional styling for hover effect on thumbs
                    var onMouseOutOpacity = 0.67;
                    $('#thumbs ul.thumbs li').opacityrollover({
                        mouseOutOpacity:   onMouseOutOpacity,
                        mouseOverOpacity:  1.0,
                        fadeSpeed:         'fast',
                        exemptionSelector: '.selected'
                    // Initialize Advanced Galleriffic Gallery
                    var gallery = $('#thumbs').galleriffic({
                        delay:                     2500,
                        numThumbs:                 15,
                        preloadAhead:              10,
                        enableTopPager:            true,
                        enableBottomPager:         true,
                        maxPagesToShow:            7,
                        imageContainerSel:         '#slideshow',
                        controlsContainerSel:      '#controls',
                        captionContainerSel:       '#caption',
                        loadingContainerSel:       '#loading',
                        renderSSControls:          true,
                        renderNavControls:         true,
                        playLinkText:              'Play Slideshow',
                        pauseLinkText:             'Pause Slideshow',
                        prevLinkText:              '&lsaquo; Previous Photo',
                        nextLinkText:              'Next Photo &rsaquo;',
                        nextPageLinkText:          'Next &rsaquo;',
                        prevPageLinkText:          '&lsaquo; Prev',
                        enableHistory:             false,
                        autoStart:                 false,
                        syncTransitions:           true,
                        defaultTransitionDuration: 900,
                        onSlideChange:             function(prevIndex, nextIndex) {
                            // 'this' refers to the gallery, which is an extension of $('#thumbs')
                            this.find('ul.thumbs').children()
                                .eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
                                .eq(nextIndex).fadeTo('fast', 1.0);
                        onPageTransitionOut:       function(callback) {
                            this.fadeTo('fast', 0.0, callback);
                        onPageTransitionIn:        function() {
                            this.fadeTo('fast', 1.0);
    </script>  
    </body>
    <!-- InstanceEndEditable -->
    <!-- InstanceEnd --></html>

    Sure thing:
    http://www.acresllc.net/TA501001.html

  • Need Help with Javascript for Acrobat Pro 9

    Hello,
    I am creating a PDF form in Adobe Acrobat Profession 9.  Not having a lot of experience with Javascript, I have found this forum very helpful and have used many of the script examples for other issues I have had.  I was hoping someone could help with the following script, I have tried many variations, cannot get it to work.
    var ratio = this.getField("ratio").value
    var concentration = this.getField("concentration").value
    var result = this.getField("result").value
    if(ratio.value>=50.00)
    {result.value ='PASS';}
    if(ratio.value".value>=40.00)
    {result.value ='PASS';}
    if((concentration.value ==61) && (ratio.value >= 49.25))
    {result.value ='PASS';}
    if((concentration.value ==61) && (ratio.value >= 39.25))
    {result.value ='PASS';}
    if((concentration.value ==62) && (ratio.value >= 48.50))
    {result.value ='PASS';}
    if((concentration.value ==62) && (ratio.value >= 38.50))
    {result.value ='PASS';}
    else
    {result.value = 'FAIL';}
    This is just a piece of the code  The concentration values run from 61 through 99 and the ratio value varies for each concentration value, there is a high ratio and a low ratio.  The result of this field with populate the results field with a PASS or FAIL.  This is not working......any help is greatly appreciated!

    Thanks George.  I updated the script to:
    // Get a reference to the result field
    var ratio = this.getField("ratio");
    // Get a reference to the result field
    var concentration = this.getField("concentration");
    // Get a reference to the result field
    var result = this.getField("result");
    if(ratio.value>=50.00)
    {result.value ='PASS';}
    if(ratio.value >=40.00)
    {result.value ='PASS';}
    if((concentration.value ==61) && (ratio.value >= 49.25))
    {result.value ='PASS';}
    if((concentration.value ==61) && (ratio.value >= 39.25))
    {result.value ='PASS';}
    if((concentration.value ==62) && (ratio.value >= 48.50))
    {result.value ='PASS';}
    if((concentration.value ==62) && (ratio.value >= 38.50))
    {result.value ='PASS';}
    else
    {result.value = 'FAIL';}
    However, I am still getting a FAIL result even when the ratio is 50.00 or equal to the passable ratio.

  • Need help with 3D carousel gallery rotation to a specific angle

    Hi,
    I am making a 3d gallery, that has a menu underneath it. When clicking to a menu link, the gallery will rotate itself to a certain angle (photo) connected with the menu link. I am using FlashAndMaths 3D cylindrical gallery scripts (XML Customizable 3D Cylindrical Photo Gallery in Flash) as the base (as I couldn't find any free or neither payed 3d galleries that would have a menu connected to the carousel!).
    The function to rotate a carousel of thumbnails is the following:
    public function doRotate(ang:Number):void {  
                if(isLoading || notReady){       
                        return;
                if(!this.contains(container)){
                    return;
                var i:int;
                 for(i=0;i<numCols;i++){
                   colsVec[i].rotationY+=ang;
                   colsVec[i].rotationY=colsVec[i].rotationY%360;
                   if((colsVec[i].rotationY>90+diffAng && colsVec[i].rotationY<270-diffAng) || (colsVec[i].rotationY<-(90+diffAng) && colsVec[i].rotationY>-(270-diffAng))){
                          if(container.contains(colsVec[i])){
                              container.removeChild(colsVec[i]);
                         } else {   
                                   if(!container.contains(colsVec[i])){
                                     container.addChild(colsVec[i]);
    This will rotate the carousel as an infinite loop. However - I need the function to stop at a certain angle e.g. 45% (and/or reset itself to 0%). Another option would be to stop the carousel at a certain thumbnail container.
    The function to create a carousel is here:
    thumbWidth=thumbsArray[0][0].width;
    thumbHeight=thumbsArray[0][0].height;
    colsVec=new Vector.<Column>();
    colHeight=thumbHeight*colLen+(colLen-1)*pxSpace;
    colWidth=thumbWidth;
    rad=galLoader.radius;
    angle=360/numCols;
    container=new Sprite();
    this.addChild(container);
    containerWidth=2*rad;
    vertAddOn=40;
    vertDrop=15;
    containerHeight=colHeight+vertAddOn;
    container.x=containerWidth/2;
    container.y=containerHeight/2+vertDrop;
    contMask=new Shape();
    this.addChild(contMask);
    contMask.x=container.x;
    contMask.y=container.y;
    prepContainer();
    diffAng=Math.round((Math.asin(rad/fL)*180/Math.PI)*1000)/1000; 
    for(i=0;i<numCols;i++){
    colsVec[i]= new Column(thumbsArray[i],pxSpace,rad);
    container.addChild(colsVec[i]);
    colsVec[i].y=0;
    colsVec[i].x=0; 
    colsVec[i].z=0;
    colsVec[i].rotationY=angle*i;
    if((colsVec[i].rotationY>90+diffAng && colsVec[i].rotationY<270-diffAng) || (colsVec[i].rotationY<-(90+diffAng) && colsVec[i].rotationY>-(270-diffAng))){
    if(container.contains(colsVec[i])){
    container.removeChild(colsVec[i]);
    } else {
    if(!container.contains(colsVec[i])){
    container.addChild(colsVec[i]);
    Could anyone help me as I'm out of ideas!

    Hi, well, unfortunately asking help from forums is my last option, there really isn't many people around anymore, who'd use Flash!
    Also, I couldn't find neither free or payed scripts or examples online, that could do this - so, it's just me and forums.
    I really do appreciate that you've tried to help me- I just need a bit clearer reference (as I'm just not really used to use AS), so that I could try to search and/or figure out how to solve that problem.
    By "call doRotate() and pass the difference between the current rotation and the desired rotation.", did you mean something like this:
    private function onEnter(e:Event):void {
    if (rotate){
    this.doRotate(1);
    if(    //so, here I should use something that would locate the desired position, so something like currentFrame or would you have any better ideas?
    // should I also add something like doRotate.stop(); here?
    this.removeEventlistener(Event.ENTER_FRAME,onEnter);
    Or am I going the wrong way?

  • DW8 - Need help with Flash Mirror Gallery by Flashdevelopment24

    I just purchased an image viewer called Flash Mirror Gallery by Flashdevelopment24:
    http://www.flashdevelopment24.com/extensions/flash_photo_gallery_06.aspx
    I use DW8. Unfortunately the wizard and the instructions are WAY beyond me. I can insert the object on my page but I have no clue how to import images into it, do I need to create separate thumbnails?, etc. Its a European company and the English isn't taht great either which doesn't help.I went through all their FAQs and examples and I don't have a clue.
    I'm doing something very simple, all I need are VERY simple directions on how to make this work. It would be best if there was a YouTube or other video tutorial available. I paid 45 buck for this and it useless to me right now. Help!

    I paid 45 buck for this and it useless to me right now. Help!
    Sorry can't help, don't know the product at all.
    If you are having problems with it, then it's best to contact the people you purchased it from no?  They should either help you with support issues, you you should get a refund if it doesn't work as expected.
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    Web Design & Development
    http://www.perrelink.com.au
    http://twitter.com/nadiap

  • Need help with xml video gallery

    Hello everyone
    I recently bought a xml video gallery. I'm loading the movie externally into another movie. When the xml gallery loads, it cancels all sounds.
    I need to figure out where in the actionscription can i reverse the cancellation of sounds. Can anyone help? if possible, I can email, whomever is willing to help, the xml gallery to see if theres another reason the sound is being canceled.
    Also, the sound of the gallery doesn't work til you click the volume scroller.
    Here are two parts of actionscript included in the gallery:
    part one:
    // Import filter classes
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    // Set flash variables
    var xmlFileUrl:String = "playlist.xml";
    var auto_play:String = "true";
    // Set xml file URL
    if (_root.xmlfile) {
        xmlFileUrl = _root.xmlfile;
    var V_SRC;
    var thuArray:Array = new Array();
    var currentVideo:Number = 0;
    var totalItems;
    var numOfItems:Number;
    var itemDistance:Number = 120+5;
    var itemHeight:Number = 80+2;
    var Value:Number = 1;
    var boundry:Number = 1;
    var ratio:Number = 1;
    var diff:Number = 1;
    var collectionWidth:Number = 1;
    var buffer:Number = 135*2;
    this.createEmptyMovieClip("video_txt",this.getNextHighestDepth());
    video_txt.createTextField("theText",video_txt.getNextHighestDepth(),0,0,584,36);
    video_txt.theText.selectable = false;
    video_txt.theText.autoSize = "left";
    //The Format
    myFormat = new TextFormat();
    myFormat.font = _root.font_format;
    myFormat.size = _root.font_size;
    myFormat.color = _root.font_color;
    myFormat.align = "center";
    video_txt.theText.setNewTextFormat(myFormat);
    // Create a new movieclip to load the thumbs
    var thumbLoader:MovieClipLoader = new MovieClipLoader();
    var thumbListener:Object = new Object();
    thumbLoader.addListener(thumbListener);
    thumbListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number)
        new Tween(target_mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
        target_mc._parent.preloader_mc._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = xmlLoaded;
    xml.load(xmlFileUrl);
    // Load the xml file into the player
    function xmlLoaded(b:Boolean) {
        if (b) {
            auto_play = this.firstChild.firstChild.attributes.auto_play;
            scrollSpeed = parseInt(this.firstChild.firstChild.attributes.scrollSpeed);
            totalItems = this.firstChild.firstChild.childNodes;
            numOfItems = totalItems.length;
            for (j=0; j<numOfItems; j++) {
                var i = player_mc.main_mc.collection_mc.attachMovie("mc_Thumb", "thumb_"+j, j);
                i._x = itemDistance*j;
                thumbLoader.loadClip(totalItems[j].attributes.thumb,i.loader_mc);
                i.id = j;
                i.videoTitle = totalItems[j].attributes.title;
                i.videoUrl = totalItems[j].attributes.src;
                // Create an event for thumb rollover
                i.onRollOver = iRoll;
                i.onRollOut = i.onReleaseOutside=iOut;
                i.onRelease = iRelease;
                thuArray[j] = i;
            // default first video
            collectionWidth = player_mc.main_mc.collection_mc._width;
            currentVideo = 0;
            V_SRC = thuArray[0].videoUrl;
            changeVideo();
            //scope._alpha = 100;
            new Tween(scope, "_alpha", Regular.easeOut, 0, 100, 0.5, true);
        else
            trace("Error! xml file not loaded");
    // onRollOver Events
    function iRoll() {
        player_mc.mc_title.title_txt.htmlText = totalItems[this.id].attributes.title;
        this.light_mc.play();
    function iRelease() {
        currentVideo = this.id;
        changeVideo();
    function changeVideo() {
        V_SRC = thuArray[currentVideo].videoUrl;
        player_mc.loadVideo();
        currentThumb();
        player_mc.mc_title.title_txt.htmlText = thuArray[currentVideo].videoTitle;
        video_txt.theText.text = totalItems[currentVideo].attributes.title;
        player_mc.so.getVolume();
        player_mc.playStatus = 1;
        player_mc.checkStatus();
    function nextVideo() {
        if (currentVideo<(numOfItems-1)) {
            currentVideo++;
        } else {
            currentVideo = 0;
        changeVideo();
    function currentThumb() {
        for (i=0; i<thuArray.length; i++) {
            if (i == currentVideo) {
                thuArray[i].enabled = true;
    // Mouse movement on rollover
    this.onMouseMove = function() {
        collectionWidth = player_mc.main_mc.collection_mc._width;
        boundry = player_mc.main_mc.area_mc._width;
        if ((player_mc.main_mc._ymouse>0) && (player_mc.main_mc._ymouse<itemHeight)) {
            if ((player_mc.main_mc._xmouse>0) && (player_mc.main_mc._xmouse<boundry)) {
                ratio = player_mc.main_mc._xmouse/boundry;
                diff = (collectionWidth-boundry)+buffer;
                Value = Math.floor((-ratio)*diff)+(buffer/2);
        updateAfterEvent();
    this.onEnterFrame = function() {
        // Define movement area and speed
        if (player_mc.main_mc.collection_mc._width>player_mc.main_mc.area_mc._width) {
            player_mc.main_mc.collection_mc._x = Math.round((player_mc.main_mc.collection_mc._x)+((Value-player_mc.main_mc.collection_mc._ x)/scrollSpeed));
            if (player_mc.main_mc.collection_mc._x>0) {
                player_mc.main_mc.collection_mc._x = 0;
            } else if (player_mc.main_mc.collection_mc._x<(player_mc.main_mc.area_mc._width-(player_mc.main_mc. collection_mc._width))) {
                player_mc.main_mc.collection_mc._x = Math.round(player_mc.main_mc.area_mc._width-(player_mc.main_mc.collection_mc._width));
        } else {
            player_mc.main_mc.collection_mc._x = 0;
        updateAfterEvent();
    part two:
    // Define flash variables
    var video_url:String = "";
    var tempx:Number = this._parent._x;
    var tempy:Number = this._parent._y;
    var timeCounter:Number = 0;
    var timeInSeconds:Number = _root.time_counter;
    // Object to listen to onStage Event
    videoObj = vid.videoObj;
    // Setting up the connection
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    // Buffer time
    ns.setBufferTime (10);
    videoObj.attachVideo (ns);
    function loadVideo () {
        video_url = _parent.V_SRC;
        trace(video_url);
        ns.play (video_url);
    function checkStatus()
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("pause");
            mc_playAgain._visible = false;
            thumbs_out = false;
            title_out = false;
        else
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
        } // end else if
        if (so.getVolume() == 0)
            controls_mc.mute_mc.gotoAndStop("mute");
        else
            controls_mc.mute_mc.gotoAndStop("on");
    }; // End of the function
    mc_playAgain._visible = false;
    // Check Status of video
    ns.onStatus = function (info)
        if (info.code == "NetStream.Buffer.Empty")
            mc_buffer._visible = true;
        else if (info.code == "NetStream.Buffer.Full")
            mc_buffer._visible = false;
        else if (info.code == "NetStream.Play.Stop")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            else
                trace;
            } // end else if
            mc_playAgain._visible = true;
            mc_buffer._visible = false;
            thumbs_out = true;
            title_out = true;
            checkStatus();
        } // end else if
    // Get info about video
    ns.onMetaData = function(infoObject:Object)
        FLVduration = infoObject["duration"];
        relationshipW = infoObject.height / infoObject.width;
        relationshipH = infoObject.width / infoObject.height;
        if (Stage["displayState"] == "fullScreen")
            largeSize ();
        else
            regularSize ();
        if (_parent.auto_play == "false")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            mc_buffer._visible = false;
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
            thumbs_out = true;
            title_out = true;
            _parent.auto_play = "true";
        }// end else if
    var videoInterval = setInterval(videoStatus, 100);
    var amountLoaded;
    var duration;
    // videoStatus on load Event
    function videoStatus()
        amountLoaded = ns.bytesLoaded / ns.bytesTotal;
        controls_mc.mc_progress.mc_buff._width = amountLoaded * 250;
        controls_mc.mc_progress.mc_played._x = ns.time / duration * 250;
        controls_mc.mc_progress.mc_played._xscale = Math.round(ns.time*100/FLVduration);
    }; // End of the function
    function scrubIt()
        ns.seek(Math.floor(controls_mc.mc_progress.mc_played._x / 250 * duration));
    }; // End of the function
    // video time
    var time_interval:Number = setInterval(checkTime, 500, ns);
    function checkTime(ns:NetStream) {
        //current time
        var ns_seconds:Number = ns.time;
        var minutes:Number = Math.floor(ns_seconds/60);
        var seconds = Math.floor(ns_seconds%60);
        sec = seconds;
        min = minutes;
        if (sec<10) {
            sec = "0"+sec;
        if (min<10) {
            min = "0"+min;
        controls_mc.time_txt.time_1.text = min+":"+sec;
        //total time
        var minutes2:Number = Math.floor(FLVduration/60);
        var seconds2 = Math.floor(FLVduration%60);
        sec2 = seconds2;
        min2 = minutes2;
        if (sec2<10) {
            sec2 = "0"+sec2;
        if (min2<10) {
            min2 = "0"+min2;
        controls_mc.time_txt.time_2.text = min2+":"+sec2;
        if (controls_mc.time_txt.time_2.text == "NaN:NaN") {
            controls_mc.time_txt.time_2.text = "00:00";
    setStage ();
    // Object to listen onStage Event
    var stageL:Object = new Object ();
    // function respnsible for content alignment
    function setStage ()
        if (Stage["displayState"] == "fullScreen") {
            tempx = this._parent._x;
            tempy = this._parent._y;
            this._parent._x = 0;
            this._parent._y = 0;
            vidBg_mc._x = 0;
            vidBg_mc._y = 0;
            mc_title._x = 0;
            mc_title._y = -30;
            slide_me._x = 0;
            slide_me._y = 0;
            vidBg_mc._width = Stage.width;
            vidBg_mc._height = Stage.height;
            mc_title._width = Stage.width;
            mc_title._height = Stage.height / 20;
            slide_me._width = Stage.width;
            slide_me._height = Stage.height / 20;
            vid._x = vid._y = 0;
            largeSize ();
            controls_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));
            controls_mc._y = Math.round (Stage.height - 36);
            mc_playAgain._x = Math.round ((Stage.width / 2) - (mc_playAgain._width / 2));
            mc_playAgain._y = Math.round (Stage.height - 572);
            thumbs_mc._x = Math.round ((Stage.width / 2) - (thumbs_mc._width / 2));
            thumbs_mc._y = Math.round (Stage.height - 115);
            main_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));;
            hide_mc.onEnterFrame = function () {
                timeCounter = timeCounter + 1;
                if (timeCounter >= timeInSeconds * 30) {
                    timeCounter = 0;
                    controls_mc._alpha = 0;
            this.onMouseMove = function () {
                timeCounter = 0;
                controls_mc._alpha = 100;
        else
            delete hide_mc.onEnterFrame;
            delete this.onMouseMove;
            controls_mc._alpha = 100;
            this._parent._x = tempx;
            this._parent._y = tempy;
            vidBg_mc._width = 600;
            vidBg_mc._height = 360;
            mc_title._width = 600;
            mc_title._height = 30;
            slide_me._width = 600;
            slide_me._height = 30;
            vidBg_mc._x = vid._x = 0;
            vidBg_mc._y = vid._y = 35;
            mc_title._x = vid._x = 0;
            mc_title._y = vid._x = -30;
            slide_me._x = vid._x = 0;
            slide_me._y = vid._y = 35;
            regularSize ();
            controls_mc._x = 0;
            controls_mc._y = 395;
            mc_playAgain._x = 243;
            mc_playAgain._y = 158;
            thumbs_mc._x = 0;
            thumbs_mc._y = 316;
            main_mc._x = 0;
            main_mc._y = 406;
        mc_buffer._x = Math.round (vidBg_mc._x + (vidBg_mc._width / 2));
        mc_buffer._y = Math.round (vidBg_mc._y + (vidBg_mc._height / 2));
    // to apply when stage (browser window) is resized or modified
    stageL.onResize = function () {
        setStage ();
    // attaching object to the stage
    Stage.addListener (stageL);
    MovieClip.prototype.slide = function(yPos) {
        this._y -= (this._y-yPos)/5;
    // tilte actions
    mc_title.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && title_out == false)
            this.slide(5);
        else if (Stage["displayState"] == "normal" && title_out == true)
            this.slide(35);
        if (Stage["displayState"] == "fullScreen" && title_out == false)
            this._y -= (this._y+106)/5;
        else if (Stage["displayState"] == "fullScreen" && title_out == true)
            this.slide(0);
    // thumbs actions
    main_mc.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && thumbs_out == false)
            this.slide(406);
        else if (Stage["displayState"] == "normal" && thumbs_out == true)
            this.slide(299);
        if (Stage["displayState"] == "fullScreen" && thumbs_out == false)
            this._y = Math.round (Stage.height - 0);
        else if (Stage["displayState"] == "fullScreen" && thumbs_out == true)
            this._y = Math.round (Stage.height - 133);
    // Playlist button
    controls_mc.playlist_mc.onRollOver = function ()
        this.gotoAndStop("playlistOver");
    controls_mc.playlist_mc.onRollOut = controls_mc.playlist_mc.onReleaseOutside = function ()
        this.gotoAndStop("playlist");
    // Toggle playlist button
    controls_mc.playlist_mc.onRelease = function ()
        if (thumbs_out == false)
            thumbs_out = true;
            title_out = true;
        else if (thumbs_out == true)
            thumbs_out = false;
            title_out = false;
        } // end if else
    // Define hit area for playPause button
    vid.onPress = controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("play")
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            controls_mc.playPause.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    // playPause button
    controls_mc.playPause.onRollOver = function ()
        if (playStatus == 1)
            this.gotoAndStop("pauseOver");
        else
            this.gotoAndStop("playOver");
        } // end else if
    controls_mc.playPause.onRollOut = controls_mc.playPause.onReleaseOutside = function ()
        if (playStatus == 1)
            this.gotoAndStop("pause");
        else
            this.gotoAndStop("play");
        } // end else if
    // Toggle playPause button
    controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            this.gotoAndStop("play");
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            this.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    controls_mc.skip_mc.onRollOver = function ()
        this.gotoAndStop("skipOver");
    controls_mc.skip_mc.onRollOut = controls_mc.skip_mc.onReleaseOutside = function ()
        this.gotoAndStop("skip");
    controls_mc.skip_mc.onRelease = function ()
        _parent.nextVideo()
    // Play Again button
    mc_playAgain.onRollOver = function ()
        this.gotoAndStop("playAgainOver");
    mc_playAgain.onRollOut = mc_playAgain.onReleaseOutside = function ()
        this.gotoAndStop("playAgain");
    // Toggle Play Again button
    mc_playAgain.onRelease = function ()
        this._visible = false;
        ns.pause();
        playStatus = 1;
        checkStatus();
    // make the seek bar clickable
    controls_mc.mc_progress.mc_buff.onPress = function()
        xpos = controls_mc.mc_progress._xmouse;
        percent = Math.round(xpos/controls_mc.mc_progress._width*100);
        seekTime = percent/100*FLVduration;
        seekTime = Math.round(seekTime*100)/100;
        ns.seek(seekTime);
    // Set volume level
    var s:Sound = new Sound();
    s.setVolume(_root.volume_value);
    controls_mc.mc_soundLevel.mc_volume._xscale = _root.volume_value;
    // Volume control
    controls_mc.mc_soundLevel.onPress = function()
        volumeTo = (this._xmouse / this._width)*100;
        this.mc_volume._xscale = volumeTo;
        s.setVolume(volumeTo);
    // Volume
    _parent.createEmptyMovieClip("vSound", _parent.getNextHighestDepth());
    vSound.attachAudio(ns);
    var so = new Sound(vSound);
    so.setVolume(_root.volume_value);
    // Mute button
    controls_mc.mute_mc.onRollOver = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("onOver");
        else
            this.gotoAndStop("muteOver");
        } // end else if
    controls_mc.mute_mc.onRollOut = controls_mc.mute_mc.onReleaseOutside = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("on");
        else
            this.gotoAndStop("mute");
        } // end else if
    // Toggle mute button
    controls_mc.mute_mc.onRelease = function ()
        if (so.getVolume() >= 1)
            controls_mc.mc_soundLevel.mc_volume._xscale = 0;
            so.setVolume(0);
            this.gotoAndStop("muteOver");
        else
            controls_mc.mc_soundLevel.mc_volume._xscale = 70;
            so.setVolume(_root.volume_value);
            this.gotoAndStop("onOver");
        } // end else if
    // Resize video proportionaly
    function regularSize ()
        videoObj._width = 600;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > 360)
            videoObj._height = 360;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (600 - videoObj._width) / 2;
        videoObj._y = (360 - videoObj._height) / 2;
    function largeSize ()
        videoObj._width = Stage.width;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > Stage.height)
            videoObj._height = Stage.height;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (Stage.width - videoObj._width) / 2;
        videoObj._y = (Stage.height - videoObj._height) / 2;
    // Fullscreen button
    controls_mc.fullscreen_mc.onRollOver = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("fullOver");
        else
            this.gotoAndStop("fullCloseOver");
        } // end else if
    controls_mc.fullscreen_mc.onRollOut = controls_mc.fullscreen_mc.onReleaseOutside = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("full");
        else
            this.gotoAndStop("fullClose");
        } // end else if
    // Toggle fullscreen button
    controls_mc.fullscreen_mc.onRelease = function ()
        if (Stage["displayState"] == "normal")
            Stage["displayState"] = "fullscreen";
            _parent.video_txt.theText._visible = false;
        else
            Stage["displayState"] = "normal";
            _parent.video_txt.theText._visible = true;

    if you mean sound works well when the gallery is tested without being loaded into another swf but fails when loaded, change the highlighted line:
    // Import filter classes
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    // Set flash variables
    var xmlFileUrl:String = "playlist.xml";
    var auto_play:String = "true";
    // Set xml file URL
    if (_root.xmlfile) {
        xmlFileUrl = _root.xmlfile;
    var V_SRC;
    var thuArray:Array = new Array();
    var currentVideo:Number = 0;
    var totalItems;
    var numOfItems:Number;
    var itemDistance:Number = 120+5;
    var itemHeight:Number = 80+2;
    var Value:Number = 1;
    var boundry:Number = 1;
    var ratio:Number = 1;
    var diff:Number = 1;
    var collectionWidth:Number = 1;
    var buffer:Number = 135*2;
    this.createEmptyMovieClip("video_txt",this.getNextHighestDepth());
    video_txt.createTextField("theText",video_txt.getNextHighestDepth(),0,0,584,36);
    video_txt.theText.selectable = false;
    video_txt.theText.autoSize = "left";
    //The Format
    myFormat = new TextFormat();
    myFormat.font = _root.font_format;
    myFormat.size = _root.font_size;
    myFormat.color = _root.font_color;
    myFormat.align = "center";
    video_txt.theText.setNewTextFormat(myFormat);
    // Create a new movieclip to load the thumbs
    var thumbLoader:MovieClipLoader = new MovieClipLoader();
    var thumbListener:Object = new Object();
    thumbLoader.addListener(thumbListener);
    thumbListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number)
        new Tween(target_mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
        target_mc._parent.preloader_mc._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = xmlLoaded;
    xml.load(xmlFileUrl);
    // Load the xml file into the player
    function xmlLoaded(b:Boolean) {
        if (b) {
            auto_play = this.firstChild.firstChild.attributes.auto_play;
            scrollSpeed = parseInt(this.firstChild.firstChild.attributes.scrollSpeed);
            totalItems = this.firstChild.firstChild.childNodes;
            numOfItems = totalItems.length;
            for (j=0; j<numOfItems; j++) {
                var i = player_mc.main_mc.collection_mc.attachMovie("mc_Thumb", "thumb_"+j, j);
                i._x = itemDistance*j;
                thumbLoader.loadClip(totalItems[j].attributes.thumb,i.loader_mc);
                i.id = j;
                i.videoTitle = totalItems[j].attributes.title;
                i.videoUrl = totalItems[j].attributes.src;
                // Create an event for thumb rollover
                i.onRollOver = iRoll;
                i.onRollOut = i.onReleaseOutside=iOut;
                i.onRelease = iRelease;
                thuArray[j] = i;
            // default first video
            collectionWidth = player_mc.main_mc.collection_mc._width;
            currentVideo = 0;
            V_SRC = thuArray[0].videoUrl;
            changeVideo();
            //scope._alpha = 100;
            new Tween(scope, "_alpha", Regular.easeOut, 0, 100, 0.5, true);
        else
            trace("Error! xml file not loaded");
    // onRollOver Events
    function iRoll() {
        player_mc.mc_title.title_txt.htmlText = totalItems[this.id].attributes.title;
        this.light_mc.play();
    function iRelease() {
        currentVideo = this.id;
        changeVideo();
    function changeVideo() {
        V_SRC = thuArray[currentVideo].videoUrl;
        player_mc.loadVideo();
        currentThumb();
        player_mc.mc_title.title_txt.htmlText = thuArray[currentVideo].videoTitle;
        video_txt.theText.text = totalItems[currentVideo].attributes.title;
        player_mc.so.getVolume();
        player_mc.playStatus = 1;
        player_mc.checkStatus();
    function nextVideo() {
        if (currentVideo<(numOfItems-1)) {
            currentVideo++;
        } else {
            currentVideo = 0;
        changeVideo();
    function currentThumb() {
        for (i=0; i<thuArray.length; i++) {
            if (i == currentVideo) {
                thuArray[i].enabled = true;
    // Mouse movement on rollover
    this.onMouseMove = function() {
        collectionWidth = player_mc.main_mc.collection_mc._width;
        boundry = player_mc.main_mc.area_mc._width;
        if ((player_mc.main_mc._ymouse>0) && (player_mc.main_mc._ymouse<itemHeight)) {
            if ((player_mc.main_mc._xmouse>0) && (player_mc.main_mc._xmouse<boundry)) {
                ratio = player_mc.main_mc._xmouse/boundry;
                diff = (collectionWidth-boundry)+buffer;
                Value = Math.floor((-ratio)*diff)+(buffer/2);
        updateAfterEvent();
    this.onEnterFrame = function() {
        // Define movement area and speed
        if (player_mc.main_mc.collection_mc._width>player_mc.main_mc.area_mc._width) {
            player_mc.main_mc.collection_mc._x = Math.round((player_mc.main_mc.collection_mc._x)+((Value-player_mc.main_mc.colle ction_mc._x)/scrollSpeed));
            if (player_mc.main_mc.collection_mc._x>0) {
                player_mc.main_mc.collection_mc._x = 0;
            } else if (player_mc.main_mc.collection_mc._x<(player_mc.main_mc.area_mc._width-(player_m c.main_mc.collection_mc._width))) {
                player_mc.main_mc.collection_mc._x = Math.round(player_mc.main_mc.area_mc._width-(player_mc.main_mc.collection_mc._w idth));
        } else {
            player_mc.main_mc.collection_mc._x = 0;
        updateAfterEvent();
    part two:
    // Define flash variables
    var video_url:String = "";
    var tempx:Number = this._parent._x;
    var tempy:Number = this._parent._y;
    var timeCounter:Number = 0;
    var timeInSeconds:Number = _root.time_counter;
    // Object to listen to onStage Event
    videoObj = vid.videoObj;
    // Setting up the connection
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    // Buffer time
    ns.setBufferTime (10);
    videoObj.attachVideo (ns);
    function loadVideo () {
        video_url = _parent.V_SRC;
        trace(video_url);
        ns.play (video_url);
    function checkStatus()
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("pause");
            mc_playAgain._visible = false;
            thumbs_out = false;
            title_out = false;
        else
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
        } // end else if
        if (so.getVolume() == 0)
            controls_mc.mute_mc.gotoAndStop("mute");
        else
            controls_mc.mute_mc.gotoAndStop("on");
    }; // End of the function
    mc_playAgain._visible = false;
    // Check Status of video
    ns.onStatus = function (info)
        if (info.code == "NetStream.Buffer.Empty")
            mc_buffer._visible = true;
        else if (info.code == "NetStream.Buffer.Full")
            mc_buffer._visible = false;
        else if (info.code == "NetStream.Play.Stop")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            else
                trace;
            } // end else if
            mc_playAgain._visible = true;
            mc_buffer._visible = false;
            thumbs_out = true;
            title_out = true;
            checkStatus();
        } // end else if
    // Get info about video
    ns.onMetaData = function(infoObject:Object)
        FLVduration = infoObject["duration"];
        relationshipW = infoObject.height / infoObject.width;
        relationshipH = infoObject.width / infoObject.height;
        if (Stage["displayState"] == "fullScreen")
            largeSize ();
        else
            regularSize ();
        if (_parent.auto_play == "false")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            mc_buffer._visible = false;
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
            thumbs_out = true;
            title_out = true;
            _parent.auto_play = "true";
        }// end else if
    var videoInterval = setInterval(videoStatus, 100);
    var amountLoaded;
    var duration;
    // videoStatus on load Event
    function videoStatus()
        amountLoaded = ns.bytesLoaded / ns.bytesTotal;
        controls_mc.mc_progress.mc_buff._width = amountLoaded * 250;
        controls_mc.mc_progress.mc_played._x = ns.time / duration * 250;
        controls_mc.mc_progress.mc_played._xscale = Math.round(ns.time*100/FLVduration);
    }; // End of the function
    function scrubIt()
        ns.seek(Math.floor(controls_mc.mc_progress.mc_played._x / 250 * duration));
    }; // End of the function
    // video time
    var time_interval:Number = setInterval(checkTime, 500, ns);
    function checkTime(ns:NetStream) {
        //current time
        var ns_seconds:Number = ns.time;
        var minutes:Number = Math.floor(ns_seconds/60);
        var seconds = Math.floor(ns_seconds%60);
        sec = seconds;
        min = minutes;
        if (sec<10) {
            sec = "0"+sec;
        if (min<10) {
            min = "0"+min;
        controls_mc.time_txt.time_1.text = min+":"+sec;
        //total time
        var minutes2:Number = Math.floor(FLVduration/60);
        var seconds2 = Math.floor(FLVduration%60);
        sec2 = seconds2;
        min2 = minutes2;
        if (sec2<10) {
            sec2 = "0"+sec2;
        if (min2<10) {
            min2 = "0"+min2;
        controls_mc.time_txt.time_2.text = min2+":"+sec2;
        if (controls_mc.time_txt.time_2.text == "NaN:NaN") {
            controls_mc.time_txt.time_2.text = "00:00";
    setStage ();
    // Object to listen onStage Event
    var stageL:Object = new Object ();
    // function respnsible for content alignment
    function setStage ()
        if (Stage["displayState"] == "fullScreen") {
            tempx = this._parent._x;
            tempy = this._parent._y;
            this._parent._x = 0;
            this._parent._y = 0;
            vidBg_mc._x = 0;
            vidBg_mc._y = 0;
            mc_title._x = 0;
            mc_title._y = -30;
            slide_me._x = 0;
            slide_me._y = 0;
            vidBg_mc._width = Stage.width;
            vidBg_mc._height = Stage.height;
            mc_title._width = Stage.width;
            mc_title._height = Stage.height / 20;
            slide_me._width = Stage.width;
            slide_me._height = Stage.height / 20;
            vid._x = vid._y = 0;
            largeSize ();
            controls_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));
            controls_mc._y = Math.round (Stage.height - 36);
            mc_playAgain._x = Math.round ((Stage.width / 2) - (mc_playAgain._width / 2));
            mc_playAgain._y = Math.round (Stage.height - 572);
            thumbs_mc._x = Math.round ((Stage.width / 2) - (thumbs_mc._width / 2));
            thumbs_mc._y = Math.round (Stage.height - 115);
            main_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));;
            hide_mc.onEnterFrame = function () {
                timeCounter = timeCounter + 1;
                if (timeCounter >= timeInSeconds * 30) {
                    timeCounter = 0;
                    controls_mc._alpha = 0;
            this.onMouseMove = function () {
                timeCounter = 0;
                controls_mc._alpha = 100;
        else
            delete hide_mc.onEnterFrame;
            delete this.onMouseMove;
            controls_mc._alpha = 100;
            this._parent._x = tempx;
            this._parent._y = tempy;
            vidBg_mc._width = 600;
            vidBg_mc._height = 360;
            mc_title._width = 600;
            mc_title._height = 30;
            slide_me._width = 600;
            slide_me._height = 30;
            vidBg_mc._x = vid._x = 0;
            vidBg_mc._y = vid._y = 35;
            mc_title._x = vid._x = 0;
            mc_title._y = vid._x = -30;
            slide_me._x = vid._x = 0;
            slide_me._y = vid._y = 35;
            regularSize ();
            controls_mc._x = 0;
            controls_mc._y = 395;
            mc_playAgain._x = 243;
            mc_playAgain._y = 158;
            thumbs_mc._x = 0;
            thumbs_mc._y = 316;
            main_mc._x = 0;
            main_mc._y = 406;
        mc_buffer._x = Math.round (vidBg_mc._x + (vidBg_mc._width / 2));
        mc_buffer._y = Math.round (vidBg_mc._y + (vidBg_mc._height / 2));
    // to apply when stage (browser window) is resized or modified
    stageL.onResize = function () {
        setStage ();
    // attaching object to the stage
    Stage.addListener (stageL);
    MovieClip.prototype.slide = function(yPos) {
        this._y -= (this._y-yPos)/5;
    // tilte actions
    mc_title.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && title_out == false)
            this.slide(5);
        else if (Stage["displayState"] == "normal" && title_out == true)
            this.slide(35);
        if (Stage["displayState"] == "fullScreen" && title_out == false)
            this._y -= (this._y+106)/5;
        else if (Stage["displayState"] == "fullScreen" && title_out == true)
            this.slide(0);
    // thumbs actions
    main_mc.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && thumbs_out == false)
            this.slide(406);
        else if (Stage["displayState"] == "normal" && thumbs_out == true)
            this.slide(299);
        if (Stage["displayState"] == "fullScreen" && thumbs_out == false)
            this._y = Math.round (Stage.height - 0);
        else if (Stage["displayState"] == "fullScreen" && thumbs_out == true)
            this._y = Math.round (Stage.height - 133);
    // Playlist button
    controls_mc.playlist_mc.onRollOver = function ()
        this.gotoAndStop("playlistOver");
    controls_mc.playlist_mc.onRollOut = controls_mc.playlist_mc.onReleaseOutside = function ()
        this.gotoAndStop("playlist");
    // Toggle playlist button
    controls_mc.playlist_mc.onRelease = function ()
        if (thumbs_out == false)
            thumbs_out = true;
            title_out = true;
        else if (thumbs_out == true)
            thumbs_out = false;
            title_out = false;
        } // end if else
    // Define hit area for playPause button
    vid.onPress = controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("play")
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            controls_mc.playPause.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    // playPause button
    controls_mc.playPause.onRollOver = function ()
        if (playStatus == 1)
            this.gotoAndStop("pauseOver");
        else
            this.gotoAndStop("playOver");
        } // end else if
    controls_mc.playPause.onRollOut = controls_mc.playPause.onReleaseOutside = function ()
        if (playStatus == 1)
            this.gotoAndStop("pause");
        else
            this.gotoAndStop("play");
        } // end else if
    // Toggle playPause button
    controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            this.gotoAndStop("play");
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            this.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    controls_mc.skip_mc.onRollOver = function ()
        this.gotoAndStop("skipOver");
    controls_mc.skip_mc.onRollOut = controls_mc.skip_mc.onReleaseOutside = function ()
        this.gotoAndStop("skip");
    controls_mc.skip_mc.onRelease = function ()
        _parent.nextVideo()
    // Play Again button
    mc_playAgain.onRollOver = function ()
        this.gotoAndStop("playAgainOver");
    mc_playAgain.onRollOut = mc_playAgain.onReleaseOutside = function ()
        this.gotoAndStop("playAgain");
    // Toggle Play Again button
    mc_playAgain.onRelease = function ()
        this._visible = false;
        ns.pause();
        playStatus = 1;
        checkStatus();
    // make the seek bar clickable
    controls_mc.mc_progress.mc_buff.onPress = function()
        xpos = controls_mc.mc_progress._xmouse;
        percent = Math.round(xpos/controls_mc.mc_progress._width*100);
        seekTime = percent/100*FLVduration;
        seekTime = Math.round(seekTime*100)/100;
        ns.seek(seekTime);
    // Set volume level
    var s:Sound = new Sound(this);
    s.setVolume(_root.volume_value);
    controls_mc.mc_soundLevel.mc_volume._xscale = _root.volume_value;
    // Volume control
    controls_mc.mc_soundLevel.onPress = function()
        volumeTo = (this._xmouse / this._width)*100;
        this.mc_volume._xscale = volumeTo;
        s.setVolume(volumeTo);
    // Volume
    _parent.createEmptyMovieClip("vSound", _parent.getNextHighestDepth());
    vSound.attachAudio(ns);
    var so = new Sound(vSound);
    so.setVolume(_root.volume_value);
    // Mute button
    controls_mc.mute_mc.onRollOver = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("onOver");
        else
            this.gotoAndStop("muteOver");
        } // end else if
    controls_mc.mute_mc.onRollOut = controls_mc.mute_mc.onReleaseOutside = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("on");
        else
            this.gotoAndStop("mute");
        } // end else if
    // Toggle mute button
    controls_mc.mute_mc.onRelease = function ()
        if (so.getVolume() >= 1)
            controls_mc.mc_soundLevel.mc_volume._xscale = 0;
            so.setVolume(0);
            this.gotoAndStop("muteOver");
        else
            controls_mc.mc_soundLevel.mc_volume._xscale = 70;
            so.setVolume(_root.volume_value);
            this.gotoAndStop("onOver");
        } // end else if
    // Resize video proportionaly
    function regularSize ()
        videoObj._width = 600;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > 360)
            videoObj._height = 360;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (600 - videoObj._width) / 2;
        videoObj._y = (360 - videoObj._height) / 2;
    function largeSize ()
        videoObj._width = Stage.width;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > Stage.height)
            videoObj._height = Stage.height;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (Stage.width - videoObj._width) / 2;
        videoObj._y = (Stage.height - videoObj._height) / 2;
    // Fullscreen button
    controls_mc.fullscreen_mc.onRollOver = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("fullOver");
        else
            this.gotoAndStop("fullCloseOver");
        } // end else if
    controls_mc.fullscreen_mc.onRollOut = controls_mc.fullscreen_mc.onReleaseOutside = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("full");
        else
            this.gotoAndStop("fullClose");
        } // end else if
    // Toggle fullscreen button
    controls_mc.fullscreen_mc.onRelease = function ()
        if (Stage["displayState"] == "normal")
            Stage["displayState"] = "fullscreen";
            _parent.video_txt.theText._visible = false;
        else
            Stage["displayState"] = "normal";
            _parent.video_txt.theText._visible = true;

  • Need help with DW photo gallery

    I'm learning DW the hard way, trial & error. I've created
    my photo album & uploaded it. It looks find, but when I click
    on the pictures to enlarge them I get the message "ooops no page
    found". What do I do to resolve this issue? I know I'm missing a
    step.
    Please help me!!! Thanks, Barbara

    Look at the path to the larger image. Is the path correct?
    Did you upload
    the larger photos?
    Can you post a URL to your site?
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: Dreamweaver CS3: The Missing Manual,
    DMX 2004: The Complete Reference, DMX 2004: A Beginner's
    Guide
    Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "whuzthere" <[email protected]> wrote in
    message
    news:fs4591$6ir$[email protected]..
    > I'm learning DW the hard way, trial & error. I've
    created my photo album
    > &
    > uploaded it. It looks find, but when I click on the
    pictures to enlarge
    > them I
    > get the message "ooops no page found". What do I do to
    resolve this
    > issue? I
    > know I'm missing a step.
    >
    > Please help me!!! Thanks, Barbara
    >

  • Need Help with Javascript

    I posted a little bit ago, but solved part of the problem I'm having with this javascript. I'm new to javascript and am trying my best to understand how to do it. I have a lightbox script that I'm trying to edit so that I can have a different image be the starting point of the images in the lightbox, depending on which is clicked. Currently, no matter how I change the script, I have the same starting image. I think that I don't understand the handlers completely that affect the total script. Any help understanding these would be helpful.
    Here's the affected html:
        <div id="content_1" class="content">
                                  <img src="file1bottom.png" width="982" height="674" alt="Photos of Holston Room" usemap="#filmstripmap1">
                <map name="filmstripmap1" >
                           <area id="1" shape="poly" coords="732,91,884,97,877,198,718,187" class="open_lightbox" href="#" alt="Photo_1">
                   <area id="2" shape="poly" coords="724,205,874,214,868,312,717,301" class="open_lightbox" href="#" alt="Photo_2">
                   <area id="3" shape="poly" coords="717,324,872,332,862,432,713,420" class="open_lightbox" href="#" alt="Photo_3">
                   <area id="4" shape="poly" coords="711,440,865,447,857,547,709,537" class="open_lightbox" href="#" alt="Photo_4">
                   <area id="5" shape="poly" coords="470,150,617,130,628,231,483,245" class="open_lightbox" href="#" alt="Photo_5">
                   <area id="6" shape="poly" coords="481,260,630,247,641,347,491,361" class="open_lightbox" href="#" alt="Photo_6">
                   <area id="7" shape="poly" coords="492,380,644,363,654,460,504,477" class="open_lightbox" href="#" alt="Photo_7">
                   </map>
    <div class="lightbox-panel">
    <img id="photo1" src="HolstonImages/00.jpg" class="ntt_media_file" alt="Room Photo 1"/>
    <img id="photo2" src="HolstonImages/01.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 2"/>
    <img id="photo3" src="HolstonImages/02.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 3"/>
    <img id="photo4" src="HolstonImages/03.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 4"/>
    <img id="photo5" src="HolstonImages/04.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 5"/>
    <img id="photo6" src="HolstonImages/05.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 6"/>
    <img id="photo7" src="HolstonImages/06.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 7"/>
    <iframe width="750" height="500" style="display:none;"
    class="ntt_media_file" frameborder="0" allowfullscreen></iframe>
    <div class="ntt_prev_button">
    <img src="fc_left_arrow.png" id="ntt_prev_media" alt="Get Previous Media Item"/>
    </div>
    <div class="ntt_next_button">
    <img src="fc_right_arrow.png" id="ntt_next_media" alt="Get Next Media Item"/>
    </div>
    <div class="ntt_close_button">
    <img src="ntt_close_button.png" id="close-panel" alt="Close Lightbox"/>
    </div>
    </div>
    <div id="lightbox_background"></div>
          </div>
    Here is the javascript (highlighted where I'm trying to add script to change it to pull up which image I want:
    $(document).ready(function(){
              // When a link of class open_lightbox is clicked this function is triggered
               $("#1.open_lightbox").click(function(){
               // Sets the opacity for the background shadow to 85%
               $("#lightbox_background").css({opacity: 0.75});
               // Makes all of the hidden parts of the lightbox appear
               $("#lightbox_background, .lightbox-panel, .ntt_close_button, .ntt_next_button, .ntt_prev_button").fadeIn(300);
               // Gets the height and width of the first media type displayed
               // Media type is a reference to any images or movies
               ntt_img_height = $('.ntt_media_file:first').css('height');
               ntt_img_width = $('.ntt_media_file:first').css('width');
               // Changes the size of the parent div that surrounds the media on screen
               // Animate will make the changes slowly for dramtic effect
               $('.ntt_media_file:first').parent().animate({
               height: ntt_img_height+100,
               width: ntt_img_width
               }, "slow");
              $("#2.open_lightbox").click(function(){
              $("#lightbox_background").css({opacity: 0.75});
              $("#lightbox_background, .lightbox-panel .ntt_close_button, .ntt_next_button, .ntt_prev_button").fadeIn(300);
               $(".ntt_media_file").is("#photo2")
               // If an img is clicked on with the id of close-panel run this function
               $("img#close-panel").click(function(){
               // Make all the lightbox elements disappear
               $("#lightbox_background, .lightbox-panel, .ntt_close_button, .ntt_next_button, .ntt_prev_button").fadeOut(300);
               // When the next button is clicked it triggers a click event on
               // the current image visible on the screen
               $("img#ntt_next_media").click(function(){
                         $(".ntt_media_file:visible").trigger('click');
               // Closes the lightbox if the escape key is pressed
               $(document).keypress(function(e) {
                         // If the key pressed was escape close the lightbox
                         if(e.keyCode == 27)
                                   $("#lightbox_background, .lightbox-panel").fadeOut(300);
               // This event is triggered any time the user clicks on anything with a
               // class of ntt_media_file.
               // It cycles through the different media types from first to last
              $(".ntt_media_file").click(function(){
                         if( $(this).next('.ntt_media_file').length == 0)
                                   // Make all visible media disappear in the lightbox
                                   $(".ntt_media_file:visible").toggle();
                                   // Display the first media in the lightbox
                                   $(".ntt_media_file:first").toggle();
                                   // Call this to resize the div that surrounds the media
                                   // based on the size of the media displayed
                                   ntt_resize_div_container();
                         } else {
                                   // Make all visible media disappear in the lightbox
                                   $(".ntt_media_file:visible").toggle();
                                   // this is a reference to the element that was clicked to trigger
                                   // this function. This statement is causing the next media
                                   // with the class ntt_media_file to appear
                                   $(this).next('.ntt_media_file').toggle();
                                   // Call this to resize the div that surrounds the media
                                   // based on the size of the media displayed
                                   ntt_resize_div_container();
               // This event is triggered any time the user clicks on the previous
               // button.
               // It cycles backwards through the different media types
               $(".ntt_prev_button").click(function(){
                         // This checks to see if a media file is available to display
                         if( $(".ntt_media_file:visible").prev('.ntt_media_file').length == 0)
                                   // Make all visible media disappear in the lightbox
                                   $(".ntt_media_file:visible").toggle();
                                   // Display the first media in the lightbox
                                   $(".ntt_media_file:last").toggle();
                                   // Call this to resize the div that surrounds the media
                                   // based on the size of the media displayed
                                   ntt_resize_div_container();
                         } else {
                                   // Get the current index value for the media shown
                                   var ntt_current_media_shown = $(".ntt_media_file:visible").index();
                                   // Get the index for the media that proceeds the current image
                                   var ntt_prev_item_to_show = ntt_current_media_shown - 1;
                                   // Toggle off all visible media in the lightbox
                                   $(".ntt_media_file:visible").toggle();
                                   // Toggle on the media previous to the last shown
                                   $(".ntt_media_file").eq(ntt_prev_item_to_show).toggle();
                                   // Call this function to resize the div based on dimensions
                                   // of the media shown in the lightbox
                                   ntt_resize_div_container();
               // Call this function to resize the div based on dimensions
               // of the media shown in the lightbox
               function ntt_resize_div_container()
                         // Get the current height and width of the visible media in lightbox
                         ntt_img_height = $(".ntt_media_file:visible").css('height');
                        ntt_img_width = $(".ntt_media_file:visible").css('width');
                        // Define the margins based on the size of the image
                        ntt_img_margin_top = (ntt_img_height / 4);
                        ntt_img_margin_left = (ntt_img_width / 4);
                         // Target the div that surrounds the visible media (it's a div)
                         // Adjust the size of the parent div based on the dimensions
                         // of the media it contains
                         $(".ntt_media_file:visible").parent().animate({
                                   height: ntt_img_height+100,
                                   width: ntt_img_width
                                   }, "fast");
                         $(".ntt_media_file:visible").parent().css({
                                  'position': 'fixed',
                                  'top': '22%',
                                  'left': '22%',
                                  'min-width': '775px',
                                  'margin-top': ntt_img_margin_top,
                                  'margin-left': ntt_img_margin_left
    Here is the link the the uploaded script and html: www.theriveroverlook.com/Trial.html

    Hi,
    May be this can help:
    <html>
    <body>
    <script language="javascript">
    var num1=0;
    var num2=0;
    var num3=0;
    function printGrade(){
    var score=prompt("Enter your score","Enter your score");
    if(score>81)
    alert("Grade : A");
    else if(score>61)
    alert("Grade : B");
    else if(score>41)
    alert("Grade : C");
    else
    alert("Grade : D");
    function input3Number(){
    num1=prompt("Enter First Number","Enter First Number");
    num2=prompt("Enter Second Number","Enter Second Number");
    num3=prompt("Enter Third Number","Enter Third Number");
    function returnMax(){
    input3Number();
    if(num1>num2){
    if(num1>num3)
    alert(num1);
    else
    alert(num3);
    }else{
    if(num2>num3)
    alert(num2);
    else
    alert(num3);
    function returnMin(){
    input3Number();
    if(num1<num2){
    if(num1<num3)
    alert(num1);
    else
    alert(num3);
    }else{
    if(num2<num3)
    alert(num2);
    else
    alert(num3);
    function daysInMonth(){
    var monthNumber=prompt("Enter Month in Number","");
    if(monthNumber==1 || monthNumber==3 || monthNumber==5 || monthNumber==7 || monthNumber==8 || monthNumber==10 || monthNumber==12)
    alert("Days in Month is : 31");
    else if(monthNumber==2)
    alert("Days in Month is : 28/29 (Leap year)");
    else
    alert("Days in Month is : 30");
    </script>
    <input type="button" name="month1" value="Days in a Month" onclick="daysInMonth()">
    <input type="button" name="B1" value="Calculate Grade" onclick="printGrade()">
    <input type="button" name="max" value="Maximum number" onclick="returnMax()">
    <input type="button" name="max" value="Minimum number" onclick="returnMin()">
    </body>
    </html>

  • Need help with Javascript to get value of standard report column

    Hello All,
    Apex version 3.1
    I have a SQL Query (Updateable report) region where I need to do some validations using an OnDemand Applicaiton Process and javascript. For this validation I need to use the serial number and the item id from the same report row. The function is called when the serial number is changed. I can get the serial number easily because it is a Text field, however the item id is a standard report column (making it a text field or hidden gives me a checksum error, long story). How do I get the value for the standard report column in order to set the value for an Application item to be used in my Application Process along with the serial number? Here is my code below.
    <script>
    function f_ValidateSerial(pThis)
      // The row in the table
      var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
        //alert('Row is '+vRow);
      // Display the serial number
        //alert('The Serial Number is '+html_GetElement('f21_'+vRow).value);
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateSerial',0);
    get.add('F101_SERIAL_NUMBER',html_GetElement('f21_'+vRow).value);
    get.add('F101_INVENTORY_ITEM_ID',+html_GetElement(?????+vRow).value);   // Here's where I need to get the item id to set application item!!
    gReturn = get.get();
    if (gReturn)
          alert(gReturn);
      if(gReturn)
          html_GetElement('f21_'+vRow).value = '';
    </script>

    jarola wrote:
    Hi,
    Ok, No standard report column do not have name attribute-
    You can add one extra column to report that is your Item Id with different alias.
    Then change that column Display as to "Hidden".
    Now you have hidden input where is your Item Id. Than input have name and id.
    Regards,
    JariBut this puts me back to my initial problem. When making the column hidden I get the checksum error...
    Error in mru internal routine: ORA-20001: Error in MRU: row= 0, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process...
    The item id is NOT in the table which I am updating (I use a subquery to get the data) so I think it has to be a standard report column. Hidden and Text Item (which have an item id) all generate the checksum error.
    So I think I'm back to my original question. Given a standard report column on a row in a sql query (updateable report) region how do I get the value using Javascript?
    Edited by: blue72TA on Aug 2, 2011 12:07 PM

  • Need help with PHP form processor coding

    I posted my first question on this forum earlier today and got help quickly. I'm going to try again and see who can help me this time.
    I have a customer feedback form that I designed and I am using Spry validation on the fields and I'm use Recaptcha as well. Now I'm trying to get the form handler working. I know there are some canned procedures out there but I hate using too much code that I don't understand at all.  I'm sure my first attempt at PHP coding is horrible but we all have to learn. My processor is working in some areas but there are holes I don't know how to fill in:
    1. When I validate the Recaptcha input, if it was entered correctly, I go on to send an email to the appropriate person BUT how do I send them a message and get back to the form if the recaptcha validation fails and still have their entries in place?
    2. Assuming the recaptcha validated correctly, my procedure sends an email  and it writes the comments to a file for historical purposes. These parts seem to be working (by some miracle). Once I do this, I think I would like to open a little window to send the customer a confirmation message, have them click the box to confirm and close the window and then take them back to the feedback form but now have it be reset. I'm not sure how to do these steps.
    Does anyone have a SIMPLE example to accomplish these steps?
    Thanks much!!
    Donna

    It would be hard to give you substantive examples of how to accomplish your goals here without seeing your PHP code, but in general the following methods would work:
    1.  To return to the form with the fields populated, is easiest when the processing script and the form code are on the same page.  The idea is that when the form is not properly completed, you fall back into the form code and use the data from the posted values to repopulate the fields, e.g.,
    <input type="text' name="whatever" value="<?php isset($_POST['whatever']) { echo $_POST['whatever']; ?>">
    or
    <select name="whatever2">
    <option<?php if(isset($_POST['whatever2']) && $_POST['whatever2']=='this_option_value') { echo ' selected="selected"'; } ?>>this_option_value</option>
    </select>
    Each field is set to repeat the posted data (if the corresponding $_POST value is set - to avoid error messages when the page is first loaded).
    2.  You can place the confirmation message on the page with CSS that hides it.  When the form is submitted successfully, just set a variable that is used to show the previously hidden message, e.g.,
    Assume the following CSS -
    #message { display:none; }
    and the following HTML -
    <p id="message">Congratulations</p>
    and the fact that you have set a PHP variable called $success to be true when the form is successfully submitted, you would just modify the HTML like this -
    <p id="message"<?php if($success) { echo ' style="display:block"; } ?>>Congratulations</p>
    Make sense?

  • Need help with javascript drop down menu

    Hi,
    I inherited a website that was already created. I do not know
    what version of dreamweaver they created it in but I have
    Dreamweaver MX 2004. I am trying to make changes to the drop down
    menus. I have figured most everything else out about dreamweaver
    but cant figure out how these menu's are made or can be modified. I
    have gone into the main template and clicked on the menu section I
    want to modify. All it shows it a link to javascript:; I have
    searched everywhere for what this means or how to modify it but
    can't find anything. Can someone tell me how to get to this info so
    I can make changes. Thanks. My website is www.pfcal.org if that
    helps.

    Oh boy. Templates are not for uploading. They have no effect
    on the
    server. They only change local files which must then be
    uploaded to the
    server. But - I'm troubled by this comment -
    > It didnt give me an option to "save" though
    When you made the changes did the template page get marked as
    "dirty" (with
    an asterisk beside the name)? Which DW are you using?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "sjg23" <[email protected]> wrote in message
    news:[email protected]...
    > Ok. thanks. I did that but nothing changed. Here is what
    I have now:
    >
    > <div id="MMMenuContainer1112210633_0">
    > <div id="MMMenu1112210633_0"
    onmouseout="MM_menuStartTimeout(100);"
    > onmouseover="MM_menuResetTimeout();">
    > <a href="../message_director.cfm"
    id="MMMenu1112210633_0_Item_0"
    > class="MMMIFVStyleMMMenu1112210633_0"
    >
    onmouseover="MM_menuOverMenuItem('MMMenu1112210633_0');">
    > Director's Message
    > </a>
    > <a href="../mission.cfm"
    id="MMMenu1112210633_0_Item_1"
    > class="MMMIVStyleMMMenu1112210633_0"
    >
    onmouseover="MM_menuOverMenuItem('MMMenu1112210633_0');">
    > Our Mission
    > </a>
    > <a href="../history.cfm"
    id="MMMenu1112210633_0_Item_2"
    > class="MMMIVStyleMMMenu1112210633_0"
    >
    onmouseover="MM_menuOverMenuItem('MMMenu1112210633_0');">
    > Our History
    > </a>
    > <a href="../leadership_transiton.cfm"
    id="MMMenu1112210633_0_Item_3"
    > class="MMMIVStyleMMMenu1112210633_0"
    >
    onmouseover="MM_menuOverMenuItem('MMMenu1112210633_0');">
    > Leadership Transition
    > </a>
    > <a href="../pcl_organized.cfm"
    id="MMMenu1112210633_0_Item_4"
    > class="MMMIVStyleMMMenu1112210633_0"
    >
    onmouseover="MM_menuOverMenuItem('MMMenu1112210633_0');">
    > How PCL is Organized
    > </a>
    > <a href="../board_directors.cfm"
    id="MMMenu1112210633_0_Item_5"
    > class="MMMIVStyleMMMenu1112210633_0"
    >
    onmouseover="MM_menuOverMenuItem('MMMenu1112210633_0');">
    >
    Board of Directors and Officers
    > </a>
    > <a href="VideoNGO.cfm" id="MMMenu1112210633_0_Item_6"
    > class="MMMIVStyleMMMenu1112210633_0"
    >
    onmouseover="MM_menuOverMenuItem('MMMenu1112210633_0');">
    > See our promotional video</a>
    >
    > </div>
    > </div>
    >
    > I made this change in the html code of the page
    "main.dwt" which is my
    > main
    > template. It didnt give me an option to "save" though so
    it's like it
    > doesnt
    > recognize that I changed anything. I saved it anyway and
    uploaded but no
    > change
    > on the web.
    >

  • Just started Livecycle yesterday. Need help with Javascripting

    I'm new to scripting in general, but have figured out enough to be dangerous in Acrobat. Unfortunately, Acrobat no longer fulfills the need I have for dynamic forms and I have started trying to figure out Livecycle. Is the scripting in Livecycle THAT different from Acrobat that I need to relearn the scripting I figured out in Acrobat? Below is an example. It is in a table where I am trying to determine height of instrument (HI) from the elevation (Ele) and the difference between back (BS) and fore sights (FS). Any help is greatly appreciated. Thanks!
    This is the script I used in Acrobat and it worked:
    if(this.getField("BSRow2").value) {
      var add = this.getField("BSRow2").value + this.getField("EleRow1").value
      this.getField("HIRow2").value = add;
    } else {
      var height = this.getField("HIRow1").value
      this.getField("HIRow2").value = height;
    This is the script I used in Livecycle and it doesn't
    if(this.getField(BS).value) {
      var add = this.getField(BS).value + this.getField(Row1.Ele).value
      this.getField(this).value = add;
    } else {
      var height = this.getField(Row1.HI).value
      this.getField(this).value = height;

    Hi i just started programming in java.
    im running j2se 1.5.0 on windows xp
    im on the subject of classes and objects.
    here is my simple little code im trying to get to
    compile
    public class Newprog
         public static void main(String[] args)
              Greeter myObjectGreeter = new Greeter();
              myObjectGreeter.sayHello();
    }now here are the error messages i get:
    --------------------Configuration:
    <Default>--------------------
    C:\Program Files\Java\jre1.5.0_07\lib\Newprog.java:5:
    cannot find symbol
    symbol : class Greeter
    location: class Newprog
    Greeter myObjectGreeter = new
    Greeter();
    ^
    s\Java\jre1.5.0_07\lib\Newprog.java:5: cannot find
    symbol
    symbol : class Greeter
    location: class Newprog
    Greeter myObjectGreeter = new
    Greeter();
    ^
    get this error message alot....well actually just
    about everytime..
    I got it working just once using texteditor but have
    no clue how i did it that time...now nomatter what i
    try i get this error
    I have my enviornmental variable set at
    path = C:\Program Files\Java\jdk1.5.0_07\bin;
    i am using JCreator Le
    i downloaded exact codes from websites and they still
    compile with this error..
    if anybody with patience could tell me what i need to
    do
    would i have to configure java some more with
    variables?
    is my installation wrong?
    do i have to save the work on a different file?
    thanks in advance
    Well here is all that goes
    As you said you were pretty new
    I suspect the following error done by most of the novice programmers in JAVA
    Where is the Greeter class ??
    ok may be you must have defined it somewhere else
    Mostly the Java Compiler hasnt found out your Greeting class
    Try locating that " Greeter.java"
    or mention it in an other file located in the same folder as "Newprog.java"
    public class Newprog
         public static void main(String[] args)
              Greeter myObjectGreeter = new Greeter();
              myObjectGreeter.sayHello();

  • Need help with javascript for an attachment button in a pdf built in LiveCycle

    what is the javascript to add an button for an attachment to a pdf

    [discussion moved to LiveCycle Forms forum.]

Maybe you are looking for