Need help on complicated thumb gallery

I need to build a gallery of thumbnails that allows you to do these things:
Click a main menu item to show      a gallery consisting of rows of thumbs
Gallery has scrollbar to      look at many rows of thumbs
Hovering over thumbs      enlarges them a little
Double-click adds a larger      size of image to another MC’s display list; Should that be the thumb      itself at a larger size of should it load another image that’s different than      the thumb? The image once in the other MC’s display list, will have to be      like a MC/sprite and be able to be manipulated, i.e. scaled…
All help with this greatly appreciated.
GF

Hi,
Here are my inputs for your questions:-
1) You have to import the thumbnails and then you have to add it into movieclip it will not be movieclip when they are imported.
2) You can use smaller images as thumbnail so the loading will be fast and on selecting the thumbnail you can load the corresponding big image
     this will save you thumbnail loading time. you can use same logic to load big image that u used for thumbnail loading...

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 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 Removing XML Photo Gallery on Button Click

    Hi, I'm new to flash so this might seem like a dumb question, but I'm right in the middle of designing a photography site and need some help.  I have 4 buttons in my timeline that go to the corresponding frame labels when clicked, above each frame label is a keyframe with actionscript applied to it, that will load an external XML photo gallery. I need the current photo gallery that's on the screen to disappear when I click on a new button to load the new XML photo gallery.  this is the code that will be above each frame label with a few changes, then below this is the code for my buttons. Any help is greatly appreciated. Thank you  Code: Select all var imageX:XML; var imageList:XMLList;  var canvas:MovieClip = new MovieClip(); var picLoader:Loader; addChild(canvas); canvas.x = -155; canvas.y = 160;   var req:URLRequest = new URLRequest("gallery.xml"); var imageLoader:URLLoader = new URLLoader(); imageLoader.addEventListener(Event.COMPLETE, onComplete); imageLoader.load(req);  function onComplete(e:Event):void { imageX = new XML(imageLoader.data); imageList = imageX.image; picLoader = new Loader(); picLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, imageLoaded); picLoader.load(new URLRequest (imageList[0].url)); }  function imageLoaded(e:Event):void  { canvas.addChild(picLoader); }    Code for the buttons in different keyframe.  Code: Select all stop();  kids_btn.addEventListener(MouseEvent.CLICK,onKidsClick); couples_btn.addEventListener(MouseEvent.CLICK,onCouplesClick); portraits_btn.addEventListener(MouseEvent.CLICK,onPortraitsClick); bellies_btn.addEventListener(MouseEvent.CLICK,onBelliesClick);  function onKidsClick(e:MouseEvent):void { gotoAndStop("kids"); }  function onCouplesClick(e:MouseEvent):void { gotoAndStop("couples"); }  function onPortraitsClick(e:MouseEvent):void { gotoAndStop("portraits"); }  function onBelliesClick(e:MouseEvent):void { gotoAndStop("bellies"); }

    Hi, I'm new to flash so this might seem like a dumb question, but I'm right in the middle of designing a photography site and need some help.  I have 4 buttons in my timeline that go to the corresponding frame labels when clicked, above each frame label is a keyframe with actionscript applied to it, that will load an external XML photo gallery. I need the current photo gallery that's on the screen to disappear when I click on a new button to load the new XML photo gallery.  this is the code that will be above each frame label with a few changes, then below this is the code for my buttons. Any help is greatly appreciated. Thank you  Code: Select all var imageX:XML; var imageList:XMLList;  var canvas:MovieClip = new MovieClip(); var picLoader:Loader; addChild(canvas); canvas.x = -155; canvas.y = 160;   var req:URLRequest = new URLRequest("gallery.xml"); var imageLoader:URLLoader = new URLLoader(); imageLoader.addEventListener(Event.COMPLETE, onComplete); imageLoader.load(req);  function onComplete(e:Event):void { imageX = new XML(imageLoader.data); imageList = imageX.image; picLoader = new Loader(); picLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, imageLoaded); picLoader.load(new URLRequest (imageList[0].url)); }  function imageLoaded(e:Event):void  { canvas.addChild(picLoader); }    Code for the buttons in different keyframe.  Code: Select all stop();  kids_btn.addEventListener(MouseEvent.CLICK,onKidsClick); couples_btn.addEventListener(MouseEvent.CLICK,onCouplesClick); portraits_btn.addEventListener(MouseEvent.CLICK,onPortraitsClick); bellies_btn.addEventListener(MouseEvent.CLICK,onBelliesClick);  function onKidsClick(e:MouseEvent):void { gotoAndStop("kids"); }  function onCouplesClick(e:MouseEvent):void { gotoAndStop("couples"); }  function onPortraitsClick(e:MouseEvent):void { gotoAndStop("portraits"); }  function onBelliesClick(e:MouseEvent):void { gotoAndStop("bellies"); }

  • 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 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 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 installing Bridge CS4 gallery in DW CS4

    I've spent days trying to find out how to put a gallery I created in Bridge CS4 into Dreamweaver CS4. Bridge created a folder filled with a lot of files, including image files and an index.html file. How do I insert these into my DW page? I'm fairly new to Dreamweaver and need the specific steps laid out for me. Thanks.

    Greetings,
    Copy the entire folder to your web root in the Dreamweaver CS4 and create a HTML page from your template, name it "gallery" then open the Dreamweaver CS4 if not already opened, click to open the files of your website at the right hand Corner of the Dreamweaver CS4 page or windows > files to open it; search for the folder of the gallery open it and copy the .swf player file to the space you have created on the gallery page save the page then press F12 on your keyboard or file > preview in browser and choose your browser to view your gallery. You could resize it after all that. It worked for me on my new web design. Good luck.
    Best regards,
    Brigma.com

  • Need help positioning flash photo gallery partially behind graphic.

    I have created the basic photoshop layout that I will now be assembling in Dreamweaver.  I wish to create a 4 or 5 image gallery using LightBox 2 that will rotate images within the header graphic.  Image attached. How would I accomplish this code wise.  Would I place the arched graphic within it's own <div> and float it above the div that holds the slideshow/gallery?  Any help would be appreciated.

    To the example that you have linked to above, make the following additions
      <div id="arch-container" style="position:relative;">
        <div id="arch-img" style="position:absolute; top: 170px;"><img src="images/arch-img.png" alt="arch_img" width="959" height="195" /></div>
      </div>
    I have used inline styles to make it easy on myself, but in reality you would put the style rules in the corresponding element selector in the CSS. Also, you would readjust the values to suit.
    Also, it is worth mentioning that placing a width and height on your image as you have done, should really be done using CSS.
    Added:
    As a side note, I have gotten into the habit of using classes for all of my style rules. I came to the conclusion that this is the way to go when trying to analyse a problem within my web page. ID's are unique per document and as such are used when manipulating the DOM using JavaScript. Now when I see an ID in one of my documents, I know that it is not a styling matter as in CSS, but a problem within my script.
    Take the above note as a thought, because there is a ongoing debate about this.
    Message was edited by: Altruistic Gramps

  • Need help fine tuning my gallery

    Hello everybody... first let me post the code and then I'll post the errors and what needs to be done...
    XML Code:
    <images>
    <image src="images/image1.jpg" title="Jelly 4" url="images/image1.jpg" />
    <image src="images/image2.jpg" title="Cat" url="images/image2.jpg" />
    <image src="images/image3.jpg" title="Statue" url="images/image3.jpg" />
    <image src="images/image4.jpg" title="Arch 3" url="images/image4.jpg" />
    <image src="images/image5.jpg" title="Penguin" url="images/image5.jpg" />
    <image src="images/image6.jpg" title="Jelly" url="images/image6.jpg" />
    <image src="images/image7.jpg" title="Statue 2" url="images/image7.jpg" />
    <image src="images/image8.jpg" title="Arch 1" url="images/image8.jpg" />
    <image src="images/image9.jpg" title="Arch 2" url="images/image9.jpg" />
    </images>
    AS 3.0 Code:
    import gs.*;
    import gs.easing.*;
    //load xml
    var xmlLoader:URLLoader = new URLLoader();
    var xmlData:XML = new XML();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    var xmlPath:String = "image-scroller.xml";
    xmlLoader.load(new URLRequest(xmlPath));
    function LoadXML(e:Event):void {
         xmlData = new XML(e.target.data);
         buildScroller(xmlData.image);
    //declaring variables
    var scroller:MovieClip = new MovieClip();
    var speed:Number;
    var padding:Number = 5;
    var thumbFadeOut:Number = .2;
    var thumbFadeIn:Number = 1;
    var thumbSmall:Number = 1;
    var thumbLarge:Number = 1.1;
    this.addChild(scroller);
    scroller.y = scroller.x = padding;
    var thisOne:MovieClip
    //build scroller from xml
    function buildScroller(imageList:XMLList):void{
         for (var item:uint = 0; item < imageList.length(); item++ )  {
              thisOne = new MovieClip();
              //outline
              var blackBox:Sprite = new Sprite();
              blackBox.graphics.beginFill(0xFFFFFF);
              blackBox.graphics.drawRect( -1, -1, 82, 82);
              blackBox.alpha = thumbFadeOut;
              thisOne.addChild(blackBox);
              thisOne.blackBox = blackBox;
              thisOne.x = thisOne.myx = (80 + padding) * item;
              thisOne.itemNum = item;
              thisOne.title = imageList[item].attribute("title");
              thisOne.link = imageList[item].attribute("url");
              thisOne.src = imageList[item].attribute("src");
              //image container
              var thisThumb:Sprite = new Sprite();
              //add image
              var ldr:Loader = new Loader();
              var urlReq:URLRequest = new URLRequest(thisOne.src);
              ldr.load(urlReq);
              //assign event listeners for Loader
              ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
              ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
              thisThumb.addChild(ldr);
              thisOne.addChild(thisThumb);
              //create listeners for this thumb
              thisOne.buttonMode = true;
              thisOne.addEventListener(MouseEvent.MOUSE_OVER, overScrollerItem);
              thisOne.addEventListener(MouseEvent.MOUSE_OUT, outScrollerItem);
              thisOne.addEventListener(MouseEvent.CLICK, clickScrollerItem);
              //add item to the scroller mc
              scroller.addChild(thisOne);
         scroller.addEventListener(Event.ENTER_FRAME, moveScrollerThumbs);
    function overScrollerItem(e:MouseEvent):void {
         //trace("over" + e.currentTarget.name);
         TweenMax.to(e.currentTarget, 0.5, { scaleX:thumbLarge, scaleY:thumbLarge, x:e.currentTarget.myx - e.currentTarget.width * Math.abs(thumbSmall - thumbLarge)/2, y: -e.currentTarget.width * Math.abs(thumbSmall - thumbLarge)/2} );
         TweenMax.to(e.currentTarget.blackBox, 1, { alpha:thumbFadeIn} );
    function outScrollerItem(e:MouseEvent):void {
         //trace("out" + e.currentTarget.name);
         TweenMax.to(e.currentTarget, 0.5, { scaleX:thumbSmall, scaleY:thumbSmall, x:e.currentTarget.myx, y:0} );
         TweenMax.to(e.currentTarget.blackBox, 0.5, { alpha:thumbFadeOut} );
    var mcFullImage:MovieClip;
    var fullLdr:Loader
    function clickScrollerItem(e:MouseEvent):void {
         mcFullImage = new MovieClip();
         fullLdr = new Loader()
         var urlReq:URLRequest = new URLRequest(e.currentTarget.link);
         fullLdr.load(urlReq);
         fullLdr.contentLoaderInfo.addEventListener(Event.INIT, initHandler)
         addChild(mcFullImage);
         mcFullImage.x = 100;
         mcFullImage.y = 90;
         mcFullImage.addChild(fullLdr);
         var image:Bitmap = Bitmap(e.target.content);
         image.smoothing = true;
    function initHandler(e:Event):void
         TweenMax.from(fullLdr, 1, {alpha: 0});
         mcFullImage.addEventListener(MouseEvent.CLICK, removeImg);
    function removeImg(e:MouseEvent):void
         TweenMax.to(mcFullImage, 0.2, {alpha: 0, onComplete: unloadImg});
    function unloadImg(e:Event):void
         removeChild(fullLdr);
         fullLdr.unload();
         removeChild(mcFullImage);
         mcFullImage = null;
    function completeHandler(e:Event):void {
         //size image into scroller
         resizeMe(e.target.loader.parent, 80, 80, true, true, false);
         var image:Bitmap = Bitmap(e.target.content);
         image.smoothing = true;
         TweenMax.to(e.target.loader.parent.parent, 0.5, { alpha:1} );
    function errorHandler(e:IOErrorEvent):void {
         trace("thumbnail error="+e);
    //The resizing function
    // parameters
    // required: mc = the movieClip to resize
    // required: maxW = either the size of the box to resize to, or just the maximum desired width
    // optional: maxH = if desired resize area is not a square, the maximum desired height. default is to match to maxW (so if you want to resize to 200x200, just send 200 once)
    // optional: constrainProportions = boolean to determine if you want to constrain proportions or skew image. default true.
    function resizeMe(mc:DisplayObject, maxW:Number, maxH:Number=0, constrainProportions:Boolean=true, centerHor:Boolean=true, centerVert:Boolean=true):void{
        maxH = maxH == 0 ? maxW : maxH;
        mc.width = maxW;
        mc.height = maxH;
        if (constrainProportions) {
            mc.scaleX < mc.scaleY ? mc.scaleY = mc.scaleX : mc.scaleX = mc.scaleY;
         if (centerHor) {
              mc.x = (maxW - mc.width) / 2;
         if (centerVert){
              mc.y = (maxH - mc.height) / 2;
    function moveScrollerThumbs(e:Event):void {
         if ( mouseY > scroller.y && mouseY < scroller.y + scroller.height) {//vertically over scroller
              if (mouseX < stage.stageWidth/2 - padding*2 && mouseX > 0) {//left of stage explicitly
                   speed = -(mouseX - (stage.stageWidth/2 - padding*2)) / 8;
              else if (mouseX > stage.stageWidth/2 + padding*2 && mouseX < stage.stageWidth) {//right of stage explicitly
                   speed = -(mouseX - (stage.stageWidth/2 + padding*2)) / 8;
              else {
                   speed = 0;
              scroller.x += speed;
              //scroller limits
              if (scroller.x < -scroller.width + stage.stageWidth - padding) { //if scrolled too far left
                   scroller.x = -scroller.width + stage.stageWidth - padding;
              else if (scroller.x > padding) { //if scrolled to far right
                   scroller.x = padding;
    The problem is that when I click on a thumb it shows up the image nicely, but when I click on the image to close it, I get this error:
    ArgumentError: Error #1063: Argument count mismatch on XMLScroller_fla::MainTimeline/unloadImg(). Expected 1, got 0.
         at Function/http://adobe.com/AS3/2006/builtin::apply()
         at gs::TweenLite/complete()
         at gs::TweenMax/complete()
         at gs::TweenMax/render()
         at gs::TweenLite$/updateAll()
    Also, when there's already an image which is loaded, and I click another thumb, a new image loads on top of the one that is already loaded. I tried removing "thisOne.addEventListener(MouseEvent.CLICK, clickScrollerItem);" in the clickScrollerItem function but it didn't work.... Any suggestions?

    Now I tried adding a boolean to check whether there's an image that is already loaded to the stage or not and still no luck I really need to fix this, so please someone tell me where did I go wrong...!! here's the code:
    import gs.*;
    import gs.easing.*;
    //load xml
    var xmlLoader:URLLoader = new URLLoader();
    var xmlData:XML = new XML();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    var xmlPath:String = "image-scroller.xml";
    xmlLoader.load(new URLRequest(xmlPath));
    function LoadXML(e:Event):void {
         xmlData = new XML(e.target.data);
         buildScroller(xmlData.image);
    //declaring variables
    var scroller:MovieClip = new MovieClip();
    var speed:Number;
    var padding:Number = 5;
    var thumbFadeOut:Number = .2;
    var thumbFadeIn:Number = 1;
    var thumbSmall:Number = 1;
    var thumbLarge:Number = 1.1;
    this.addChild(scroller);
    scroller.y = scroller.x = padding;
    var thisOne:MovieClip
    var loaded:Boolean = false;
    //build scroller from xml
    function buildScroller(imageList:XMLList):void{
         for (var item:uint = 0; item < imageList.length(); item++ )  {
              thisOne = new MovieClip();
              //outline
              var blackBox:Sprite = new Sprite();
              blackBox.graphics.beginFill(0xFFFFFF);
              blackBox.graphics.drawRect( -1, -1, 82, 82);
              blackBox.alpha = thumbFadeOut;
              thisOne.addChild(blackBox);
              thisOne.blackBox = blackBox;
              thisOne.x = thisOne.myx = (80 + padding) * item;
              thisOne.itemNum = item;
              thisOne.title = imageList[item].attribute("title");
              thisOne.link = imageList[item].attribute("url");
              thisOne.src = imageList[item].attribute("src");
              //image container
              var thisThumb:Sprite = new Sprite();
              //add image
              var ldr:Loader = new Loader();
              var urlReq:URLRequest = new URLRequest(thisOne.src);
              ldr.load(urlReq);
              //assign event listeners for Loader
              ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
              ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
              thisThumb.addChild(ldr);
              thisOne.addChild(thisThumb);
              //create listeners for this thumb
              thisOne.buttonMode = true;
              thisOne.addEventListener(MouseEvent.MOUSE_OVER, overScrollerItem);
              thisOne.addEventListener(MouseEvent.MOUSE_OUT, outScrollerItem);
              if(loaded == false) {
              thisOne.addEventListener(MouseEvent.CLICK, clickScrollerItem);
              //add item to the scroller mc
              scroller.addChild(thisOne);
         scroller.addEventListener(Event.ENTER_FRAME, moveScrollerThumbs);
    function overScrollerItem(e:MouseEvent):void {
         //trace("over" + e.currentTarget.name);
         TweenMax.to(e.currentTarget, 0.5, { scaleX:thumbLarge, scaleY:thumbLarge, x:e.currentTarget.myx - e.currentTarget.width * Math.abs(thumbSmall - thumbLarge)/2, y: -e.currentTarget.width * Math.abs(thumbSmall - thumbLarge)/2} );
         TweenMax.to(e.currentTarget.blackBox, 1, { alpha:thumbFadeIn} );
    function outScrollerItem(e:MouseEvent):void {
         //trace("out" + e.currentTarget.name);
         TweenMax.to(e.currentTarget, 0.5, { scaleX:thumbSmall, scaleY:thumbSmall, x:e.currentTarget.myx, y:0} );
         TweenMax.to(e.currentTarget.blackBox, 0.5, { alpha:thumbFadeOut} );
    var mcFullImage:MovieClip;
    var fullLdr:Loader
    function clickScrollerItem(e:MouseEvent):void {
         mcFullImage = new MovieClip();
         fullLdr = new Loader()
         var urlReq:URLRequest = new URLRequest(e.currentTarget.link);
         fullLdr.load(urlReq);
         fullLdr.contentLoaderInfo.addEventListener(Event.INIT, initHandler)
         addChild(mcFullImage);
         mcFullImage.x = 100;
         mcFullImage.y = 90;
         mcFullImage.addChild(fullLdr);
         var image:Bitmap = Bitmap(e.target.content);
         image.smoothing = true;
         loaded = true;
    function initHandler(e:Event):void
         TweenMax.from(fullLdr, 1, {alpha: 0});
         mcFullImage.addEventListener(MouseEvent.CLICK, removeImg);
    function removeImg(e:MouseEvent):void
         TweenMax.to(mcFullImage, 0.2, {alpha: 0, onComplete: unloadImg});
    function unloadImg():void
         mcFullImage.removeChild(fullLdr);
         fullLdr.unload();
         removeChild(mcFullImage);
         mcFullImage = null;
         loaded = false;
    function completeHandler(e:Event):void {
         //size image into scroller
         resizeMe(e.target.loader.parent, 80, 80, true, true, false);
         var image:Bitmap = Bitmap(e.target.content);
         image.smoothing = true;
         TweenMax.to(e.target.loader.parent.parent, 0.5, { alpha:1} );
    function errorHandler(e:IOErrorEvent):void {
         trace("thumbnail error="+e);
    //The resizing function
    // parameters
    // required: mc = the movieClip to resize
    // required: maxW = either the size of the box to resize to, or just the maximum desired width
    // optional: maxH = if desired resize area is not a square, the maximum desired height. default is to match to maxW (so if you want to resize to 200x200, just send 200 once)
    // optional: constrainProportions = boolean to determine if you want to constrain proportions or skew image. default true.
    function resizeMe(mc:DisplayObject, maxW:Number, maxH:Number=0, constrainProportions:Boolean=true, centerHor:Boolean=true, centerVert:Boolean=true):void{
        maxH = maxH == 0 ? maxW : maxH;
        mc.width = maxW;
        mc.height = maxH;
        if (constrainProportions) {
            mc.scaleX < mc.scaleY ? mc.scaleY = mc.scaleX : mc.scaleX = mc.scaleY;
         if (centerHor) {
              mc.x = (maxW - mc.width) / 2;
         if (centerVert){
              mc.y = (maxH - mc.height) / 2;
    function moveScrollerThumbs(e:Event):void {
         if ( mouseY > scroller.y && mouseY < scroller.y + scroller.height) {//vertically over scroller
              if (mouseX < stage.stageWidth/2 - padding*2 && mouseX > 0) {//left of stage explicitly
                   speed = -(mouseX - (stage.stageWidth/2 - padding*2)) / 8;
              else if (mouseX > stage.stageWidth/2 + padding*2 && mouseX < stage.stageWidth) {//right of stage explicitly
                   speed = -(mouseX - (stage.stageWidth/2 + padding*2)) / 8;
              else {
                   speed = 0;
              scroller.x += speed;
              //scroller limits
              if (scroller.x < -scroller.width + stage.stageWidth - padding) { //if scrolled too far left
                   scroller.x = -scroller.width + stage.stageWidth - padding;
              else if (scroller.x > padding) { //if scrolled to far right
                   scroller.x = padding;

  • 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 making basic php gallery.

    Hi guys,
    Thanks for checking out my post...
    I want to create a gallery, using php, for a client site
    similar to the one at
    http://www.danwheldon.com/gallery.cfm
    where you click on a thumbnail and it refreshes the page with the
    larger image within the websites' layout and above the rest of the
    thumbnails.
    At the moment, my site has a template layout called main.php
    and I'm using a basic php query to bring up gallery.php
    (main.php?pagename=gallery) so the thumbnails are displayed in the
    template.
    How can I add another query to the links so that when you
    click on one of the thumbnails, it refreshes
    main.php?pagename=gallery with the enlarged image above the rest of
    the thumbnails?
    Thank you very much and I hope to hear from you.
    All the best,
    Mark

    Spindrift wrote:
    > How can I add another query to the links so that when
    you click on one of the
    > thumbnails, it refreshes main.php?pagename=gallery with
    the enlarged image
    > above the rest of the thumbnails?
    Seb posted this the other day. I think it fits in with what
    you want and
    can be adapted.
    Someone asked. How are pages created like this:
    http://www.foo.com/fooing.php?id=10
    http://www.foo.com/fooing.php?id=20
    ANSWER:
    whatever is after the "?" is a variable ("id") and its value
    ("20").
    The variable value is retreived by PHP via the $_GET array:
    <?php
    $var = $_GET['id'];
    echo $var;
    ?>
    This will output the variable value (10 or 20).
    Then you can use these values to outuput different things:
    <?php
    $var = $_GET['id'];
    if ($var == 10){
    do_something();
    if ($var == 20){
    do_someting_else();
    ?>
    A typical example would be with an image gallery, each
    thumbnail would
    have a link to the same page, but with a different variable:
    <a href="big_image.php?id=10"><img
    src="thumb10.jpg"></a>
    so each thumbnail would open the same page, but in this page,
    the
    approperiate bigger image would be outputted buy PHP
    according to the
    variable:
    <?php
    $big_image = $_GET['id'].'.jpg';
    echo '<img src="'.$big_image.'">';
    ?>
    this will output:
    <img src="10.jpg">

  • Plz help i need to build a flash gallery with thumbs

    plz help me i need to build a flash gallery with thumbs plz
    give me the code or the fla file ........ !

    You don't give a lot of information about your set-up but there are a couple ways to do this.
    You can run Open Directory on your OS X Server and bind that to your Active Directory forest. This will allow people to authenticate against your OD using their AD credentials. This will work (it's better/easier in 10.5 than 10.4) but will result in Kerberos ticket which you would need to integrate to your site's permissions. You might be able to use Service ACLs to only allow authenticated users to access a certain site or service and that would take care of the authentication and control for you - but would require a certain amount of server manipulation and ODAD interaction. From the tone of your question I'm guessing this is an answer beyond what you were looking for.
    Alternately you should be able to build a website that presents a dialogue and uses LDAP against the AD server. Almost all the examples of this are, of course, using MS specific tools and code like C# and .Net. But even to get this working would certainly programming (using PHP, Java or some other language) to handle the request and answer from the server and this will be beyond anything included in CS4. Depending on your resources maybe you could create the whole website except for the authentication and have someone code that for you. But it would need to be someone not from the MS world because they will probably want to use tools that are Windows specific.
    Lastly there is the web specific .htaccess method that you could use without programming, but as you anticipate it will require you to manage the file that has the name/password information in it and will not talk to AD for information. This is the easy and local way to do it because it cuts AD out of the picture, but that puts the burden of maintenance on you.
    I guess the answer is yes this is possible, but it is not easy or automatic.
    Good luck,
    =Tod

  • Need Help/Advice with Photo Web Gallery coming from SQL Database

    This is my first attempt at a database driven website. I assume what I am trying to accomplish should be fairly easy for more experienced but I am stuck at this point.
    First, let me explain what I am trying to accomplish.
    I want to create a thumbnail photo gallery displayed in columns and rows. I want to be able to hover over or click on the thumbnail image and have a lightbox script display the image over the thumb page. I am developing locally right now with intent to upload to the hosting site upon completion.
    I am developing with ASP vbScript pages. I have an SQL database where the paths to the image thumbnails and pictures are stored in a table. On the gallery page, I have created a div tag to hold my image recordset. Within this div, I have inserted 3 absolute positioned divs to hold the pictureID, the pictureName and the image inserted as a datasource. I then inserted the information from the bindings panel of my recordset. Last, I used a horizontal looper extension from Tom Muck to get the thumbnails to display in columns and rows. Everything works up to this point just fine.
    Now, I want to be able to hover or click on a thumnail image and have it displayed in a lightbox. I downloaded and used a javascript called Lightbox 2 which contains 3 javascript files and a css stylesheet. I inserted the files into the head tag like instructed to but could not get things to work properly. Here is where I need help. Currently, I am clicking on the thumbImage binding within the image Div and creating a link holder. I am then binding the larger pictureImage to it with the a.href selected in the bind to. I am then adding the command to call the lightbox javascript. Now, when I test my page, my thumbnail images do not show up (my alt text does in its place) but the links are in place and you can click on the alt text and it will return the correct larger image, but not in the lightbox, just in a new window with no styles.
    Am I going about this correctly? Can you use lightbox scripts with data-driven galleries? Does anybody have any suggestions of what I may be doing wrong or missing? Are there better ways to go about accomplishing this?
    Any help would be appreciated as this dynamic data thing has my head spinning. Although I know a database is needed to simplify the update and maintenance of the photos while allowing them to be searchable by keywords and tags also set up in the database.
    Thanks

    As I explained, I am developing locally a the moment. I will see about getting the databased moved up to the hosting server and then provide a link for an example.
    In the mean time, can you or anyone else explain a way that you would go about displaying an image thumbnail photo gallery laid out in rows / columns, with any lighbox script that would overlay the larger image over the existing page instead of opening a new browser window?
    I don't have to use the method I tried to describe.
    In all of the lightbox examples I have looked at thus far, they give instructions on how to append that javascript to a single static image or a group of static images, not images from a datasource. That is where I am getting confused.
    Don't know if this will help or not but please see code below:
    Javascript and CSS positioned in head tag
    <!--beginning of lightbox script with css -->
    <link href="CSS/lightbox.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/protype.js" type="text/javascript"></script>
    <script src="Scripts/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
    <script src="Scripts/lightbox.js" type="text/javascript"></script>
    <!--end of lightbox script with css -->
    Calling for javascript in the galleryimage div when hovering over thumbnail image
        <!--beginning of gallery div -->
        <div id="gallery">
          <p>
            <!--beginning of galleryImage div -->
          </p>
          <table width="400" border="0" align="center" id="galleryNav2">
            <tr>
              <td width="100" align="center"><% If MM_offset <> 0 Then %>
                  <a href="<%=MM_moveFirst%>">First</a>
              <% End If ' end MM_offset <> 0 %></td>
              <td width="100" align="center"><% If MM_offset <> 0 Then %>
                <a href="<%=MM_movePrev%>">Previous</a>
              <% End If ' end MM_offset <> 0 %></td>
              <td width="100" align="center"><% If Not MM_atTotal Then %>
                <a href="<%=MM_moveNext%>">Next</a>
              <% End If ' end Not MM_atTotal %></td>
              <td width="100" align="center"><% If Not MM_atTotal Then %>
                <a href="<%=MM_moveLast%>">Last</a>
              <% End If ' end Not MM_atTotal %></td>
            </tr>
          </table>
          <p> </p>
          <table align="center" id="HorzLooper">
            <%
    startrw = 0
    endrw = HLooper1__index
    numberColumns = 5
    numrows = 5
    while((numrows <> 0) AND (Not rs_ssfGallery.EOF))
    startrw = endrw + 1
    endrw = endrw + numberColumns
    %>
            <tr align="center" valign="top">
              <%
    While ((startrw <= endrw) AND (Not rs_ssfGallery.EOF))
    %>
              <td><div id="galleryImage">
                <div id="galleryThumb"><a href="images/pic/<%=(rs_ssfGallery.Fields.Item("picture_url").Value)%>"rel="lightbox"><img src="images/thumb/<%=(rs_ssfGallery.Fields.Item("thumb_url").Value)%>" alt="<%=(rs_ssfGallery.Fields.Item("alt_url").Value)%>" /></a></div>
                <div id="galleryImageID"><%=(rs_ssfGallery.Fields.Item("picture_ID").Value)%></div>
                <div id="galleryImageFamily"><%=(rs_ssfGallery.Fields.Item("family").Value)%></div>
              </div></td>
              <%
    startrw = startrw + 1
    rs_ssfGallery.MoveNext()
    Wend
    %>
            </tr>
            <%
    numrows=numrows-1
    Wend
    %>
          </table>
          <p> </p>
          <table width="400" border="0" align="center" id="galleryNav">
            <tr>
              <td width="100" align="center"><% If MM_offset <> 0 Then %>
                  <a href="<%=MM_moveFirst%>">First</a>
              <% End If ' end MM_offset <> 0 %></td>
              <td width="100" align="center"><% If MM_offset <> 0 Then %>
                  <a href="<%=MM_movePrev%>">Previous</a>
              <% End If ' end MM_offset <> 0 %></td>
              <td width="100" align="center"><% If Not MM_atTotal Then %>
                  <a href="<%=MM_moveNext%>">Next</a>
              <% End If ' end Not MM_atTotal %></td>
              <td width="100" align="center"><% If Not MM_atTotal Then %>
                  <a href="<%=MM_moveLast%>">Last</a>
              <% End If ' end Not MM_atTotal %></td>
            </tr>
          </table>
    <!--end of galleryImage div -->
        </div>
        <!--end of gallery div -->
    Thanks for any help or suggestions.

Maybe you are looking for

  • Loading a text file into Terminal App

    Hi, I  am  trying  to  load  a  textfile  into  my  Terminal  App  using  the  Import  utility  under  the  Shell  drop  down  menu. But  when  I  try  choosing  the  text  files  after  clicking  Import,  I  am   unable  to  select  a  text  file  b

  • Question about keyword hierarchies

    Hi, I'm relatively new to Lightroom. I'm seeing an "interesting" behavior with respect to hierarchical keywords and I'd like to understand if it is correct. To start with, I've got an example keyword hierarchy for aircraft: So far so good. Now, I hav

  • German foreign trade regulation reports Z5E - RFAWVZ5A

    Hello expert, is there someone that could tell me if there is some customizing in order to run correctly the following report. S_ALR_87012243 Thanks

  • Page Visibility and Language Translator

    Could anyone advise me, I have built an educational website? All finished, is it to late to add a feature, to help Viewers with visibility issues like a zoom function. Any ideals of what can be added, or do I need to remake the site in a larger text

  • Installing on Win XP Pro

    Is there a set of developer's tools or something that will install on XP Pro SP2 with no trouble? I'm looking for something that will give me at least a basic download of Oracle so I can learn it and practice working with it, and then later develop f