Hi Friends!
I am new to this forum. advance thanks for the help,since i cant get the source file of kaltura i am doing the clone of famous kaltura player , i have done the image
gallery, the image gallery is dynamic, say when the user type a url it populates the images
with the help of scrapping using php, the image gallery is populated as 4 X 2 columns and rows respectively, the problem here is the images which i am displaying with the help of the path are of different dimension for example it is of 300 X 400 but my thumbnail image size is
50 X 50, i tried with movieclip._xscale and movieclip.yscale = 50, but its working partially, to see in action please visit www.wikivideo.com/MEDIA/Media_new.html there please go to the images, then go to the url tab , then type the url in this format http://www.youtube.com/, it will populate the images and another problem here is when you type the url it will populate the images perfectly in Internet Explorer and Mozilla , but when you type the url again it populates the images perfectly in mozilla, but its showing the previous images in IE, iam using
send and post method this is the code iam using: this action will be done after the search button is clicked,
on(press){
cliparray = [];
columns = 5;
spacex = 110;
spacey = 78;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<20; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
thumbnails* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
}
sload();
firstImage();
} else {
content = “file not loaded!”;
}
}
this.createEmptyMovieClip(“kk”, 658);
kk._x = 174.0;
kk._y = kk.starty=138.8;
kk.setMask(mm)
btn.enabled = true
function drawSquare(clip, depth, colour, x, y, w, h) {
var mc = clip.createEmptyMovieClip(“clip”+depth, depth);
mc._x = x;
mc._y = y;
mc.lineStyle();
mc.beginFill(colour);
mc.lineTo(w, 0);
mc.lineTo(w, h);
mc.lineTo(0, h);
mc.endFill();
return mc;
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p–;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
var ij = 0;
oarray = [];
function sload() {
for (var i = 0; i<image.length; i++) {
var clip = drawSquare(kk, i, 0, 0, 0, 60, 60);
clip._x = (i%columns)*spacex;
clip._y = Math.floor(i/columns)*spacey;
if (i%4 == 0) {
oarray.push(clip._y);
}
var clap = clip.createEmptyMovieClip(“tt”, 1);
clap._x = 2;
clap._y = 2;
cliparray.push(clap);
clip.pictureValue = i;
clip._xscale = 60;
clip._yscale = 60;
clip.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
clip.onRollOver = function() {
this._alpha = 50;
};
clip.onRollOut = function() {
this._alpha = 100;
};
}
startload();
}
this.createEmptyMovieClip(“checker”, 1000);
function checkload() {
checker.onEnterFrame = function() {
if (cliparray[ij]._width) {
delete this.onEnterFrame;
if (ij<cliparray.length-1) {
ij++;
startload();
}else{btn.enabled = true}
}
};
}
function startload() {
cliparray[ij].loadMovie(thumbnails[ij]);
checkload();
}
var ji = 1;
btn.onPress = function() {
ji++;
//trace(ji)
ji %= oarray.length;
kk._y = kk.starty-oarray[ji];
};
var jh = -1;
btn1.onPress = function() {
jh++;
//trace(ji)
jh %= oarray.length;
kk._y = kk.starty+oarray[jh];
};
var result_lv:LoadVars = new LoadVars();
result_lv.onLoad = function(success:Boolean) {
if (success) {
//trace(“hi”)
xmlData.load(“gallery.xml”);
}
};
var send_lv:LoadVars = new LoadVars();
send_lv.name = name;
// trace(“hi”);
send_lv.sendAndLoad(“scrap_links1.php”,result_lv,“POST”);
}
Please, some one help me out of this two problem! Thanks Again!