|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Set frame with SetProperty
Does anyone know how to set the frame with setProperty? I need to use setProperty because I'm doing ("movie" + i) if I do "movie"+i.gotoAndStop(1) if gives me an error. So I need to use setProperty to set the frame.
Thanks,
__________________
Travis |
|
#2
|
|||
|
|||
|
can you be more specific on what you are exactly trying to accomplish !
cheers
__________________
please see my site http://www.f-web.net also tutorials coming soon.. I am for hire .timo@f-web.net |
|
#3
|
||||
|
||||
|
The "movie" +i.gotoAndPlay I told you about in an earlier thread and setProperty are completely unrelated, You might want to post and example of what you are working on and then it will be easier to understand what you are doing......
__________________
No problem is so complex that it cannot be resolved with the proper use of explosives. |
|
#4
|
||||
|
||||
|
I guess I'm off in some many directions I can't figure out where I'm going. Here's the code I'm working on:
//This function gets called with three params, INOROUT(meaning expand or collaspe), HOWMANY(means howmany submenus it needs to make room for), and WHICHONE(means which menu item it is. i.e. 1,2, or whatever). __________________________________________ function menumove(INOROUT,HOWMANY,WHICHONE){ switch(INOROUT){ case "IN": trace("In"); for(i=WHICHONE + 1;i<16;i++){ tempX = getProperty('menu' + i, _y); setProperty('menu' + i, _y, tempX - (22.3 * HOWMANY)); } _global.whosopen = 0; _global.whoshowmany = 0; break; case "OUT": trace("Out"); for(i=WHICHONE + 1;i<16;i++){ tempX = getProperty('menu' + i, _y); setProperty('menu' + i, _y, tempX + (22.3 * HOWMANY)); } _global.whosopen = WHICHONE; _global.whoshowmany = HOWMANY; break; } } //This function is called to close whichever one is open. So if you click another item it closes the previos one. _________________________________________ function closeothersopen(){ setProperty('menu' + _global.whosopen, gotoAndStop(1),""); _root.menumove("IN",_global.whoshowmany,_global.whosopen); } __________________________________________ I have a menu with submenu options. When you click a menu option I want all the menu option below it to move down so the submenu options are accessible. Right now I have the menu options as movieclips with 3 frames total. 1st is for normal when it's just sitting there. 2nd is just the lettering a different color to look like it's highlighted. I have it goto this frame onRollover. Then frame 3 is it with the lettering greyed out and submenu options underneath it. Take a look and you'll see what I mean www.absolutemonkey.com/work/menu.html I also have the fla there too, same name. For right now, Just the first two options have all the code, and only the first one the third frame in it. I want to use the setproperty to change whichever menu item that is open to frame one and then close it. I hope this helps explain my maddness. If not, I may just be a lost soul. Thanks again, |
|
#5
|
||||
|
||||
|
This code you posted is illogical. You don't explain why you are using global variables. You don't define the WHICHONE variable in ths code: for(i=WHICHONE + 1;i<16;i++) and endless other open questions............
It looks like you have a good understanding of actionscript and programming in general. What are you asking for here? |
|
#6
|
||||
|
||||
|
I'm asking how to make a movieclip goto a frame using a way that I can use... "menu" + i
If I do "menu"+i.gotoAndStop(1) it gives me an error. I'm using globals because I'm just used to doing that with PHP (so you can use them outside of a function in PHP) I pass the variables(INOROUT,WHICHONE,HOWMANY) from the call function statement in the onRelease statement This is the code attached to the menu item: on (rollOver) { if(_currentframe !== 3){ gotoAndStop(2); } } on (rollOut) { if(_currentframe !== 3){ gotoAndStop(1); } } on (release) { switch(_global.footballclicked){ case true: if(_currentframe == 3){ //Sending IN because it's collapsing, sending 13 because that's howmany submenus, and sending 1 because this is the first menu item _root.menumove("IN",13,1); gotoAndStop(1); } break; case false: //Sending OUT because it's expanding, sending 13 because that's howmany submenus, and sending 1 because this is the first menu item _root.menumove("OUT",13,1); gotoAndStop(3); break; } //Toggles the menu option _global.footballclicked = !_global.footballclicked; } Thanks, |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Set frame with SetProperty |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|