본문 바로가기

전체 글

(286)
Drag n’ Drop in AS3 I used to teach drag-n-drop funtionality using startDrag() and stopDrag() MovieClip methods. This is the easiest and fastest way but it tends to be choppy when the framerate is low. To solve this problem, you should employ MOUSE_MOVE event as shown in this tutorial by Flash and Math. Their tutorial is great and I'll use their concept in this article. But I don't want the draggable object to snap..
Google Maps + Flex (Basic) Since the release of Google Maps API for Flash, I wanted to start incorporating this free service in my apps as I've seen a lot of good examples being built around. One thing to take note is this ActionScript API will only work in Flex and not in your usual Flash app. Google API Key Before you can even start coding, you need sign up for an API key so you can use their free service. Get the key h..
Chart Label Rotation @font-face { fontFamily: myFont; src: local("Verdana"); } LineChart { fontFamily: myFont; }
RotateEffectsDemo.mxml [Bindable] public var angle:int=0; private function rotateImage() : void { angle += 45; rotate.play(); }
equalsIgnoreCase() equal() 과 equalsIgnoreCase() 차이 equal은 문자열을 비교를 위해서 쓰인다. 물론 equalsIgnoreCase() 문자열 비교다. 하지만 크게 두가지 차이를 보인다. 첫째 비교시점시 글자길이를 먼저비교한다. 둘째 equalsIgnoreCase() 는 대소문자를 비교하지않는다. 첫번째 이유로 성능면에서는 equalsIgnoreCase() 가 더 빠르다. 하지만 둘중 어떤것을 사용할지는 개발자에 선택으로 사용하면 된다.
java1.5 셈플 java5 로 넘어오면서 많이 바꼈는데 가장 맘에드는건 저너릭스와 enum 타입이 생긴것이다. annotation 은 어떤곳에 써야할지 아직은 감이 안잡힌다. 1. static 멤버 import 하기 - static import 를 사용하면 클래스명을 안쓰고 static 멤버변수와 static 메소드에 접근할수 있다. import static java.lang.Math.*; public class StaticImportTest { public static void main(String args[]) { double y = sin(1.2); System.out.println("SIN(1.2) : " + y); System.out.println("PI : " + PI); } } 2. Eunumerated 타..
[JAVA1.5] JDK 1.5 Sample Code 원문 : http://blog.naver.com/sj99yang/140002147454 JDK 1.5 has some very useful enhancements.  Thanks to Josh Bloch of Sun Microsystems for helpful hints.Early Access: there is an interactive version of this page here where you can post your code fragments to the community at large.--------------------------------------------------------------------------------------1.AutoboxingJava's distinction ..
Java Programming - Why this warning comes when i use Generics in java1.5 Why this warning comes when i use Generics in java1.5? "The cast fromObject to List is actually checking against the erased type of List" I m getting this warning whenever I am fetching any List from a Map object. headerList = (List)listMap.get("headerList"); Re: Why this warning comes when i use Generics in java1.5? The cast fromObject to List is actually checking against the erased type of Lis..