FORUMS: list search recent posts

button

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
johnsabbath
button
on Dec 27, 2007 at 2:45:32 pm

Hi
Just new to flash and wand want to create my oun site. I have Flash cs3. I have a roll over button called "services" how would i make this link to the services page. Is it possable to go to a frame or would it be better to make another project and call it services and make it link to that.....like i said i 'm new and if you can help that would be great.

what's the code and where do put it?


Return to posts index

Pieter Helsen
Re: button
on Dec 27, 2007 at 4:22:29 pm

First of all, we'll need to know what version of actionscript you're using. At startup, Flash offers you a choice between an Actionscript 2 or an Actionscript 3 file. Unless you plan on using advanced effects when making your website, I suggest you stick to AS2.

Second, as you may have guessed already, Actionscript code can be placed just about anywhere you'd like, either on the timeline, on the button or movieclip itself or on the button or movieclip's timeline. When working with larger projects, you'll soon find out that placing the code on buttons and movieclips will decrease productivity, since you'll have to click around the stage a lot in search of that particular mc where you placed your code on. Therefore, I recommend that you place as much code as possible on your main timeline. How do you call on a button that's on your timeline or in another MC? Well, let's imagine you have a button called my_btn inside a movieclip called nav_mc and that that movieclip is placed on the main timeline.

The code below should be placed on the main timeline and would make your movie skip to frame 20:

Actionscript 2

nav_mc.my_btn.onRelease = function(){
_root.gotoAndStop(20);
}



Kind regards,
Pieter


Return to posts index

johnsabbath
Re: button
on Dec 28, 2007 at 4:07:18 am

Hi

I tried this out it goes to frame 20 then it loops over to frame 1 and back to 20 and over and over. I want to make a site in flash whats the best way to start this off?? I need some help linking up the pages. any thoughts where i can start... im new to all this stuff.


Return to posts index


Pieter Helsen
Re: button
on Dec 28, 2007 at 12:37:48 pm

There isn't a "best way", each site requires it's own approach. When you have a bandwidth-heavy website, you'll want to use seperate .swfs and load them into your main .swf when you need them.

For a beginner website, I'd just have several frames (-don't- work with Scenes! And even labels aren't something I use very often) with your content on each of those and buttons linking to the appropriate frame.

Here's a Rather advanced tutorial

This one is slightly less complex. At the moment I recommend you read this one, as it explains the basics quite well.

If you're just looking for tutorials, please use google. I found these in under 2 minutes.

Kind regards,
Pieter


Return to posts index

johnsabbath
Re: button
on Dec 29, 2007 at 2:20:32 pm

when the service button is clicked on my main page i want this to go to the service section, this would be another page. how do i do this this is all i need for know. every button tutorial i find is to make a link to a site not another page in flash. can you help...thanks


Return to posts index

Pieter Helsen
Re: button
on Dec 29, 2007 at 5:36:53 pm

The services section is just at another frame right, not in another scene or something?

In that case, give your button an instance name (click the button and give it the instance name "services_btn" in the properties panel)

Now go to your actionscript panel.

and place this action on the first frame of the timeline -in which you placed your button!-


services_btn.onRelease = function(){
this.gotoAndStop(20); // Where 20 is the frame number at which you located the section.

// If you use frame labels, it would look something like this.gotoAndStop("services");
where services is the name of the frame
}

stop();


At frame 20, insert another
stop();
action.



Kind regards,
Pieter


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]