| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
|
|
#4 (permalink) | |
|
Iris Folder
Join Date: Apr 2003
Location: smokey
Posts: 2,672
|
Quote:
Depends on his background and when/where he's working, freelance very few agencies are wanting AS3 yet. Not that they say no if you can, they're dabbling their toes. Plus if you're working with legacy code you're sure to need AS2. But as he's only just got Flash 8 you're probably right. |
|
|
|
|
#6 (permalink) | |
|
Senior Member
Join Date: Aug 2006
Location: Belfast
Posts: 746
|
Quote:
legacy code, hadnt thought of that... probably best to learn as3 then familiarise yourself with as2.. |
|
|
|
|
#8 (permalink) | |
|
Senior Member
Join Date: Aug 2006
Location: Belfast
Posts: 746
|
Quote:
alot of it is different, though if youre familiar with as2 it should be easy to migrate to as3... biggest change is probably the document classes. have a looksie at what ive just coded today: package folder { import flash.display.*; import flash.events.*; import flash.text.*; public class PhotoPanel extends Sprite { private static const defaultTitle:String = "Photo Viewer [No Photo Selected]"; private static const defaultPhotoName:String = "Enter Photo Name Here"; private var title:TextField; private var photoname:TextField; public function PhotoPanel() { title = new TextField(); title.text = PhotoPanel.defaultTitle; title.width = 350; title.height = 25; title.border = true; title.background = true; title.selectable = false; addChild(title); photoname = new TextField(); photoname.text = PhotoPanel.defaultPhotoName; photoname.width = 150; photoname.height = 30; photoname.x = 100; photoname.y = 150; photoname.border = true; photoname.background = true; photoname.type = TextFieldType.INPUT; addChild(photoname); photoname.addEventListener(Event.CHANGE, changeListener); photoname.addEventListener(FocusEvent.FOCUS_IN, photoFocusInListener); photoname.addEventListener(FocusEvent.FOCUS_OUT, photoFocusOutListener); stage.addEventListener(FocusEvent.FOCUS_OUT, panelFocusOutListener); } private function changeListener(e:Event):void { if(photoname.text.length == 0) { title.text = "Photo Viewer [Unnamed Photo]"; } else { title.text = "Photo Viewer [" + photoname.text + "]"; } private function photoFocusInListener(e:FocusEvent):void { if(photoname.text == PhotoPanel.defaultPhotoName) { photoname.text = ""; title.text = "Photo Viewer [Unnamed Photo]"; } else { title.text = "Photo Viewer [" + photoname.text + "]"; } } private function photoFocusOutListener(e:FocusEvent):void { if(photoname.text.length == 0) { photoname.text = PhotoPanel.defaultPhotoName; } } private function panelFocusOutListener(e:FocusEvent):void { if(e.relatedObject == null) { title.text = PhotoPanel.defaultTitle } } }// function }// sprite }//package |
|
|
![]() |