473,699 Members | 2,131 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML gallery help

nomad
664 Recognized Expert Contributor
Hello everyone:

I need a little help here in adding a two other text fields for an xml Gallery.

Here is the flash action Script
Expand|Select|Wrap|Line Numbers
  1. var myGalleryXML = new XML();
  2. myGalleryXML.ignoreWhite = true;
  3.  
  4. myGalleryXML.load("fine_arts.xml");
  5.  
  6. myGalleryXML.onLoad = function() {
  7.  
  8. //I removed the function section area if you need it please contact me.
  9.  
  10.  
  11. fullPreloader.onLoadStart = function(target) {
  12. target.createTextField("my_txt",target.getNextHighestDepth(),0,0,200,20);
  13. target.my_txt.selectable = false;
  14. };
  15.  
  16. preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
  17. target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
  18. };
  19.  
  20. preloader.onLoadComplete=function(target){
  21. new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
  22. target.my_txt.removeTextField();
  23. target.onRelease=function(){
  24. callFullImage(this._name);
  25. }
  26.  
  27. target.onRollOver=function(){
  28. this._alpha=50;
  29. };
  30.  
  31. target.onRollOut=function(){
  32. this._alpha=100;
  33. };
  34. }
  35.  
  36. }
  37.  
  38. }
  39.  
  40. function callFullImage(myNumber) {
  41.  
  42. myURL = myImages[myNumber].attributes.full_url;
  43. myTitle = myImages[myNumber].attributes.title;
  44.  
  45. _root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());
  46. fullImage_mc._x = _root.full_x;
  47. fullImage_mc._y = _root.full_y;
  48.  
  49. var fullClipLoader = new MovieClipLoader();
  50. var fullPreloader = new Object();
  51. fullClipLoader.addListener(fullPreloader);
  52.  
  53. fullPreloader.onLoadStart = function(target) {
  54. target.createTextField("my_txt",target.getNextHighestDepth(),0,295,200,20);
  55. target.my_txt.selectable = false;
  56. };
  57.  
  58. fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
  59. target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
  60. };
  61.  
  62. fullPreloader.onLoadComplete = function(target) {
  63. new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);    
  64. target.my_txt.text = myTitle;
  65. };
  66.  
  67. fullClipLoader.loadClip("buildings/"+myURL,fullImage_mc);
  68.  
  69. }
  70.  
  71. function createMask() {
  72.  
  73. _root.createEmptyMovieClip("mask_mc",_root.getNextHighestDepth());
  74.  
  75. mask_mc._x = _root.gallery_x;
  76. mask_mc._y = _root.gallery_y;
  77.  
  78. mask_mc.beginFill(0x000000,100);
  79. mask_mc.lineTo(_root.gallery_width,0);
  80. mask_mc.lineTo(_root.gallery_width,_root.gallery_height);
  81. mask_mc.lineTo(0,_root.gallery_height);
  82. mask_mc.lineTo(0,0);
  83.  
  84. container_mc.setMask(mask_mc);
  85. }
  86.  
  87. function scrolling() { 
  88. _root.onEnterFrame = function() {
  89. if (mask_mc._ymouse<(mask_mc._height*(1/3)) || mask_mc._ymouse>(mask_mc._height*(2/3))) {
  90. container_mc._y += Math.cos(((mask_mc._ymouse)/mask_mc._height)*Math.PI)*15;
  91.  
  92. if (container_mc._y>mask_mc._y) {
  93. container_mc._y = mask_mc._y;
  94. }
  95.  
  96. if (container_mc._y<(mask_mc._y-(container_mc._height-mask_mc._height))) {
  97. container_mc._y = mask_mc._y-(container_mc._height-mask_mc._height);
  98. }
  99. }
  100. };
  101. }
  102.  
  103. import mx.transitions.Tween;
  104. import mx.transitions.easing.*;
  105.  
  106.  
Here is the XML code
Expand|Select|Wrap|Line Numbers
  1. <gallery thumb_width="120" thumb_height="120" gallery_width="120" gallery_height="400" gallery_x="50" gallery_y="125" full_x="220" full_y="125">
  2. <image thumb_url="balboa_sm.jpg" full_url="balboa.jpg" title="balboa.jpg" subtitle2="Mansonite" subtitle3="$400.00"/>
  3. <image thumb_url="surf_sm.jpg" full_url="surf.jpg" title="balboa.jpg" subtitle2="Mansonite" subtitle3="$400.00"/>
  4. </gallery>
  5.  
