Current location: Hot Scripts Forums » Programming Languages » PHP » flash xml changes in server won't stay


flash xml changes in server won't stay

Reply
  #31 (permalink)  
Old 03-14-10, 09:12 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
The htaccess file shouldn't go to the browser, it should be a hidden file, and should remain on the server.

The name must be .htaccess (dot or period) htaccess - for Apache to find it and use it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #32 (permalink)  
Old 03-14-10, 09:15 AM
offtheroad offtheroad is offline
Newbie Coder
 
Join Date: May 2009
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
would you like access to the server? That way you can see exactly what I have?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #33 (permalink)  
Old 03-14-10, 09:41 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
The config.xml file has an error.

To get rid of the error, you can remove all the comments in the file that precede the <?xml code. The <?xml line must be the first line in the file.

I tested this by loading config.xml on my server and then removing the comments and refreshing - that can be viewed with the browser. If you view it before making the change, you'll see the error.

The gallery xml looks good, and it's being called with cache disabling code, which means the cache is not the issue. You should remove any cache related changes, although they probably aren't doing any harm.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #34 (permalink)  
Old 03-14-10, 09:51 AM
offtheroad offtheroad is offline
Newbie Coder
 
Join Date: May 2009
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
OK that was easy. could my refresh issue be a .js problem?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #35 (permalink)  
Old 03-14-10, 09:57 AM
offtheroad offtheroad is offline
Newbie Coder
 
Join Date: May 2009
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
where do I find the cache related changes and what do they look like?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #36 (permalink)  
Old 03-14-10, 10:17 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
config.xml is still reporting an error, even after I clear my cache.

The blank lines need to be removed.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #37 (permalink)  
Old 03-14-10, 10:21 AM
offtheroad offtheroad is offline
Newbie Coder
 
Join Date: May 2009
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Done, I just removed them from the top and not in between each line of code ok?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #38 (permalink)  
Old 03-14-10, 12:58 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Cool - is it working the way you want it to?

There is one other problem, something on the client side is requesting "undefined", and Firebug is reporting the error.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #39 (permalink)  
Old 03-14-10, 01:15 PM
offtheroad offtheroad is offline
Newbie Coder
 
Join Date: May 2009
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
No it's still caching back to older xml

