- Most Recent | Since 2004
- List View
- Archive
- March 3, 2014
2014 Resolutions Review 01: So Far, So Good
March 3, 2014Read moreIt’s MARCH 3RD, the first of 10 monthly reviews of my yearly “Groundhog Day Resolutions”. Groundhog Day Resolutions (GHDRs) are about picking a goal and moving toward it, reviewing it on 3/3, 4/4, 5/5, and so on until December 12. It’s been a pretty good February, thanks to a change in my attitude. (more…)
- March 2, 2014
Migrating from ActionScript 2 to ActionScript 3 Notes
March 2, 2014Read moreI have been attempting to updated an old Flash CS4 project written in AS2 to the current version of Flash Pro CC, and discovered that it no longer supports AS2. So, you are forced to update your project.
Conversion Strips Scripts
The update process strips out any scripts attached to the instances, which I guess is good. I don’t think I was using any. You don’t get any kind of list telling you that there’s a problem.
New Package Usage Syntax
All my scripts are organized by folder in the
dseahpackage hierarchy, and there are subpackages likedseah.ettanddseah.io. I’m working through compiler errors about packages; notably:5007: An ActionsScript file must have at least one externally visible definition.
Googling this error brings up advice in wrapping this in a package so you can declare the constructor of your class public. Here’s an example of an old AS2 class:
import mx.services.*; import dseah.io.Debugger; class dseah.io.DSWebService { [...] function DSWebService(wsdl:String, listener:Object, func:Function) { [...] } }Most of the blathering on StackExchange suggests wrapping everything in a the global
package, as in:package { import mx.services.*; import dseah.io.Debugger; class dseah.io.DSWebService { [...] } }You will, however, get a NEW error:
1037: Packages cannot be nested.
It took me a while to figure out what this meant, because there is a lot of blather on StackExchange about “autogenerated package namespaces” and “try purging your project cache in FlexBuilder” and even “It works for me.” It actually is another change in AS3 from AS2, and it’s a big DUH: when using the
packagekeyword, you must match the hierarchy and the class names no longer have the path. This is the way other languages work, and it makes sense. It should look like this:package dseah.io { import mx.services.*; import dseah.io.Debugger; class DSWebService { [...] } }Then, the error goes away.
Need to explicitly include packages
The built-in Flash classes now have to be explicitly
imported.Changes in Focus and Events
Selectiongoes away, and is accessible now as thestage.focusproperty of a DisplayObject (movieclip, textfield).TextField.onKillFocusandonSetFocusare replaced with general event listener syntax:addEventListener(FocusEvent.FOCUS_OUT, function (e:Event) { ... });Changes to SOAP
It’s gone, and has been replaced with something new.
setInterval() and getTimer() changes
The callback works differently, accepting now a function reference instead of a closure object + function name string.
Loss of _root
There’s no easy way to grab
_root. Working on fix.Loss of TextFormat.getTextExtents()
Workaround is to make a new TextField, set its text format and text, and pull its textWidth and textHeight properties afterwards. This is possible now that the TextField isn’t a weird Flash object.
WORK ONGOING
… work ongoing to get to an error-free compile, then to see what else has broken. Sigh.
- March 1, 2014
Foggy Friday Final (Day 5)
March 1, 2014Read more
This is the last day I’m going to publicly monitor the day’s activities for brain fog and its possible causes. Friday was largely a social day, followed by a huge tech binge that surprisingly didn’t wipe out my energy.
- March 1, 2014
Cloning/Migrating WordPress Multisite/Network Site to a New Domain
March 1, 2014Read moreI’ve been wanting to try out a new theme for davidseah.com, so I needed to create a duplicate installation. Ordinarily, a plugin like BackupBuddy would help migrate the site with relatively little pain, but it turns out that the ones I tried are not able to handle a WordPress Network. This is the case when a single installation of WordPress is used to manage more than one blog; usually it’s one installation per blog. This site, davidseah.com, is a WP Network with each process blog (e.g. this InfoTech process blog) can have its own theme and set of features. There really is no reason for it other than I thought it might be useful for creating more focused subblogs, but in practice it probably hurts more than it helps.
Anyway, since none of the commercial plugins I tried (BackupBuddy and WPMUDEV Snapshot) worked for me, I needed to perform the migration manually. I wasn’t sure if it could be easily done, but there were two helpful posts that got me through it: Moving WordPress Multisite on the WordPress Codex (which I stupidly read last) and Moving WordPress multisite to a new domain/server. You’ll also want to read Changing the Site URL if the domain name is changing.
Basically you do this:
- Make a sqldump of the original database with
mysqldump, using the WordPress db credentials inwp-config.php - Archive the
wp-contentfolder withtar, along with anything else you might need in the filesystem - Ftp/sftp from the OLD server to the NEW server, and
putthe sqldump and tar archive - Install WordPress on the new server, setting up the new WordPress db credentials
- Make sure you have some way of accessing the new WordPress database with a tool like PhpMyAdmin, because you will need to change some values if the domain is different!
- Make sure you have some way of seeing PHP errors.
- Use the
mysqlcommand to import the sqldump, using the new db credentials. Optionally use PhpMyAdmin. - Untar the
wp-contentarchive in a_tarballsfolder to keep things tidy, and thencp -R(recursive copy) the contents of thethemesandpluginsfolder over to the WordPress install. - Make sure the
wp-config.phpfile has the Multisite enabling commands, otherwise nothing will happen.
Read on for example. (more…)
- Make a sqldump of the original database with
- February 28, 2014
Foggy Thursday (Day 4)
February 28, 2014Read moreI got off to a late start, having let the morning dissolve into a blur of blog updates, email checking, and social media socializing. I don’t feel bad about that (at least, not TOO bad) because I had a breakthrough insight about the nature of the resistance that comes when I do a certain kind of work: I get a literal headache, and its cause may be due to a lack of closure. Now that I’m mindful of it, I can start to deal with it.
(more…)
This is the last day I’m going to publicly monitor the day’s activities for brain fog and its possible causes. Friday was largely a social day, followed by a huge tech binge that surprisingly didn’t wipe out my energy.
