I need to start off by saying I am not a web developer, and I'm not quite sure of what I'm doing!!!
I am trying to embed a flash gallery into my html page, and I need some help. I downloaded the xml flash gallery component from flashnifities.com. It seems pretty easy to use, but I can't figure out how to embed the gallery I created into the html page I want to use for the gallery.
I followed the instructions found at http://flashnifties.com/support/viewtopic.php?id=972
It's been quite a while since I've posted here, and I don't remember how to post code so you can look at it. If someone could refresh my memory on how to post, I'll post what I have.
Thanks,
Frankie
skilled1
05-08-2009, 11:47 AM
like so
your code here
Doguenanny
05-08-2009, 12:09 PM
ok, here 's what the instructions said to add to the "head" of my html (I'm including the whole head)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>End of The Road Kennels - Males</title>
<meta name="description" content="Breeding Dogue De Bordeaux since 1987">
<meta name="keywords" content="dogue de bordeaux, french mastiff, dogue, mastiff, bordeaux, bordeaux dog, french dog, hooch dog, turner and hooch, dogue de bordeaux breeder, ddbs, ddbsa, usbs, nabf, dogue de bordeaux club, akc miscellaneous class, akc working class, bulldog of bordeaux, bulldog of france, red dog, rare breed, black mask, red mask">
<meta name="author" content="Frankie Von Hof">
<div id="flashcontent"> download flash player message here </div>
<script type="text/javascript">
var so = new SWFObject("xmlGallery.swf", "gallery", "600", "400", "7", "#333333");
so.write("flashcontent");
</script>
</div>
I need to take this one step at a time so I can understand what I'm doing, and why I'm doing it. I have several other pages in my website that I want to put galleries on, and I figured if I can get one completely finished, and understand what I did, and why, the rest should be pretty easy.
Thanks,
Frankie
Eye for Video
05-09-2009, 10:03 AM
So does this code work for you? Or are you inferring that it does not?
From <head>
<script type="text/javascript" src="flashdetect.js"></script>
sets path the to javascript file you will be calling to (re)write the contents of “flashcontent”
Beware that this path must always be correct relative to the Web page on which you are using it. In the example above the .js file is in the same folder as the Web page. If you want to use this script on several pages and store it in it’s own subfolder one level down, the new path could be
<script type="text/javascript" src="scripts/flashdetect.js"></script>
<div id="flashcontent"> download flash player message here </div>
This is the content of “flashcontent” before it is (re)written by the .js. If the viewer has .js disabled, or when the script checks for Flash pluggin, and the viewer doesn’t have, it won’t rewrite, viewer would see this content. Use this for valuable content. This will be read and indexed by search engines. So use this “Alternate Content” to describe in detail your visual Flash content. Any regular Web page content can go here, including text, photos, and links. For example, if your Flash content is a nav bar, you could create a regular, photo or text based set of html links here.
<script type="text/javascript">
starts call to .js
var so = new SWFObject("xmlGallery.swf", "gallery", "600", "400", "7", "#333333");
creates a new swfObject… "xmlGallery.swf"…this is path to the content which will replace “Alternate Content”, relative to the page on which this code is placed. So if the .swf is in a subfolder one level down it could be "flash/xmlGallery.swf"…."gallery"…this is the id given to the outermost object tag, …."600", "400"…content will be 600px wide, 400 high…."7"…requires at least Flash player 7 to display contents…"#333333"… use a shade of gray as background behind the .swf.
so.addParam("wmode", "transparent");
You may also want to add other params... like one to make the background of the .swf transparent and let the html page show through wherever there are no objects on the Flash stage.
so.write("flashcontent");
Now that all those parameters are set, (re)write the contents of <div id="flashcontent">
In this slideshow, the .swf is expecting the .xml file to be in the same folder, so keep them together. In the xml file are the params for the slideshow itself, images source, file names, captions, fades, etc.
Best wishes,
Eye for Video
www.cidigitalmedia.com
Doguenanny
05-09-2009, 06:39 PM
The code didn't work for me. The only thing that comes up on the page that I put the code on are the words "download flash player message here".
I do have everything in the same folder, but I don't see a file named xmlGallery.swf. I do see a file titled xmlGallery with no extension, and the description is Shockwave Flash Object, would that be the SWF file?
What do you mean by this "sets path the to javascript file you will be calling to (re)write the contents of “flashcontent”.
I understand it sets the path, but I don't understand what the rest of it means.
Totally Confused:confused::confused:
Thanks,
Frankie
Eye for Video
05-09-2009, 09:55 PM
To better understand your dilemma, I went to
http://www.flashnifties.com/xml_slideshow.php
and downloaded the slide show. Not sure if this is the exact version you are working with or not but either way, the slide show will need a minimum of 4 files, plus the photo images files Listed below are the 4 files used to operate and display the slideshow. If you don’t have at least 4 files, download again (file names don’t seem to be exactly the same, but functions would be.
flashdetect.js
This is a javascript file which detects the Flash plugin in the Web browser and does the (re)writing of “flashcontent”. The path to find this file is set in the <head>. The code below is not just code for the sake of code, it’s just like any src="find_it_here"… code to find and call in another file.
<script type="text/javascript" src="flashdetect.js"></script>
The reason your page is displaying
download flash player message here
is because that is the content in the <div> with id="flashcontent"
<div id="flashcontent"> download flash player message here </div>
The content is NOT being rewritten with the slide show content. You must have the flashdetect.js file and the path to find it must be correct.
slideshow.html
This is the Web page used to display the slide show and any other content you want.
slideshow.swf
This is the Flash .swf used to animate the photo images
slideshow.xml
This is a .xml text file which the Flash .swf will read. It is used to configure the image size, fadein, display time, etc. It also lists the file name and path to each of the photos you will be displaying. Open in a simple text editor like NotePad (not a word processor) to edit and add photo file names and captions.
If this version of the slide show is not the same as yours, perhaps you should download it (it’s the free version) shown on page linked above. Practice with this slide show until you understand the function of each of the 4 files. Add a few photos of your own…etc.
Best wishes,
EfV
Doguenanny
05-10-2009, 06:40 AM
The one I had downloaded to work with is http://www.flashnifties.com/xml_gallery.php
These are the files that came with the download:
data.xml
I've already added 6 of my own photos to this file by opening it and editing it in notepad. The gallery works with my photos. I am just having a problem embedding it into my own html file.
flashdetect.js
xmlGallery.swf
xmlGallery.fla
xmlGallery.mxp
xmlGallery.html
In addition to the photos and the webpage I want to put the gallery on, all of these files are in one folder.
I understand that I will use the data.xml file for all of my editing; all of the other files (except the html file) are what runs the gallery. Is this correct?
I don't know why the gallery doesn't work in my html file.
Thanks for your help.
Frankie
webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved.