473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

problem with flash xml script

dan
does anyone know why this script doesnt work propertly
the images on the right side can not be displayed
here is the script i use

function initSettings () {
for ( var i = 1; i <= 50; i++){
removeMovieClip("thumbnails.thumbBox" + i)
}
thumbSpacing = 72
thumbsInRow = 5
bottomLimit = 268
topLimit = 40
tooltip.swapDepths(10000)
pics.info.txt.html = true
pics.info.txt.htmlText = ""
pics.info._visible = false
showTooltip ("off")
pics.btn_right._visible = pics.btn_left._visible = false
pics.btn_fullview._visible = false
pics.btnInfo._visible = false
btnScrollDown._visible = btnScrollUp._visible = false
}
function parsePortXML () {
thumbnails._x = 34
thumbnails._y = topLimit
totalProjects = portXML.firstChild.childNodes.length
for ( var i = 1; i <= totalProjects; i++){
thumbnails.attachMovie("thumbBox","thumbBox" + i,100 + i)
column = i % thumbsInRow
if (column == 0) {
column = thumbsInRow
}
row = Math.ceil(i / thumbsInRow)
thumbnails["thumbBox" + i]._x = thumbSpacing * (column - 1)
thumbnails["thumbBox" + i]._y = thumbSpacing * (row - 1)
if (thumbnails["thumbBox" + totalProjects]._y + thumbSpacing >
bottomLimit) {
btnScrollDown._visible = true
}
}
thumbnails.thumbBox1.gotoAndPlay(2)
}
function showTooltip (txt) {
if (txt == "off") {
stopDrag()
tooltip._x = -1000
} else {
tooltip.txt = " " + txt + " "
startDrag ("tooltip",true)
}
}
function changeProject (projNum) {
if (currentProj == undefined) {
pics.loading.play()
}
thumbnails["thumbBox" + currentProj].gotoAndStop("on")
currentProj = projNum
projNode = portXML.firstChild.childNodes[projNum - 1]
pics.project = projNode.attributes.name
projectInfo = projNode.attributes.info
if (projectInfo.length > 0) {
projectInfo = projectInfo.split("[").join("<")
projectInfo = projectInfo.split("]").join(">")
pics.info.txt.htmlText = projectInfo
pics.info._visible = false
pics.btnInfo._visible = true
} else {
pics.info.txt.htmlText = ""
pics.btnInfo._visible = false
}
totalPics = projNode.childNodes.length
clearInterval (picsSwitcher)
if (totalPics > 1) {
pics.btn_right._visible = pics.btn_left._visible = true
picsSwitcher = setInterval (showNextPic,5000)
} else {
pics.btn_right._visible = pics.btn_left._visible = false
}
showPic (1)
}
function showPic (picNum) {
picNode = projNode.childNodes[picNum - 1]
pics.picPlace = picNode.attributes.name
fileToLoad = sitePath + "pics/" + picNode.attributes.file + ".jpg"
loadVariables(fileToLoad,pics.loader)
currentPic = picNum
W = Number(picNode.attributes.fullW)
H = Number(picNode.attributes.fullH)
if ((W > 0) && (H > 0)) {
pics.btn_fullview._visible = true
} else {
pics.btn_fullview._visible = false
}
}
function openFullView () {
file = "fullview/" + picNode.attributes.file + ".jpg"
popupTitle = projNode.attributes.name + " : " +
picNode.attributes.name
getURL("javascript:FullView('" + file + "'," + W + "," + H + ",'" +
popupTitle + "')","")
}
function showNextPic () {
if ((pics.loader.getBytesLoaded() == pics.loader.getBytesTotal())
&& (pics.loader.getBytesLoaded() > 100)) {
nextPic = currentPic + 1
if (nextPic > totalPics) {
nextPic = 1
}
showPic (nextPic)
}
}
function resetSwitcherInterval () {
clearInterval (picsSwitcher)
picsSwitcher = setInterval (showNextPic,5000)
}
function doScroll (direction) {
if (direction == "up") {
var yGap = 2
}
else if (direction == "down") {
var yGap = -2
}
clearInterval (scrollInterval)
scrollInterval = setInterval (function () {
thumbnails._y = thumbnails._y + yGap
btnScrollUp._visible = btnScrollDown._visible = true
if (thumbnails._y > topLimit) {
btnScrollUp._visible = false
clearInterval (scrollInterval)
}
if (thumbnails._y + thumbnails["thumbBox" +
totalProjects]._y + thumbSpacing < bottomLimit) {
btnScrollDown._visible = false
clearInterval (scrollInterval)
}
},20)
}
stop()
if (getProperty("",_url).substr(0,4) == "file") {
sitePath = ""
} else {
sitePath = ""
}
portXML = new XML ();
portXML.ignoreWhite = true
portXML.onLoad = function () {
initSettings ()
parsePortXML ()
}
portXML.load(sitePath + "portfolio_interior.xml")
btnScrollDown.onRollOver = function () {
doScroll ("down")
}
btnScrollUp.onRollOver = function () {
doScroll ("up")
}
btnScrollDown.onRollOut = btnScrollUp.onRollOut =
btnScrollDown.onDragOut = btnScrollUp.onDragOut = function () {
clearInterval (scrollInterval)
}

Jul 20 '05 #1
3 1741
Just scanning it, I don't see an onLoad function. How do you make sure
your XML is loaded before the attachMovie gets called?

Jul 20 '05 #2
Oops, just found it. Please disregard previous numbskull post.

Jul 20 '05 #3


paron, what is the solution then you said you solve it

*** Sent via Developersdex http://www.developersdex.com ***
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: MN | last post by:
Hello all - I was hoping I could appeal to the gurus out there as I've researched this issue and can't seem to get this Flash movie to load at all. Below is my javascript code that I use to...
6
by: Cliff R. | last post by:
Hi, I use a handy little Javascript Flash detection script on a number of sites (copied below). Usually works great, but I just started trying Firefox and it's not working. A few browsers are...
3
by: johnsonholding | last post by:
Here is the script I have in my page : <!-- Begin function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "',...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
20
by: Pete Marsh | last post by:
Wondering if anyone can see an error with this script. I get a server configuration error. THat could mean a module is not being loaded, but maybe there's a syntax error here, can anyone spot it?...
3
by: tshad | last post by:
I have a problem with a page I am trying to secure. It has a flash object as well as a couple of 3rd party objects used for tracking use of the page. I keep getting a message saying that there are...
1
by: critchey1 | last post by:
Hey everyone, i've been playing around with trying to get some scripts to work with detecting whether flash player is installed on your computer or not. I found a flash detection kit on the adobe...
4
by: vijaypatidar | last post by:
hi i am using flash action script 3 for streaming video and audio via web cam and mice to flash media server.as all know that flash uses nellymoser audio codec for recording audio. i want to convert...
0
momotaro
by: momotaro | last post by:
I have a flash file that I include in a PHP page, the bottons are visible but not the content of the file (images) all the rest is a white box in both the preview of dreamweaver and the internet...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.