here is the action scrip for the gallery
/*

All of the code for the gallery is located here. There is a configuration xml file
in xml/gallery (config.xml) which gives you countrol over various attributes of the menu.

The xml used by this menu can be found in xml/gallery/gallery.xml it can be genreated by php which can
be found in the php folder named buildGalleries.php. You might want to read the help file in the php folder.

YOU WILL NEED TO RUN THE MAIN MOVIE OR OPEN INDEX.HTML TO VIEW CHANGES MADE TO THIS SECTION.

enjoy,
Chuck :-)

*/
// lets start by calling our config file
// create new xml object and load config.xml
var config:XML = new XML();
config.ignoreWhite = true;
// once the xml is loaded fire the loadConfig function
config.onLoad = loadConfig;
config.load("xml/gallery/config.xml");
// on load of xml
function loadConfig(success:Boolean):Void {
if (success) {
// get our xml start point
var all:XMLNode = config.firstChild;
// retrieve all xml options
titleCol = Number(all.childNodes[0].firstChild.nodeValue);
titleTime = Number(all.childNodes[1].firstChild.nodeValue);
thumbsY = Number(all.childNodes[2].firstChild.nodeValue);
thumbsX = Number(all.childNodes[3].firstChild.nodeValue);
numCols = Number(all.childNodes[4].firstChild.nodeValue);
numRows = Number(all.childNodes[5].firstChild.nodeValue);
thumbPaddingX = Number(all.childNodes[6].firstChild.nodeValue);
thumbPaddingY = Number(all.childNodes[7].firstChild.nodeValue);
useOwnThumbs = all.childNodes[8].firstChild.nodeValue;
thumbHeight = Number(all.childNodes[9].firstChild.nodeValue);
thumbWidth = Number(all.childNodes[10].firstChild.nodeValue);
thumbOverHeight = Number(all.childNodes[11].firstChild.nodeValue);
thumbOverWidth = Number(all.childNodes[12].firstChild.nodeValue);
thumbXScale = Number(all.childNodes[13].firstChild.nodeValue);
thumbYScale = Number(all.childNodes[14].firstChild.nodeValue);
thumbType = all.childNodes[15].firstChild.nodeValue;
thumbSlicePoint = all.childNodes[16].firstChild.nodeValue;
thumbOverSpeed = Number(all.childNodes[17].firstChild.nodeValue);
borderSize = Number(all.childNodes[18].firstChild.nodeValue);
thumbBorder = Number(all.childNodes[19].firstChild.nodeValue);
thumbBorderOver = Number(all.childNodes[20].firstChild.nodeValue);
thumbIntroSpeed = Number(all.childNodes[21].firstChild.nodeValue);
thumbIntroDelay = Number(all.childNodes[22].firstChild.nodeValue);
preloaderCircleColor = Number(all.childNodes[23].firstChild.nodeValue);
preloaderTextColor = Number(all.childNodes[24].firstChild.nodeValue);
preloaderGlowColor = Number(all.childNodes[25].firstChild.nodeValue);
preloaderGlowAmount = Number(all.childNodes[26].firstChild.nodeValue);
lightboxOverlayAlpha = Number(all.childNodes[27].firstChild.nodeValue);
lightboxOverlayInSpeed = Number(all.childNodes[28].firstChild.nodeValue);
lightboxOverlayOutSpeed = Number(all.childNodes[29].firstChild.nodeValue);
largeImgBorderColor = Number(all.childNodes[30].firstChild.nodeValue);
largeImgBorderSize = Number(all.childNodes[31].firstChild.nodeValue);
largeImgSpeed = Number(all.childNodes[32].firstChild.nodeValue);
largeImgRevealSpeed = Number(all.childNodes[33].firstChild.nodeValue);
useInfoPanel = all.childNodes[34].firstChild.nodeValue;
alwaysShowInfo = all.childNodes[35].firstChild.nodeValue;
infoSlideSpeed = Number(all.childNodes[36].firstChild.nodeValue);
infoBgColor = Number(all.childNodes[37].firstChild.nodeValue);
infoBgAlpha = Number(all.childNodes[38].firstChild.nodeValue);
infoShineAlpha = Number(all.childNodes[39].firstChild.nodeValue);
infoTitleColor = Number(all.childNodes[40].firstChild.nodeValue);
showCounter = all.childNodes[41].firstChild.nodeValue;
infoCounterColor = Number(all.childNodes[42].firstChild.nodeValue);
gridSlideSpeed = Number(all.childNodes[43].firstChild.nodeValue);
navPadding = Number(all.childNodes[44].firstChild.nodeValue);
arrowColor = Number(all.childNodes[45].firstChild.nodeValue);
arrowGlowColor = Number(all.childNodes[46].firstChild.nodeValue);
arrowGlowAmount = Number(all.childNodes[47].firstChild.nodeValue);
arrowGlowAmountOver = Number(all.childNodes[48].firstChild.nodeValue);
arrowGlowSpeed = Number(all.childNodes[49].firstChild.nodeValue);
counterPrefix = all.childNodes[50].firstChild.nodeValue;
counterSuffix = all.childNodes[51].firstChild.nodeValue;
counterDiv = all.childNodes[52].firstChild.nodeValue;
counterTextCol = Number(all.childNodes[53].firstChild.nodeValue);
// now we can build the gallery
buildGallery();
} else {
trace("XML NOT LOADED");
}
}
// import classes
import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
import caurina.transitions.Tweener;
// This initates the color tween
import caurina.transitions.properties.ColorShortcuts;
ColorShortcuts.init();
import flash.filters.GlowFilter;
import caurina.transitions.properties.FilterShortcuts;
FilterShortcuts.init();
buildGallery = function ():Void {
// remove previous galllery
scope.removeMovieClip();
Tweener.removeAllTweens();
// get title from main movie
galTitle.t.autoSize = "LEFT";
galTitle.t.text = _parent._parent.galTitle;
// fade in and set color
galTitle._alpha = 0;
Tweener.addTween(galTitle, {_alpha:100, time:titleTime, transition:"easeInOutCirc"});
Tweener.addTween(galTitle, {_color:titleCol, time:0});
// get xml from main moive (via gallery menu)
galString = _parent._parent.galImages;
galleryXML = new XML(galString);
// create a container for everything
scope = this.createEmptyMovieClip("scope", 1);
// create new movieclip to put all of thumbs into;
thumbs = scope.createEmptyMovieClip("thumbs", 5);
// position all thumbs
thumbs._y = thumbsY;
thumbs._x = thumbsX;
// this is our xml start point;
folder = galleryXML.firstChild.childNodes;
// numDisplay is used in our calculations to determine where we are in the grid;
numDisplay = numCols*numRows;
/* create an array to store our images in. The array is filled in our for loop and used in
the loadImages function */
images = new Array();
thumbnails = new Array();
// run a loop to run through each instance of <image> in our xml file;
var i:Number;
for (i=0; i<folder.length; i++) {
// fill our image array with the path to the image in our xml;
images[i] = folder[i].attributes.src;
// if use our own thumbs we need to store the thumb paths as well
thumbnails[i] = folder[i].attributes.thumb;
// attach a thumb for each image;
thumb = thumbs.attachMovie("thumb", "thumb"+i, i+100);
thumbBitmap = thumb.createEmptyMovieClip("thumbBitmap", i+11000);
// contaner to put our selection from thumbBitmap;
thumbnail = thumb.createEmptyMovieClip("thumbnail", i+3000);
// give each thumb a unique id
thumb.id = i;
// postion thumb to take into account of the border
thumbnail._x = borderSize;
thumbnail._y = borderSize;
thumb.bg._x = (thumbWidth/2)+borderSize;
thumb.bg._y = (thumbHeight/2)+borderSize;
// set bg to defualt state
thumb.bg._alpha = 20;
thumb.bg._width = 0;
thumb.bg._height = 0;
// get name of image
thumb.thumbInfo = folder[i].firstChild.nodeValue;
// tween (scale) the first set of thumbs as defined by the rows and cols
if (i<numDisplay) {
Tweener.addTween(thumb.bg, {_width:thumbWidth+(borderSize*2), time:thumbIntroSpeed, delay:thumbIntroDelay*i, transition:"easeInOutBack"});
// notice the onComplete function call, once this tween is done we start to load our first thumb
Tweener.addTween(thumb.bg, {_height:thumbHeight+(borderSize*2), time:thumbIntroSpeed, delay:thumbIntroDelay*i, transition:"easeInOutBack", onComplete:waitLoad});
} else {
// no point in tweening the hidden ones so let hide to save some cpu
thumb._visible = false;
thumb.bg._width = thumbWidth+(borderSize*2);
thumb.bg._height = thumbHeight+(borderSize*2);
}
// the thumb mask it used to give the mouse over and and intro effectS
thumb.thumbMask = thumb.attachMovie("thumbMask", "thumbMask"+i, i+9000);
thumb.thumbMask._width = thumbWidth;
thumb.thumbMask._height = thumbHeight;
thumb.thumbMask._x = (thumbWidth/2)+borderSize;
thumb.thumbMask._y = (thumbHeight/2)+(borderSize);
thumb.thumbnail.setMask(thumb.thumbMask);
thumb.thumbMask._visible = false;
// attach, style and postion our thumbnail preloader
thumb.preloader = thumb.attachMovie("preloader", "preloader", i+1000);
thumb.preloader._y = (thumb._height/2)-(thumb.preloader._height/2);
thumb.preloader._x = (thumb._width/2)-(thumb.preloader._width/2);
Tweener.addTween(thumb.preloader.animation, {_colorreloaderCircleColor, time:0});
thumb.preloader.counter.t.textColor = preloaderTextColor;
preloaderGlow = new GlowFilter(preloaderGlowColor, preloaderGlowAmount, 4, 4, 4, 10, false, false);
Tweener.addTween(preloader.animation, {_filterreloaderGlow, time:0});
// hide until needed
thumb.preloader._visible = false;
// set the background/border color of the thumbs;
btnColor = new Color(thumb.bg);
btnColor.setRGB(thumbBorder);
// assign a unique id for each thumb;
thumb.num = i;
// get current column and row;
var col = i%numCols;
var row = Math.floor(i/numCols);
// position thumbs in grid;
thumb._x = col*(thumbWidth+(borderSize*2)+thumbPaddingX);
thumb._y = row*(thumbHeight+(borderSize*2)+thumbPaddingY);
// lets disabled the thumb until the images has loaded
thumb.enabled = false;
// THUMBNAIL MOUSE EVENTS
thumb.onRelease = function() {
// show overlay and largImg MC`s in main movie
_parent._parent.overlay._visible = true;
_parent._parent.largeImg._visible = true;
// set text of info panel
_parent._parent.info.txt.autoSize = "LEFT";
_parent._parent.info.txt.text = this.thumbInfo;
// tween in lightbox overlay
Tweener.addTween(_parent._parent.overlay, {_alpha:lightboxOverlayAlpha, time:lightboxOverlayInSpeed, transition:"linear"});
// hide hand cursor
_parent._parent.overlay.useHandCursor = false;
// create a container for our large image
img = _parent._parent.largeImg.img;
// get image to use
currImg = images[this.id];
// load large image
imgBgResizer.loadClip(images[this.id], img);
// set currThumb
currThumb = this;
// disable largeImg rollover until ready
_parent._parent.largeImg.enabled = false;
// curr thumb id for use in counter text
currThumbID = this.id+1;
};
thumb.onRollOver = function() {
// scale thumb mask and tween border color
Tweener.addTween(this.thumbMask, {_height:thumbOverHeight, time:thumbOverSpeed, transition:"linear"});
Tweener.addTween(this.thumbMask, {_width:thumbOverWidth, time:thumbOverSpeed, transition:"linear"});
Tweener.addTween(this.bg, {_color:thumbBorderOver, time:thumbOverSpeed, transition:"linear"});
};
thumb.onRollOut = thumb.onReleaseOutside=function () {
// reset thumb mask and border
Tweener.addTween(this.thumbMask, {_height:thumbHeight, time:thumbOverSpeed, transition:"linear"});
Tweener.addTween(this.thumbMask, {_width:thumbWidth, time:thumbOverSpeed, transition:"linear"});
Tweener.addTween(this.bg, {_color:thumbBorder, time:thumbOverSpeed, transition:"linear"});
};
}
// THUMB PRELOADER;
var mcl:MovieClipLoader = new MovieClipLoader();
var thumbLoader:Object = new Object();
mcl.addListener(thumbLoader);
var cont:Number = 0;
loadImages = function () {
var targetName1:String = "thumb"+(cont-1);
scope.thumbs[targetName1].enabled = true;
var targetName:String = "thumb"+cont;
if (useOwnThumbs == "true") {
mcl.loadClip(thumbnails[cont], scope.thumbs[targetName].thumbnail);
} else {
mcl.loadClip(images[cont], scope.thumbs[targetName].thumbBitmap);
}
};
thumbLoader.onLoadInit = function(targetMC:MovieClip) {
if (useOwnThumbs != "true") {
if (thumbType == "slice") {
targetMC._xscale = thumbXScale;
targetMC._yscale = thumbYScale;
// lets create a new bitmap object from our image we defined in the xml;
var newBitmap:BitmapData = new BitmapData(targetMC._width, targetMC._height, true, 0x000000);
// next put the newly created bitmap into our container;
newBitmap.draw(targetMC._parent.thumbBitmap);
// create new selection;
var select:BitmapData = new BitmapData(targetMC._parent.thumbBitmap._width, targetMC._parent.thumbBitmap._height, true, 0x00000000);
// define which area of our bitmap we are going to copy;
if (thumbSlicePoint == "center") {
select.copyPixels(newBitmap, new Rectangle(targetMC._width/2, targetMC._height/2, thumbWidth, thumbHeight), new Point(0, 0));
} else {
select.copyPixels(newBitmap, new Rectangle(targetMC._width-thumbWidth, targetMC._height-thumbHeight, thumbWidth, thumbHeight), new Point(0, 0));
}
// attach our copied area into our thumbnail container;
targetMC._parent.thumbnail.attachBitmap(select, 0);
targetMC._parent.thumbnail.bitmapSmoothing;
// hide the original bitmap ;
targetMC._parent.thumbBitmap._visible = false;
targetMC._parent.thumbBitmap._x = -99999;
} else {
// lets just scale down the image with some smoothing
bitmap = new BitmapData(targetMC._width, targetMC._height, true);
targetMC.attachBitmap(bitmap, targetMC.getNextHighestDepth(), "auto", true);
bitmap.draw(targetMC);
targetMC._width = thumbWidth;
targetMC._height = thumbHeight;
targetMC._x = borderSize;
targetMC._y = borderSize;
}
// if we are using our own thumbs
} else {
targetMC.setMask(targetMC._parent.thumbMask);
targetMC._x = borderSize;
targetMC._y = borderSize;
}
// update cont so we can load our next image in the array
cont++;
};
thumbLoader.onLoadProgress = function(targetMC:MovieClip, loaded:Number, total:Number) {
// fade in bg/border
Tweener.addTween(targetMC._parent.bg, {_alpha:100, time:1, transition:"easeOutCirc"});
targetMC._parent.preloader._visible = true;
// update preloader text
var amount:Number = Math.floor(loaded/total*100);
targetMC._parent.preloader.counter.t.text = amount;
// position mask to the left of the thumb
targetMC._parent.thumbMask._x = -thumbWidth;
};
thumbLoader.onLoadComplete = function(targetMC:MovieClip, loaded:Number, total:Number) {
// slide in masks
Tweener.addTween(targetMC._parent.thumbMask, {_xthumbWidth/2)+borderSize, time:1, transition:"easeOutCirc", onComplete:loadImages});
// remove preloader - saves on cpu
targetMC._parent.preloader.removeMovieClip();
};
// if we don`t have more thumbs than the total we want to display at any one time
if (folder.length<numDisplay) {
introCount = folder.length;
} else {
introCount = numDisplay;
}
isFirst = true;
var counter:Number = 1;
// this is our function
function waitLoad():Void {
counter++;
if (counter == introCount+1) {
loadImages();
thumbNav._visible = true;
thumbNav._alpha = 0;
Tweener.addTween(thumbNav, {_alpha:100, time:1});
}
}
// on overlay and large image mouse click
_parent._parent.overlay.onRelease = _parent._parent.overlay.onReleaseOutside=_parent._ parent.largeImg.onRelease=function () {
// hide large mask and large image
_parent._parent.largeMask._visible = false;
_parent._parent.largeImg._visible = false;
// fade out lightbox overlay - on complete remove everything we do not need
Tweener.addTween(_parent._parent.overlay, {_alpha:0, time:lightboxOverlayOutSpeed, transition:"linear", onComplete:removeOverlay});
// reset thumb to defualt state
Tweener.addTween(currThumb.thumbMask, {_height:thumbHeight, time:thumbOverSpeed, transition:"linear"});
Tweener.addTween(currThumb.thumbMask, {_width:thumbWidth, time:thumbOverSpeed, transition:"linear"});
Tweener.addTween(currThumb.bg, {_color:thumbBorder, time:thumbOverSpeed, transition:"linear"});
};
// get rid of all the large image mc`s
function removeOverlay() {
_parent._parent.largeMask._visible = false;
_parent._parent.overlay._visible = false;
_parent._parent.info._visible = false;
_parent._parent.largeImg.bg._width = 0;
_parent._parent.largeImg.bg._height = 0;
}
// set the background/border color of the large image
Tweener.addTween(_parent._parent.largeImg.bg, {_color:largeImgBorderColor, time:0});
// preloader used to tween large image bg
imgBgResizer = new MovieClipLoader();
imgBgResizer.addListener(scope);
imgBgResizer.onLoadInit = function(targetMC:MovieClip) {
// set mask
_parent._parent.largeImg.img.setMask(_parent._pare nt.largeMask);
// hide everything for now
_parent._parent.largeMask._visible = false;
_parent._parent.largeMask._width = 0;
_parent._parent.largeImg.img._alpha = 0;
// get image dimensions
_parent._parent.currImgWidth = targetMC._width;
_parent._parent.currImgHeight = targetMC._height;
// get border width and height
borderWidth = targetMC._width+(largeImgBorderSize*2);
borderHeight = targetMC._height+(largeImgBorderSize*2)+1;
// set new image dimensions
_parent._parent.currImgWidth = borderWidth;
_parent._parent.currImgHeight = borderHeight;
// scale mask to image height
_parent._parent.largeMask._height = targetMC._height;
_parent._parent.largeMask._y += largeImgBorderSize;
// get width for large mask
largeMaskWidth = Number(targetMC._width);
// scale info panel to fit the width of image
_parent._parent.info.bg._width = targetMC._width;
_parent._parent.info.shine._width = targetMC._width;
_parent._parent.info.shine._alpha = infoShineAlpha;
// set alpha of info panel
_parent._parent.info.bg._alpha = infoBgAlpha;
// set info background color
Tweener.addTween(_parent._parent.info.bg, {_color:infoBgColor, time:0});
// set info colors
_parent._parent.info.txt.textColor = infoTitleColor;
_parent._parent.info.counter.textColor = infoCounterColor;
// position counter text
_parent._parent.info.counter.autoSize = "RIGHT";
_parent._parent.info.counter._x = targetMC._width-_parent._parent.info.counter.textWidth-10;
// fill in coutner text
_parent._parent.info.counter.text = currThumbID+"/"+folder.length;
// hide counter if we don`t want to use it
if (showCounter == "false") {
_parent._parent.info.counter.text = "";
}
// positon info panel
_parent._parent.info._x = -(targetMC._width/2)-1;
if (alwaysShowInfo == "false") {
_parent._parent.info._y = (targetMC._height/2)+_parent._parent.info.bg._height;
} else {
_parent._parent.info._y = (targetMC._height/2)-_parent._parent.info.bg._height;
}
// scale info mask to match info panel
_parent._parent.infoMask._width = targetMC._width;
_parent._parent.infoMask._height = _parent._parent.info.bg._height;
_parent._parent.infoMask._x = _parent._parent.info._x;
// capture _y position for rollover events
yPos = Number((targetMC._height/2)-_parent._parent.info.bg._height);
// position and set info mask
_parent._parent.infoMask._y = yPos;
_parent._parent.info.setMask(_parent._parent.infoM ask);
// lets remove the info panel if we are not going to use it
if (useInfoPanel == "false") {
_parent._parent.info._visible = false;
_parent._parent.info._y = 90000;
}
// tween background to new image size - on complete load image
Tweener.addTween(_parent._parent.largeImg.bg, {_height:borderHeight, time:largeImgSpeed, transition:"easeOutCirc"});
Tweener.addTween(_parent._parent.largeImg.bg, {_width:borderWidth, time:largeImgSpeed, transition:"easeOutCirc", onComplete:loadImage});
// call our setPostions function in the main movie to take into account the new movieclips
_parent._parent.setPostions();
};
// function called on complete of large image background tween
function loadImage() {
loadLargeImg.loadClip(currImg, img);
}
// preloader for large image
loadLargeImg = new MovieClipLoader();
loadLargeImg.addListener(scope);
loadLargeImg.onLoadInit = function(targetMC:MovieClip) {
// set mask
_parent._parent.largeImg.img.setMask(_parent._pare nt.largeMask);
// position image to take account of the border
_parent._parent.largeImg.img._x = -((targetMC._width/2)+(largeImgBorderSize))-1;
_parent._parent.largeImg.img._x += largeImgBorderSize;
_parent._parent.largeImg.img._y = -((targetMC._height/2)+(largeImgBorderSize))-1;
_parent._parent.largeImg.img._y += largeImgBorderSize;
// position mask
_parent._parent.largeImg.largeMask._x = _parent._parent.largeImg.img._x;
_parent._parent.largeImg.largeMask._y = _parent._parent.largeImg.img._y;
//
};
loadLargeImg.onLoadComplete = function(targetMC:MovieClip) {
// tween mask in to revel image
_parent._parent.largeMask._visible = true;
_parent._parent.largeImg.img._alpha = 100;
Tweener.addTween(_parent._parent.largeMask, {_width:largeMaskWidth, time:largeImgRevealSpeed, transition:"easeOutCirc"});
_parent._parent.largeImg.enabled = true;
_parent._parent.info._visible = true;
};
// large image mouse events
if (useInfoPanel == "true") {
if (alwaysShowInfo == "false") {
_parent._parent.largeImg.onRollOver = function() {
Tweener.addTween(this.info, {_y:yPos, time:infoSlideSpeed, transition:"linear"});
};
_parent._parent.largeImg.onRollOut = function() {
rollOutYpos = yPos+_parent._parent.info._height;
Tweener.addTween(_parent._parent.info, {_y:rollOutYpos, time:infoSlideSpeed, transition:"linear"});
};
}
}
// thumb mask
thumbMask = scope.attachMovie("mask", "thumbMask", 10);
thumbMask._y = thumbs._y;
thumbMask._x = thumbs._x;
thumbMask._width = (thumbWidth+borderSize*2)*numCols+(thumbPaddingX*n umCols);
thumbMask._height = (thumbHeight+(borderSize*2))*numRows+(thumbPadding Y*numRows);
thumbs.setMask(thumbMask);
// only show the nav if needed
if (folder.length>numDisplay) {
// get amount of thumbs per grid
thumbCount = numRows*numCols;
//; attach and positon nav
var thumbNav:MovieClip = scope.attachMovie("thumbNav", "thumbNav", 7);
thumbNav._x = thumbs._x;
thumbNav._y = thumbMask._height+thumbsY+navPadding;
thumbNav._visible = false;
// style buttons
glowIn = new GlowFilter(arrowGlowColor, arrowGlowAmountOver, 5, 5, 5, 5, false, false);
glowOut = new GlowFilter(arrowGlowColor, arrowGlowAmount, 5, 5, 5, 5, false, false);
Tweener.addTween(thumbNav.nextBtn, {_filter:glowOut, time:0});
Tweener.addTween(thumbNav.prevBtn, {_filter:glowOut, time:0});
Tweener.addTween(thumbNav.nextBtn.downBtn, {_color:arrowColor, time:0});
Tweener.addTween(thumbNav.prevBtn.upBtn, {_color:arrowColor, time:0});
// disable prev button as its not needed yet
thumbNav.prevBtn.enabled = false;
thumbNav.prevBtn._alpha = 30;
// set and style counter text
thumbNav.counter.t.textColor = counterTextCol;
thumbNav.counter.t.autoSize = "left";
thumbNav.counter.t.text = counterPrefix+" 1"+counterDiv+thumbCount+" of "+folder.length+" "+counterSuffix;
// var used to work out where we are in the grid
var id:Number = 0;
endPos = thumbsY;
thumbNav.nextBtn.onRelease = function() {
if (thumbCount<folder.length-(numRows*numCols)) {
// enable prev button
thumbNav.prevBtn.enabled = true;
Tweener.addTween(thumbNav.prevBtn, {_alpha:100, time:1});
id++;
// set new endPos
endPos += -thumbMask._height;
// slide grid to new to endPos
slide(thumbs, thumbs._y, endPos, gridSlideSpeed, "_y", Strong.easeInOut);
// get old thumbCount
prevThumbCount = thumbCount;
// set new thumbCount
thumbCount += numRows*numCols;
// show next thumbs (cpu saver)
if (prevThumbCount<thumbCount) {
for (i=prevThumbCount; i<thumbCount; i++) {
var targetName1:String = "thumb"+(i);
scope.thumbs[targetName1]._visible = true;
}
}
// update counter text
thumbNav.counter.t.text = counterPrefix+" "+(prevThumbCount+1)+counterDiv+thumbCount+" of "+folder.length+" "+counterSuffix;

} else {
// enable prev button
thumbNav.prevBtn.enabled = true;
Tweener.addTween(thumbNav.prevBtn, {_alpha:100, time:1});
//
prevThumbCount = thumbCount;
thumbCount += numRows*numCols;
if (prevThumbCount<thumbCount) {
for (i=prevThumbCount; i<thumbCount; i++) {
var targetName1:String = "thumb"+(i);
scope.thumbs[targetName1]._visible = true;
}
}
id++;
endPos += -thumbMask._height;
slide(thumbs, thumbs._y, endPos, gridSlideSpeed, "_y", Strong.easeInOut);
// disable this button
Tweener.addTween(this, {_alpha:30, time:1});
Tweener.addTween(this, {_filter:glowOut, time:arrowGlowSpeed});
this.enabled = false;
// update counter text
thumbNav.counter.t.text = counterPrefix+" "+(prevThumbCount+1)+counterDiv+folder.length+ " of "+folder.length+" "+counterSuffix;
}
prevCount = (prevThumbCount+1);
};
}
thumbNav.prevBtn.onRelease = function() {
if (id != 0) {
// enable next button
thumbNav.nextBtn.enabled = true;
Tweener.addTween(thumbNav.nextBtn, {_alpha:100, time:arrowGlowSpeed});
id--;
// set vars
prevThumbCount = thumbCount;
thumbCount -= numRows*numCols;
// slide to new endpost
endPos -= -thumbMask._height;
slide(thumbs, thumbs._y, endPos, gridSlideSpeed, "_y", Strong.easeInOut);
// show previous thumbs (cpu saver)
for (i=prevThumbCount; i<thumbCount; i++) {
var targetName1:String = "thumb"+(i);
scope.thumbs[targetName1]._visible = false;
}
if (id == 0) {
// disable this button
Tweener.addTween(this, {_alpha:30, time:1});
Tweener.addTween(this, {_filter:glowOut, time:arrowGlowSpeed});
this.enabled = false;
thumbNav.counter.t.text = counterPrefix+" "+(thumbCount-thumbCount+1)+counterDiv+thumbCount+" of "+folder.length+" "+counterSuffix;
} else {
thumbNav.counter.t.text = counterPrefix+" "+(prevCount-numRows*numCols)+counterDiv+thumbCount+" of "+folder.length+" "+counterSuffix;
prevCount = prevCount-numRows*numCols;
}
}
};
// mouse over events for nav buttons
thumbNav.prevBtn.onRollOver = thumbNav.nextBtn.onRollOver=function () {
Tweener.addTween(this, {_filter:glowIn, time:arrowGlowSpeed});
};
thumbNav.prevBtn.onRollOut = thumbNav.nextBtn.onRollOut=function () {
Tweener.addTween(this, {_filter:glowOut, time:arrowGlowSpeed});
};
};
// slide tween function
function slide(who:MovieClip, startvalue:Number, endvalue:Number, speed:Number, prop:String, ease) {
var slider:Tween = new Tween(who, prop, ease, startvalue, endvalue, speed, true);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #40 (permalink)  
Old 03-14-10, 06:11 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
I think one of the .xml files isn't working out, but I can't tell which one.

You can probably safely assume the files that were given to you are fine, the cache stuff I gave you, especially the Apache configuration is a good idea, and removing any text prior to <?xml tags is good. The "undefined" issue may be the cause of the problem at this point and that could be a setting from one of the .xml files. The thumbnails are too big - but that just means they load slowly, and they could display better - but that's not a major issue for thumbnails.

If I didn't know the site wasn't doing what you wanted it to - I'd never know. You can leave it as it is.

If you are planning to use the site to get business, and relying on search engines, you really need to add some text somehow. Search engines can't index Flash content. You might want to post some images at flickr.com or sell some at istockphoto.com, to gain exposure, as well as inbound links to your site, which will raise it's position in search engine result lists.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Create a Quiz with Free Quiz Template in Adobe Flash WPeterson Flash & ActionScript 0 10-22-08 11:54 PM
Flash & XML... scoop Flash & ActionScript 2 09-25-06 01:35 PM
perl xml socket server ... stuck cloudiam Perl 2 02-28-05 10:32 AM


All times are GMT -5. The time now is 09:04 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.