Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Visual Design > Flash and ActionScript

Reply
 
LinkBack Thread Tools
Old August 5th, 2007, 11:37 AM   #1
New Member
 

Join Date: Aug 2007
Location: Utah
Age: 25
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 louie2k2 is on a distinguished road
Angry noob needs help

So, I'm taking this ridiculously absurd class, where the teacher expects us to create an interactive CD-ROM using Flash, its pretty just a website on a CD (which is stupid in and of itself)... without even showing us how to use Flash really. He just slapped up some scripts and told us to do it.

Anyway, I need some help trying to figure things out. Our teacher gave us an example .FLA file to help us and this is what he had in an Actions layer on the "Main" screen (of the screens on the left) of the Flash Form Application. (SplashScreen, ColorKey, Lighting... etc are the names of the screens underneath "Main"...)

Quote:
function showScreen(screenName:String):Void{
SplashScreen.visible=false;
ColorKey.visible=screenName=="ColorKey";
this.ColorKey.Page2.visible=screenName=="Page2";
Lighting.visible=screenName=="Lighting";
Sets.visible=screenName=="Sets";
Credits.visible=screenName=="Credits";
}
Then he has component buttons on the main page with a script that takes you to the other screens...

Quote:
on (click){
_parent.showScreen("ColorKey");
}
So, when it came time to doing my own, I thought I could put the "on (click){ ..." script on Button symbols from images that I imported. I kept on getting error messages on this and figured out that this code doesn't work on Buttons, but only on Components.

So I guess my question is... how do I create a button that, when you click it, it takes you to another Screen. Also, I need help making the button change when you rollover it.

I know this is all really simple and easy, but I'm in a time crunch, and the Flash Help, doesnt seem to be very 'helpful'. Any and all help is greatly appreciated.
louie2k2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 5th, 2007, 01:56 PM   #2
New Member
 

Join Date: Jul 2007
Location: India
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 al2000123 is on a distinguished road
Re: noob needs help

hey louie2k2-

I'm no guru-actually just a newbie too. I suggest that you first make the button (with the change when you rollover), next add a very simple actionscript to take you to the specified screen(I'm assuming you have your screen on a frame on your main timeline).

For the button:
1. Create any graphic element (shape)/ or text and then select it (including the outline.
2. Right-Click while still selected and select "Convert to Symbol".
3. Select "Button", and key in a name for it.
4. Click "OK".
5. Now place the cursor over the button and double click it- you will see the time line has now changed to have only four frames- UP, OVER, DOWN and HIT.
6. UP-Is the state that you have when your mouse is not on the button.
OVER- Is what you want your new image to be- whatever you want-
DOWN- Is when you press the mouse (left click)
HIT- Is the area where your mouse is activated for clicking.
7. You will have noticed that the "UP"-state already has a keyframe on it (black spot) Now right-click in the frame "OVER" on the tiimeline...and select "Insert Keyframe".
8. Do the same for the "DOWN" state too.
9. Modify the graphic/text/image for the "OVER" and "DOWN" states.
10. click ctrl+enter and test the button.

NOW FOR THE SECOND PART

I'm assuming that your playhead is on frame 1 and you want to go to frame 2(or whichever) where your other screen is, where you want to navigate to.

1. Make a new layer and call it Actions.
2. On frame 1, on the Actions layer, in the Actions Panel, type in stop ();
3. Do the same on Frame 2. This will stop on frame 1 and 2 so you can click the buttons you make on these frames.
4. Now Right-click on your newly made button- and select "Actions".
You are now in the Actions Panel.
5. Key in
on(release) {
gotoAndPlay(2);
}

You can also check GLOBAL FUNCTIONS in the Action Panel, and under TIMELINE CONTROL you will find some options- use what you need.

That's about it! I hope this helps you- sorry if I misread your question- All the best anyway!

Cheers!

al2000123 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
applications , buttons , components , flash , screens


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Noob looking for help Gardenworks Your Design and Layout 2 April 6th, 2008 11:57 AM
Need HELP , IM A NOOB matto HTML, XHTML and CSS 30 August 20th, 2006 11:50 PM


Search Engine Optimization by vBSEO 3.2.0 RC8