XML Driven Photo Gallery (Action Script Help)

Hi,
I need to make a XML Driven Photo slide in Flash CS5.
It needs to have a Box that contains 5 Thumbnails(by XML) act as buttons.
The  Box sits on top of the Main photo area and shrinks (or close out) when  user click its close button. And it opens out by clicking on a open  button.
I'm sure it can be done by using timeline, Tweening or you name it..But what about the Thumbnails that run from the XML file?
Can they disappear with the Box and retrieve when it opens? is it possible?
If yes, what would be the best way to do that?
Any comment would be greatly appreciated!
Here is the ActionScript.
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.events.Event;
import fl.controls.Button;
import flash.display.Shape;
import flash.events.MouseEvent;
import flash.display.MovieClip;
import flash.display.Loader;
import flash.text.TextField;
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.display.Shader;
var hasloaded:Boolean = false;
var firstLoaded:Boolean = false;
var barWidth:int;
var barHeight:int;
var images;
var imageCount:int;
var thumbnailArray:Array = new Array();
var bigImageArray:Array = new Array();
var descriptionArray:Array = new Array();
var xmlLoader:URLLoader = new URLLoader();
var imageXML:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("slideshow.xml"));
function LoadXML(e:Event):void {
     imageXML = new XML(e.target.data);
     ParseImages(imageXML);
  Populates the arrays with the image values
  and the text for each picture.
function ParseImages(imageInput:XML):void {
     var iconList:XMLList = imageInput.image.icon;
     var mainImageList:XMLList = imageInput.image.mainimage;
     var descriptionList:XMLList = imageInput.image.description;
     for (var i:int = 0; i < iconList.length(); i++) {
         var imageElement:XML = iconList[i];
         //trace(imageElement);
         thumbnailArray[i] = imageElement;
     for (var j:int = 0; j < mainImageList.length(); j++) {
         var mainimageElement:XML = mainImageList[j];
         //trace(mainimageElement);
         bigImageArray[j] = mainimageElement;
     for (var l:int = 0; l < descriptionList.length(); l++) {
         var descriptionElement:XML = descriptionList[l];
         //trace(descriptionElement);
         descriptionArray[l] = descriptionElement;
     loadImages();
function loadImages():void{
     trace("inside of loadimages function.");
     trace(thumbnailArray.length);
     for(var i:int=0; i < thumbnailArray.length; i++){
         trace(thumbnailArray[i]);
         populateContainers(thumbnailArray[i], i);
         //populateContainers2();
         trace("Loaded " + thumbnailArray[i]);
var loader:Loader;
var xStart = -210;
var ypos = -34;
var currentPos = xStart;
var incrementValue = 66;
  This takes in the name of the image file and
  displays it within the newly created movie clip
function populateContainers(file:String, pos:int):void{   
     //create a movie clip to hold the image
     var mc:MovieClip = new MovieClip();
     mc.graphics.beginFill(0xFFFFFF);
     mc.graphics.drawRect(0, 0, 50, 51);
     mc.graphics.endFill();
     mc.buttonMode = true;
     mc.x = currentPos;
     mc.y = ypos;
     mc.name = "thumb_" + pos;
     mc.addEventListener(MouseEvent.CLICK, clickHandler); 
     loader = new Loader();
     //loader.mask = imagemask;
    var url:URLRequest = new URLRequest(file);
     loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadInitialImage);
     loader.load(url);
     //add the image to the movie clip
     mc.addChild(loader);
     this.imageBar.addChild(mc);
     //increment the currentPos
     currentPos += incrementValue;
function clickHandler(e:MouseEvent):void{
     var str:String = e.currentTarget.name;
     var index:int = int(str.substr(6,1));
     if(hasloaded) {
         this.mainWindow.removeChild(loader);
     loader = new Loader();
     loader.load(new URLRequest(bigImageArray[index]));
     this.mainWindow.addChild(loader);
     TransitionManager.start(this.mainWindow,{type:Fade, direction:Transition.IN, duration:2, easing:Regular.easeOut});
     //setChildIndex(loader, 0);
     hasloaded = true;
     loadText(index);
function loadText(index:int):void {
     Object(this).imageBar.txtdescription.text = descriptionArray[index];
function loadInitialImage(event:Event):void {
     if(!firstLoaded) {
         loader = new Loader();
         loader.load(new URLRequest(bigImageArray[0]));
         this.mainWindow.addChild(loader);
         TransitionManager.start(this.mainWindow,{type:Fade, direction:Transition.IN, duration:2, easing:Regular.easeIn});
         //setChildIndex(loader, 0);
         hasloaded = true;
         loadText(0);
     firstLoaded = true;
/*  This section defines the buttons that control the image bar */
Object(this).imageBar.btnBarOpen.addEventListener(MouseEvent.MOUSE_UP, openImageBar);
function openImageBar(event:MouseEvent):void {
     this.gotoAndPlay(1);

Well Thats what i know but you might be able to use flash player 10 in your browser i think the file system works on it fine im not sure i mostly work on air glad i could help
James

Similar Messages

  • Help - xml driven photo gallery

    Hello,
    I have a very simple ajax page. There is a dropdown from
    which the user selects the gallery and then there is an xml file
    that send back the xml full of pictures for that gallery. The
    problem is that on changing the gallery in the dropdown, sometimes
    it works and then it doesnt. More like it works the first time (so
    new pictures load up fine) and then it doesnt. I cant figure out
    for the life of me why this wont work right. I have tried looking
    at the xml, it is running fine, takes a url parameter as the
    galleryid and generates the xml. The alert in the get_pictures
    alwys pops up but the loadData seems like not working. Been looking
    over this code for hours now. Here is the relevant code:
    <script type="text/javascript">
    var dsPhotos = new
    Spry.Data.XMLDataSet("test_getpics_xml.cfm?galleryid=<cfoutput>#galleryid#</cfoutput>",
    "photos/photo");
    //var dsPhotos = new
    Spry.Data.XMLDataSet("test_getpics_xml.xml?galleryid=<cfoutput>#galleryid#</cfoutput>",
    "photos/photo");
    //var dsPhotos_page = new
    Spry.Data.PagedView(dsPhotos,{pageSize: 20});
    //var dsPhotos_page_info = dsPhotos_page.getPagingInfo();
    function get_pictures(galleryid)
    urltext='test_getpics_xml.xml?galleryid='+galleryid
    alert(urltext)
    dsPhotos.setURL(urltext)
    dsPhotos.loadData()
    </script>
    <table>
    <tr>
    <td>Galleries:
    <select name="galleryid"
    onChange="get_pictures(this.value)">
    <cfoutput query="qry_galleries">
    <option
    value="#galleryid#">#galleryname#</option>
    </cfoutput>
    </select>
    </td>
    </tr>
    </table>
    <div spry:region="dsPhotos">
    <div spry:repeat="dsPhotos"> <a href="##"
    onclick="alert('hey')"><img width="100" height="100"
    src="{@picture}" /></a>
    <p><br />
    </p>
    </div>
    </div>
    I have Firebug plugin installed on my Firebox and there is no
    error on it. Any help will be appreciated. Thanks a lot.

    Hi vansh110,
    It's really hard to diagnose the problem without actually
    seeing your example in action. If you can't give us an URL to look
    at, then the best we can do is suggest some debugging tips.
    Try adding an observer to your data set that prints the
    notifications:
    dsPhotos.addObserver(function(notificationType, notifier,
    data)
    Spry.Debug.trace(notificationType);
    if (notificationType == "onPostLoad")
    Spry.Debug.trace("<pre>" +
    Spry.Utils.encodeEntities(dsPhotos.getData().toSource()) +
    "</pre>");
    That way you can watch what states the data set is going
    through. The trace statement will only work in FireFox due to the
    use of toSource(), but it will show you what the final data set
    looks like after the data is loaded and flattened into a table.
    Next, you can turn on region debugging:
    Spry.Data.Region.debug = true;
    That should show you the markup that is being generated after
    data is loaded.
    --== Kin ==--

  • Flv xml Stream Playlist action script help

    So if you go to this site:
    click here
    you will see a FLV player that has a list of videos that are
    pulled from a .xml file...
    The action script for this player is as such:
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    theVideo.attachVideo(ns);
    rewindButton.onRelease = function() {
    ns.seek(0);
    playButton.onRelease = function() {
    ns.pause();
    var videoInterval = setInterval(videoStatus,100);
    var amountLoaded:Number;
    var duration:Number;
    ns["onMetaData"] = function(obj) {
    duration = obj.duration;
    function videoStatus() {
    amountLoaded = ns.bytesLoaded / ns.bytesTotal;
    loader.loadBar._width = amountLoaded * 194.5;
    loader.scrub._x = ns.time / duration * 194.5;
    var vlist:XML = new XML();
    vlist.ignoreWhite = true;
    vlist.onLoad = function() {
    var videos:Array = this.firstChild.childNodes;
    for(i=0;i<videos.length;i++) {
    videoList.addItem(videos
    .attributes.desc,videos.attributes.url);
    ns.play(videoList.getItemAt(0).data);
    videoList.selectedIndex = 0;
    var vidList:Object = new Object();
    vidList.change = function() {
    ns.play(videoList.getItemAt(videoList.selectedIndex).data);
    videoList.addEventListener("change",vidList);
    vlist.load("videos.xml");
    I want to action script something that will make the videos
    play one after the other, get rid of the list on the right and have
    buttons on player that allow you to go to the next/previous video
    listed in the .xml file
    Its sort of like the player at
    click
    here
    I know this is a lot to ask, but I am currently in a jam and
    any help would be greatly appreciated...
    Thanks
    Matthelm88

    gotoAndLearn is a fantastic base to build off of.
    but
    i'm looking for the same thing... how do you get the files
    to play one after another?
    i've looked for everyhting ns. related and i can find any
    doc's on this one.
    i 've found the
    function complete_listener(eventObject:VideoEvent):void {
    if (my_FLVPlybk.source == "rentv1.flv") {
    my_FLVPlybk.play("rentv2.flv");
    else if (my_FLVPlybk.source == "rentv2.flv") {
    my_FLVPlybk.play("rentv3.flv");
    on the flash video live docs.. but i can't find anything on
    how to tie it into the XML.
    anything anyone can offer would be a huge help ...

  • XML Action Script Help

    Im taking over a job and I was given the original flash file
    that doesnt seem to be working properly.
    It a thumbnail menu that loads through xml...the images work
    fine but the Links & Titles do not load.
    Nor does the rollover effect. Here what I have.
    Action Script:
    Stage.align = "TL";
    Stage.scaleMode = "noscale";
    preloader._visible = true;
    thumbs_line._visible = false;
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    my_xml = new XML();
    my_xml.ignoreWhite = true;
    if (_parent.xml_file == undefined) {
    my_xml.load((String(_url.slice(0, (_url.length-3))))+"xml");
    } else {
    my_xml.load(_parent.xml_file);
    my_xml.onLoad = function(ok) {
    if (ok) {
    process_xml();
    } else {
    trace("XML not loaded");
    function process_xml() {
    total_images = my_xml.childNodes[1].childNodes.length-1;
    gallery_width =
    Number(my_xml.childNodes[0].childNodes[0].attributes.gallery_width);
    gallery_height =
    Number(my_xml.childNodes[0].childNodes[0].attributes.gallery_height);
    max_thumb_height =
    Number(my_xml.childNodes[0].childNodes[0].attributes.max_thumb_height);
    thumbs_space =
    Number(my_xml.childNodes[0].childNodes[1].attributes.thumbs_space);
    thumb_border =
    Number(my_xml.childNodes[0].childNodes[1].attributes.thumb_border);
    image_border =
    Number(my_xml.childNodes[0].childNodes[1].attributes.image_border);
    fade_in_seconds =
    Number(my_xml.childNodes[0].childNodes[2].attributes.fade_in_seconds);
    fade_out_seconds =
    Number(my_xml.childNodes[0].childNodes[2].attributes.fade_out_seconds);
    thumb_fade_seconds =
    Number(my_xml.childNodes[0].childNodes[2].attributes.thumb_fade_seconds);
    fade_in_seconds += 0.01;
    fade_out_seconds += 0.01;
    thumb_fade_seconds += 0.01;
    thumbs_line._y =
    gallery_height-max_thumb_height-(4*thumbs_space);
    thumbs_line.thumbs_bg._width = gallery_width;
    thumbs_line.thumbs_mask._width = gallery_width;
    thumbs_line.thumbs_bg._height =
    max_thumb_height+thumbs_space*2+thumb_border*2;
    thumbs_line.thumbs_mask._height =
    max_thumb_height+thumbs_space*2+thumb_border*2;
    thumbs_line._visible = true;
    load_thumb(0);
    preloader._x = int((gallery_width-preloader._width)/2);
    preloader._y = int(thumbs_line._y/2-preloader._height/2);
    max_image_height =
    gallery_height-max_thumb_height-thumbs_space*6;
    load_image(0);
    this["link"+t] =
    my_xml.childNodes[1].childNodes[t].attributes.link;
    function load_thumb(t) {
    thumbs_line.thumbs.createEmptyMovieClip('thumb'+t,
    thumbs_line.thumbs.getNextHighestDepth());
    thumbs_line.thumbs['thumb'+t]._y =
    thumbs_space+thumb_border;
    thumbs_line.thumbs['thumb'+t]._x =
    thumbs_space+thumb_border;
    if (t>0) {
    thumbs_line.thumbs['thumb'+t]._x =
    thumbs_line.thumbs['thumb'+(t-1)]._x+thumbs_line.thumbs['thumb'+(t-1)]._width+thumbs_spac e;
    thumbs_line.thumbs['thumb'+t].image_number = t;
    thumbs_line.thumbs['thumb'+t].onRollOver =
    thumbs_line.thumbs['thumb'+t].attachMovie("thumbov_mc",
    "thumbov_mc", 10);
    thumbs_line.thumbs['thumb'+t].onRelease = function() {
    tellTarget (thumbs_line.thumbs['thumb'+t]) {
    var loadListener:Object = new Object();
    loadListener.onLoadInit = function(target_mc:MovieClip) {
    preloader.visible = false;
    thumbs_line.thumbs['thumb'+t].attachMovie("border_grey",
    "border_grey", 10);
    thumbs_line.thumbs['thumb'+t].border_grey._x -=
    thumb_border;
    thumbs_line.thumbs['thumb'+t].border_grey._y -=
    thumb_border;
    thumbs_line.thumbs['thumb'+t].attachMovie("border_white",
    "border_white", 20);
    thumbs_line.thumbs['thumb'+t].border_white._x -=
    thumb_border-1;
    thumbs_line.thumbs['thumb'+t].border_white._y -=
    thumb_border-1;
    if (target_mc._height>max_thumb_height) {
    ratio = target_mc._width/target_mc._height;
    target_mc._height = max_thumb_height;
    target_mc._width = int(target_mc._height*ratio);
    thumbs_line.thumbs['thumb'+t].border_grey._width =
    target_mc._width+thumb_border*2;
    thumbs_line.thumbs['thumb'+t].border_grey._height =
    target_mc._height+thumb_border*2;
    thumbs_line.thumbs['thumb'+t].border_white._width =
    target_mc._width+thumb_border*2-2;
    thumbs_line.thumbs['thumb'+t].border_white._height =
    target_mc._height+thumb_border*2-2;
    if (t<total_images) {
    t++;
    load_thumb(t);
    thumbs_width = thumbs_line.thumbs._width;
    thumbs_right_limit = 0;
    thumbs_left_limit =
    0-thumbs_width+int(gallery_width-thumbs_space-thumbs_space);
    var thumb_fade_in:Tween = new Tween(target_mc, "_alpha",
    none.easeIn, 0, 100, thumb_fade_seconds, true);
    var thumb_loader:MovieClipLoader = new MovieClipLoader();
    thumb_loader.addListener(loadListener);
    createEmptyMovieClip("img", 30);
    thumb_loader.loadClip(this.my_xml.childNodes[1].childNodes[t].attributes.small,
    img);
    thumbs_line.onMouseMove = function() {
    if (_xmouse>=thumbs_line.thumbs_bg._x and
    _xmouse<=thumbs_line.thumbs_bg._width and
    _ymouse>=thumbs_line._y and
    _ymouse<=thumbs_line._y+thumbs_line._height) {
    onRollOver =
    thumbs_line.thumbs['thumb'+t].attachMovie("thumbov_mc",
    "thumbov_mc", 10);
    onEnterFrame = function () {
    if (_xmouse<(gallery_width/2)-10 and
    thumbs_line.thumbs._x<thumbs_right_limit) {
    thumbs_line.thumbs._x -=
    int((_xmouse-thumbs_line.thumbs_bg._width/2)/(100-scroll_speed));
    if (thumbs_line.thumbs._x>thumbs_right_limit) {
    thumbs_line.thumbs._x = thumbs_right_limit;
    if (_xmouse>gallery_width/2+10 and
    thumbs_line.thumbs._x>thumbs_left_limit) {
    thumbs_line.thumbs._x -=
    int((_xmouse-thumbs_line.thumbs_bg._width/2)/(100-scroll_speed));
    if (thumbs_line.thumbs._x<thumbs_left_limit) {
    thumbs_line.thumbs._x = thumbs_left_limit;
    } else {
    onEnterFrame = undefined;
    this["link"+t] =
    my_xml.childNodes[1].childNodes[t].attributes.link;
    this["the_target"+t] =
    my_xml.childNodes[1].childNodes[t].attributes.target;
    XML File
    <?xml version="1.0" encoding= "UTF-8" ?>
    <options>
    <option gallery_width="730" gallery_height="450"
    max_thumb_height="96"/>
    <option scroll_speed="75" thumbs_space="0"
    thumb_border="1" image_border="2"/>
    <option fade_in_seconds="1.5"
    thumb_fade_seconds="1.5"/>
    </options>
    <gallery>
    <img small="../flash/hosts/images/pic7.jpg" title="Name
    1" link="hosts.asp"/>
    <img small="../flash/hosts/images/pic1.jpg" title="Name
    2" link="bio1.asp"/>
    <img small="../flash/hosts/images/pic2.jpg" title="Name
    3" link="bio2.asp"/>
    <img small="../flash/hosts/images/pic3.jpg" title="Name
    4" link="bio3.asp"/>
    <img small="../flash/hosts/images/pic5.jpg" title="Name
    5" link="bio4.asp"/>
    <img small="../flash/hosts/images/pic6.jpg" title="Name
    6" link="bio5.asp"/>
    <img small="../flash/hosts/images/pic8.jpg" title="Name
    7" link="bio6.asp"/>
    <img small="../flash/hosts/images/pic9.jpg" title="Name
    8" link="bio7.asp"/>
    </gallery>
    Thier is a dynamic Text field in the roll over effect that
    should contain the "title"
    the rollover MC name is: thumbov_mc
    the dynamic text field is labeled: title
    And the links are not working either?
    Does anyone see the problem?
    Thank You So Much for you help in Advance

    If you think you can help just let me now and ill email you
    the link to where this menu is...i dont want to post it for
    everyone to see..thanks

  • Flash Photo Gallery Image Rollover Help

    Ok I was wondering if anyone could help me with this I have
    created a flash photo gallery which reads from an xml file. It uses
    the following action script
    myPhoto = new XML();
    myPhoto.ignoreWhite = true;
    myPhoto.onLoad = function(success) {
    //portfolioTag = this.firstChild;
    numimages = this.firstChild.childNodes.length;
    spacing = 70;
    for (i=0; i<numimages; i++) {
    this.picHolder = this.firstChild.childNodes
    this.thumbHolder =
    thumbnails.createEmptyMovieClip("thumbnail"+i, i);
    this.thumbHolder._x = i*spacing;
    this.thumbLoader =
    this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
    this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);
    this.thumbHolder.title = this.picHolder.attributes.title;
    this.thumbHolder.main = this.picHolder.attributes.main;
    this.thumbHolder.onRelease = function() {
    loader.loadMovie(this.main);
    title_txt.text = this.title;
    myPhoto.load("xmlphoto.xml");
    I want to add in a rollover effect to the gallery similar to
    the one in Flash Gallery 1 in photoshop
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=2961
    Would it be possible to take one of the as files from the Flash
    Gallery source and intergrate it into my gallery or would I be
    better just adding the rollover effect myself?

    the thumbnail (or its unique parent if you setup this up
    without fore-thought) should be a movieclip that stores a reference
    to the larger image's path.
    search google for flash gallery tutorial. there are bound to
    be lots of tutorials.

  • XML Thumbnail Photo gallery

    Hi, I'm almost done with this Photo Gallery project but I
    have one final issue with the photo gallery. I created a
    multidimensional array to group image paths from the XML file in
    sets of 9. When the array is called the images appear in the right
    order, but when the images are rendered in their respective movie
    clips dynamically they appear in reverse order. Why would this be
    happening? I don't want to use the array.reverse() method because
    it would complicate my code unnecessarily when I add forward and
    back buttons to navigate throught the different sets. Any help
    would be greatly appreciated.
    Thanks!

    From the help docs:
    The MovieClipLoader.onLoadInit handler is invoked after the
    actions in the first frame of the clip have executed, so you can
    begin manipulating the loaded clip.
    The problem is the way the onLoadInit function fires. Since
    it doesn't fire until after the onLoadComplete method, you have a
    call stack of 9 onLoadInits waiting to fire. Since it uses a stack
    structure, your data is handled in a first-in-last-out format,
    hence, the first image in is the last image out.
    You can fix the behaviour by changing onLoadInit to
    onLoadStart.
    Cheers,
    FlashTastic

  • Video Gallery Action Script 3

    I am creating a video gallery off of the demo action script
    3, video gallery, that is shown on this site. I have updated the
    XML file that contains the link to the thumbnails and videos to the
    appropriate url. When I test the project out, I get the following
    error:
    TypeError: Error #1085: The element type "video" must be
    terminated by the matching end-tag "</video>".
    at
    fvg::FlashVideoGallery/fvg:FlashVideoGallery::onDataHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    I am fairly new to Action Scripts and would really appreciate
    overcoming this hurdle.
    Thanks
    Ari

    arikanoa wrote:
    > I am creating a video gallery off of the demo action
    script 3, video gallery,
    > that is shown on this site. I have updated the XML file
    that contains the link
    > to the thumbnails and videos to the appropriate url.
    When I test the project
    > out, I get the following error:
    >
    > TypeError: Error #1085: The element type "video" must be
    terminated by the
    > matching end-tag "</video>".
    > at
    fvg::FlashVideoGallery/fvg:FlashVideoGallery::onDataHandler()
    > at
    >
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio
    > n()
    > at flash.events::EventDispatcher/dispatchEvent()
    > at
    flash.net::URLLoader/flash.net:URLLoader::onComplete()
    >
    > I am fairly new to Action Scripts and would really
    appreciate overcoming this
    > hurdle.
    >
    > Thanks
    >
    > Ari
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <!--
    > ***************************************
    > Settings.xml
    > Provides a configurable data source for the Flash Video
    > Gallery application.
    >
    > Configurable Settings:
    > - labels: exposes labels for localization.
    > - links: configure main screen links and resulting urls.
    > - filters(1): creates a list for filtering (up to 4
    filters).
    > - filters(2): creates an alternate list for filtering
    (up to 4 filters).
    > - videos: creates a list of video display information.
    >
    > Note: Text nodes are for localization and node
    attributes
    > are not. The exception is the 'url' attributes...
    >
    > Last Modified: March 2, 2007
    > ***************************************
    > -->
    > <flashvideogallery>
    >
    > <!-- Labels for localization -->
    > <labels>
    > <label name="title"><![CDATA[ActionScript 3.0
    Flash Video Gallery]]></label>
    > <label name="welcome"><![CDATA[<b>Click
    on a thumbnail to view
    > details</b>]]></label>
    > <label name="videoPreview"><![CDATA[Webvideo
    Preview]]></label>
    > </labels>
    >
    > <!-- Links for the main screen (up to 8 sidebar
    links) -->
    > <links>
    > <link name="textLink1"
    > url="
    http://www.adobe.com/products/flash/video/"><![CDATA[Learn
    more about
    > Flash video >]]></link>
    > <link name="textLink2"
    > url="
    http://www.adobe.com/devnet/flash/"><![CDATA[Visit
    the Flash Developer
    > Center >]]></link>
    > <link name="textLink3"
    > url="
    http://www.adobe.com/devnet/flash/articles/video_gallery.html"><![CDATA[Exa
    > mine the gallery source files >]]></link>
    > <link name="textLink4" url="
    http://www.adobe.com"><![CDATA[View
    more
    > examples of Flash video >]]></link>
    > <link name="textLink5"
    > url="
    http://www.adobe.com/products/flash/"><![CDATA[Learn
    about Flash CS3
    > Professional >]]></link>
    > <link name="textLink6" url=""/>
    > <link name="textLink7" url=""/>
    > <link name="textLink8" url=""/>
    > </links>
    >
    > <!-- Filter by list #1 (category radio button and up
    to 4 checkbox filters)
    > -->
    > <filters>
    > <filter name="radio1" view="1"><![CDATA[Filter
    videos by industry]]></filter>
    > <filter name="checkbox1" id="i0"
    view="1"><![CDATA[Content]]></filter>
    > <filter name="checkbox2" id="i1"
    view="1"><![CDATA[Entertainment]]></filter>
    > <filter name="checkbox3" id="i2"
    view="1"><![CDATA[Marketing]]></filter>
    > <filter name="checkbox4" id="i3" view="0"/>
    > </filters>
    >
    > <!-- Filter by list #2 (category radio button and up
    to 4 checkbox filters)
    > -->
    > <filters>
    > <filter name="radio2" view="0"><![CDATA[Filter
    videos by region]]></filter>
    > <filter name="checkbox5" id="r0"
    view="1"><![CDATA[Europe]]></filter>
    > <filter name="checkbox6" id="r1"
    view="1"><![CDATA[North America]]></filter>
    > <filter name="checkbox7" id="r2" view="0"/>
    > <filter name="checkbox8" id="r3" view="0"/>
    > </filters>
    >
    > <!-- List up to 36 videos for display in the gallery
    -->
    > <videos>
    > <video
    preview="thumbnails/Qlippit_3_Adam3_pix_to_grandP-26May07-0523PM.flv"
    >
    flv="video/Qlippit_3_Adam3_pix_to_grandP-26May07-0523PM.flv"
    filter2="r1"
    > filter1="i2">
    > <title><![CDATA[Creative
    Bubble]]></title>
    > <description><![CDATA[Creative Bubble needed a
    way to show their demo reels
    > to the largest audience possible with the best
    experience. Their solution is a
    > Flash-based UI that instantly streams video to their
    home page.]]></description>
    > <moreInfo url="
    http://www.adobe.com"><![CDATA[More
    info...]]></moreInfo>
    > </video>
    > </flashvideogallery>
    >
    1st. If you haven't already, get a nice xml editor such as
    http://www.wmhelp.com/download.htm
    free xmlpad editor for windows. Why? because it supports
    editing the
    dating in 3 different ways: Source <which has syntax/tag
    hilighting ,
    Grid , Table.. the grid is easiest to use and helps avoid
    deleting tags
    by mistake, which is what it sounds like you did based on the
    error
    message. If the above was a straight cut and paste of your
    xml file then
    you are missing
    the </videos> tag that belongs between
    </video> and </flashvideogallery>
    I have personally spent the last week playing with the
    example and
    modifying it to have a scrollbar so that i can show more than
    36 videos,
    and have edited the xml files to add more entries.

  • XML Driven Video Gallery with Playlist

    Hi,
    I have put together a XML Driven Video Player with auto thumbnail detection but there is a problem.The Video plays but, The thumbs will not show. I think my thumbnail function is not reaching the correct node in my XML.Can someone take a look at my Actionscript Please? The Action Script is below. The XML is at the bottom of this post. The top half of the code is the video playing code the bottom is for the thumbs.
    Actionscript 2.0
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    ns.setNufferTime(30);
    ns.onStatus = function(info) {
    if (info.code == "NetStream.Buffer.Full") {
    bufferClip._visible = false;
    if (info.code == "NetStream.Buffer.Empty") {
    bufferClip._visible = true;
    if (info.code == "NetStream.Buffer.Stop") {
    ns.seek(0);
    theVideo.attachVideo(ns);
    rewindButton.onRelease = function() {
    ns.seek(0);
    playButton.onRelease = function() {
    ns.pause();
    var videoInterval = setInterval(videoStatus, 100);
    var amountLoaded:Number;
    var duration:Number;
    ns["onMetaData"] = function (obj) {
    duration = obj.duration;
    function videoStatus() {
    amountLoaded = ns.bytesLoaded/ns.bytesTotal;
    loader.loadbar._width = amountLoaded*187.4;
    loader.scrub._x = ns.time/duration*187.4;
    var scrubInterval;
    loader.scrub.onPress = function() {
    clearInterval(videoInterval);
    scrubInterval = setInterval(scrubit, 10);
    this.startDrag(false,0,this._y,187.4,this._y);
    loader.scrub.onRelease = loader.scrub.onReleaseOutside=function () {
    clearInterval(scrubInterval);
    videoInterval = setInterval(videoStatus, 100);
    this.stopDrag();
    function scrubit() {
    ns.seek(Math.floor((loader.scrub._x/187)*duration));
    var theMenu:ContextMenu = new ContextMenu();
    theMenu.hideBuiltInItems();
    _root.menu = theMenu;
    var i1:ContextMenuItem = new ContextMenuItem(":::::Video Controls:::::", trace);
    theMenu.customItems[0] = i1;
    var i2:ContextMenuItem = new ContextMenuItem("Play / Pause Video", pauseIt, true);
    theMenu.customItems[1] = i2;
    var i3:ContextMenuItem = new ContextMenuItem("Replay Video", replayIt);
    theMenu.customItems[2] = i3;
    var i4:ContextMenuItem = new ContextMenuItem("All Rights Reserved 2009", trace, true);
    theMenu.customItems[3] = i4;
    var i5:ContextMenuItem = new ContextMenuItem("SamAndOnline.com Video Player", trace);
    theMenu.customItems[4] = i5;
    function pauseIt() {
    ns.pause();
    function replayIt() {
    ns.seek(0);
    //sound controls
    _root.createEmptyMovieClip("vSound",_root.getNextHighestDepth());
    vSound.attachAudio(ns);
    var so:Sound = new Sound(vSound);
    so.setVolume(100);
    volControl.volcon.slider1.onPress = function() {
    this.startDrag(true,volControl.volcon.groove1._x,volControl.volcon.groove1._y,volControl.v olcon.groove1._x,volControl.volcon.groove1._y+100);
    slideit = setInterval(volControl.volcon.slider_1Move, 100, this);
    volControl.volcon.slider1.onRelease = function() {
    this.stopDrag();
    clearInterval(slideit);
    mute.gotoAndStop("on");
    volControl.volcon.slider1.onReleaseOutside = function() {
    this.stopDrag();
    clearInterval(slideit);
    mute.gotoAndStop("on");
    mute.onRollOver = function() {
    if (so.getVolume() == 100) {
    this.gotoAndStop("onOver");
    } else {
    this.gotoAndStop("muteOver");
    mute.onRollOut = function() {
    if (so.getVolume() == 100) {
    this.gotoAndStop("on");
    } else {
    this.gotoAndStop("mute");
    mute.onRelease = function() {
    if (so.getVolume() == 100) {
    so.setVolume(0);
    this.gotoAndStop("muteOver");
    } else {
    so.setVolume(100);
    this.gotoAndStop("onOver");
    //listBx
    var vlist:XML = new XML();
    vlist.ignoreWhite = true;
    vlist.onLoad = function() {
    var videos:Array = this.firstChild.childNodes;
    for (i=0; i<videos.length; i++) {
    videoList.addItem({label:videos[i].attributes.desc,data:videos[i].attributes.url ,image:videos[i].attributes.thumb});
    //play 1st video
    ns.play(videoList.getItemAt(0).data);
    videoList.selectedIndex = 0;
    //would like to reference something in the XML File with the thumb attribute
    thumbnails_fn(i);
    var vidList:Object = new Object();
    vidList.change = function() {
    ns.play(videoList.getItemAt(videoList.selectedIndex).data);
    videoList.addEventListener("change",vidList);
    vlist.load("videos.xml");
    soundb.onRelease = function() {
    if (volControl.switch2=open2) {
    volControl.gotoAndPlay("open");
    } else {
    volControl.play();
    function thumbNailScroller() {
    // thumbnail code!
    this.createEmptyMovieClip("tscroller", 1000);
    scroll_speed = 10;
    tscroller.onEnterFrame = function() {
    if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
    if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
    thumbnail_mc._x -= scroll_speed;
    } else if ((_root._xmouse<=40) && (thumbnail_mc.hitTest(hit_left))) {
    thumbnail_mc._x += scroll_speed;
    } else {
    delete tscroller.onEnterFrame;
    function thumbnails_fn(k) {
    thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
    tlistener = new Object();
    tlistener.onLoadInit = function(target_mc) {
    target_mc._x = hit_left._x+(eval("thumbnail_mc.t"+k)._width+5)*k;
    target_mc.pictureValue = k;
    target_mc.onRelease = function() {
    p = this.pictureValue-1;
    nextImage();
    target_mc.onRollOver = function() {
    this._alpha = 50;
    thumbNailScroller();
    target_mc.onRollOut = function() {
    this._alpha = 100;
    image_mcl = new MovieClipLoader();
    image_mcl.addListener(tlistener);
    image_mcl.loadClip(image[k], "thumbnail_mc.t"+k);
    trace(videoList.getItemAt(0).image+ "k= "+k+" "+videos.length+" pv "+target_mc.pictureValue+" thumbnails");
    XML Example
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <videos>
    <video url="vid1.flv" desc="Video 1" thumb="1.jpg"/>
    <video url="vid2.flv" desc="Video 2" thumb="2.jpg"/>
    </videos>

    I'm trying to load the thumbnails in with this code
    image_mcl.loadClip(image[k], "thumbnail_mc.t"+k);
    i tried
    videoList.getItemAt(k).image
    which works in the trace method but gives no response in the actual code it self
    So the line of code that should work is
    image_mcl.loadClip(videoList.getItemAt(k).image, "thumbnail_mc.t"+k);
    and not
    image_mcl.loadClip(image[k], "thumbnail_mc.t"+k);
    but I gets no response

  • Action Script Help (Flash 8 ONLY)

    My department currently has a host of training videos we use
    for online courses. Of course, these are all being delivered as
    FLVs. Through the Developer's communities, I found a script that
    allowed me to add a caption file to the video (XML).
    Now I'd like to take it to another level. I'd like to be able
    to have my one SWF player play a series of FLVs AND include the
    caption file. I began to look at using an Array, but have not been
    successful in making it work. I'm not too sure, but I think the way
    I coded it started to affect the video - started getting "stuck" at
    times. Another attempt caused the caption file from the previous to
    be seen in the current video.
    I have attached my script and would appreciate any
    assistance.
    Finally, I need to stick to a Flash 8 and Action Script 2.0
    solution. I realize that Flash 9 and Action Script 3.0 would be
    helpful, but our district PCs are all imaged with a Flash 8 player.
    Sorry.
    Thank you for your help.
    Frank Erazo ([email protected])

    Whatever approach you take will depend heavily on the document(s) you have for the bible element of the design.  You somehow need to be able to seek within it and determine where matched elements can be found and how to extract the information you intend to present.
    I don't think your issue currently lies with how to do this in Flash as much as first coming up with a gameplan that identifies the players and how you can interact with and within them.

  • Photo Gallery with lightbox2 help

    Hey people
    Good news i finally got my photo gallery from bc to show in lightbox 2 using .xlm. the only problem im having is how to layout the thumb pictures. if you have a look here http://kookaburracreekretreat2.businesscatalyst.com/the-house.html
    You will see some pictures but they going down the screen. How do i make them layout like 4 pictures across then go down?
    As well if some one could help with with a auto crop for the thumb pictures that would be great. what i mean by this is some time clients will upload portrait and other time landscape. I want the thumb pictures to be crop to all the same size. at the moment when i do it just squashed the picture.
    this is the css at the moment for the thumb picture .
    .thumb { width: 50%px; height: 50%; overflow: hidden; }
    img.thumb  { width: 150px; height: 150px; crop: rect(0px, 50px, 50px, 50px) ; }
    Any help would be great
    Thank you

    Looking at it from the box model, your containing div needs to be 4 elements wide. You then float all the elements left, which will stack them into a single row of 4 elements and the 5th element will not be able to fit because of the with and it will go into the next row. Kind of how BC stacks products inside the small product layout. They're all floated left and stacked to each other from the right.
    -m

  • Creating photo gallery - newbie needs help!

    Hey guys!
    Ok, so I've never really gotten into action script, which is
    why I'm using
    http://www.kirupa.com/developer/mx/photogallery.htm
    as a guide, great tutorial :) But I seem to have some problems.
    I downloaded the zip file at the bottom of the site (because
    I'm lazy) and I've managed to put my own images into the thing -
    but, the images aren't scaling correctly. I did do the 100%
    transform thing, but still I can only see a little piece of the
    image when I press preview. I was wondering if there's any
    actionscript code that I could put in so that they would scale
    correctly inside the mask? And also, is there a sollution if I'm
    having both vertical and horizontal pictures?
    If you have any other tutorial for photo galleries that you
    can recommend - I'd be very greatful!
    (Sorry if I'm confusing.. I'm confusing myself too..)

    slideshowpro.net
    "Atnace" <[email protected]> wrote in
    message
    news:gnhkkq$7cv$[email protected]..
    > Hey guys!
    >
    > Ok, so I've never really gotten into action script,
    which is why I'm using
    >
    http://www.kirupa.com/developer/mx/photogallery.htm
    as a guide, great
    > tutorial
    > :) But I seem to have some problems.
    >
    > I downloaded the zip file at the bottom of the site
    (because I'm lazy) and
    > I've managed to put my own images into the thing - but,
    the images aren't
    > scaling correctly. I did do the 100% transform thing,
    but still I can only
    > see
    > a little piece of the image when I press preview. I was
    wondering if
    > there's
    > any actionscript code that I could put in so that they
    would scale
    > correctly
    > inside the mask? And also, is there a sollution if I'm
    having both
    > vertical and
    > horizontal pictures?
    >
    > If you have any other tutorial for photo galleries that
    you can
    > recommend -
    > I'd be very greatful!
    >
    > (Sorry if I'm confusing.. I'm confusing myself too..)
    >

  • Document Class / Action Script Help

    Dear all,
    From a tutorial page, i manage to built this flash page with
    xml capabilities. but when i add more scene to the flash page, i
    have errors like this.
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at MyContent/init()
    at MyContent()
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at MyContent/onComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    How do i edit the "MyContent.as" file so that i can add more
    scene to the flash.
    I understand that, once i put the "MyContent.as" in the
    document class, it will load immediately, is there any way to tell
    it to load only in scene 2 (which is where the xml is needed).
    Thanks. Any help will be very grateful.
    Attach is the actionscript

    other then defining the document class, can i "call up" the
    MyContent.as (external script) when needed?
    If this can be done, what must i do to add into the .fla file
    and the .as file..
    Sorry, i'm very new to AS3.
    Thanks!!!

  • Action Script Help

    Hi to all,
    This is vertical xml gallery code, where the mouse will move
    up, then the scoller will move up and vice versa. now i want the
    reverse . if it move up , then the scoller come down and if it move
    down , then the scoller move up.
    Can anyone please help me.
    Thanks
    Krishna
    quote:
    this.onEnterFrame = function()
    mask_y = _root.main.verti.mask._y;
    mask_h = _root.main.verti.mask._height;
    mask_middle = (mask_y + mask_h) / 2; // take middle of mask
    as reference
    roller_y = _root.main.verti.roller._y;
    roller_h = _root.main.verti.roller._height;
    ymouse = _root.main.verti.mask._ymouse;
    // if mous out of range
    if (ymouse < mask_y || ymouse> mask_y + mask_h)
    speed = 0;
    else
    speed = (ymouse - mask_middle)/ 10;
    // calculate speed -> the closer to middle-> slower,
    closer to edges-> faster
    // if roller bottom reaches mask bottom and scroll up, stop
    if ((roller_y+roller_h)<(mask_y+mask_h) && speed
    < 0)
    speed = 0;
    // if roller top reaches mask top and scroll down, stop
    if (roller_y > mask_y && speed > 0)
    speed = 0;
    _root.main.verti.roller._y += speed;
    stop();

    try:

  • Loadmovie action script help

    Hey there, just putting together a website using flash.
    Everythings ok except, my website is one flash file, i've
    done a new document which is a page for my movie to
    play in. So i have jesl homepage.swf and now charles.swf
    On my homepage scene 3 theres a button you press
    using loadmovie script and it goes straight to the
    charles.swf
    and from charles.swf theres a go back button that goes
    straight back
    to my jesl homepage.swf
    using this from charles back to homepage
    on (release) {
    loadMovieNum("jesl homepage.swf", 0);
    Now all i would like to do is from charles.swf
    go back to my jesl homepage.swf like it does,
    but go to scene 3. Maybe its simple and im stupid
    but i cant figure it out. Cause scene 3 is where the
    info and buttons are about my movie and it would
    make sense to go back where you started from...
    So yeah it goes back fine to my scene 1 homepage
    but i want scene 3 guys...
    Any help would be greatful
    As im pulling my hair out..

    Hi there jestone and welcome to the on-line community
    I know this forum category says "FlashHelp", but note that
    both words "Flash" and "Help" are run together. This is a forum
    where people using FlashHelp output from the Adobe RoboHelp product
    ask questions. Most of the folks here are developers of the
    Microsoft Help technology. FlashHelp is simply one possible output
    from this product.
    I think you are probably looking for the Flash forum, so I'll
    give you a magic link to take you over there where you can post
    your question and be more likely to find an answer.
    Click
    here to visit the Flash forum
    Good luck! Rick

  • Action script help: Quiz that uses an array needs to be changed.

    Hi,
    I have a quiz that was created by someone else, and now I (inexperienced with flash) need to make some edits. The quiz has 4 questions, and each answer the user clicks on will show a green ball, and then other text appears to let them know if they are right or not. Also, when they click the right answer "next" appears in the bottom right corner.
    Now I need to make the wrong answers red balls, and have the green ball only for the right answer. However it seems there is only one "green ball" and the code creates an array and that's all I can understand. I will need to make this changes to about 15 quiz questions, so hopefully the solution is something I can replicate easily on my own.
    Thanks!
    Here is the code:
    function doAnswer(n){
        //d or 4 is the correct answer.
        var bArray:Array = n.split("_");//split the button's name to array
        var butNum = bArray[1];//retrieve the button's number from the array
        //reset any answers that may have already been answered
        for (i=1;i<=4;i++){
            var currAns = "ans1_" + i;//current looped mc answer
            var currBut = "btn_" + i;
            if (this[currAns].actv == 1){
                this[currAns].play();
            if (this[currBut].actv == 1){
                this[currBut].play();
        this["ans1_" + butNum].play();
        if (butNum==4){
            next_mc._visible = 1;
        }else{
            next_mc._visible = 0;
    Flash CS5.5

    kglad,
    I'm not exactly sure what you mean. When the user clicks on the circle next to each answer, the colored ball fills the space. When they click on another answer, the ball from the previous answer disappears, so there is only one colored ball on the screen at a time. Does that help?

Maybe you are looking for

  • Is it possible to remove xml declaration from a target HTTP msg in PI 7.1?

    Hello, I am working on a SOAP to HTTP scenario in PI 7.1. I am using a java mapping to create a target string. This target string does not contain XML declaration(<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>) in it. To elaborate the issue

  • How to open the NSComboBox list programmatically

    Been struggling with this all day. Perhaps I'm barking up the wrong tree. This is the scenario: I have a database of 8,000 items, represented to the user as text. The user has to pick one. I'm thinking NSComboBox. But 8,000 items is a lot, so I want

  • Mac os    list sessions   implementation process

    I need to list all theactive graphical login sessions, to launch an agent in each graphical user session How do I get a list of GUI login sessions? How to launch an agent in each graphical user session? I am using qt I will be glad of any useful info

  • Coverage Profile in Network of Interdependent DCs

    Hello Experts, I would like to have your advice in this subject. I have MTS Scenario , 1 Plant and 2 DCs to simplify the example. Plant A  only transfers stock to DC1. DC1 sells to customers but also transfers stock to DC2 which has also customers an

  • IPod touch can not use credit, from gift card

    My daughters iPod touch will not allow me to use the credit to purchase money from a game app. In the past It says insufficient funds, but there is credit to cover it.  I have never had this problem before. Could any of the settings been changed?