SunQuest
           Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 10th, 2003, 05:20 PM
hurl hurl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Salt Lake City
Posts: 12 hurl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Dynamic Menu Trouble

I have a dynamically generated menu that I have created. The menu will generate correctly, but I cannot get it to go to any frame other than 2. It is probally something stupid. Any help would be greatly appreciated.

images = new Array("test1.jpg", "test2.jpg");
imageCount=images.length;
offset=40;
for (i=1;i<=imageCount;i++){
_root.nav.buttons.createEmptyMovieClip("clip_"+i,i);
_root.nav.buttons["clip_"+i].createEmptyMovieClip("button_"+i,i);
_root.nav.buttons["clip_"+i]["button_"+i].loadMovie("images/"+images[i-1],i);
_root.nav.buttons["clip_"+i].onPress = function(){
_root.gotoAndStop(i-1);
}
if(i!=1){
_root.nav.buttons["clip_"+i]._y = _root.nav.buttons["clip_"+(i-1)]._y+_root.nav.buttons["clip_"+(i-1)]._height+offset;
}
}

Reply With Quote
  #2  
Old July 10th, 2003, 09:54 PM
CyanBlue CyanBlue is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Chantilly, VA
Posts: 31 CyanBlue User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Howdy...

You could try this...
PHP Code:
 images = new Array("test1.jpg""test2.jpg");
imageCount images.length;
offset 40;
for (
1<= imageCounti++)
{
    
_root.nav.buttons.createEmptyMovieClip("clip_" ii);
    
_root.nav.buttons["clip_" i].createEmptyMovieClip("button_" ii);
    
_root.nav.buttons["clip_" i]["button_" i].loadMovie("images/" images[1], i);
    
_root.nav.buttons["clip_" i].num i;
    
_root.nav.buttons["clip_" i].onPress = function()
    {
        
_root.gotoAndStop(this.num 1);
    };
    if (
!= 1)
    {
        
_root.nav.buttons["clip_" i]._y _root.nav.buttons["clip_" + (1)]._y _root.nav.buttons["clip_" + (1)]._height offset;
    }


Reply With Quote
  #3  
Old July 14th, 2003, 04:56 PM
hurl hurl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Salt Lake City
Posts: 12 hurl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
CyanBlue,
Thank you for your reply. Between then and now I put together this code, and it is working for me.

images = new Array("test1.jpg", "test2.jpg);
imageCount=images.length;
offset=40;
for (i=0;i<=imageCount;i++){
_root.nav.buttons.createEmptyMovieClip("clip_"+i,i+1);
_root.nav.buttons["clip_"+i].createEmptyMovieClip("button_"+i,i+1);
_root.nav.buttons["clip_"+i]["button_"+i].loadMovie("images/"+images[i-1],i);
_root.nav.buttons["clip_"+i].onPress = function(){
_root.gotoAndStop(parseInt(this._name.substr(5))+1);
_root.display=_currentframe;
}
if(i!=1){
_root.nav.buttons["clip_"+i]._y = _root.nav.buttons["clip_"+(i-1)]._y+_root.nav.buttons["clip_"+(i-1)]._height+offset;
}
}

thanks anyway

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Dynamic Menu Trouble


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway