Flash help with movieclips

edited June 2008 in advice
I'm pulling my hair out with this !

I‘m building a website with “movie clip buttons” and a loader this is the first time I done it this way.
so it’s a bit different to how I normally use flash. As all the actionscript is in the first frame of the main timeline. The infomation for each web page is brought in and placed in a movieclip holder and are saved as external SWFs. This is working fine until I tried to incorporate a previous flash project I’ve worked on,

The previous file has an an XML photo gallery which loads the JPGs into another a movieclip holder,
could this be where the problem lies, having one move clip holder inside another ????

Would I be better off loading the external SWF (photogallery) onto the next level of the main SWF
by trying to re adapt the code to one of the buttons.

Comments

  • edited 10:12AM
    just a quick thought - maybe it's looking at _root for something, and _root is now a different file?
  • edited 10:12AM
    I can't get my head around this _root business !!

    this is part of the code from the photo gallery SWF file and it does refure in parts to" _root" as you can see. Is there a quick fix here.

    // 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_folio.xml");

    /////////////////////////////////////////////////////////////////////////////////////////
  • edited 10:12AM
    I've decided to have XML gallery load into the main SWF on level 2 as below

    folio_mc.onRelease = function() {
    loadMovieNum("folio.swf", 2);
    stick("folio_mc");
    }

    this seems to be working better and I can position things better.

    All the rest of the buttons will load the info into the movieclip holder but I need to unload
    the folio.swf at the same time. Can this function be added to all the buttons ?

    Previously I would have just over written on level 2 with the next SWF.

    about_mc.onRelease = function() {
    mcLoader.loadClip("about.swf",myLoader);
    stick("about_mc");
    }


    Cheers anyone.
  • edited 10:12AM
    i've sussed it.

    about_mc.onRelease = function() {
    mcLoader.loadClip("about.swf",myLoader);
    stick("about_mc");
    unloadMovieNum(2);
    }



    right I'm not talking code anymore now.
  • edited 10:12AM
    haha nice one! sorry i flaked out after my initial suggestion ;)
Sign In or Register to comment.