A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Probably stupid easy question

  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    62

    Probably stupid easy question

    So I am loading images from a xml into a swf, then loading that swf into another swf. Everything works but it won't let me move the position of the swf. Here is my code for the swf with the images:
    PHP Code:
    var mList:Object = new Object();
    var 
    mLoad:MovieClipLoader = new MovieClipLoader();
    mLoad.addListener(mList);

    function 
    loadXML(loaded) {
    if (
    loaded) {
        
    xmlNode this.firstChild;
        
    lastNode this.lastChild;
        
    image = [];
        
    total xmlNode.childNodes.length;
        for (
    i=0i<totali++) {
            
    image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
        }
        
    AllImages();
        } else {
            
    content "file not loaded!";
        }
    }
    xmlData = new XML();
    xmlData.ignoreWhite true;
    xmlData.onLoad loadXML;
    xmlData.load("houseTNs.xml");
    //Preloader
    this.onEnterFrame = function() {
        
    filesize total.getBytesTotal();
        
    loaded total.getBytesLoaded();
        
    preloader._visible true;
        if (
    loaded != filesize) {
            
    preloader.preload_bar._xscale 100*loaded/filesize;
        } else {
            
    preloader._visible false;
            
            }
        }
    //Creating movie clips for images
    function AllImages() {
        for(
    i=0i<totali++){
            var 
    _root.createEmptyMovieClip("picture"+ii);
            
    mLoad.loadClip(image[i], m);
            
    m._x 0;
            
    m._y i*120;
            }
        } 
    And here is the swf that is loading that swf:
    PHP Code:
    _root.createEmptyMovieClip("container"3);
    loadMovie("LeftNavGalleryStrip.swf"container);
    container._x 500;
    container._y 500
    I can type in any number for the "container._x" and it doesnt change anything Help!
    Thanks!

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518

    Maybe try something like this...

    Code:
    _root.createEmptyMovieClip("container", 3);
    container._lockroot = true;
    loadMovie("LeftNavGalleryStrip.swf", container);
    container._x = 500;
    container._y = 500;

  3. #3
    Junior Member
    Join Date
    Jul 2007
    Posts
    20
    where did you call the code, have you try to replace container with _root.container?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center