| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Mr chips to you
Join Date: Feb 2003
Location: Toronto
Posts: 1,242
|
flash drop down component help
I'm looking to edit the 'weekly pics' fla on my site - http://www.lomodome.com/ (the calender on the right of the front page) I want be able to jump to frame 35 of my main movie (gotoandStop)when the user selects "Feb" from the drop down list. Does any one know what the code is for this? also if you know how I can set the dropdown list component to be on "feb" as it's current default that would be useful aswell..(does that make sense?)...i,e rather than showing Jan like it does now, I want it to show 'Feb' and have the option to select 'Jan' p.s I'm using flash mx |
|
|
|
|
|
#2 (permalink) | |
|
Notorious?
|
Quote:
Make the change handler for the dropdown (should be in the Properties window) a function called something like changeMonth. Every time you call the function, pass it an argument for the frame number (35). Then do something like this: changeMonth = function(month) { this.gotoAndStop(month); } I'll look into the default setting stuff. Stay tuned... |
|
|
|
|
#3 (permalink) |
|
Mr chips to you
Join Date: Feb 2003
Location: Toronto
Posts: 1,242
|
cheers, just having a quick look at it now (should really be working) so, I've put this code on the first frame of the movie. - changeMonth = function(month) { this.gotoAndStop(month); } And named the changehandler - "changeMonth" in the properties window of the component.... but what now? how do I "pass it an argument" to jump to frame 35 when the user selects "feb" ? |
|
|
|
#4 (permalink) | |
|
Notorious?
|
Quote:
You have a function for changeMonth that is the handler for the changing of the drop down. So you should define an array for each month and its corresponding frame number, then in your changeMonth function you test the dropdown for its currently selected value. Then you compare the selected value with the corresponding array value, then you call another function like monthChangeFrame(yourArrayValue). I think that should do it quite nicely. |
|
|
![]() |