TopplistanWebbdesignDetaljer för "Hint - Flash, AS3, Design Patterns and More."

Hint - Flash, AS3, Design Patterns and More.


Hint - Flash, AS3, Design Patterns and More.
A blog in broken English about Flash, AS3, Design Patterns, Music, Games and More.

Artiklar

Vinbergs GK ? Tölltorpsslingan 10-18
2009-09-23 17:57:00
(What's the Story) Morning Glory? Well I became a father for six weeks ago! So It hasn´t been much work or golf since then. But today (tonight) when I woke up by 3 am I realized, since I don?t get much sleep at nights I can go for a golf round instead? At this time of the year It is almost daylight 24?7 in Sweden. I arrived to the parking lot of the golf club at 5 am. I thought that I would be the first one out there, but no! There was another crazy guy already there. But I managed to cut him off before the first tee so I become the first one out on the course! The final score isn´t much to brag about. Taking some time of the game didn´t seems to help my putting at all. I really need some serious help. I played the round with a half set of clubs, driver, 3w , 4i, 6i, 8i, 9i, pw, sw and putter, and I finished the round in just under 2,5 hours. I think it was one of my fastest rounds ever made.5:45 am. Hole nr 6. Par 5. A perfect drive that I found blocked by a wall of trees. I wasn´...
Vinbergs GK ? Tölltorpsslingan 10-18 (Flag Tournament)
2009-09-23 17:57:00
This round was played for quite a long time ago. In fact I haven?t played since then (you can see why on the scoreboard). It was one of my strangest round ever played. The putting statistics are just mental. As you can see I did a six(!) putt on hole four. Ok, here what?s happened. The flag was placed on the right plateau of a green that has a very aggressive undulation. I missed the plateau to the left and found myself with a steep 6 meters uphill putt. Unfortunately my putting line where cut off by a bit of fore green, so aimed a bit to the left of the hole. Off course I missed and the ball were slowed down by the higher grass and didn?t make it up the hill. The ball ran back to where I started from. And I did this mistake not only once but four times before a managed to nail the ball on the higher plateau? And with a start like that I didn?t manage to get my putting back in shape. In fact I ended up with a total of 45 puts! My shots where all used at the 16:th green so I had plac...
HStage ? MouseUpOutside Functionality in AS3
2009-09-23 17:57:00
When I where on out on my jogging round earlier today I started to think about a better way to deal with what in AS2 was called MouseUpOutside Events. In AS3 you have to listen for MouseUp events on the stage like this - ?stage.addEventListener(MouseEvent.MOUSE_UP, stageMouseUpEventHandler?. But if you remove the displayObject from the stage without first deactivating the listeners, the displayObject will not garbage collect. That´s why you are learned that you should never add a listener to the stage, if you do you could end up with some serious memory problems. So I came up whit this solution. I created a Singleton class named HStage which is now taking care of the stage listening. The class listens for events on the stage and dispatches new events with information about what´s happening on the stage. Then I simply use weak listeners to that class. Off course you have to add the HStage class to the stage to make it work.Download Source Files
IKEA Wall Decoration
2009-09-23 17:57:00
Before the end of last week my wife and I went to Borås for a stop at our favorite vintage store (no, we will not tell the name of the store). We went there for a couple of weeks ago and ended up with a fully loaded car before heading back to Gothenburg. This time we decided that we should hold back our spending. But even if you go there with a tinier budget you could found some nice things to buy. We bought this plastic wall decoration from IKEA probably manufactured somewhere around late 70:s or early 80:s? The chair and the lamp ?bumling? as you see on the picture were actually bought when we went there last time.
HTween - Performance Test
2009-09-23 17:57:00
The development of my tween engine ?HTween? have been on pause for a while due to other projects, flue, vacations and other things. But now I have made a little performance test on it. I´m comparing it with Greensocks ?TweenLite? which they say it?s the fastest tweening engine out there. This comparison shows that the HTween is keeping up really well. So I think I?m on the right track. So what are the results showing? I simply measure the amount of time in milliseconds that has passed from the start of the tweens to the end of the tweens. Then I calculate the average value between every frame (ms/f = milliseconds/frame). Later on I will test it with more parameters and on a heavier load.
Vinbergs GK ? Tölltorpsslingan 10-18
2009-09-23 17:57:00
I went up in the early morning with hopes of being the first one out on the course. When being all alone out there I aiming for a completion of the round in 2,5 hours. Unfortunately there where already a group of ten men out there so I had to change my plans. So instead I started on the tenth hole and headed for a nine hole play. The last nine are a bit more challenging and because of the early morning cold my expectations on the first holes wasn?t too high but I started off quite well with two pars. Then my tee shots began to put me into problem? I ended up with a score containing two triple bogies, one double bogie, one birdie and pars on the rest. The birdie on the eighteen was a tap in birdie. In fact I had a two meters put for an eagle but as you can read from the statistics my putting is not so good.
HButtonGlossy - Flash buttons with IPhone look
2009-09-23 17:57:00
Here it is. The flash button with the IPhone look. Use it, share it and change it the way you want!The features is described within the classes. The demo shows the implementation and the autoSize function.>> Download Source Files and Example
Marissa Nadler ? Little Hells (Album)
2009-09-23 17:57:00
With here atmospheric voice and here folk-rock influenced songs she will conquer the world. A very good album that will grow for every time you listen to It.
HShape tested with HTween
2009-09-23 17:57:00
The Easter has almost come to an end. It hasn´t been so much development over the weekend but some progression has been made in the development of the HShape class. This demo shows two Cubic Bezier segments drawn with the cubicCurveTo() function. When dragging the first vertex of the second segment the last vertex of the first segment follows. I have also added some data reading functions to the HShape class, I?m using two of them in this example. When you drag the ball and drop it somewhere on the stage the ball tweens to the neareast point of the curve. That is done by calling the nearastPoint() function of the curve, the function returns a Point object.During the development of the nearastPoint() function I couldn?t resist to test if I could get the ball to tween along the curve. The nearestPoint function works in conjunction with a getPointOnCurve() function. The getPointOnCurve() takes a position (pos) value from 0 to 1 (0 is equal to the starting point of the curve and 1 is eq...
Götaströms GK ? 1-18
2009-09-23 17:57:00
Where the wheels keep on running?This is where I ended up after a 250 meters drive on the 19:th hole. 150 meters left to go.18:th hole. Easy birdie!First round of the year! Götaström is a really challenging golf course. It is surrounded by thousands of pine trees which are very significant for this part of Sweden called Småland. The fairways are very narrow and the holes are sometimes quite long. So you better practice some target shooting with your driver and your spoon before you thinking of coming here. I really had a lucky day with my tee shots but as you can see my putting was catastrophic.
HShape cubicCurveTo() by Midpoint Approximation
2009-09-23 17:57:00
The HShape class is now taking form. My idea is to make a layer on top the Shape class and make a similar interface as the built in Graphic class. The curve data is separated from the input interface (vertex and handles) by a ?Modell View Pattern? approach. It will be possible to change the look of the vertexes and the handles at runtime. When manipulating the vertexes and the handles the data model updates and when it does, the segments classes recalculate its data. In this example it´s the ?HShapeSegmentCubicCurve.as? class who recalculates it´s two vertexes (containing one corresponding handle each) to five new vertexes which is calculated from a ?Generic Midpoint Approach?. When that is done the built in graphics.curveTo() function uses those five vertexes to draw the curve. This is how the code looks like for drawing the initial line shown in the ?CubicCurveTo.swf? example. You can manipulate the curve by dragging the vertexes and their handles.
Poor performance in Flash Player 10 with NVIDIA GPU:s
2009-09-23 17:57:00
The problems appear in the standalone player when going into full screen mode. I´ve tried to find information about this on the Internet, but there isn´t much to find. The problems seem to occur when flash is running on a client equipped with an NVidia graphic board and I also found out that there is a significant frame rate slowdown when using Display Objects in front of FLV-movies. Adobe says that it´s all related to the firmware of the graphic board so we can only wait for NVidia to fix the problems. Here is a list of things you can try out to avoid the problem.1. If you´re not using Flash Player 10 specific AS3 code you can open up your project in Flash CS3 and then export it from there, then the Flash Player 9 will be embedded in your standalone player and the problems will be gone.2. Avoid placing Display Objects in front of Flash Video.3. If you have to use Display Objects in front of your video content in Flash CS4 you can try to place your movie in a separate SWF. Then load...
Cubic Bezier Curves
2009-09-23 17:57:00
Yesterday I started to work on a file explorer for my Code Viewer when I released that I needed a better way to serialize the glossy icons (IPhone Style) that I´m using in the application (and for the linking icons I use in my blog). So I started to plan a ButtonGlossy class. When doing that I started to think about the little roundness which makes the glossiness looks like it shines on a convex surface. Drawing a curved line like that with code is a bit of a pain in Flash. Flash uses Quadratic Bezier for curve drawing. A Quadratic Bezier uses three control points, one starting point, one control handle and one ending point. I want a nicer and more dynamic way to draw that curvature. I want the ability to set the amount of curvature with only one parameter. So I started to dig in to the world of Bezier Curves. The Cubic Bezier uses 4 control points and it´s the most commonly used Bezier type in drawing programs such as Illustrator and other vector drawing applications. Later on I wi...
Rokia Traoré ? Kounandi (Song)
2009-09-23 17:57:00
Rokia Traoré is part of the raising music scene from Mali which we have heard more and more from lately. This is a very moving and mellow song. Even though I don?t know what she sings about, this song moves me very much, but it also brings me in a good mood.
Singleton Pattern
2009-09-23 17:57:00
In most of your projects you want to have the possibility to access data globally. Cascading Style Sheets (CSS) is a good example of data you often need to access from many different classes. To accomplish this you need a class that only can be instanced once. The best way to accomplish this is by the use of this Design Pattern called Singleton Pattern. This Design Patterns is explained in the book ?Advanced ActionScript with Design Patterns?. View the example in the Hint Code Viewer, ?MySingletonClass.as?.
Fever Ray - Fever Ray (Album)
2009-09-23 17:57:00
The first solo album from Karin Dreyer (The Knife), Very dark and organic electronica filled with beautiful harmonies and melodies.
Extra line breaks removed in Code Viewer
2009-09-23 17:57:00
I have updated the Code Viewer so there is no extra line breaks displayed. My HString class is now taking care of this problem.
Genesis - Hairless Heart (Song)
2009-09-23 17:57:00
An amazing song from one of the best band ever. I listened to Genesis a lot when I was younger and I still return to the good old songs quite frequently. On this newly released compilation box called "Genesis Archive" I found this live version of "Hairless Heart" and it gave me what we in Sweden call "gåshud" (goose skin). Genesis were very often criticized for being to academic and not punk enough but take a look at some of the old live sessions that can be found on YouTube and you will find that they were a really cool rock band. Not many bands today delivers so much energy and authenticity on the stage.
Hint Code Viewer
2009-09-23 17:57:00
Before the launch of this blog I searched for a nice way to post code snippets. I´ve seen some nice examples of that on other sites. Unfortunately I couldn?t find a nice way to do that. Maybe someone knows how to do that? Instead I started to build my own code viewer in Flash. One of the advantages of doing it on my own was that I could design It the way I wanted. I thought it would be done in a rather short time but I run into some problems. One of the problems I found out was that I couldn´t load actionscript files into the swf:s because of the servers restriction in MIME-types. So I had to rename the extensions to .txt. Maybe there is a better way to this? Anyway, this is how the Hint Code Viewer looks right now. You have the ability to save the files and when you do that the files is once again renamed to .as. You can also view the code in a new window which makes the code more viewable.
Art by Mattias Norström
2009-09-23 17:57:00
Yesterday I was at Park Lane and watched the Pecha Kucha #13 event presented by ADA. The idea behind the conept ?Pecha Kucha? is that people get on a stage and shows 20 images for 20 seconds apiece, for a total time of 6 minutes and 40 seconds. Mattias Norstöm who is an artist and skateboard producer took the opportunity to auction 20 pieces of special designed art. I couldn?t resist to by the first one that was out for sale (thought that the first one would end up being the cheapest). A palm tree on a piece of plywood!
OLA INGVARSSON
2009-09-23 17:57:00
The personal portfolio for Ola Ingvarsson is up and running! As you might see it is in fact the same framework that I´m using for my website http://h-int.se/. The site is very easy to enlarge because of the multi leveled hierarchy built up by using dynamically loaded XML-files.Features:- Multileveled hierarchy and dynamically loaded content using XML.- Every level can be feeded with unlimited amount of textfields, pictures & swf:s.- Textfield can be individually formatted using external CSS-files.- Design on GUI items such as boarders on pictures, drop shadows and background picture can be edited in the main XML using global properties.Take a look at the site and Olas beautifully and talented work in the areas of art and graphical design - http://olaingvarsson.se/.
Advanced ActionScript with Design Patterns
2009-09-23 17:57:00
As the title of this blog says I will try to write something about using Design Patterns in conjunction with Actionscript 3.0. Actually I haven?t been around as a flashdeveloper for a very long time. I first started out as technical illustrator and from there I become more and more focused on using 3D-modelling and 3D-animation in my work. Back in the days I used Macromedia Director and Lingo-code for presentations. For a couple of years ago I started to use Flash. And at that time the demand for advertising using Flash on the Internet increased so I ended up doing more and more web campaigns. When the projects became more and more advanced I realized that I have to take my programming skills to a a higher level, so I bought Joey Lotts and Danny Pattersons book ?Advanced Actionscript 3 with Design Patterns?. And I must say coding ?the right way? was bit of a struggle in the beginning due to my lack of education in the areas of OOP. But today this book is one of my best friends and I...
18528 bloggar i topplistan.
Statistiken nollställs varje vecka.


Kontakta
© FeWorks Ltd 2010 - Stöds av Web Catalog - Sökmotoroptimering av FeWorks
eXTReMe Tracker