473,789 Members | 2,530 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.th umbBox" + i)
}
thumbSpacing = 72
thumbsInRow = 5
bottomLimit = 268
topLimit = 40
tooltip.swapDep ths(10000)
pics.info.txt.h tml = true
pics.info.txt.h tmlText = ""
pics.info._visi ble = false
showTooltip ("off")
pics.btn_right. _visible = pics.btn_left._ visible = false
pics.btn_fullvi ew._visible = false
pics.btnInfo._v isible = false
btnScrollDown._ visible = btnScrollUp._vi sible = false
}
function parsePortXML () {
thumbnails._x = 34
thumbnails._y = topLimit
totalProjects = portXML.firstCh ild.childNodes. length
for ( var i = 1; i <= totalProjects; i++){
thumbnails.atta chMovie("thumbB ox","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.thum bBox1.gotoAndPl ay(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.pl ay()
}
thumbnails["thumbBox" + currentProj].gotoAndStop("o n")
currentProj = projNum
projNode = portXML.firstCh ild.childNodes[projNum - 1]
pics.project = projNode.attrib utes.name
projectInfo = projNode.attrib utes.info
if (projectInfo.le ngth > 0) {
projectInfo = projectInfo.spl it("[").join("<" )
projectInfo = projectInfo.spl it("]").join(">" )
pics.info.txt.h tmlText = projectInfo
pics.info._visi ble = false
pics.btnInfo._v isible = true
} else {
pics.info.txt.h tmlText = ""
pics.btnInfo._v isible = false
}
totalPics = projNode.childN odes.length
clearInterval (picsSwitcher)
if (totalPics > 1) {
pics.btn_right. _visible = pics.btn_left._ visible = true
picsSwitcher = setInterval (showNextPic,50 00)
} else {
pics.btn_right. _visible = pics.btn_left._ visible = false
}
showPic (1)
}
function showPic (picNum) {
picNode = projNode.childN odes[picNum - 1]
pics.picPlace = picNode.attribu tes.name
fileToLoad = sitePath + "pics/" + picNode.attribu tes.file + ".jpg"
loadVariables(f ileToLoad,pics. loader)
currentPic = picNum
W = Number(picNode. attributes.full W)
H = Number(picNode. attributes.full H)
if ((W > 0) && (H > 0)) {
pics.btn_fullvi ew._visible = true
} else {
pics.btn_fullvi ew._visible = false
}
}
function openFullView () {
file = "fullview/" + picNode.attribu tes.file + ".jpg"
popupTitle = projNode.attrib utes.name + " : " +
picNode.attribu tes.name
getURL("javascr ipt:FullView('" + file + "'," + W + "," + H + ",'" +
popupTitle + "')","")
}
function showNextPic () {
if ((pics.loader.g etBytesLoaded() == pics.loader.get BytesTotal())
&& (pics.loader.ge tBytesLoaded() > 100)) {
nextPic = currentPic + 1
if (nextPic > totalPics) {
nextPic = 1
}
showPic (nextPic)
}
}
function resetSwitcherIn terval () {
clearInterval (picsSwitcher)
picsSwitcher = setInterval (showNextPic,50 00)
}
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._vi sible = btnScrollDown._ visible = true
if (thumbnails._y > topLimit) {
btnScrollUp._vi sible = 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.ignoreW hite = true
portXML.onLoad = function () {
initSettings ()
parsePortXML ()
}
portXML.load(si tePath + "portfolio_inte rior.xml")
btnScrollDown.o nRollOver = function () {
doScroll ("down")
}
btnScrollUp.onR ollOver = function () {
doScroll ("up")
}
btnScrollDown.o nRollOut = btnScrollUp.onR ollOut =
btnScrollDown.o nDragOut = btnScrollUp.onD ragOut = function () {
clearInterval (scrollInterval )
}

Jul 20 '05 #1
3 1760
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
3773
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 detect the browser and then based on the success of loading the plugin either show the Flash movie (swf file) or show a jpeg. Any help is appreciated as I have adjusted the syntax of having nested script tags within each other without any success. ...
6
3572
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 referenced in the script so I presume that Firefox needs to be added somewhere -- does anyone know how I could update this to be supported by Firefox? Thanks! <SCRIPT TYPE="text/JavaScript">
3
1717
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 + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=194,height=146,left = 440,top = 288');"); }
5
3700
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 for repeated html im using the external js, i mean the TOP, BOTTOM they are repeated in every page, so i include them as functions in the external js and call them. Why it doesn't work?
20
1744
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? Thanks <? Error_Reporting(E_ALL & ~E_NOTICE); $subject="from ".$_REQUEST ; $headers= "From: ".$_REQUEST ."\n"; $headers.='Content-type: text/html; charset=iso-8859-1';
3
1658
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 unsecure items on the page. I assume this is because of some absolute URL paths. But one of them doesn't cause the problem and it also has an absolute URL in it. The first 2 cause an error:...
1
2731
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 site which had a client side detection method using javascript. Basically what im trying to get it to do is if flash player is installed, use the style property display="none" to hide my static content, and if flash is not installed hide the flash...
4
4388
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 flash media server flv to 3gp for that i am using ffmpeg but after conversion i am getting audio video synchronization problem. the problem is coming due to the nellymoser audio codec. here anyone can suggest me right way to stream audio from...
0
1924
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 browsers here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
0
9506
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10193
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6761
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.