Welcome to Mediasparkles

News : Flash

Aleks from dotnet-project.com emailed me recently asking where all the English-speaking community sites dedicated to Flash and .NET were. I told him that I didn't really know of any. There is the book, there is a small .NET forum on were-here.com, David Bisset just posted about a relevant article, but other than that, information on Flash and .NET is sparse. Aleks told me that there is a lot of crossover between the French Flash and .NET communities, and that the members of each help each other out.

Do you know of any good Flash .NET resources? If not, can I interest you in starting one? :)

Also, while we're on the topic, if anyone knows if there is a special setup required to have Apache/PHP and IIS/.NET running on the same machine, and if so, what exactly that setup looks like, please email me.

 posted by Vera Fleischer (1/10/2004 10:45:03 AM);




I got the coolest T-shirt today - a Macromedia Central T-shirt with the Dev Chat icon on the front. I really think it's going to be one of my favorite T-shirts from now on. The best part about it is that it is a women's size. It actually fits! It's not big and clunky like all the other Macromedia T-shirts I have. Kristin mentioned just the other day that all the people in her neighborhood think that her husband is this hot shot programmer when he is seen sporting one of her geeky T-shirts she has collected over the years that are all way too big for her. I am proud of Macromedia for having included women's sizes in their Central spring line. I finally have a geek-shirt I can actually wear. Thanks, Mike!

Central T-shirt - front

Central T-shirt - back

 posted by Vera Fleischer (1/8/2004 09:01:58 PM);




Macromedia at the Macworld conference, San Francisco

Please excuse the horrid quality; the picture was taken with my phone.

 posted by Vera Fleischer (1/8/2004 08:04:44 PM);




I have noticed that although there are about one or two new Central apps out there a week, not a lot of developers make the source available. But if we want Central to spread like wildfire, we need to make it easy for people to learn. This is why I have made a little Central app for the sole purpose of demonstrating how the building blocks of a Central app work together. All the source files are available for download. The app doesn't really do anything besides open a pod, connect to an Agent via LCService, send notifications on button click, and blast! a zip code when you tell it to. I assumed that you know Flash and ActionScript, which is why the application doesn't really have any meat. And I am sure you have your own ideas for useful Central apps. This one is just for you to pick apart and learn from.

Here are some of the things I struggled with.

1. It took me a while to get the LCService connection to work. After reading Ethan Malasky's article titled Understanding and Using the LCService Library, I finally got it. Be sure to read that if you're running against a wall. The correct syntax is


// Creating the client, usually the app itself
serviceName = Central.LCService.createClient(agentName, clientName, this, false);
// Creating the server, usually the agent
serviceName = Central.LCService.createServer(agentName, this, false);


The variables serviceName and agentName MUST be the same on both the client side and the server side. Note that if you want this to be a synchronous service, the last parameter should be true on both sides.

2. I couldn't figure out how to make sure that only one pod is running for the app. I make a call to viewPod() during onActivate(). But I couldn't figure out how to determine if the pod was still open from the last time you viewed the app. I kept ending up with multiple identical pods whenever I started the app consecutive times without closing down Central inbetween. Here is how I finally solved that with the magical getViewedPods():


// get array of pods
pods = shell.getPods();
// there is only one pod for this app, so it must be the first in the list
myPod = pods[0];
// get viewed pods
viewedPods = shell.getViewedPods();
if (viewedPods.length == 0) {
   // if the array of viewed pods has a length of 0, no pod is currently
   // open for this app, so it's safe to open one; otherwise don't
   shell.viewPod(myPod.id);
}


So every time the app activates, I check if there are any viewed pods. I open the pod only if there aren't any.

3. After I set up the Blast! data according to the docs, I still wasn't getting the clickable Blast! icon in the lower left corner of the console. I knew I had followed the instructions properly. But there is something else you have to do that isn't in the docs, and Mike Chambers himself had to clue me in: You have to include some tags in the product.xml file that indicate that your app or your pod is set up to send out Blasts.


<supportedTypes namespace="http://www.w3.org/2001/XMLSchema" schema="http://download.macromedia.com/pub/central/schemas/CentralData.xsd">
<type>any</type>
</supportedTypes>


If the blastable data originates in the pod, you insert it in the <pod> tags. If it originates in the app itself, you insert it in the <application> tags. For my example, I put it within the <application> tags, and my Blast! feature was complete.

Let me know if you have any questions about this app.

Installer
Download source files

 posted by Vera Fleischer (1/7/2004 08:53:40 PM);