Issues With Embedding Flash SWF into Flex

3 Comments

Working on a project where I have a highly interactive Flash SWF that needed to be embedded in a Flex project. The thing would not work. Here’s what I did to get it to successfully embed.

  1. Use SWFLoader. If your Flash SWF is self contained and doesn’t access any outside resources, you’re pretty much set.
  2. For SWFLoader, be sure to specify the minWidth and minHeight properties.
  3. Remove/change the loaderInfo statement. stage.loaderInfo.parameters["someValue"]
    I was trying to get flashvars from the getgo and it was failing right here. Commenting out that line made it work.
  4. Here’s the kicker though – don’t embed your SWF. Load it dynamically. So this statement:
    <mx:SWFLoader width="100%" height="100%" source="@Embed(source='FlashAS3.swf')"
    scaleContent="false" autoLoad="true" minWidth="500" minHeight="400" />

    should look like this:

     <mx:SWFLoader width="100%" height="100%" source="FlashAS3.swf"
    scaleContent="false" autoLoad="true" minWidth="500" minHeight="400" /> 

    For some reason, when you embed the SWF, it doesn’t work.

  5. Finally, be sure to update all your paths if your SWF accesses resources such as XML and images dynamically.

Popularity: 32% [?]

Flash ActionScript stage.stageWidth vs stage.width

5 Comments

I was never clear on the differences between stageWidth and the width properties of the stage object. Here it is:

stage.stageWidth is the width of the Flash Player
stage.width is the width of content within the stage. So if you have nothing on the stage, stage.width would be 0.

Popularity: 95% [?]

5 Questions With Rock Star iPhone Developer: Shane Vitarana

4 Comments

Who are you and what do you do?
My name is Shane Vitarana and I’m currently an independent iPhone developer.

Tell us a little bit of background info about how you got into Facebook application development.
The Facebook platform initially lured me in because of the ability to reach millions of people with little effort. The barrier for many web app users is the login process. On my fitness site, MyFitBuddy.com, 90% of the users drop off at the signup page. Facebook alleviates this problem because all the apps just use your Facebook login credentials. This causes people to experiment with new apps with ease, and invite their friends to use them. Therefore, I thought it was a great platform to develop some fun apps for.

I have a tendency to work with platforms that have some kind of constraints. Constraints open the door to be really creative. Limited screen real-estate forces you to really think about design and layout in a new way. I think this is a factor that got me into both Facebook and iPhone development.

If you’re a Ruby on Rails developer, and curious about developing Facebook apps, check out my book: http://peepcode.com/products/rails-on-facebook.

What made you decide to go into iPhone application development?
iTunes is the #1 music retailer in the world right now. People are used to buying music and movies from it with relative ease. I think applying that to applications was a genius idea. It makes applications immediately available to people with a few clicks/touches, similar to how Facebook made applications easily available. You can buy an app for your iPhone with a minimum of 3 touches (App Store -> App -> Buy), without any login credentials. There has never been a simpler process for buying applications ever.

I saw it as a great opportunity as an independent developer to make iPhone apps. I love working on small projects that I can finish in 1-2 weeks. I have a low attention span and the App Store provides the perfect place for me to work on fun little projects and make a living out of it. The iPhone has been a huge success story for Apple, and is not going away anytime soon.

Can you talk about some of your iPhone applications and what we can expect from you in the future?
I currently have two applications in the App Store. Places uses the iPhone’s location capabilities to find nearby restaurants, coffee shops, nightlife, and shops. It is the only application in the store right now that lets you pick a cuisine and get reviews and ratings for nearby restaurants. There are a few similar apps, such as Yelp, Where To?, and Vicinity. Unfortunately many people are unable to distinguish the feature set between these apps. I made Places free for a limited time so people can try it and see how it is different from the other location-based apps.

Drum Kit has had much more success than Places. It has been one of the Top 25 paid applications for almost a month now. At one point it was #12 in the U.S Store, and in the Top 10 in some other countries. It is basically just a toy drum set on your phone. You can tap the heads to make sounds and it provides visual feedback. Ars Technica wrote a great review of Drum Kit: http://arstechnica.com/journals/apple.ars/2008/08/07/review-drumkit-for-iphone-a-toy-with-potential. Now that it has reached such a level of success, I have big plans on improving it. However it is tough to add features while keeping it super simple. I’m a stickler for simplicity so I have to go about it very carefully.


A screenshot of Shane’s best selling iPhone App: Drum Kit

I have a few more applications in the pipeline. On of them will be called Anthem Music Videos. It’s kind of like Pandora but for videos. You pick an artist, and it finds videos for that artist and similar artists. It launches the YouTube application where you can view the videos. I also want to make a game at some point.

My applications are at: http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewArtist?id=284976112 (iTunes link)

