+ Reply to Thread
Page 2 of 3
FirstFirst 1 2 3 LastLast
Results 11 to 20 of 24

Thread: for Loop help with Navigation and loadMovie

  1. #11
    Experienced Member
    Join Date
    Nov 2008
    Location
    Fort Collins, CO
    Posts
    110
    So I used this and still no go:
    Code:
    for(var i:Number = 0; i<menuArray.length; i++){
        var btn:MovieClip = menuArray[i].mc;
        btn.btnMC.btnText.text = menuArray[i].name;
        btn.queue = i;
        btn.onRelease = function(){
            toggleButtons(this);
            _root.createEmptyMovieClip("movieContainer", 5);
            loadMovie(menuArray[this.queue].label.concat('.swf'), "movieContainer");
        }
    }
    Right?


  2. #12
    likes chips. Scriptage's Avatar
    Join Date
    May 2008
    Location
    Yorkshire
    Posts
    2,760
    Try:

    for(var i:Number = 0; i<menuArray.length; i++){
    var btn:MovieClip = menuArray[i].mc;
    btn.btnMC.btnText.text = menuArray[i].name;
    btn.queue = i;
    btn.onRelease = function(){
    toggleButtons(this);
    _root.createEmptyMovieClip("movieContainer", 5);
    loadMovie(menuArray[this.queue].label.concat('.swf'), movieContainer);
    }
    }

    If not we'll try a different approach.

  3. #13
    Experienced Member
    Join Date
    Nov 2008
    Location
    Fort Collins, CO
    Posts
    110
    Damn! I was so excited too. No errors or anything but nothing happened.

    bD

  4. #14
    likes chips. Scriptage's Avatar
    Join Date
    May 2008
    Location
    Yorkshire
    Posts
    2,760
    Maybe:

    for(var i:Number = 0; i<menuArray.length; i++){
    var btn:MovieClip = menuArray[i].mc;
    btn.btnMC.btnText.text = menuArray[i].name;
    btn.queue = i;
    btn.onRelease = function(){
    toggleButtons(this);
    _root.createEmptyMovieClip("movieContainer", 5);
    container.loadMovie(menuArray[this.queue].label.concat('.swf'));
    }
    }

    If that fails we'll try:


    for(var i:Number = 0; i<menuArray.length; i++){
    var btn:MovieClip = menuArray[i].mc;
    btn.btnMC.btnText.text = menuArray[i].name;
    btn.queue = i;
    btn.onRelease = function(){
    toggleButtons(this);
    _root.createEmptyMovieClip("movieContainer", this.getNextHighestDepth());
    var myListener:Object = new Object();
    myListener.onLoadInit = function(targetMC:MovieClip) {
    trace(movieContainer._width);
    trace(movieContainer._height);
    }
    var imageLoader:MovieClipLoader = new MovieClipLoader();
    imageLoader.addListener(myListener);
    imageLoader.loadClip(menuArray[this.queue].label.concat('.swf'), movieContainer);
    }
    }

    to see if the movie is being created.
    Last edited by Scriptage; 23-06-2009 at 10:11 AM. Reason: changes this to root

  5. #15
    Experienced Member
    Join Date
    Nov 2008
    Location
    Fort Collins, CO
    Posts
    110
    Tried them both. Nothing happened.

  6. #16
    Experienced Member
    Join Date
    Nov 2008
    Location
    Fort Collins, CO
    Posts
    110
    I also changed this:

    Quote Originally Posted by Scriptage View Post
    Maybe:
    _root.createEmptyMovieClip("movieContainer", 5);
    container.loadMovie(menuArray[this.queue].label.concat('.swf'));
    to this:
    Quote Originally Posted by Scriptage View Post
    Maybe:
    _root.createEmptyMovieClip("movieContainer", 5);
    movieContainer.loadMovie(menuArray[this.queue].label.concat('.swf'));

    ...and still nothing.

  7. #17
    likes chips. Scriptage's Avatar
    Join Date
    May 2008
    Location
    Yorkshire
    Posts
    2,760
    Bugger, I'm perplexed. I don't have Flash installed here, I'll have a play when I get home in about 10 hours.

    One last thing to try:

    for(var i:Number = 0; i<menuArray.length; i++){
    var btn:MovieClip = menuArray[i].mc;
    btn.btnMC.btnText.text = menuArray[i].name;
    btn.queue = i;
    btn.onRelease = function(){
    toggleButtons(this);
    _root.createEmptyMovieClip("movieContainer", this.getNextHighestDepth());
    var myListener:Object = new Object();
    myListener.onLoadInit = function(targetMC:MovieClip) {
    trace(movieContainer._width);
    trace(movieContainer._height);
    }
    var imageLoader:MovieClipLoader = new MovieClipLoader();
    imageLoader.addListener(myListener);
    imageLoader.loadClip(menuArray[this.queue].label.concat('.swf'), movieContainer);
    }
    }

    The post above originally said 'this' not '_root'.

  8. #18
    likes chips. Scriptage's Avatar
    Join Date
    May 2008
    Location
    Yorkshire
    Posts
    2,760
    I also changed this:


    Quote:
    Originally Posted by Scriptage
    Maybe:
    _root.createEmptyMovieClip("movieContainer", 5);
    container.loadMovie(menuArray[this.queue].label.concat('.swf'));


    to this:

    Quote:
    Originally Posted by Scriptage
    Maybe:
    _root.createEmptyMovieClip("movieContainer", 5);
    movieContainer.loadMovie(menuArray[this.queue].label.concat('.swf'));



    ...and still nothing.
    Sorry I really should check what I'm posting.

  9. #19
    Experienced Member
    Join Date
    Nov 2008
    Location
    Fort Collins, CO
    Posts
    110
    Nada. No errors either. Just nothing.

    Thanks though man.

  10. #20
    likes chips. Scriptage's Avatar
    Join Date
    May 2008
    Location
    Yorkshire
    Posts
    2,760
    How about:

    for(var i:Number = 0; i<menuArray.length; i++){
    var btn:MovieClip = menuArray[i].mc;
    btn.btnMC.btnText.text = menuArray[i].name;
    btn.queue = i;
    btn.onRelease = function(){
    toggleButtons(this);
    loadMovieNum(menuArray[this.queue].label.concat('.swf'), 5);
    }
    }

