Flash Loading Bar Issues

July 3, 2009

Today I spent many hours researching the best way to create a progress bar for my existing LindsayRyerse.com website.  It had been a while since I had updated it, so I figured that would be a good place to start.  Unfortunately I ran into a lot of trouble getting the loading bar to start at (or even near) zero percent.  After reading countless blogs and testing several different code suggestions, thanks to this tutorial (www.senocular.com/flash/tutorials/preloading/) I finally found a solution that worked.  And just for the sake of reference, that tutorial uses ActionScript 2.0 which is exactly what I was looking for.

There are two options for preloading a SWF that dynamically loads movie clips that are exported in the first frame.  To learn more about this issue, see here (www.senocular.com/flash/tutorials/preloading/#loadingcomplications).  The first is to create a ‘loading’ frame inserted after the end of your preloading frames where you can manually load each movie.  So instead of setting each movie to export, add all the movies to this single frame instead.  This will allow the preloader animation itself to load and start running before any movie clips (which will later be dynamically called) are loaded.  When movie clips are dynamically called, by default, Flash loads them in the very first frame so that they are available any any point in the time line.  While this solution would work, it seems to add extra work and remove the flexibility of dynamically adding movie clips in the first place.  Since it had been over a year since I last update my site, I had no interest in going back through it to find and change every movie clip I exported to the first frame to instead load in a single frame after my preloading animation.

Fortunately, I came stumbled across another (and in my opinion better) option, loading my SWF from another SWF to eliminate the issue of first frame exporting completely.  To implement this scenario I created a new Flash SWF containing my preloading animation, which after execution, loaded my original SWF into it.  This way I could ensure that the preloading animation began before the orginal movie clips even had a chance to.  To read more about this, see this link (www.senocular.com/flash/tutorials/preloading/#loadingexternalcontent).

The final solution I ended up using on my site was largely based off of the MovieClipLoader class and Example 5 which can be found here (http://www.senocular.com/flash/tutorials/preloading/#themoviecliploaderclass).  So just like that, LindsayRyerse.com finally comes complete with a loading bar which will hopefully ease any user frustration.


Converting Eclipse Help to PDF

June 29, 2009

These are instructions for converting Eclipse 3.3.2 help libraries to PDFs using Word 2007 and Adobe Acrobat 8 Standard.

  1. In Eclipse, open the help dialog (Help > Help Contents).
  2. On the left hand side, click the top category so it is selected.
  3. From the menu bar, select ‘Print selected topics and all subtopics.’
  4. A web page containing the help pages will open.
  5. Click ‘Cancel’ on the print dialog, as we do not actually want to print the website.
  6. Save the web page to your computer (File > Save Page As…).
  7. Open the saved web page (ie, help.htm) in Word 2007.
  8. Make any layout changes you desire (ie, page breaks, etc).
  9. Go to the ‘Acrobat’ tab and select ‘Create PDF.’
  10. Accept the default settings and click ‘Save.’
  11. The PDF will be created.  Depending on the file size this can take several minutes.  Note that although the table of contents contains links, they do not actually work in the PDF, even though bookmarks are created.

Using WebLogic 9.2 with MySQL

June 24, 2009

These are the problems (and fixes) I encountered while trying to setup the WebLogic 9.2 application serer to use MySQL instead of an Oracle database.

 The first problem I encountered was getting WebLogic to recognize and use the MySQL JDBC drivers.  When booting the WebLogic server, I received the following error:

Error is: ‘weblogic.application.ModuleException: ‘
weblogic.application.ModuleException:
 at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:268)

To fix this error, I edited the startWebLogic.cmd script to include the location of my JDBC driver by adding the following:

set MYSQL_CLASSPATH=%DOMAIN_HOME%\lib\mysql-connector-java-5.0.4-bin.jar

and then added %DOMAIN_HOME% to the existing CLASSPATH variable in the same file to look like this:

set CLASSPATH=%SAVE_CLASSPATH%;%DOMAIN_HOME%

This part is unrelated to WebLogic in particular, but was an error I ran across while trying to load my particular database tables into MySQL.  

ERROR 2006 (HY000) at line 1243: MySQL server has gone away

As it turns out I was getting this error because my max_allowed_packet size was set too low.  To change this I added the following to the end of the MySQL my.ini file and restarted the MySQL windows service.

max_allowed_packet=16M


Running Multiple JBoss Servers on the same Machine

June 24, 2009

I pulled most of this information from the following link:  
http://manoharviswanathan.com/blog/tech/running-multiple-jboss-instances-on-the-same-machine/. Note that some files have ports listed multiple times, be sure to change all of them.

JBoss 4.0.5:

* default/deploy/jbossweb-tomcat55.sar/server.xml

  • change 8080 to 18080

* default/conf/jboss-service.xml

  • change 1099 to 11099
  • change 1098 to 11098
  • change 4445 to 14445
  • change 4444 to 14444
  • change 8083 to 18083

* default/conf/jboss-minimal.xml

  • change 1099 to 11099
  • change 1098 to 11098

* default/deploy/jms/uil2-service.xml

  • change 8093 to 18093

JBoss 4.2.2 GA:

* deploy/jboss-web.deployer/server.xml 

  • change 8080 to 18080
  •  change 8443 to 18443
  •  change 8009 to 18009

* deploy/http-invoker.sar/META-INF/jboss-service.xml

  • change 8080 to 18080

* deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml

  • change 8080 to 18080
  • change 8443 to 18443

* deploy/ejb3.deployer/META-INF/jboss-service.xml

  • change 3873 to 13873

* deploy/jms/uil2-service.xml

  • change 8093 to 18093

* conf/jboss-service.xml

  • change 8083 to 18083

* conf/jboss-minimal.xml

  • change 1099 to 11099
  • change 1098 to 11098

* conf/jboss-service.xml

  • change 1099 to 11099
  • change 1098 to 11098
  • change 4444 to 14444
  • change 4445 to 14445
  • change 4446 to 14446

Insert Number of Pages (Word 2007)

June 24, 2009

I always forget how to do this, so here it is.

  1. Select Insert tab.
  2. Go to Text group > Quick Parts > Field …
  3. In the Categories drop-down list, choose Document Information.
  4. In the Field Names list choose NumPages.
  5. Click OK.

Hello world!

June 24, 2009

Welcome to my blog.  It will mainly be used for me to post computer/software related things that I don’t want to forget how to do.  If anything I post is useful to others, thats great too!