If you met this error, or you compile swf but it's can not run correctly without any error message. It's mean the java machine's memory is not enough for Flash CS5 to complile.
A solution for all of you who are having this issue again with CS5 here:
http://www.bhootnath.in/blog/?p=73
1. Quit Flash
2. In a text editor, open the jvm.ini file from the following location:
2.1. Windows XP: System Hard Disk\Documents and Settings\\Local Settings\Application Data\Adobe\Flash CS5\\Configuration\ActionScript 3.0\jvm.ini
2.2. Windows Vista or Windows7: System Hard Disk\Users\\AppData\Local\Adobe\Flash CS5\\Configuration\ActionScript 3.0\jvm.ini
(You might need to turn on “show hidden files”winking
3. Change -Xmx128m to -Xmx256m and save the file.
OR -Xmx314m OR -Xmx512m.
Thursday, December 16, 2010
Sunday, November 21, 2010
Subtraction between 2 dates
function dateSubtraction(d1y:int,d1m:int,d1d:int, d2y:int,d2m:int,d2d:int): Number { |
Wednesday, November 10, 2010
[Sencha Touch] [List Disclosure] Change icon
To change discloure icon, you must change two properties: -webkit-mask and -webkit-mask-box-image
For example
.examplelist .x-disclosure {
-webkit-mask: 0 0 url('../images/down-icon.png') no-repeat;
-webkit-mask-box-image: url('../images/down-icon.png');
}
For example
.examplelist .x-disclosure {
-webkit-mask: 0 0 url('../images/down-icon.png') no-repeat;
-webkit-mask-box-image: url('../images/down-icon.png');
}
Thursday, July 29, 2010
How to get a custom cursor in an AIR Window
I was testing custom cursors in an AIR Window this past week and I found some strange behavior. If tried to change the default cursor in an AIR Window by calling :
CursorManager.setBusyCursor()
The cursor in the main WindowedApplication changed rather than the cursor in my AIR Window. So, how could I change just the cursor in my AIR Window. The answer is to use a lower case “cursorManager” on the Window. So, I needed to call:
myAIRWindow.cursorManager.setBusyCursor();
Source from http://butterfliesandbugs.wordpress.com/2008/09/04/how-to-get-a-custom-cursor-in-an-air-window/
CursorManager.setBusyCursor()
The cursor in the main WindowedApplication changed rather than the cursor in my AIR Window. So, how could I change just the cursor in my AIR Window. The answer is to use a lower case “cursorManager” on the Window. So, I needed to call:
myAIRWindow.cursorManager.setBusyCursor();
Source from http://butterfliesandbugs.wordpress.com/2008/09/04/how-to-get-a-custom-cursor-in-an-air-window/
Thursday, July 22, 2010
Programming in Object-C 2.0
This book is divided into three logical parts. Part I,“The Objective-C 2.0 Language,”
teaches the essentials of the language. Part II,“The Foundation Framework,” teaches how
to use the rich assortment of predefined classes that form the Foundation framework. Part
III,“Cocoa Programming and the iPhone SDK,” gives you an overview of Cocoa’s Application
Kit framework and then walks you through the process of developing a simple
iPhone application using the UIKit framework, and developing and debugging the code
with Xcode and Interface Builder.
A framework is a set of classes and routines that have been logically grouped together to
make developing programs easier. Much of the power of programming in Objective-C
rests on the extensive frameworks that are available.
Chapter 2,“Programming in Objective-C,” begins by teaching you how to write your
first program in Objective-C.
Because this is not a book on Cocoa programming, graphical user interfaces (GUIs)
are not extensively taught and are hardly even mentioned until Part III. So an approach
was needed to get input into a program and produce output. Most of the examples in this
text take input from the keyboard and produce their output in a window: a Terminal
window if you’re using gcc from the command line, or a Console window if you’re using
Xcode.
Chapter 3,“Classes, Objects, and Methods,” covers the fundamentals of object-oriented
programming.This chapter introduces some terminology, but it’s kept to a minimum.
I also introduce the mechanism for defining a class and the means for sending
messages to instances or objects. Instructors and seasoned Objective-C programmers will
notice that I use static typing for declaring objects. I think this is the best way for the student
to get started because the compiler can catch more errors, making the programs
more self-documenting and encouraging the new programmer to explicitly declare the
data types when they are known.As a result, the notion of the id type and its power is not
fully explored until Chapter 9,“Polymorphism, Dynamic Typing, and Dynamic Binding.”
Chapter 4,“Data Types and Expressions,” describes the basic Objective-C data types
and how to use them in your programs.
Chapter 5,“Program Looping,” introduces the three looping statements you can use in
your programs: for, while, and do.
Making decisions is fundamental to any computer programming language. Chapter 6,
“Making Decisions,” covers the Objective-C language’s if and switch statements in detail.
Chapter 7,“More on Classes,” delves more deeply into working with classes and objects.
Details about methods,multiple arguments to methods, and local variables are discussed
here.
Chapter 8,“Inheritance,” introduces the key concept of inheritance.This feature makes
the development of programs easier because you can take advantage of what comes from
above. Inheritance and the notion of subclasses make modifying and extending existing
class definitions easy.
Chapter 9 discusses three fundamental characteristics of the Objective-C language.
Polymorphism, dynamic typing, and dynamic binding are the key concepts covered here.
Chapters 10–13 round out the discussion of the Objective-C language, covering issues
such as initialization of objects, protocols, categories, the preprocessor, and some of the
underlying C features, including functions, arrays, structures, and pointers.These underlying
features are often unnecessary (and often best avoided) when first developing objectoriented
applications. It’s recommended that you skim Chapter 13,“Underlying C
Features,” the first time through the text and return to it only as necessary to learn more
about a particular feature of the language.
Part II begins with Chapter 14,“Introduction to the Foundation Framework,” which
gives an introduction to the Foundation framework and how to access its documentation.
Chapters 15–19 cover important features of the Foundation framework.These include
number and string objects, collections, the file system, memory management, and the
process of copying and archiving objects.
By the time you’re done with Part II, you will be able to develop fairly sophisticated
programs in Objective-C that work with the Foundation framework.
Part III starts with Chapter 20,“Introduction to Cocoa.” Here you’ll get a quick
overview of the Application Kit that provides the classes you need to develop sophisticated
graphical applications on the Mac.
Chapter 21,“Writing iPhone Applications,” introduces the iPhone SDK and the UIKit
framework.This chapter illustrates a step-by-step approach to writing a simple iPhone (or
iTouch) application, followed by a calculator application that enables you to use your
iPhone to perform simple arithmetic calculations with fractions.
Because object-oriented parlance involves a fair amount of terminology,Appendix A,
“Glossary,” provides definitions of some common terms.
Appendix B,“Objective-C Language Summary,” gives a summary of the Objective-C
language, for your quick reference.
Appendix C,“Address Book Source Code,” gives the source code listing for two classes
that are developed and used extensively in Part II of this text.These classes define address card and address book classes. Methods enable you to perform simple operations such as
adding and removing address cards from the address book, looking up someone, listing
the contents of the address book, and so on.
After you’ve learned how to write Objective-C programs, you can go in several directions.
You might want to lean more about the underlying C programming language—or
you might want to start writing Cocoa programs to run on Mac OS X, or develop more
sophisticated iPhone applications. In any case,Appendix D,“Resources,” will guide you in the right direction.
Download
teaches the essentials of the language. Part II,“The Foundation Framework,” teaches how
to use the rich assortment of predefined classes that form the Foundation framework. Part
III,“Cocoa Programming and the iPhone SDK,” gives you an overview of Cocoa’s Application
Kit framework and then walks you through the process of developing a simple
iPhone application using the UIKit framework, and developing and debugging the code
with Xcode and Interface Builder.
A framework is a set of classes and routines that have been logically grouped together to
make developing programs easier. Much of the power of programming in Objective-C
rests on the extensive frameworks that are available.
Chapter 2,“Programming in Objective-C,” begins by teaching you how to write your
first program in Objective-C.
Because this is not a book on Cocoa programming, graphical user interfaces (GUIs)
are not extensively taught and are hardly even mentioned until Part III. So an approach
was needed to get input into a program and produce output. Most of the examples in this
text take input from the keyboard and produce their output in a window: a Terminal
window if you’re using gcc from the command line, or a Console window if you’re using
Xcode.
Chapter 3,“Classes, Objects, and Methods,” covers the fundamentals of object-oriented
programming.This chapter introduces some terminology, but it’s kept to a minimum.
I also introduce the mechanism for defining a class and the means for sending
messages to instances or objects. Instructors and seasoned Objective-C programmers will
notice that I use static typing for declaring objects. I think this is the best way for the student
to get started because the compiler can catch more errors, making the programs
more self-documenting and encouraging the new programmer to explicitly declare the
data types when they are known.As a result, the notion of the id type and its power is not
fully explored until Chapter 9,“Polymorphism, Dynamic Typing, and Dynamic Binding.”
Chapter 4,“Data Types and Expressions,” describes the basic Objective-C data types
and how to use them in your programs.
Chapter 5,“Program Looping,” introduces the three looping statements you can use in
your programs: for, while, and do.
Making decisions is fundamental to any computer programming language. Chapter 6,
“Making Decisions,” covers the Objective-C language’s if and switch statements in detail.
Chapter 7,“More on Classes,” delves more deeply into working with classes and objects.
Details about methods,multiple arguments to methods, and local variables are discussed
here.
Chapter 8,“Inheritance,” introduces the key concept of inheritance.This feature makes
the development of programs easier because you can take advantage of what comes from
above. Inheritance and the notion of subclasses make modifying and extending existing
class definitions easy.
Chapter 9 discusses three fundamental characteristics of the Objective-C language.
Polymorphism, dynamic typing, and dynamic binding are the key concepts covered here.
Chapters 10–13 round out the discussion of the Objective-C language, covering issues
such as initialization of objects, protocols, categories, the preprocessor, and some of the
underlying C features, including functions, arrays, structures, and pointers.These underlying
features are often unnecessary (and often best avoided) when first developing objectoriented
applications. It’s recommended that you skim Chapter 13,“Underlying C
Features,” the first time through the text and return to it only as necessary to learn more
about a particular feature of the language.
Part II begins with Chapter 14,“Introduction to the Foundation Framework,” which
gives an introduction to the Foundation framework and how to access its documentation.
Chapters 15–19 cover important features of the Foundation framework.These include
number and string objects, collections, the file system, memory management, and the
process of copying and archiving objects.
By the time you’re done with Part II, you will be able to develop fairly sophisticated
programs in Objective-C that work with the Foundation framework.
Part III starts with Chapter 20,“Introduction to Cocoa.” Here you’ll get a quick
overview of the Application Kit that provides the classes you need to develop sophisticated
graphical applications on the Mac.
Chapter 21,“Writing iPhone Applications,” introduces the iPhone SDK and the UIKit
framework.This chapter illustrates a step-by-step approach to writing a simple iPhone (or
iTouch) application, followed by a calculator application that enables you to use your
iPhone to perform simple arithmetic calculations with fractions.
Because object-oriented parlance involves a fair amount of terminology,Appendix A,
“Glossary,” provides definitions of some common terms.
Appendix B,“Objective-C Language Summary,” gives a summary of the Objective-C
language, for your quick reference.
Appendix C,“Address Book Source Code,” gives the source code listing for two classes
that are developed and used extensively in Part II of this text.These classes define address card and address book classes. Methods enable you to perform simple operations such as
adding and removing address cards from the address book, looking up someone, listing
the contents of the address book, and so on.
After you’ve learned how to write Objective-C programs, you can go in several directions.
You might want to lean more about the underlying C programming language—or
you might want to start writing Cocoa programs to run on Mac OS X, or develop more
sophisticated iPhone applications. In any case,Appendix D,“Resources,” will guide you in the right direction.
Download
Tuesday, July 20, 2010
Build ObjectC on Windows with Foundation frameworks
Use
gcc `gnustep-config --objc-flags` -o hello hello.m -L C:/GNUstep/GNUstep/System/Library/Libraries -lobjc -lgnustep-base
on Shell command line.
view more
gcc `gnustep-config --objc-flags` -o hello hello.m -L C:/GNUstep/GNUstep/System/Library/Libraries -lobjc -lgnustep-base
on Shell command line.
view more
Monday, July 19, 2010
iPhone touch motion
View
import flash.events.MouseEvent; |
DisplayUtils and fitIntoRect
Useful to create thumbnails and resizing
From http://blog.soulwire.co.uk/code/actionscript-3/fit-a-displayobject-into-a-rectangle
From http://blog.soulwire.co.uk/code/actionscript-3/fit-a-displayobject-into-a-rectangle
Sunday, July 18, 2010
Slide Transition
View DEMO
How to use:
import binhpro.SlideTransition; |
SlideTransition.as
package binhpro { //binhpro.SlideTransition |
ClickPageEvent.as
package binhpro { //binhpro.ClickPageEvent |
ImageUtils.as
package binhpro.utils { // binhpro.utils.ImageUtils |
Friday, July 16, 2010
Grid of Items Container
This post introduces to you a container that can help you create a grid of items that list in horizontal or vertical direction.
You can customize the ItemRenderer and ScrollBar by passing the name of it's Linkage Class.
HORIZONTAL CANVAS:
VIEW
VERTICAL CANVAS:
VIEW
EXAMPLE CODE:
Checkout SVN: https://flashtraining.googlecode.com/svn/trunk/AS3/BDCFramework
You can customize the ItemRenderer and ScrollBar by passing the name of it's Linkage Class.
HORIZONTAL CANVAS:
VIEW
VERTICAL CANVAS:
VIEW
EXAMPLE CODE:
import binhdocco.containers.canvas.Canvas; |
Checkout SVN: https://flashtraining.googlecode.com/svn/trunk/AS3/BDCFramework
Subscribe to:
Posts (Atom)