+ Reply to Thread
Page 2 of 3
FirstFirst 1 2 3 LastLast

Similar Threads

  1. loadMovie Issues
    By bdavey311 in forum Flash Forum
    Replies: 0
    Last Post: 01-04-2009, 11:22 PM
  2. 4 CSS navigation menus
    By Graphic Design Links in forum Graphic Design Links
    Replies: 0
    Last Post: 23-06-2008, 06:42 PM
  3. navigation problem
    By spnwebdesign in forum Graphic Design and Web Design Help
    Replies: 1
    Last Post: 17-05-2008, 12:23 PM
  4. navigation
    By cre8 in forum General Web Design Forum
    Replies: 12
    Last Post: 09-05-2008, 04:58 PM
  5. css navigation
    By dannynosleeves in forum CSS Forum
    Replies: 11
    Last Post: 09-10-2007, 08:57 PM

Bookmarks

Posting Permissions

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


The Graphics Forum Web Design Stuff Free Decent Downloads Free Quality Wallpapers Graphics Forum Free Vista Themes
The Top The Best Images Tech Talk 247 Logo Design - $149 Affordable Stock Vector Illustrations Creativecurio - Design Blog Graphic Design Advertising

Check the forum often for the latest design announcements. Everything from graphic design and web design, to films and music. Estetica is a great place for people to get together and help each other out.



Web Hosting - UK Web Hosting services for business or personal website hosting needs.

Dedicated Servers - A full range of Managed Dedicated Server solutions suitable for all your requirements.

Graphic Design Blog | Web Design Forum | Graphic Design and Print Forum | Graphic Design Links | Advertise On This Site

Web Design UK | Vision.To Design | Leaflet Printing | Estetica Design Forum's Privacy Policy

Flyer Printing | Photography Blog | Design Forum Links | Logo Design | Graphic Design Social Network | Logo Design

Graphic Design Tutorials | Logo Designer | UK Logo Design Studio | Land for sale | Vector Art Blog | Leaflet Printing

Free Web Hosting | Custom Logo Design - $149 Only | Affordable Print Design Templates | Small Business Logo Design | Company Logo Design

Logo Design Service | Logo Design Firm | Logo Design Reseller | Custom Logo Design | Letterhead Printing | Flyer Printing | Business Card Printing

Printing | Leaflet Printing | Online Backup | T-Shirt Printing | Personalised Mugs | Canvas Printing | Free Web Hosting Comparison Site