What I want is the photo then the title below it then the subtitle below that and then the subtitle below that.

Any Help would be great
thanks
damon
Aug 3 '10 #1
0 1057

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3032
by: dddddd | last post by:
i need do create simple dinamic site - built mainly of pictures(they are the only dinamic part). pictuers differ by the -Location- and by -Time- (in which they were taken)... so on the index page visitor should have 2 choices (how the pictures will be arranged) (1) by time (2) by location the webmaster will only copy the pictures in folder
13
5205
by: matt | last post by:
I have this bit of code, that isn't valid, and I need some help getting it to work... Currently, I get an error because I am calling the next() function within a foreach loop. I am opening a flat file with data in the format of: 01|data1|data2 01 Being Gallery Name, data1 being the filename, data2 being photo caption. Basically I need to look at the line from the text file, and if the
3
1519
by: peterf | last post by:
Posted in alt.comp.lang.php before I saw how much more active this group is... Hope someone can help. I am new to this group and needing a little bit of guidance. First off I need to say that I'm also new to php but am certain that I could work with it enough to accomplish this task so please be patient with my question. I'm trying to find if possible, a script that would allow the viewing of two different images side by side on the same...
11
2775
by: ste | last post by:
Hi there, Further to my recent posts where I've received excellent help from Rik and Jerry, I've ended up with an image gallery on my website that displays images in a table, 3 images per row. This works great and opens all images in the database when I open the url mywebsite/gallery.php, or I can choose certain images (by category) by going to url's like mywebsite/gallery.php?category=landscape Although the above worked perfectly...
3
2634
by: Chuck Renner | last post by:
Please help! This MIGHT even be a bug in PHP! I'll provide version numbers and site specific information (browser, OS, and kernel versions) if others cannot reproduce this problem. I'm running into some PHP behavior that I do not understand in PHP 5.1.2. I need to parse the HTML from the following carefully constructed URI:
1
1327
nritchie124
by: nritchie124 | last post by:
Hi there.... I know some one out there will be able to figure this out....it just isn't me. I'm a graphics guy and my java coding is very limited. I'm trying to have a gallery with thumbs on the bottom, back and next buttons on top and the pic in the middle. I have a swap that works nice for the thumbs and an array with back and next functions for the top buttons. I need them to work together or a single script to control all of it.......
11
2092
by: shror | last post by:
hi every body I need help please i have designed an image gallery of about 20 pictures and they are shown in thumb nail views and for viewing the largeer version of the images i have added a radio button and a push button, so that the user choose the picture using the radio button and click on the push button to open the larger version picture in another window, but my problem is that i know how to pass the selection to the second page...
0
1085
by: sriframes | last post by:
one help please I have a tempat with flip book. in that the pages are loaded as _global object. thats mean pages are not in time line. pages are in library only so these pages are loding from library.my problam is I have to intigrate this templat with a gallery wich is bult by action script 2.0 means this uses external action script (*.as etc..) . in script gallery objects are bulding in main time line.(_root.) this move clip I have to insert...
0
2304
nomad
by: nomad | last post by:
Hello Everyone. I founded an Flash and xml photo gallery. It works but I took it to another step What I want is to have six different galleries in one Flash file. I figure out how to do that but when I click on the the galleries I can see the pervious gallery files. The gallery works like this: When you open the gallery there are links on top of the page where you can go to other gallery; with gallery one which has small thumbnails on...
3
2616
by: jwidener117 | last post by:
i am well virsed in html and CSS but I am making a new portfolio site for myself and I would like to implement some java for a simple way to display my images, using my links to the left when the item is clicked i want my image to be loaded in the place holder, I found a perfect tutorial online http://www.alistapart.com/articles/imagegallery but something is wrong when clicking the first link "mecha horse" it should load 1.jpg into my place...
0
8706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8630
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
9199
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
9055
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
8944
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
7786
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...
1
6550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5889
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();...
2
2364
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.