Remove all elements from a Movieclip

I’m always trying to empty out a clip and this is by far the best way :

while (target_mc.numChildren) {
	target_mc.removeChildAt(0);
}

or if you prefer to be verbose :

var total:uint = target_mc.numChildren;
for (var i:uint = 0; i < total; i++) {
	target_mc.removeChildAt(0);
}

or if you prefer single function :

for (var i:uint = 0; i < target_mc.numChildren; i++) {
	target_mc.removeChildAt(0);
	i--;
}

Here is a user submitted version :

while (target_mc.numChildren > 0) {
	target_mc.removeChildAt(target_mc.numChildren - 1);
}

Upgrade OS X 10.5 svn from 1.4.4 to 1.6.2

Os X 10.5 comes with svn 1.4.4 preinstalled, but you might want to upgrade to the latest 1.6.2 for many reasons.

I needed the upgrade to run subclipse 1.4.x for flex builder 3. The best instruction I found on how to do this was here.

in a nutshell

1) download the universal subversion 1.6.2 binaries for mac from here : http://www.open.collab.net/downloads/community/

2) open terminal and type this : echo ‘export PATH=”/opt/subversion/bin:$PATH”‘ >> ~/.bash_profile

3) restart terminal

4) tpe svn –version and make sure you see :
—> svn 1.6.2

done.

Home server with old G4 – pt 2

serverdoc

Once your hard ware is set up, we will need to install the software to fill the purpose of your home server. Here is a list of what I’m running and a description.

1) sharepoints

sharepoints1

If you are running os x 10.4 or lower, this app will make it easy for you to define which folders or volume will be available to share. This is especially helpful is you have a separate hard drive as your file server. 10.5 does not require Sharepoints because it is built in.

2) DynDns

dyndns

The free service from dyndns.org will give you a web address that auto forwards to your server for those with dynamic I.P. address. Not needed if you can afford a static I.P. address.

3) Vine Server

vineserver

Since my server will sit in my closet without a monitor,  svnX will allow me to connect remotely via VNC.  OSX has built in vnc support but you can not change the default 5900 port.

4) Media Link

medialink

Get more usage out of your server by turning it into a media server. MediaLink is a UPnP server to stream photos, videos and music to your Playstation 3.

5) FtpD

ftpd

FTPD is a FTP server for creating users to give access control for others to connect via FTP.

6) WebMon

webmon

Not critical, but it is a nice option to connect via WebDAV.

7) Carbon Copy

carboncopy

I decided not to run RAID 1, instead set carbon cloner on a schedule to backup to the second hard drive once a week. This helps incase I accidently delete a file, since deleting a file on the server will delete it immidiately.

Another option was iBackup, but that does not do incremental backup. Incremental backup is where it only backups files thats been modified, so it doesnt back up the entire disk every time. If i delete a file on my main drive it will also delete it on the back up drive.

Home server with old G4

Using an old G4 is a great way to create a file server. If you have one around it is a cheaper solution then getting a dedicated NAS drive. The old G4 have gigabit etherbit capability so it will be much cheaper then getting a NAS drive with gigabit connection.

It can also stretch the functionality to a Web server, FTP server, UPnP media server and a Webdav server. Not bad for an old obsolete computer.

The one I will be using with be my old 10 year old Mac G4 dual 450 mhz, 896mb ram, 136 gb main hard drive, and 2 western digital 1TB sata drive for files.

img_3045-medium

The only upgrade required was to install a SATA pci card to support two additional hard drives. Current system is limited to recognize 136 gb.

img_3044-medium

I used a Sonnets TEMPO serial ATA 2 port pci controller card as pictured above for $60 from amazon. There is an issue with the driver that comes with os 10.4  for this card which makes the system freeze. You will have to reflash the driver, but don’t use the one from sonnet. This is acutally a repackaged FirmTek , and their driver fixes the issue. Download their driver and it should get this card working for you.

As i mentioned above, you will want to go with os 10.4. You can get away with 10.3, but there are lots of apps that wont support it. My current setup is to enable the sharing below, and also several apps that i can go into detail in the next post.

sharing2

Flash on smart phones

According to Dilbert, flash on smart phones really isn’t a good idea.

dilbert1

Comfortable chair for the office

The previous chair was an old used one I bought from my previous works storage for $5. I don’t think the damage it did to my back was worth the saving.

Check out the new one. From costco for $200. Expensive but worth every penny.

New mac workstation

This week I added a new computer to my collection, but this time its a mac. The specs are 8-Core 2.26 ghz Quad-core Intel Xeon “Nehalem” processors, 6GB ram, Nvidia GeForce GT 120 video card.

The brand gap

An excellent slide presentation on what is a brand :

The Brand Gap
View SlideShare presentation or Upload your own. (tags: design brand)

New computer for the new year

Built a new computer this weekend. Check it out!

The specs are :

  • Intel Core 2 Quad @ 2.83ghz
  • Intel DX48BT2 extreme series mother board
  • Nvidia GeForce 9800 GT
  • Corsair DDR3 1600 mhz 4GB Memory
  • Western Digital 1TB hard drive
  • CoolMaster 600 watt power supply

New gallery plugin for wordpress

I just installed a new gallery plugin for word press. nextGen gallery is currently the most popular one out there. Take a look at my quick test