Actionscript 3 trace instance name

Thursday, December 23, 2010 at 1:35 PM
While I was working on a Flash project with AS 3.0 involved, I happen to deal with a weird problem when I want to get the instance name by using code. It always ends in names like "instance11" or "instance61". At last, I found out the solution to this problem. Here it is:



 Assuming I have a button named "btnTest" on stage and I want to get the instance name . Normally we usually code like this:


btnTest.addEventListener(MouseEvent.CLICK, clkTest);

private function clkTest(e:MouseEvent):void {

trace(e.target.name) // It'd output something random like "instance61" instead of the instance name of the MC you are targeting,
}

you should change a little bit, just 1 line of code, like this:
e.currentTarget.name

Finally, I get the proper result.
trace(e.currentTarget.name) // It'd output "btnTest"

Convert bitmap to vector

Tuesday, December 21, 2010 at 12:36 AM

 Okie, this post is originally posted here. But I find it very useful especially when you're dealing with the "convert from raster to vector" problem in AI . It's a nice and easy way do achieve the result . So far so good, here it is.

Use Live Trace to Create Line Art in Adobe Illustrator

The Live Trace tool which was introduced into Adobe Illustrator CS2 is great for tracing line art, or even photos. Earlier trace tools weren't worth using if you wanted to create something with any accuracy - but that's all changed. Adobe Streamline was a standalone tracing product (to create vector graphic versions of rasterized images) which was improved, integrated into CS2, and renamed Live Trace. Here is how to use it to create accurate, clean line art in Illustrator. Below is a public domain image which I'll use as an example.

If your image is going to be black and white line art, it's best to make the edges as clearly defined as possible in Photoshop by using the levels tool (and possibly threshold as well). Place the image to be traced in Illustrator by selecting File/Place... Once it's placed, select the image and go to Object/Live Trace/Tracing Options... This will open the Live Trace dialogue box.