And finally, What advice would you give entrepreneurs going into business for themselves and/or looking to create software applications for the current web.
First and foremost, you must love what you are doing. You have to be the type of person who will build what you are building if it provided no monetary reward. I understand this may be to difficult if you have a family to support and other obligations, but it has been done. You have to be excited about your idea. You have to wake up super anxious to work your product, and want to see it come to fruition. If you are only focused on making money, you have already failed before you’ve begun.

You also need to be willing to take risks. I know countless people who have great ideas but are hesistant to leave their day jobs. You can still keep your day job and build a startup, if you put the time and effort into it. However, if you really believe in your product, quit your day job and do it full-time. Sometimes going into debt and being constrained financially will force you to get the product out there quickly. I quit doing client work for five months to learn the iPhone SDK, and it has paid off nicely so far..

Another piece of general advice is to not get caught in the planning phase forever. Just start building it. No elaborate design diagrams or documents are necessary. Forget the waterfall method, even forget the Agile development process. Process is for rank-n-file engineers, not passionate entrepreneurs/developers. Throw away the project management tools, story cards, the bug trackers. You don’t need that fluff for small projects. Process just bogs you down hampers creativity. I just have a simple todo list for each project. You really don’t need anything else besides a sketch pad and a todo list for a 1 – 3 person project.

Also, ideas don’t really have much value anymore. It’s all about the implementation and execution. Don’t worry about protecting your idea, screw NDAs. Just be open about it, find the right people, and build it. If you’re a developer and can code with relative ease, you don’t really need much in terms of resources. The barrier to entry is super low for both web application development, and even iPhone development. Furthermore, surround yourself with people who have a history of creating, and actually have something to produce, like open source projects. Then you’ll have a source of inspiration, and a pool of talent to tap into if you need additional help.

Your approach, however, should really depend on what kind of application you are building. Building consumer applications and business applications require very different models. A consumer “social” application generally has to be free, because people are used to social sites being free. To be able to afford hosting and development costs, you may need to seek Angel or VC funding. Business applications or consumer applications that you charge for don’t always need VC money to start out with. If your application is a success, you can use the revenue from version 1.0 to fund the rest of the development and hosting. Try as hard as possible to not get funding so you don’t have to answer to anyone, and can follow through with your vision. If you really need to, get funding from family/friends first.

For a consumer app, don’t simply think ad revenue is going to save you. Ads work on Google because of the search aspect. People are actively looking for something, and therefore are more likely to click on a targeted ad. If your application doesn’t have a search component, you need to build a substantial user-base to make any money off of ads. Building a huge user-base is hard work.

Finally, don’t discount the value of entertainment apps. People spend an ungodly amount of time watching TV and will gladly spend money and time on an application that provides entertainment value. The biggest apps on Facebook are entertainment oriented apps, and the most successful apps on the iPhone are games.

I hope that gets you readers pumped about about starting your own stuff. I know I am. For more Shane Vitarana, you can follow is tweets: http://twitter.com/shanev or subscribe to his blog http://shanesbrain.net/

Popularity: 7% [?]

August 9 2008 Weekly Links

No Comments

Popularity: 1% [?]

Personal MBA Challenge

No Comments

I’ve recently come across this wonderful gem of a website called Personal MBA – Do It Yourself Business Education: Mastering Business Without B-School. The theory of this website is that you don’t need a B-School ejamacation to learn the lessons and principles of strategery and leadershippery. The site is dedicated to teaching you the invaluable lessons of B-School. One of the major cornerstones of the website is the Recommended Reading List – a list of 77 books that are meant to teach you what they teach you in B-School. As you know, I’m Asian (read cheap) so the idea of spending my hard earned money on B-School rubs me the wrong way in so many ways – one of which is that it takes time away from my personal endeavors. Perhaps I’m wrong on this – I don’t doubt it since I’m not the one commanding a high 6 figure salary. Short of selling my kidney and taking out another mortgage though, I just don’t see how I would do MBA school, so this website appeals to me a lot.

So what’s covered in the reading list? Topics range from Productivity, Psychology, Communication, Production, Marketing, Sales & Negotiation, Management & Leadership, Strategy & Innovation, Finance & Analysis, and more. So my personal challenge is to try to read all of these books save the supplemental. The cool thing is I’ve kind of gotten a head start already. I’ve already read:

  • Made To Stick – by Chip and Dan Heath
  • Influence: The Psychology of Persuasion by Robert B. Cialdini
  • The 4-Hour Workweek by Timothy Ferriss
  • Founders at Work by Jessica Livingston
  • Citizen Marketers by Ben McConnell & Jackie Huba

I have no real deadline as I want to read other books as well as I hear about them, but I’ll definitely be interspersing some of these in between.

Popularity: 1% [?]

Older Entries Newer Entries