STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228124
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5121

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/12361449?noj=FRM12361449-12DC" width="1" height="1"></div>

Flash CS3 Mni-Tutorial 2.swf

This is the info page for
Flash #71544

(Click the ID number above for more basic data on this flash file.)


Text
2

Flash CS3
Mini-Tutorial

0%

l

lo

loa

load

loadi

loadin

loading

Flash CS3 Mini
Tutorial 2.5

By: Jaye19

enter

Done

Flash Cs3
Mini-tutorial 2

Just another mini-tutorial that I
made in my spare time while
making my BIG tutorial so just
look, learn and enjoy!

Back / Next

Main:

Making Buttons
Timer
Drag & Drop
Right Click Menu

You have to press the next and back buttons to see
the whole tut and if the buttons dont work right click
and click it

Making Buttons

In flash CS3 making buttons is more
complicated that in flash 8 so to start
make a new flash AS3 document to
start and make new button (ctrl+f8)
then you will be taken inside an empty
button

Main

Now, when you are inside the button
look above the screen 4 tabs are there
right? Now look at the parts (below)
to know there meaning

up - The look of our button without any
mouse detection
over-The look of your button with mouse
detection
down-when you click it
hit-the hit area of your button (it's
invisible)

Now that you know the parts and have put
some desgns in them now it's time to put
some actions so go to scene (1t can be
seen above your workspace) then press f9
now as you can see when the button is
highlighted inside the actions panel it says
you cannot put some actions now that one
of the things that are complicated in
making buttons in as3 now continue to the
next page

Now click your button find instance name and
put there my_btn (used as refference for the
code) Now make sure that the action panel is
open if not so press f9 then click on the frame
you are in then insert the following actions

stop();
//stops the main timeline
function button(evt:MouseEvent):void {
nextFrame();
//opens a new function and when the fuction is functioned it will go to the next frame
}
my_btn.addEventListener(MouseEvent.CLICK, button);
//gets your button by the instance name and when it it clicked it opens the function does it

Now beside your frame make a blank
one and put anything there to know
which frame you are and put a
stop(); action inside it then press
ctrl+enter to test your movie now
when you click your button it goes
to the next frame awesome right!
now there are tones of thing that
you can change in your code see the
next page

stop();
//stops the main timeline
function button(evt:MouseEvent):void {
nextFrame();
//opens a new function and when the fuction is functioned it will go to the next frame
}
my_btn.addEventListener(MouseEvent.CLICK, button);
//gets your button by the instance name and when it it clicked it opens the function does it

Rollover to those actions that
you think that can be changed
or just browse until you find
one

You can change that to the following
prevFrame(); - goes to the previous frame
gotoAndStop(frame#); - it goes to a frame an stops it (change frame# to the frame you want
and you can change stop to play if you dont want it to stop
nextscene(); - goes to the next scene if you inserted one
stop(); - stops the movie
play(); - plays the movie
that's all the basics!!

Now there are tons of actions to replace that but here are the basics for a while
ROLL_OVER- When you rollover the button
ROLL_OUT-When you rollover then you rollout of the button
MOUSE_WHEEL-When you use the scroll wheel while your mouse is over the
button
MOUSE_MOVE-This executes faster that the Rollver script just like when you
rollver the button

Well that mostly covers everything
about buttons but if you want to make
multiple just change the instance name
(but dont take out the the _btn) and
change the function name now if you
press next you will be taken in another
topic prepare!!

Timer

Custom Text Here 00:00

This is what we're are gonna do

Now to do the timer is just
pretty easy 1st make a dynamic
text box with the instance name
of time and look out for the
code at the next frame

Now put this in your frame

var startingTime:int = getTimer ();

addEventListener(Event.ENTER_FRAME, calculateDifference);

function calculateDifference(event:Event) {
var timePassed:int = getTimer() - startingTime;
var seconds:int = Math.floor (timePassed / 1000);
var minutes:int = Math.floor (seconds / 60);
seconds -= minutes * 60;
if (seconds < 10) {
time.text = String ("Custom Text Here: " + minutes +":0" + seconds);
} else if (seconds >
= 10) {
time.text = String ("Custom Text Here: " + minutes + ":" + seconds);
}
}

Change custom text here to the text you like that will
appear beside the coutdown

Now easy was'nt it so if
you press next you will be
leaded in the next topic :p

Drag & Drop

Now here's an example
on what we're gonna do

Mr. Graggable

To do that 1st make a
movieclip (ctrl+f8) then
give it an instance name
of DragMC

Now insert these actions
at the frame

var dragging:Boolean = false;

DragMC.addEventListener(MouseEvent.MOUSE_DOWN, press);

function press(evnt:Event):void {

DragMC.startDrag();
dragging = true;

}

DragMC.addEventListener(MouseEvent.MOUSE_UP, release);

function release(evnt:Event):void {

DragMC.stopDrag();
dragging = false;

}

Take this out if
you want it to
drag FOREVER
(in the flash of
course :p)

Right Click menu

Fancy my right click menu
see for me I had a bit of
fuzz making that thing nd
compiler errors can be seen
all the time but now I
perfected it with tons
customable parts

var mymenu:ContextMenu= new ContextMenu();
mymenu.hideBuiltInItems();
var txt:String='My Webpage';
//You can change my webpage with the label that will appear at the menu
var item:ContextMenuItem= new ContextMenuItem(txt);
mymenu.customItems.push(item);
item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,item_select);
function item_select(e:ContextMenuEvent):void
{
var url:String='jaye19.newgrounds.com';
//Change the website above to the website you want
var site:URLRequest=new URLRequest(url);
navigateToURL(site);
}
this.contextMenu=mymenu;

