Quame's Rampant Rants (QRR)

Icon

QRR

Hijri Calendar Component

I developed a Hijri calendar Component for flash and flex and thought I will put it up for those who are interested. The component was developed in flash in order to learn component development for flex. I will post a tutorial or white paper on component development for flex application soon. Check back if you are interested. What made development of this component interesting was the fact that the Hijri calendar depends alot on factors that are not consistent. To explain this, here is a chapter that explains the inconsistency is the Hijri calendar system:

For religious reasons, the beginning of a Hijri month is marked not by the start of a new moon, but by a physical (i.e., an actual human) sighting of the crescent moon at a given locale. From the Fiqhi standpoint, one may begin the fast in RamDHaan, for example, based on “local” sighting (IKHTILAF AL-MATALE’) or based on sighting anywhere in the Muslim World (ITTEHAD AL-MATALE’). Although different, both of these positions are valid Fiqhi positions.

Astronomically, some data are definitive and conclusive (i.e. the time of the BIRTH of a new moon). However, determining the VISIBILITY of the crescent is not as definitive or conclusive; rather it is dependent upon several factors, mostly optical in nature. This makes it difficult to produce (in advance) Islamic calendars that are reliable (in the sense that they are consistent with actual crescent visibility).

Efforts for obtaining an astronomical criterion for predicting the time of first lunar visibility go back the the Babylonian era, with significant improvements and work done later by Muslim and other scientists. These efforts have resulted in the development in a number of criteria for predicting first possible sighting of a crescent. However, there remains a measure of uncertainty associated with all criteria developed thus far. Moreover, there has been little work in the area of estimating crescent visibility on global (as opposed to local) scale. Until this happens, no Hijri calendar software can be 100% reliable, and actual crescent sighting remains essential especially for fixing important dates such as the beginning of RamaDHaan and the two `iyds.

The slight differences in printed Islamic calendars, worldwide, can therefore be traced to two primary factors: (1) the absence of a global criterion for first visibility; and (2) the use of different visibility criterion (or method of calculation). Weather conditions and differences in the observer’s location also explain why there are sometimes differences in the observances of Islamic dates, worldwide.

Due, to this reason, any Hijri Calender software or component has a error of _/+ 1 day. You can download the Hijri Calender component here. Enjoy it.

Filed under: Others

Work Around Mr. bugg

OK, after a few minutes on trying to making AS execute in a SWF file after the SWF file has being loading into flex, I abandoned my methodology and devised a work around the problem. I created the SWF file with no AS script embedded and loaded it into flex using the loader component. Using the “content” variable of the loader component (which points to the SWF file ) I accessed the movieClips in my SWF file and manipulate them with AS in my mxml file.

———————————————————————————–
Here is the code to the mxml file

||

||
|<|–[CDATA[
var interval:Number ;
var myDate:Date;
function Initial()
{
setInterval(this,"startclock",1000);
}

function startclock() {
myDate = new Date();
Clock.content.clock_mc.Hourhand._rotation = myDate.getHours()*30 +(myDate.getMinutes()/2);
Clock.content.clock_mc.Minutehand._rotation = myDate.getMinutes()*6+(myDate.getSeconds()/10); Clock.content.clock_mc.Secondhand._rotation = myDate.getSeconds()*6;
} ]]–|>|
||

||

||
————————————————————————————-
Im sure the code is self explanatory but ….for those who don’t understand

when the application is initialized, it executes the Initial() function which in turn set a 1 second loop execution interval on the function “startclock” . This is where the actual work happens. My clock.swf file contains clock_mc which in turn contain Hourhand, Minutehand and Secondhand movieclip. Accessing my moveiclip through Clock.content.clock_mc.Movieclip_name, every second execution of the startclock function set the time in the Clock component. Hope this helps.

PS: replace |<| with | with /> if you want to use the code

Filed under: Others

Buggs Buggs

I have been trying to fix a problem /bugg in flex for the past 2 hours and havent found any solution yet. It looks like AS in my imported SWF files to flex are not executing. The reason? I really dont know. It also looks like swf file imported into flex through the loader use time tweening(setInterval) instead of frame tweening (onEnterFrame) I will post my solution to this problem hopefully in 1 hour.

Filed under: Others

Vista for Windows XP

The big giant Microsoft today announced the official release date of its new operating system code name Longhorn as Windows Vista. Here is a short video of the announcement. As you can see the working bees at MS are very excited. But as much as this is an exciting news, developers and IT staff all around the world await to see what MS Vista has to offer over XP. XP had its problems at the time of release but has grown to be strong and reliable with the application of service pack 2 and more. I hope the beta version of Vista release for developers and IT professionals will enable MS to amend holes that already exist in Vista (if any). The competition is in full force. APPLE vs MS. Personally if you ask me, APPLE is a good operating system but people condemn MS so much because its widely used and it’s likely to find more fault with it because of its wide uses. If Apple was suppose to take the place of MS, the same will be said about APPPLE because there will be people our there who will try to break into it. I hope the competition brings out the best in both OS. Not to forget, if you are a developer and you haven’t tried VS.NET 2005. I will advise you do so since it will help in reducing the learning curve when it ships out.

Filed under: Others

Effects of Adobe’s acquisition of Macromedia

Adobe’s acquisition of Macromedia (MM) has been one of the biggest new for Web/Mobile application developers and Designer. Why? Well, we all know that MM is one of the leading companies whose products have a tremendous impact on the web. Talk of Dreamweaver MX 2004, Director MX 2004, Flash MX 2004 etc. I could go on and on. This even excludes some of the project that has been “canned” and never made it out to the real world. My colleagues and I have been talking about the effects of this acquisition and it looks like Adobe might get rid of some of MM’s products and replace them with their competing products. Example, Adobe might scrap Dreamweaver for GoLive and more. I’m sure many developers out there will not be happy about that. But knowing that Adobe is a credible company in the media industry, I believe they will do a better job with MM’s future. This is what I see happening,

1. PDF and Flashpaper will become one; call it Flashpdf (hahah). A product that will
combine that best aspects of both pdf and flashpaper. This integration could mean embedding animation in pdf files, cool navigation between pages of Flashpdf , the option to print to pdf or flashpaper, reduction in file size and more.

2. GoLive will go away. If you ask me, it’s not as good as Dreamweaver. The most likely thing to happen will be to merge the two products together. This will not hurt the Web dev community but only make it stronger.

3. Flex will be transformed into a fully fledged heavy web based application dev. Flex offers almost about the same or more features visually (components ) than ASP . There are a few things that flex lacks; an example is a tighter integration with the backend: server side code and DB. At present, there are alternatives such as using the web service classes: webservice, remote object or through HTTP service. This, I think Adobe should and might extend flex in order to make it a robust developing environment.

4. Flash will stay on its road map but will have a tighter integration with editing tools like Photoshop and Image Ready. You will be able to jump between these dev tools and edit your work. Better yet, combine these 3 tools to become one powerful web design tool.

5. We will see products of Adobe and MM share the same file types like .mov, .avi, .mpeg4 and more. This will be great because one could move files from one dev tool to another without any difficulty or buy a third party software.

6. Even though this might sound trivial, I think the UI for MM product will be improved. Adobe has a good eye for ease of use and they always do a good job in breaking the UI of their dev tools in a way that makes it easier for people to learn. Flash and its sister products are not very daunting if you want to develop simple animation but to take advantage of the true power of Flash for greater App, you will have to understand the underlying foundation of flash. I think with a better UI design for MM products, using the dev tools will be easier.

These are just a few of the things that might happen. For developers like me, things are always changing. Some people are scared of change. It could mean spending more money to update or replace an old application that was probably installed 2 months ago (haha, that will be bad), it could mean going back to the drawing board or class room to learn some thing entirely new, its could mean loosing your job and someone with a better knowledge of the new technology replacing you, It could mean ……… But I believe these changes make us better developer’s day in and day out. We all know Adobe is a great company and their products are superior to their competitors (except MM haha) so I believe they will do a good job at improving the dev product from MM. My only worry is that MM is an open company and has a lot of supporting communities which Adobe lacks. Example, when Adobe and MM announced their plan to merge, by the end of that day, about 60000 blog of MM had been made but only a few from Adobe. That said, I hope Adobe takes advantage of MM’s open communities and spread their love to us all.

Filed under: Others

First blogg

Finally, I have come to accept the fact that its time to communicate with the whole world and not just close buddies. This blogg is gear towards sharing my knowledge as a software/RIA developer with other developers out there.

Filed under: Others

Del.icio.us