Ok, I have a question and would like some help with creating a flash gallery but for showing information rather than pictures. I will try to make this as clear as possible but if its confusing please let me know and I will give more details.
Basically I trying to make a vertical timeline on the lefthand side with years (in text) which expand slightly on mousover and when clicked show the relavent information on the righthand side for that year.
I can't seem to get the text to expand on mouseover? It would look like this:-
If anyone could offer advice I would be most grateful.
I'm not sure if the textField object supports mouseover. I think its easier if you create each year text in a movie clip, then create a function that is called when you move your mouse in your movie, that checks if the mouse is over one of the movie clips.
Thanks for the replies. I haven't tried to embed the font but I have tried making a movie clip but I am obviously not doing it right.
I need the 2 actions, one is to enlarge when the mouse is over and one to show the information for that year on mouse click.
I will keep trying and see if I can figure out what i am doing wrong but if you have any further ideas I would be grateful
I think the best way of doing it is naming each movie clip with years textfield in it as movY0, movY1, movY2 ...
Then you create a script in frame 1 that runs when mouse move and clicks.
Ok, I have managed to do this now with the movies. However I now have the problem that the information jumps up everytime i go into the workspace as this is grouped to the movie 1936??
Any ideas how to "hide" the info until mouseover on that date or it is clicked??
No, if you look at the SWF I attached you have the dates on the lefthand side which move out with the mouseover and on the first 2 dates information is shown on the righthand side of the flash movie. BUT when you move the mouse over the whitespace (where the information would be) the first date pops up.
So, if you click year 2000, the date stays out and show blank on the righthand side (no information), then move your mouse over the white area (where the information would show) and the information shows up for the first date?
What I want to do is ONLY show this when the user scrolls over the date and/or clicks on it.
I don't know your code, but it looks like you've made it appear by using the ".visible" property.
I suggest either making it an "animation", so you make it appear by changing frames inside the movieclip, or (the better option in my opinion) you put it in a seperate movieclip to the year.
What I think is going wrong; you have it in the same movieclip and made it invisible, but you have it set on rollOver, and the means that when you have your mouse over the info, visible or not, it will register that the mouse is over the top of THE movieclip, which contains both the year and the info.
If it's not that, we probably need to see the code.
Thanks for your help too. I have put this in the same movie as the year which looking at this means that the rollover area becomes large and now includes the information bit not just the year.
I have uploaded the .fla All the help is grately appreciated.
Right, so you did do an animation.
A tiny bit of an overhaul is what I suggest.
Take the animation of each "info" fading into existance and put it in it's own movieClip outside of any of the btn's. Then put code into the btn's that makes the info do what it did before.
I used:
PHP Code:
function onEnterFrame() {
_root.Yr1936info.gotoAndStop(_currentframe)
}
I attached my edited version only doing the 1936 one in my suggested way. (EDIT: Which I just realised won't work on your version of Flash... So I just put the .swf there... sorry, unless you have Flash 8 or higher)
I also renamed your "menu" to "menu1" because I think Flash has other uses for the word "menu" in the coding part. (It turns blue when you type it. Anything that turns blue when you type it I tend to avoid trying to use that word for naming something else)
I'm going to see if I can find another way, but if you are happy with my suggestion...
I have to ask. What's with the ".enabled"s? You don't have any actual buttons...
EDIT: New option; you can just move the first frame of the animation of the fading info just one frame further in, just so that it's not in the first frame and can't be hit with the mouse... unless they hit it while it's fading out, so it's not as neat, but it CAN work.
Last edited by Multihunter; 01-09-2010 at 04:28 AM.
Reason: New option
Brilliant, works perfectly thank you, very appreciated. I have just done 1938 and this works too ;-)
I have one last question though, when you click the year for the information to stay fixed then scroll over the next year the info for that year shows too???
Its not a massive issue however after making it work thus far it would be a little annoying to leave it.
I have re-attached my fla with 1938 done so you can see what I mean.
Any advice would be grately received.
How about this?
You put a variable in the root frame called "otherEnabled" or something.
Start it being false, and then when you click something make it true. Then test if it's false, and if it is, then it should appear when the mouse is put over it
PHP Code:
function onEnterFrame() {
if (_root.otherEnabled == false) {
_root.Yr1936info.gotoAndStop(_currentframe);
}
}
Last edited by Multihunter; 12-31-2009 at 08:35 PM.
Firstly Happy new year! Thanks for your reply, I have given this a whirl and cannot get it to work? Not sure if I need a stop function with it as it just repeats. What am i doing wrong?
var otherEnabled:Boolean = false
//goes in root frame. Name it whatever you like, but I'm using this
mc.onRelease = function() {
_root.otherEnabled = true
}
//just add the code inside that function there to the one in the frame in "menu"
function onEnterFrame() {
if (_root.otherEnabled == false) {
_root.Yr1936info.gotoAndStop(_currentframe);
}
}
//goes into the button in a frame that is the length of the entire movieClip
So long as otherEnabled is false, it will fade the infos in and out. (Are you using "otherEnabled"?)
If otherEnabled is true, then it won't.
So you want to make it true when the user clicks on a date.
You currently have code for when the user clicks on a date, so you have to put the changing of the Boolean inside that function.
If you are sure that you have done this, then I think you might have to post what you have done so far in a .fla...
This is your project, though. An answer you came up with will always be better than one I have for you.