PDA

View Full Version : Website Issues...


ErusPrime
08-31-2010, 02:47 AM
I am completely new to Flash. I'm using Adobe CS4. I am familiar with pretty much all of the master collection save for Flash.

First: what I'm trying to create is an online resume kind of thing : theboombot.com/redux/boombot.html

This is all I've been able to decipher so far through various online tutorials and some friends who have played with the program a little.

The next thing I'd like to be able to do is make each menu button clickable and load a new page in the middle. Preferably one that links to the page they are trying to reach.

edit: I would also like to know how to make the home page the first page loaded. and sorry for my lack of ability to link.

I have no idea how to set that up in the timeline/layers, or the script necessary to make it work. If anyone can get me started I would be most grateful.

ErusPrime
09-01-2010, 12:04 AM
if it's tl;dr

I learned how to make buttons and convert them to symbols. shown here: theboombot.com/redux/boombot.html
I would now like to know how to make those buttons do something when you click on them.

ErusPrime
09-01-2010, 11:53 PM
One more go:

the following is my code that i've pieced together from tutorials and references I've found on the webs. However, Instead of the actual buttons doing something when I click them, all I get is a single frame of everything on the same page at the same time.

how would I control the visiblity of my pages?

mcHeader.btnHome.addEventListener(MouseEvent.CLICK , clickHandler);
mcHeader.btnResume.addEventListener(MouseEvent.CLI CK, clickHandler);
mcHeader.btnAbout.addEventListener(MouseEvent.CLIC K, clickHandler);
mcHeader.btnContact.addEventListener(MouseEvent.CL ICK, clickHandler);
mcHeader.btnGaming.addEventListener(MouseEvent.CLI CK, clickHandler);
mcHeader.btnWebmail.addEventListener(MouseEvent.CL ICK, clickHandler);

function clickHandler(event:MouseEvent):void {
switch (event.currentTarget.label)
{
case "Home" :
gotoAndStop(2);
break;
case "Resume" :
gotoAndStop(3);
break;
case "About" :
gotoAndStop(4);
break;
case "Contact" :
gotoAndStop(5);
break;
case "Gaming" :
gotoAndStop(6);
break;
case "Webmail" :
gotoAndStop(7);
break;
}
}

rrh
09-03-2010, 04:06 PM
There is a .visible attribute.


mcHeader.btnHome.visible=false;

This would hide the home button. So you could do that to your home page, whatever you named that, instead.

ErusPrime
09-03-2010, 10:33 PM
actually, I found the right way to do it.

set the content of each page in the same layer on a different blank keyframe.

I just labeled the frames and used changing the function for each different button. works great. No errors. Now I need to find a way to make a subtle but fitting page transition.

Thanks for the help though.

stop();
function goHome(e:MouseEvent):void {
gotoAndStop("Home");
}
btnHome.addEventListener(MouseEvent.CLICK, goHome);