PDA

View Full Version : Needed help in Flash...


j_hamster84
07-27-2004, 01:28 PM
Currently, I'm a student and I have to learn Flash by myself to create an e-learning project. There is one effect I seen in one of the national geographic website, which I cannot find in any books that could teach me how. Therefore I hope I could find a solution here...

Currently, I'm using Flash MX 2004, and my problem is that I wanted to 'hit' a button then a box with text and pic will pop up (not a window) and there will be a close button for me to close the box. Please take a look at the website:

http://www.nationalgeographic.com/channel/mummy/mummy_flash.html

I really needed help in this... (T_T)

speedlemon
07-28-2004, 12:47 AM
hi j hamster. ok. here is what you'll want to do.
make a movie clip with an instance name of 'popuptext'(i suggest making this box's alpha value between 50%-75% to make it look more professional.)
next, you'll want to add a button in 'popuptext' that will close it.(i suggest an X or 'close' or whatever.)

ok. in 'popuptext', write this(or copy.)

onClipEvent(load){
this._visible = false;
}
in the button that will make the textbox appear-

on(release){
_root.popuptext._visible = true;
}
in the button that will close the textbox-

on(release){
_root.popuptext._visible = false;
}

are there easier ways of doing this? of course. but this gets the job done atleast.

infiniti
07-28-2004, 02:14 AM
My suggestion is to have an empty movie clip as a placeholder and dynamically attach the movie (popup) in place, have the close button to dynamically remove the clip. This way the user doesnt actually need to load the popup image if its never clicked.

speedlemon
07-28-2004, 03:41 AM
oh. he said he was new. thats why i figured id show him the easiest way to do it and understand it at the same time. your suggestion is awesome too, but would one movie clip and button with 6 lines of actionscript really make loading times really that bad?
besides, i dont even know if id be able to do it your way. ive never actually tried to do one of these things, but if i did, more likely than not, i would've never thought of the way you just showed. i know how to dynamically load text and all that good stuff, but i could probably find some way of accomplishing this.

infiniti
07-28-2004, 04:13 AM
Here's a quick example of my suggestion

j_hamster84
07-28-2004, 06:52 AM
Thankx for the solution, but I don't quite understand how infiniti do it... :confused: Therefore, I needed more elaboration pls... :o and i'm still trying out Speedlemon's solution.

I have attached one of my file, the effect I wanted is when I click on the UPS block, the "UPS_MC" movie clip will pop up. But after adding the action script, I still don't see the effect

Thankx for all your help :)

speedlemon
07-28-2004, 04:09 PM
im still on mx so the file wouldnt open. so i cant help anymore. soary.

j_hamster84
07-29-2004, 02:51 AM
For the buttons, should I create a hit or down button? becoz' I don't think I did the correct way...

speedlemon
07-29-2004, 02:57 AM
i dont think it matters

j_hamster84
08-02-2004, 02:20 AM
I'm not sure about the the steps from the 'intance name' of a movie, and creating a button... can you please help me...????

speedlemon
08-02-2004, 03:07 AM
you dont know how to give a movie clip an instance name? simple. click on the movie clip that is on the stage, then down towards the bottom of the screen, in the properties inspector, there should be a little white box that says <no instance name> or something. click there, name it whatever you feel like naming it
(im not sure if its the exact same way in 04, but it should be very similar.)

about buttons, what dont you understand about buttons?

j_hamster84
08-03-2004, 06:56 AM
when you are creating a button, you would need to double-click it and then you add the movie clip rit? They will give you 4 options: up, over, down and hit. do we have to select hit to make my button 'clickable'???

Dr Warm
08-03-2004, 09:09 AM
No you can already hit the button, you put different graphics in each button state, ie in over green, hit red, so that when u put your mouse over it the button goes green and then goes red once u click (release) it