Code for Right Click Links

var mymenu:ContextMenu= new ContextMenu();
mymenu.hideBuiltInItems();
var txt:String='Next Frame';
//Change that to label you want that will appear at the menu
var item:ContextMenuItem= new ContextMenuItem(txt);
mymenu.customItems.push(item);
item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,item_select);
function item_select(e:ContextMenuEvent):void
{
var String=nextFrame();
//You can change nextFrame(); to the normal things like prevFrame(); //gotoAndStop(2); etc.
}
this.contextMenu=mymenu;

Code for Right Click Custom
Function

var mymenu:ContextMenu= new ContextMenu();
mymenu.hideBuiltInItems();
var txt:String='Low quality';
//Change that to label you want that will appear at the menu
var item:ContextMenuItem= new ContextMenuItem(txt);
mymenu.customItems.push(item);
item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,item_select);
function item_select(e:ContextMenuEvent):void
{
var String=stage.quality = StageQuality.LOW;
//Change LOW to the quality type you want
}
this.contextMenu=mymenu;

Code for Right Click Quality

Well that all for right click
menu in flash but try to
discover more of it I know
you can :)

The Buh-Bye Section :'(

Now that concludes
everything of this tutorial
so if you want to
download this the
instruction is seen in my
comments so Bye :)

ActionScript [AS3]

