Adding submenus to an xml driven main menu

Hi there folks,
I have been following and bastardising a computer arts tutorial for a dynamic flash site, its a really good tutorial and I'd like to keep going with that format/style, but I'm pretty new to the whole scripting thing and am finding it a bit of a headache, so was wondering if any kind souls would help me work out how to add submenus to the code below. the main menu button is a movie file(btn_projects_main) consisting of a button (button) and a text box(txt) and is 3 frames long to allow for the different states:
What I'm looking for is a set of sub menus which load horizontally below the main menu buttons, here is the code which has been altered slightly (thanks to Ned Murphy for his help and patience with that) any help would be hugely appreciated :
// Setup some initial variables
// Hide the button that will display a web link
_root.theUrl._visible = 0;
// Hide the image icons in the project loader
// The image icons are simply there to make it easier for you to
// select the movieClip from the main timeline.
_root.img_project.photo_icon._visible = 0;
_root.img_project.img_holder.photo_icon2._visible = 0;
// name of the folder for all thumbs and swf files
_root.imageFolder = "project_files/";
// Create arrays ready for the xml data
namesArray = new Array();
linksArray = new Array();
descriptionsArray = new Array();
filesArray = new Array();
// Load XML doc
objXML = new XML();
objXML.onLoad = loadXML;
objXML.ignoreWhite = true;
// The name of your XML file
objXML.load("ss_flash_testing.xml");
// onLoad XML function
function loadXML(success) {
if (success) {
// If the XML loads successfully, count how many projects there are in the file.
_root.projectCount = this.firstChild.childNodes.length; // PROJECT node in XML file
// Then run a function that builds arrays out of the XML data.
SS_Arrays();
} else {
// If the xml data did not load, show message on stage by populating the description field.
_root.description = "Error: Could not load XML";
function SS_Arrays() {
for (var count = 0; count < _root.projectCount; count++) {
var nodeObj = objXML.firstChild.childNodes[count];
namesArray[count] = nodeObj.attributes.name;
descriptionsArray[count] = nodeObj.attributes.description;
linksArray[count] = nodeObj.attributes.link;
filesArray[count] = nodeObj.attributes.file;
// run the function to create the thumbnail and list view buttons
SS_createButtons();
var spaceBetween = 60; // space between buttons
function SS_createButtons() {
btn_projects_main._visible = 0;
btn_xPos = _root.btn_projects_main._x;
btn_yPos = _root.btn_projects_main._y;
for (count = 0; count < namesArray.length; count++) {
duplicateMovieClip(btn_projects_main, "btn_projects" + count, count);
this["btn_projects" + count]._x = btn_xPos;
this["btn_projects" + count]._y = btn_yPos;
this["btn_projects" + count].txt.autoSize = "left";
this["btn_projects" + count].txt.text = namesArray[count];
//set the button width
this["btn_projects" + count].btn._width = this["btn_projects" + count].txt._width;
// determine the new x placement value based on the current button's width
btn_xPos = btn_xPos + this["btn_projects" + count]._width + spaceBetween;
// anything from here down I have no idea if it's needed, so I left it
SS_load_project(0);
tellTarget(_root.btn_projects0){
gotoAndPlay(3);
_root.curButton = "0";
SS_createButtons(); // to kick off the function
function SS_load_project(arrayNumber){
// Progress bar stuff: This creates a new movie clip on the stage
// and shows the progress of the image or file being loaded
_root.createEmptyMovieClip("progressBar_mc", 1000);
progressBar_mc.createEmptyMovieClip("bar_mc", 1001);
// Using the flash drawing method, draw a box 550px wide by 2px deep
// with a fill of red (FF0000)
with (progressBar_mc.bar_mc) {
beginFill(0xFF0000, 100);
moveTo(0, 0);
lineTo(660, 0);
lineTo(660, 2);
lineTo(0, 2);
lineTo(0, 0);
endFill();
_xscale = 0;
// set the X & Y positions of the progress bar manually
//progressBar_mc._x = 160;
//progressBar_mc._y = 218;
// Or set them to be the same X & Y as the project file/image.
progressBar_mc._x = img_project._x;
progressBar_mc._y = img_project._y;
// set the initial width of the bar to zero
var mclListener:Object = new Object();
mclListener.onLoadStart = function(target_mc:MovieClip) {
progressBar_mc.bar_mc._xscale = 0;
// increase the width (xscale) of the bar as the file loads
mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
progressBar_mc.bar_mc._xscale = Math.round(bytesLoaded/bytesTotal*100);
// Make sure the clip being loaded doesn't play until it is fully loaded.
// If you want content to stream as it loads remove the following 3 lines
tellTarget(_root.img_project.img_holder){
stop();
// once the file has loaded, remove the progress bar from the stage
mclListener.onLoadComplete = function(target_mc:MovieClip) {
progressBar_mc.removeMovieClip();
// Plays the loaded clip once it's fully loaded.
// If you want content to stream as it loads remove the following 3 lines
tellTarget(_root.img_project.img_holder){
play();
// Load the project file onto the stage by loading it into a movieClip (which in this case
// is inside another one img_project > img_holder.
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
// load the clip onto the stage into a movieClip
image_mcl.loadClip(_root.imageFolder + _root.filesArray[arrayNumber], img_project.img_holder);
// Populate the dynamic text fields on the main stage with the project title & description
_root.prj_name = _root.namesArray[arrayNumber];     
_root.prj_description = _root.descriptionsArray[arrayNumber];
// if the URL is present for this project, populate & show the link
if(_root.linksArray[arrayNumber] != "") {
_root.btn_link.webAddress = _root.linksArray[arrayNumber];
_root.btn_link._visible = 1;
} else {
_root.btn_link._visible = 0;
// Reset the last button
tellTarget("_root.btn_projects" + _root.curButton){
gotoAndPlay(1);
// Replace the current button variable with this projects id/number     
_root.curButton = arrayNumber;
stop();

No ideas at al guys?
I just need a couple of pointers as in what to code needs adding and where, I've created a new movie clip with the name subs (instance sub1), surely its now just a matter of connecting that instance to the sub_projects node in the xml - I guess it also needs to be linked to a parent project button + told to only run when that parent is clicked. I've downloaded loads of different code from various sources, but as there seem to be lots of different ways to write the same commands, its feeling really confusing.
Any help or feed back would be massively appriciated

Similar Messages

  • Premier Elements 9 - DVD Main Menu not showing navigation highlights

    Hi All,
    Apologies if this discussion / question appears twice. I seemd to lose the original and did not think it had been posted.
    New to Adobe and just started using Premier Elements 9 for a basic DVD project.
    I managed to work out importing, editing, transitions, adding soundtrack etc and got to the DVD Menu stage where everything seemed to come together.
    Once i had burned to DVD i checked it worked on the PC which it did but when i tried in a number of DVD players, there was an issue with Main Menu marker navigation.
    This project has a main and four scene menus plus an 'Extras' marker i added to the Main Menu pointing toward Stills..
    On all the Scene menus, i can see a clear highlight dot move from scene to scene as i navigate with the remote, showing where I am as you would expect.
    On the Main Menu however, where i have Play Movie, Scenes and Extras markers, there is no sign of any dot or highlight to tell you which of these you are currently on so its a lottery as to which you get when navigating with a remote from the Main Menu.
    I am pretty sure this is user error and if anyone has thoughts of what i have done or not done when i set up the DVD Menu section maybe, i would very much appreciate it.
    A little additional info is apart from adding the 'Extras' button to the main menu i imported a still image/Logo to show up in the middle of the menu screen and added a sound clip to the main and all the 'Scene menus.
    Whether that has anything to do with it i don't know.
    thank you in advance for any clues as to what i have done wrong.
    Regards
    psutt.

    Hi ATR,
    My sincere apologies for not getting back to you sooner. This project has been above and beyond my day to day work as an integrator to the Post Production area and everything went a little nuts over the last few weeks.
    I wanted to let you know that I was successful in the end, thanks to your input.
    I ended up substituting the ‘Fun in the Sun’ with’ Memory Box’ HD under ‘Memories’ and this was the magic solution.
    I got bogged down trying to lengthen rolling end credits and  lengthening a title plate that headed the Extras but I left as is in the end.
    The main thing was the menus worked just fine after the change so I won’t go near Fun in the Sun again if I do another sometime.
    I kept it to NTSC widescreen and it looked fine.
    Many thanks again for your input.
    Kindest Regards
    Peter Sutton
    Technical Director
    Kaurus® Limited
    cid:[email protected]

  • Is there a way of just changing the text to the main menu..but not the submenus?

    Is there a way of just changing the text to the main
    menu..but not the submenus?
    Also i have looked at in the browser and when i glide over
    the menu catergories or click on them they dont show the
    submenu...what can i do to solve this?

    Does the example described at
    http://labs.adobe.com/technologies/spry/articles/menu_bar/index.html
    work for you?
    What are you doing that's different from the example?
    When you say you just want to change the text of the main
    menu without changing the submenus, do you mean you want to do so
    dynamically, at some later stage after the page has loaded?
    If so, you could try retrieving the main menu elements you
    want to update from the DOM and updating them from your script's
    event handler for whatever event it is that you want to update them
    in response to. This presumes the widget will detect this and
    update appropriately, which I can't say for sure since I haven't
    actually tried it.
    Hope that helps!
    Rob

  • Adding sub-menus wrecks main menu bar display

    I have just learned to create a Spry horizontal pull-down menu. I have dark gradient images for both the 'up' and 'down' states, and I've set my text attributes and everything works fine.
    (I'm new, but trying hard.)
    HOWEVER - I have 2 problems:
    as soon as I add in sub-menus to a menu item, the gradient images fail to show on the main menu for that menu item only. I just get a white block, out of which you obviously can no longer read the white text. The gradients and other attributes immediately apply beautifully to the sub-menu items (even though I haven't even applied any attributes to them yet!), but they are lost from the main menu bar wherever I apply sub-menus.
    ALSO - although the 'up' state gradient image works fine behind the menu item, the downstate does not show when I hover my mouse over it. I've checked that the 'up' and 'down' files are not identical, and I've ensured that they are both applied in the CSS.
    When I remove the sub-menus - works fine. Add 'em back in, problem recurs. Applies to whichever menu item I apply the submenus to.
    I have downloaded the latest version of Spry (no idea which version I already had) but can't see where to install it or how to run setup. Why are things never easy...?
    I am using Dreameaver CS4 v10 and Chrome browser. Same thing happens in Firefox, IE and Safari - no difference.
    Please forgive my newness. I have had a look at other similar forum posts but although people seemed to have linked issues, they were not the same.
    Anyone any ideas? I am getting desperate. Been trying to fix it by myself all day.
    Thanks
    Nicola

    Nicola,
    The Fact: It's all in the markup and the CSS.
    The Problem:  We are not privy to your markup and CSS and as such cannot help you.
    The Solution: Supply a link to your site, or at the very least, copy and paste your code here
    Gramps

  • Adding/Removing items from the main menu

    I don't know why my iPod won't let me add or remove items from my main menu.
    I go
    Settings > Main Menu > (check what I want on the main menu) > Reset Main Menu > Reset
    When I go out to the main menu again, nothing has changed.
    Anyone else having this problem? Thank you for help!

    If you do a reset then you're resetting it to default. If you want to change anything ya just change it to on/and or off, then hit the menu button to go back. Don't go all the way to reset. Hope this helps.

  • How to add a privacy page and exclude it from the main menu, but include in links at the base

    adding a privacy statement page and excluding it from the main menu, but including in links at the base of site

    Right click on the page in Plan view and choose to exclude from menus. This will take it off your main nav.
    For your bottom nav, change the menu to manual and add the privacy page manually.

  • XML Driven Flash Photo Gallery Thumbnails

    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);

    thank you!

  • XML Driven Flash Photo Gallery Thumbnails Control

    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);

    thank you!

  • 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

  • How do you return to main menu at end of movie in iDVD 11?

    I have created a movie in iMovie '11 with chapter markers, and imported it into iDVD 7.1.2 (1158) on an iMac
    running OS X Lion 10.7.2
    The movie imports all chapters with corresponding labels perfectly. I added a chapter at the very beginning of the movie in iMovie, and it shows up fine in iDVD.
    I removed AutoPlay since I want the DVD to play the Main Menu upon inserting it into a DVD player. What I can't figure out is how to make the DVD return to the Main Menu once it finishes playing to the end of the movie. It will automatically go to the Chapters selection menu instead. Is it possible to have it return to the Main Menu?
    In God's Harmony

    It is very possible that your iDVD Project has no Chapter Markers.
    It's possible.  My "project" which included pictures as well as movies was all done in iPhoto as a slide show.  From there I exported the slideshow into iDVD.
    I sort of messed up "I think."  I believe I did the original burn incorrectly-tester #1.  I re-burned another one this afternoon which turned out very well-tester #2.  Think I will stick with the options I used for tester #2 since it was the easiest.
    For "chapters" I will need to do some extensive "how to" reading especially when it comes to iMove.  I used iPhoto since it accepts both photos & movies.  I "think" iMovie only deals with movies?
    Thank you very much for your last post.  It was very helpful. 
    Now onto the iPhoto fourms to learn how to "add" photos & movies to where I want them, not where the computer wants to put them.

  • Main Menu in DVDSP3 Won't show background in simulation or burning disc

    I recently upgraded from a PowerBook G4 1.0Ghz and migrated to a Mac mini Intel. I am making a DVD for someone, and when i simulated it or burned a test DVD the main menu's background (video) would show up on the Powerbook, but now when i do the same on my mac mini, it will not show the main menu's background (just the plain gray background as before you would add a asset), but will play the music i added to it. All of my other menus are exactly the same as i left them (as i did with the main one) and they still have their backrounds & music when simulated. Does anyone know why this is happening?

    DVD SP 3 is not Universal Binary and should not even work at all on Intel Macs, which may the problem (though Universal Binary has its own issues also with menus it seems)
    You may want to stick with the older rig for this

  • Creating a very simple XML-driven gallery

    Hi, I'm learning XML in AS3 and I am having real trouble finding a resource that can help me learn how to build a very simple XML-driven picture gallery.
    I am working in an FLA file with AS3, with a dynamic text field with the instance name "textfield". I also have a UILoader Component with the instance name "UILoaderComponent" and an XML file called "rootdir.xml".
    I have an XML file in the following format.
    <images>
         <imagenames>
              <name>image1</name>
              <name>image2</name>
              <name>image3</name>
              <name>image4</name>
              <name>image5</name>
         </imagenames>
         <imagepaths>
              <path>image1.jpg</path>
              <path>image2.jpg</path>
              <path>image3.jpg</path>
              <path>image4.jpg</path>
              <path>image5.jpg</path>
         </imagepaths>
    </images>
    I am using the following as my actionscript.
    var xmlLoader:URLLoader = new URLLoader();
    var xmlData:XML = new XML();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    xmlLoader.load(new URLRequest("rootdir.xml"));
    function LoadXML(e:Event):void {
    xmlData = new XML(e.target.data);
    parseImg(xmlData);
    function parseImg(imgLoad:XML):void {
    var imgChild:XMLList = imgLoad.images.children();
    for each (var imgTrace:XML in imgChild) {
    trace(imgTrace);
    No matter which way I experiment, I always have poor results with my dynamic text, and every tutorial I've followed does not reproduce anything like the same returned data in "textfield" that it does with the trace command.
    My objective is: I simply want to build a menu inside a textbox called "textfield" that lists images1-5, and when clicked, calls upon the relevant image. For instance: I load the file "rootdir.xml" into the file "index.fla". I call a function to parse the XML into a dynamic text box called "textfield". When image 2 is clicked on the textbox "textfield", it would call upon a function that would load into the UIComponent Loader "image2.jpg".
    Are there any tutorials for this? I'm so confused as to why dynamic text operates so differently from the trace command. I'm not interested in doing a fancy menu bar with thumbnails, scrollbars and animations, I just want to learn the basics.

    I don't really see how you are getting a valid trace out of that code (I get nothing if I try it as is), but as far as the textfield goes, you haven't shown any attempt in your code that might help to point to why you cannot get the text into a textfield.  It might be a problem with how you are trying to write to the textfield and not how your are manipulating the data.
    While you could make use of a textfield for the menu, doing so is not straightforward, as you would need to implement htmlText with special coding in order to have the text clickable.  You might consider using a List component or ComboBox instead.
    What I always do when I am working with xml is to store the data into a data structure, usually an array conatining objects, and then make use of that structure rather than dippng into the xml data itself when I utilize the data.
    Another thing, which rquigley demonstrated, is that your xml will serve its purpose better if the data for each image is collected under the same node.  If you have separate sections for each piece of data like you have, when it comes to editing it will be more prone to error as you have to be sure you are editing the correct entry of each separate group.
    I too am no expert in the world of xml, but I have not yet worked with parameters inside the tags, so I would usually structure it as...
    <images>
       <image>
           <imgName>image 1</imgName>
           <imgPath>image1.jpg</imgPath>
       </image>
       <image>
           <imgName>image 2</imgName>
           <imgPath>image2.jpg</imgPath>
       </image>
    </images>
    Now, back to what you have...  let's say you have a textField named imgText that you want to list the image names in.  The following should work, though I do not go my usual route of storing the data into an object array first...
    function parseImg(imgLoad:XML):void {
       var imgNames:XMLList = imgLoad.imagenames.name;
       var imgPaths:XMLList = imgLoad.imagepaths.path;
       // show name
       for each (var nameTrace:XML in imgNames) {
          trace(nameTrace);
          imgText.appendText(nameTrace +"\n");
       // show path
       for each (var pathTrace:XML in imgPaths) {
          trace(pathTrace);
          imgText.appendText(pathTrace +"\n");
       // show name and path
       for(var i:uint=0; i<imgNames.length(); i++){
          trace(imgNames[i].text()+"  "+imgPaths[i].text());
          imgText.appendText(imgNames[i].text()+"  "+imgPaths[i].text() +"\n");

  • Image for add-on in main menu.

    Dear All,
    I am facing a problem in loading the image for my add-on. when i run the source file the image is displayed in the main menu. But after converting the source file to ARD format the image is not getting displayed.Pls suggest some solution,
    Regards,
    Anand

    Hello
    A i am suggesting to use the following code to make sure that the image of the Menu is on the Startup directory...
    So
            oMenus = sbo_application.Menus
            Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
            oCreationPackage = sbo_application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
            oMenuItem = sbo_application.Menus.Item("43520") 'moudles'
            Dim sFileName As String = IO.Directory.GetParent(System.Windows.Forms.Application.StartupPath()).ToString & "CFL.BMP"
            If IO.File.Exists(sFileName) = False Then
                sbo_application.MessageBox(String.Format("The Image {0} does not exists for the menu!", sFileName))
            End If
            ' Creation parameters
            oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP
            oCreationPackage.UniqueID = "SM_DMID"
            oCreationPackage.String = "Operations"
            oCreationPackage.Image = sFileName
            oCreationPackage.Position = 4
            oMenus = oMenuItem.SubMenus
            Try ' If the manu already exists this code will fail
                oMenus.AddEx(oCreationPackage)
            Catch er As Exception ' Error Handling
                sbo_application.MessageBox(er.Message)
            End Try
    Regards,
    J.
    Edited by: János Nagy on Nov 16, 2009 9:07 AM

  • Importing xml driven swf file -- is it asking for too much?

    I want to import an ActionScript3 / xml driven swf file into Catalist, but it only imports the swf file.
    I have placed all the external images and the xml file that calls them into the same folder as the swf and the catalist files, but the playback still does not work. It shows error messages when trying to run. Copying the files to Assets/ Media  or Images folders also makes no difference...There is no way in Catalyst to reconnect the xml to the swf either...
    Why can't Flash and Catalyst be more friendly? Will there be a better connectivity in the final version?

    Hello there,
    There are several reasons why this wouldn't work, especially during preview. I'd like to ask you a couple questions and have you try a couple things.
    1. What file path are you saving your project to, and what location did you copy the XML and image files to?
    2. Did you try publishing your project, and copying your additional files to the published locations?
    3. Did you try the same steps as above, only using the deploy-to-web version posted on your server? You would load the application by going to your web browser and typing something like: http://yourserverhere.com/.../deploy-to-web/Main.html.
    Let me know if any of those work. Because Catalyst cleans the space where preview files are kept, it would be difficult to have your scenario work during preview. However, you could probably get it to work in a published version.

  • N97 Main Menu .. For those who didnt know !

    Hi All ,
     Lots of ppl out there complain that the Main Menu Cant be extended for scrolling & adding items & icons , for new users it might seem its just doable in Applications ..
     Well I thought so too but figured it out by Chance ! you just go to Applications > options > Organize , & then either 
     move the Icon you want to move to the main menu Manually by dragging it to the 1st folder which looks like " UP Folder " in PC's ... or Options > Move To Folder > Root Menu " or Root Folder" or actually any folder you want in your phone ..
     Hope this Helps All who didnt know ..
     Peace
    N97 .. Working or Not , it's still a *bleeing* Rip OFF .

    Thank. Good catch.

Maybe you are looking for

  • [solved] dwm + conky + mpd

    I have the following .conkyrc: background no out_to_console yes update_interval 2 total_run_times 0 use_spacer none TEXT $if_mpd_playing ^i(/home/hithere/.dwm/dzen/xbm8x8/note.xbm) ${mpd_smart}$endif • ^i(/home/hithere/.dwm/dzen/xbm8x8/cpu.xbm) ${cpu

  • I have a 30 gb ipod and it's filled up too quickly.

    30 gb ipod that only has 1200 songs and it says it only has 8 gb left. That's ridiculuous. How can I fit more on my ipod or how can I get my ipod to recognize that it has more space. oh, most of my songs are of normal length.

  • BFile Support in 9.0.3

    We are looking at turning on support for external BFile support in 9.0.3. But before we turn it on, we want to see if we will be able to turn it off and get our content back into the database? Has anyone had any experience with this?

  • RMAN backup in tapes

    Hi We have R12.0.6 with 10.2.0.4 database. The RMAN backup is daily we are taking to tapes. Now how can i restore the backup from tapes? to create a duplicate database. Thanks Shaik

  • How can I get a "Confirm delete button inside mail"?

    So that I don't accidently hit wrong button and delete a message or more?