Click the Preview checkbox on the right. Select Black and White under Mode (or Grayscale if you'd like to include anti-aliasing). Adjust the settings until you're happy with the results. With Preview selected, this can be quite a time-consuming process depending on the speed of the computer you're using, but I've found it's the only way to get good results. For this image I used the settings as shown below.

When you're happy with the look of the line art, select Object/Live Trace/Expand. This will delete the original image from the layer and replace it with the new vectorized line art illustration. If you'd like to keep the original in the document, duplicate the layer containing the image before making the conversion.

You'll end up with a vectorized line art facsimile of the original. The accuracy of the line art depends on the resolution of the original and the settings you selected in the Tracing Options dialogue box. It's a trade off really - the more accurate the result, the more anchor points on the vector graphic, and the slower the machine creates it - but it still does a better job than Adobe Streamline ever did.

And here's the result. A clean, vectorized, infinitely scaleable piece of line art.

Merge 2 vector objects

Monday, December 20, 2010 at 8:35 PM
This is a problem which I run into when I was designing a logo for my class ( well, I'm still a newbie when it comes to AI, I know). And after minutes of googling I found out the solution, it's quite simple.
  • To merge two connected objects you could select both and use Window/Pathfinder: Add...
  • If they are not connected and they are not in groups you could select both and Object/Compound Path/Make.
That's all. Hope this can help someone out there stuck in the same problem like me.

How to Code C++ in XCode

Thursday, October 1, 2009 at 11:52 PM
I've just googled "how to code C++ in XCode " and I trust that I'm not the only one on this planet trying to find a way. And Voila , here is the way, though it cannot work with windows form or something like that or at least I still don't figure out yet, this is just command line but it's still better than nothing , right ?
Assuming you're up to date with XCode 3, I can get you started in 30 seconds:
1. Open XCode.
2. File/New Project...
3. In the "New Project" Assistant, expand the "Command Line Utility" group.
4. Select "C++ Tool"
5. Click "Next"
6. Give a project name and directory, then click "Finish".
7. Press Cmd-Shift-R to open the Console window. Output will appear there.
8. Click the "Build and Go" toolbar button.

That's it. Hello World done. From there you'll probably want to edit main.cpp to do other things.

"Do your work, don't be stupid"

Monday, August 31, 2009 at 3:19 AM


Recently I came across a nice wallpaper saying "Do your work, don't be stupid" and honestly I loved it from the first time. Motivational phrase like this really has a point on me. I know sometimes while I'm working on the computer, I tend to wind up doing some stuff but my work and since the day it was set as my default wallpaper for a little instant motivation, it really worked, this kind of wallpaper really bails me out. you know, looking right out there and seeing my friends working really hard then sit back, size things up , I'm sure that if you're surrounded by people who are motivated like that then you can't help but become more motivated yourself, and if you get somethings like this right in front of you whenever it comes up to the laziness, I think you get even more motivated :)
Just though I should share this wallpaper because I'm sure I'm not alone in this dilemma. if you're interested and for the best performance, leave your screen resolution here and I will send you as soon as I read your comment





I AM ME - I AM THE END

Sunday, August 16, 2009 at 9:29 AM

Hey there blogger,
It's been quite a long time to see me around me. soooo sorry, well , honestly I don't know what to write and how to bring the new atmosphere back to the zone .. I was trying the best to make it, here's another piece I've just made last night, this one it took more than one hour to finish it up and the result is what I was expecting. hope you guys like it. , big thank from Vietnam to abduzeedo and daily inspiration section

Collected Quotes from Albert Einstein

Wednesday, July 22, 2009 at 9:06 PM

[Note: This list of Einstein quotes was being forwarded around the Internet in e-mail, so I decided to put it on my web page. I'm afraid I can't vouch for its authenticity, tell you where it came from, who compiled the list, who Kevin Harris is, or anything like that. Still, the quotes are interesting and enlightening.]

Collected Quotes from Albert Einstein

  • "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
  • "Imagination is more important than knowledge."
  • "Gravitation is not responsible for people falling in love."
  • "I want to know God's thoughts; the rest are details."
  • "The hardest thing in the world to understand is the income tax."
  • "Reality is merely an illusion, albeit a very persistent one."
  • "The only real valuable thing is intuition."
  • "A person starts to live when he can live outside himself."
  • "I am convinced that He (God) does not play dice."
  • "God is subtle but he is not malicious."
  • "Weakness of attitude becomes weakness of character."
  • "I never think of the future. It comes soon enough."
  • "The eternal mystery of the world is its comprehensibility."
  • "Sometimes one pays most for the things one gets for nothing."
  • "Science without religion is lame. Religion without science is blind."
  • "Anyone who has never made a mistake has never tried anything new."
  • "Great spirits have often encountered violent opposition from weak minds."
  • "Everything should be made as simple as possible, but not simpler."
  • "Common sense is the collection of prejudices acquired by age eighteen."
  • "Science is a wonderful thing if one does not have to earn one's living at it."
  • "The secret to creativity is knowing how to hide your sources."
  • "The only thing that interferes with my learning is my education."
  • "God does not care about our mathematical difficulties. He integrates empirically."
  • "The whole of science is nothing more than a refinement of everyday thinking."
  • "Technological progress is like an axe in the hands of a pathological criminal."
  • "Peace cannot be kept by force. It can only be achieved by understanding."
  • "The most incomprehensible thing about the world is that it is comprehensible."
  • "We can't solve problems by using the same kind of thinking we used when we created them."
  • "Education is what remains after one has forgotten everything he learned in school."
  • "The important thing is not to stop questioning. Curiosity has its own reason for existing."
  • "Do not worry about your difficulties in Mathematics. I can assure you mine are still greater."
  • "Equations are more important to me, because politics is for the present, but an equation is something for eternity."
  • "If A is a success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut."
  • "Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
  • "As far as the laws of mathematics refer to reality, they are not certain, as far as they are certain, they do not refer to reality."
  • "Whoever undertakes to set himself up as a judge of Truth and Knowledge is shipwrecked by the laughter of the gods."
  • "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones."
  • "In order to form an immaculate member of a flock of sheep one must, above all, be a sheep."
  • "The fear of death is the most unjustified of all fears, for there's no risk of accident for someone who's dead."
  • "Too many of us look upon Americans as dollar chasers. This is a cruel libel, even if it is reiterated thoughtlessly by the Americans themselves."
  • "Heroism on command, senseless violence, and all the loathsome nonsense that goes by the name of patriotism -- how passionately I hate them!"
  • "No, this trick won't work...How on earth are you ever going to explain in terms of chemistry and physics so important a biological phenomenon as first love?"
  • "My religion consists of a humble admiration of the illimitable superior spirit who reveals himself in the slight details we are able to perceive with our frail and feeble mind."
  • "Yes, we have to divide up our time like that, between our politics and our equations. But to me our equations are far more important, for politics are only a matter of present concern. A mathematical equation stands forever."
  • "The release of atom power has changed everything except our way of thinking...the solution to this problem lies in the heart of mankind. If only I had known, I should have become a watchmaker."
  • "Great spirits have always found violent opposition from mediocrities. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence."
  • "The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science. He to whom this emotion is a stranger, who can no longer pause to wonder and stand rapt in awe, is as good as dead: his eyes are closed."
  • "A man's ethical behavior should be based effectually on sympathy, education, and social ties; no religious basis is necessary. Man would indeeded be in a poor way if he had to be restrained by fear of punishment and hope of reward after death."
  • "The further the spiritual evolution of mankind advances, the more certain it seems to me that the path to genuine religiosity does not lie through the fear of life, and the fear of death, and blind faith, but through striving after rational knowledge."
  • "Now he has departed from this strange world a little ahead of me. That means nothing. People like us, who believe in physics, know that the distinction between past, present, and future is only a stubbornly persistent illusion."
  • "You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat."
  • "One had to cram all this stuff into one's mind for the examinations, whether one liked it or not. This coercion had such a deterring effect on me that, after I had passed the final examination, I found the consideration of any scientific problems distasteful to me for an entire year."
  • "...one of the strongest motives that lead men to art and science is escape from everyday life with its painful crudity and hopeless dreariness, from the fetters of one's own ever-shifting desires. A finely tempered nature longs to escape from the personal life into the world of objective perception and thought."
  • "He who joyfully marches to music rank and file, has already earned my contempt. He has been given a large brain by mistake, since for him the spinal cord would surely suffice. This disgrace to civilization should be done away with at once. Heroism at command, how violently I hate all this, how despicable and ignoble war is; I would rather be torn to shreds than be a part of so base an action. It is my conviction that killing under the cloak of war is nothing but an act of murder."
  • "A human being is a part of a whole, called by us _universe_, a part limited in time and space. He experiences himself, his thoughts and feelings as something separated from the rest... a kind of optical delusion of his consciousness. This delusion is a kind of prison for us, restricting us to our personal desires and to affection for a few persons nearest to us. Our task must be to free ourselves from this prison by widening our circle of compassion to embrace all living creatures and the whole of nature in its beauty."
  • "Not everything that counts can be counted, and not everything that can be counted counts." (Sign hanging in Einstein's office at Princeton)

Copyright: Kevin Harris 1995 (may be freely distributed with this acknowledgement)

Workstation of popular websites

Tuesday, July 7, 2009 at 9:18 PM
source: http://www.webdesignerdepot.com/2009/02/the-workstations-of-popular-websites/

As a blogger myself, I’ve always wondered what other people’s workstations look like. I realize many of you probably wonder the same thing, so I’ve decided to prepare this post which includes photos of work spaces from popular blogs and websites.

Most pictures show Mac computers being used, sometimes in conjunction with PC’s and/or laptops. It’s also interesting to see how some spaces are very clean and minimalistic, while others draw inspiration from busier set ups.

Thanks to all of you that participated in this fun article and sent their images. Finally, if you have a popular website or blog and would like to be featured here, simply contact me so that I can include it here. The article will be expanded as other photos get submitted over the coming days.

Now, let’s go explore some interesting workstations and get inspired…


Chris Spooner’s SpoonGraphics


Brian Hoff’s The Design Cubicle


Darren Rowse’s Problogger


Jay Hilgert’s BittBox


Elliot Jay Stocks


Walter Apai’s Webdesigner Depot


Jonathan Snook’s Snook


Henry Jones’ WebDesignLedger


Gino Orlandi’s YouTheDesigner


Wolfgang’s Bartelme


Navdeep Raj’s Dezinerfolio


Steven Snell’s DesignM.ag and Vandelay Design


Dan Rubin’s SuperfluousBanter


Todd Garland’s BuySellAds


Scott Willoughby’s SEOMoz


Nick La’s Web Designer Wall


Gabriel Segura’s CSS Mania


Chris Coyier’s CSS-Tricks


InstantShift


Kai Loon’s Kailoon


Niki Brown’s The Design O’Blog


Toxel


James Qu’s PSD Vault


David and Marc Perel’s We Are Not Freelancers


Frank Jeitz’s FudgeGraphics


Matt Cronin’s Spoonfed Design


Adelle Charles’ Fuel Your Creativity


David Appleyard’s Design Shack and David Appleyard.net


Jacob Cass’ Just Creative Design


Dmitry Fadeyev’s Usability Post


Andrew Houle’s My Ink Blog


Daved’s Broche’s Outlaw Design Blog


Alex Giron’s CSS Beauty


Alen Grakalic’s CSS Globe


Eli Burford’s Design Blurb


Eva Sajdak & Paul Wozniak’s My Photoshop Brushes


John Mills’ CSS Remix


Liam McKay’s We Function


Chad Mueller’s Inspiredology


Jan’s Dawghouse


Aran Down’s Studio 7 Designs

david-desk-messy
David Legget’s Tutorial 9

david-airey-office-1
David Airey

darius_desktop_615
Darius Monsef’s Colour Lovers

source: http://www.webdesignerdepot.com/2009/02/the-workstations-of-popular-websites/