Section 1
//MainTimeline (LOL_fla.MainTimeline) package LOL_fla { import flash.events.*; import flash.display.*; import flash.ui.*; import flash.text.*; import flash.utils.*; public dynamic class MainTimeline extends MovieClip { public var back_btn:SimpleButton; public var mymenu:ContextMenu; public var next_btn:SimpleButton; public var item:ContextMenuItem; public var lbar:MovieClip; public var startingTime:int; public var lpc:TextField; public var txt:String; public var dragging:Boolean; public var time:TextField; public var play_btn:SimpleButton; public var main_btn:SimpleButton; public var DragMC:MovieClip; public function MainTimeline(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24); } public function release(_arg1:Event):void{ DragMC.stopDrag(); dragging = false; } function frame19(){ stop(); } public function onIntroCli(_arg1:MouseEvent):void{ nextFrame(); } public function onIntroCl(_arg1:MouseEvent):void{ nextFrame(); } public function onIntroCi(_arg1:MouseEvent):void{ gotoAndStop(4); } function frame10(){ stop(); } function frame14(){ stop(); } public function calculateDifference(_arg1:Event){ var _local2:int; var _local3:int; var _local4:int; _local2 = (getTimer() - startingTime); _local3 = Math.floor((_local2 / 1000)); _local4 = Math.floor((_local3 / 60)); _local3 = (_local3 - (_local4 * 60)); if (_local3 < 10){ time.text = String(((("Custom Text Here: " + _local4) + ":0") + _local3)); } else { if (_local3 >= 10){ time.text = String(((("Custom Text Here: " + _local4) + ":") + _local3)); }; }; } function frame18(){ stop(); } function frame3(){ this.stop(); next_btn.addEventListener(MouseEvent.CLICK, onIntroClick); } function frame7(){ stop(); } function frame1(){ this.stop(); this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, PL_LOADING); } public function jj(_arg1:MouseEvent):void{ gotoAndStop(5); } function frame17(){ stop(); } function frame4(){ stop(); this.stop(); next_btn.addEventListener(MouseEvent.CLICK, jj); mymenu = new ContextMenu(); mymenu.hideBuiltInItems(); txt = "Hi this is Jaye19 please enjoy the tut!!!"; item = new ContextMenuItem(txt); mymenu.customItems.push(item); item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, item_select); this.contextMenu = mymenu; } function frame5(){ this.stop(); next_btn.addEventListener(MouseEvent.CLICK, onIntroCli); stop(); back_btn.addEventListener(MouseEvent.CLICK, onIntroClic); this.stop(); main_btn.addEventListener(MouseEvent.CLICK, onIntroCi); stop(); } function frame9(){ stop(); } public function press(_arg1:Event):void{ DragMC.startDrag(); dragging = true; } function frame16(){ dragging = false; DragMC.addEventListener(MouseEvent.MOUSE_DOWN, press); DragMC.addEventListener(MouseEvent.MOUSE_UP, release); } function frame8(){ stop(); } function frame21(){ stop(); } function frame2(){ stop(); stop(); play_btn.addEventListener(MouseEvent.CLICK, onIntroCl); } function frame15(){ stop(); } function frame23(){ stop(); } function frame24(){ stop(); } function frame13(){ stop(); } function frame20(){ stop(); } function frame11(){ stop(); } function frame22(){ stop(); } public function item_select(_arg1:ContextMenuEvent):void{ var _local2:*; _local2 = stop(); } function frame6(){ stop(); } public function onIntroClic(_arg1:MouseEvent):void{ prevFrame(); } function frame12(){ stop(); startingTime = getTimer(); addEventListener(Event.ENTER_FRAME, calculateDifference); } public function onIntroClick(_arg1:MouseEvent):void{ nextFrame(); } public function PL_LOADING(_arg1:ProgressEvent):void{ var _local2:Number; _local2 = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100); lbar.scaleX = (_local2 / 100); lpc.text = (int(_local2) + "%"); if (_local2 == 100){ this.gotoAndStop(2); }; } } }//package LOL_fla
Section 2
//Symbol10_11 (LOL_fla.Symbol10_11) package LOL_fla { import flash.display.*; public dynamic class Symbol10_11 extends MovieClip { public function Symbol10_11(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package LOL_fla
Section 3
//Symbol16_4 (LOL_fla.Symbol16_4) package LOL_fla { import flash.display.*; public dynamic class Symbol16_4 extends MovieClip { public function Symbol16_4(){ addFrameScript(79, frame80); } function frame80(){ stop(); } } }//package LOL_fla
Section 4
//Symbol19_9 (LOL_fla.Symbol19_9) package LOL_fla { import flash.display.*; public dynamic class Symbol19_9 extends MovieClip { public function Symbol19_9(){ addFrameScript(24, frame25); } function frame25(){ stop(); } } }//package LOL_fla

Library Items

