Home Features User CP Facebook Twitter Google+ Youtube Support Us
Home FAQ Members List Search Today's Posts Mark Forums Read
Go Back   Animation Forum > Production > Script Writing and Graphic Novels
Reply
 
Thread Tools Display Modes
Old 01-25-2012, 05:02 PM   #1
Tolling87
New Blood
 
Join Date: Jan 2012
Posts: 1
Default Basic ActionScript 3.0 quick guide please?

Hi
/////////////////////////////////////
// ADOBE FLASH PRO CS5.5 //
/////////////////////////////////////
I've decided to begin learning AS 3.0. I used to play around with AS 2.0 a lot a few years ago. But know i am sort of lost in the ActionScript world. Have manly been focused on MEL, Python, and PHP. Since i am just gonna make a simple project that has buttons going to the next frame and back, and play the movie on a specific frame, i'll ask here instead of doing a lot of research.

I want the code to be on a single frame instead on different buttons, and movieclips.

It's this simple: I just want to bake a Book inside a flash project. Can you guide me to the codes of like - 'go to the next page' (frame nr, frame Label (want different examples just to expand my AS3.0 knowledge)) - play a movie in side this book (i want examples for IF the movie is in the same scene on a certain frame, OR in a different scene)


Thanks for the help guys!


Thomas
Tolling87 is offline   Reply With Quote
Old 02-01-2012, 03:35 AM   #2
Daino
Member
 
Daino's Avatar
 
Join Date: Mar 2011
Posts: 93
Default

Hello, perhaps I understand what you need, for the button back and forth frame-containing movieclip you create two instances two calls (and back_btn froward_btn). Add also the passage of the variables using the addEventListener, with reference to function according to the click of a mouse.

Code:
function BackMovie(e:MouseEvent):void {
	gotoAndStop(currentFrame-1); 
}
function ForwardMovie(e:MouseEvent):void {
	gotoAndStop(currentFrame+1); 
}

back_btn.addEventListener(MouseEvent.CLICK, BackMovie);
forward_btn.addEventListener(MouseEvent.CLICK, ForwardMovie);


stop();
Remember that the instances of your movie clip should be called "back_btn" and "forward_btn". If you want to add a reference to a specific scene in this case you need to add another function with the call by the movieclip, the example focuses on the first frame of the second label

Code:
function PlayScene(e:MouseEvent):void {
	gotoAndStop(1, "Scene 2"); 
}
scene_btn.addEventListener(MouseEvent.CLICK, PlayScene);
For the transition to a particular page you must make sure to add a dynamic text and a button that clicks to acquire the input value in a variable, what did you create your function, as in previous cases, which will then references to that frame.

Maybe next time post your thread in the "Flash" in Software Specific Subforums.
__________________
✪ portfolio

Last edited by Daino; 02-01-2012 at 03:37 AM.
Daino is offline   Reply With Quote
Reply


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

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 On
Forum Jump



All times are GMT -6. The time now is 09:08 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Animation Forum 2005-2010