Hi
I am facing the problem on the flash contionus horizontal image view,its working in flash interface and IE7 .But not in mozilla… any code mistake …or can i have any new method?
this is the code have done
var xml:XML = new XML();
xml.ignoreWhite = true;
_root.createEmptyMovieClip(“home”,_root.getNextHighestDepth());
home._x=0
var startX = 0;
var endX = 0;
var speedMin = 5;
var speedPlus = 2;
widt = [];
_global.wid = [];
_global.src = [];
xml.onLoad = function() {
var nodes = this.firstChild.childNodes;
_root.numOfItems = nodes.length;
for (var i = 0; i<_root.numOfItems; i++) {
_global.src* = nodes*.attributes.thumb_url;
var t = _root.home.attachMovie("item", "item"+i, i+1);
t._y = 300;
loadImage(nodes*.attributes.thumb_url,t.icon.inner);
_global.im = nodes*.attributes.image;
t.onEnterFrame = scrolling;
t.onRelease = imageClick;
_global.total = t._width*i;
}
};
xml.load(“icons1.xml”);
function loadImage(src:String, target:MovieClip) {
var mcl:MovieClipLoader = new MovieClipLoader();
var listener = new Object();
mcl.addListener(listener);
var thumbSplit = src
var srcArray:Array = thumbSplit.split("=");
src_1=srcArray[1];
mcl.loadClip(src_1,target);
listener.onLoadInit = function(target_mc:MovieClip)
{
i = Number(target_mc._parent._parent._name.substr(4,2));
t = target_mc._parent._parent;
if (i<(_root.numOfItems-1))
{
t._x = _root.home["item"+Number(i+1)]._x +_root.home["item"+Number(i+1)]._width;
}
else
{
t._x = 0;
}
startX = t._x+t._width;
thisHeight = target_mc._height;
thisWidth = target_mc._width;
nWidth = thisWidth;
nHeight = thisHeight;
if(thisHeight>500||thisWidth>500)
{
if(thisHeight>thisWidth)
{
nHeight = 500;
nWidth = thisWidth/thisHeight*500;
}
else
{
nWidth = 500;
nHeight = thisHeight/thisWidth*500;
}
}
if(nHeight<500)
{
nHeight = 500;
nWidth = thisWidth/thisHeight*500;
}
target_mc._width = nWidth;
target_mc._height = nHeight;
};
}
function imageClick() {
trace(" clck "+this._width);
}
function scrolling() {
if (this._x<-300) {
this._x = startX-300;
}
if (_root._xmouse>450 && _root._xmouse<875) {
this._x -= 5;
}
if (_root._xmouse<425 && _root._xmouse>10) {
this._x += 5;
}
if (this._x>startX-300) {
this._x =-300;
}
}
Regrads,
flashlady