Symbol 1 FontUsed by:2 5
Symbol 2 TextUses:1Used by:6
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClipUses:3Used by:6
Symbol 5 TextUses:1Used by:6
Symbol 6 MovieClipUses:2 4 5Used by:Timeline
Symbol 7 FontUsed by:8 11 13 14 15 16 17 18 19 22 25 27 28 29 30 38 39 40 41 44 45 46 47 48 49 53 68 69 70 71 72 73 74 75 76 77 78 80 82 84 85 86 87 88 89 90 91 92 93 94 95 97 98
Symbol 8 EditableTextUses:7Used by:Timeline
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClipUses:9Used by:Timeline
Symbol 11 TextUses:7Used by:24
Symbol 12 SoundUsed by:24
Symbol 13 TextUses:7Used by:24
Symbol 14 TextUses:7Used by:24
Symbol 15 TextUses:7Used by:24
Symbol 16 TextUses:7Used by:24
Symbol 17 TextUses:7Used by:24
Symbol 18 TextUses:7Used by:24
Symbol 19 TextUses:7Used by:20
Symbol 20 MovieClipUses:19Used by:24
Symbol 21 SoundUsed by:24
Symbol 22 TextUses:7Used by:24
Symbol 23 SoundUsed by:24
Symbol 24 MovieClip {LOL_fla.Symbol16_4}Uses:11 12 13 14 15 16 17 18 20 21 22 23Used by:Timeline
Symbol 25 TextUses:7Used by:26
Symbol 26 ButtonUses:25Used by:Timeline
Symbol 27 TextUses:7Used by:Timeline
Symbol 28 TextUses:7Used by:Timeline
Symbol 29 TextUses:7Used by:Timeline
Symbol 30 TextUses:7Used by:Timeline
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:36
Symbol 33 GraphicUsed by:34 36 57 61 62 66
Symbol 34 MovieClipUses:33Used by:35
Symbol 35 MovieClip {LOL_fla.Symbol19_9}Uses:34Used by:36
Symbol 36 ButtonUses:32 35 33Used by:Timeline
Symbol 37 SoundUsed by:Timeline
Symbol 38 TextUses:7Used by:Timeline
Symbol 39 TextUses:7Used by:Timeline
Symbol 40 TextUses:7Used by:Timeline
Symbol 41 TextUses:7Used by:Timeline
Symbol 42 BitmapUsed by:43
Symbol 43 GraphicUses:42Used by:Timeline
Symbol 44 TextUses:7Used by:Timeline
Symbol 45 TextUses:7Used by:Timeline
Symbol 46 TextUses:7Used by:Timeline
Symbol 47 TextUses:7Used by:Timeline
Symbol 48 TextUses:7Used by:Timeline
Symbol 49 TextUses:7Used by:Timeline
Symbol 50 FontUsed by:51 54
Symbol 51 EditableTextUses:50Used by:Timeline
Symbol 52 FontUsed by:53 72
Symbol 53 TextUses:7 52Used by:Timeline
Symbol 54 EditableTextUses:50Used by:Timeline
Symbol 55 FontUsed by:56
Symbol 56 TextUses:55Used by:67
Symbol 57 MovieClipUses:33Used by:62
Symbol 58 GraphicUsed by:62
Symbol 59 FontUsed by:60 65
Symbol 60 TextUses:59Used by:62
Symbol 61 MovieClipUses:33Used by:62 63
Symbol 62 ButtonUses:57 58 60 61 33Used by:67
Symbol 63 MovieClipUses:61Used by:66
Symbol 64 GraphicUsed by:66
Symbol 65 TextUses:59Used by:66
Symbol 66 ButtonUses:63 64 65 33Used by:67
Symbol 67 MovieClip {LOL_fla.Symbol10_11}Uses:56 62 66Used by:Timeline
Symbol 68 TextUses:7Used by:Timeline
Symbol 69 TextUses:7Used by:Timeline
Symbol 70 EditableTextUses:7Used by:Timeline
Symbol 71 TextUses:7Used by:Timeline
Symbol 72 TextUses:7 52Used by:Timeline
Symbol 73 TextUses:7Used by:Timeline
Symbol 74 EditableTextUses:7Used by:Timeline
Symbol 75 TextUses:7Used by:Timeline
Symbol 76 TextUses:7Used by:Timeline
Symbol 77 TextUses:7Used by:Timeline
Symbol 78 TextUses:7Used by:Timeline
Symbol 79 GraphicUsed by:81
Symbol 80 TextUses:7Used by:81
Symbol 81 MovieClipUses:79 80Used by:Timeline
Symbol 82 TextUses:7Used by:Timeline
Symbol 83 GraphicUsed by:Timeline
Symbol 84 TextUses:7Used by:Timeline
Symbol 85 EditableTextUses:7Used by:Timeline
Symbol 86 TextUses:7Used by:Timeline
Symbol 87 TextUses:7Used by:Timeline
Symbol 88 TextUses:7Used by:Timeline
Symbol 89 EditableTextUses:7Used by:Timeline
Symbol 90 TextUses:7Used by:Timeline
Symbol 91 EditableTextUses:7Used by:Timeline
Symbol 92 TextUses:7Used by:Timeline
Symbol 93 EditableTextUses:7Used by:Timeline
Symbol 94 TextUses:7Used by:Timeline
Symbol 95 TextUses:7Used by:Timeline
Symbol 96 GraphicUsed by:Timeline
Symbol 97 TextUses:7Used by:Timeline
Symbol 98 TextUses:7Used by:Timeline

Instance Names

"lpc"Frame 1Symbol 8 EditableText
"lbar"Frame 1Symbol 10 MovieClip
"play_btn"Frame 2Symbol 26 Button
"next_btn"Frame 3Symbol 36 Button
"main_btn"Frame 5Symbol 36 Button
"next_btn"Frame 5Symbol 36 Button
"back_btn"Frame 5Symbol 36 Button
"time"Frame 12Symbol 70 EditableText
"DragMC"Frame 16Symbol 81 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.

Labels

"drag"Frame 18




http://swfchan.com/15/71544/info.shtml
Created: 9/4 -2019 06:49:16 Last modified: 9/4 -2019 06:49:16 Server time: 12/05 -2024 10:09:09