my flash drawing

Last night I was working on my presentation for the Hawaii Flash User Group, and I made a really cool drawing using the drawing API. This drawing is done complete in code!

I hope that you like it, and if you are in Honolulu, please come to the meeting to see how this was done!
[kml_flashembed publishmethod=”static” fversion=”9.0.0″ movie=”http://blog.hawaiiflash.org/wp-content/uploads/2010/03/building.swf” width=”400″ height=”300″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]

AS3 Debug Issues!

I have been making progress on getting the AS 3 debugger working in Flash CS 3.

I have a remoting project(it could be anything I want to debug)

Here is my actions panel, with the break point

debug

When I try to debug movie I get this error:


Attemping to launch and connect to Player using URL /Users/johnbarrett/Desktop/downloads/remoting_debug.swf

[SWF] Users:johnbarrett:Desktop:downloads:remoting_debug.swf - 1635 bytes after decompression

Warning: Domain 127.0.0.1 does not specify a meta-policy.  Applying default meta-policy 'all'.  This configuration is deprecated.  See http://www.adobe.com/go/strict_policy_files to fix this problem.

Warning: Domain localhost does not specify a meta-policy.  Applying default meta-policy 'all'.  This configuration is deprecated.  See http://www.adobe.com/go/strict_policy_files to fix this problem.

before running this I change the file FlashAuthor.cfg to include User

# FlashAuthor.cfg

#

# This file was automatically installed with one or more

# Macromedia applications. This file directs Macromedia Flash

# Player to provide alternate messaging for violations of the

# security rules for local .SWF files. The alternate messaging

# is designed for users who are authors of .SWF files rather

# than only consumers of them.

#

# If you are creating .SWF files for deployment as local files

# rather than for Web delivery, and you need to simulate the

# end-user experience for local security problems, try changing

# the value of "LocalSecurityPrompt" below to "User" rather

# than its default of "Author".

#

# For more information, see:

# http://www.macromedia.com/go/flashauthorcfg

#
LocalSecurityPrompt=User

now in the crossdomain.xml I have


<?xml version="1.0"?>

<!-- http://127.0.0.1/crossdomain.xml -->

<cross-domain-policy>

    <allow-access-from domain="127.0.0.1" to-ports="507" />

    <allow-access-from domain="*" to-ports="*" />

 </cross-domain-policy>

Not sure about School?

I am really re-thinking my current situation in school! For those who know me this post is not news, but for those who don’t here is the situation:

var disclaimer:String = “I feel the school has a great Multimedia Program”

I have been programming for many years. Back in San Francisco I used to use java, yes there was a time where java applets were cool! However, when I need to start working on the web I searched many web technologies (jap, asp, php), but nothing really excited me. Then I found ColdFusion MX, and loved it, and it was a J2EE server just to make it better`-`

After a while of using ColdFusion, I discovered flash remoting, and with using Actionscript 2.0 it easy to create flash interfaces for my ColdFusion applications, a term called Rich Internet Applications. Since then I have been very, very interested in flash design, as when I see many of the great flash websites, just take a look on 2advanced.com and you will see what I mean I have been wanting to learn design. I feel if I can learn design well since I already know programming I will become a more complete web dude

I have been going to school here in Hawaii, and I started taking the design courses last semester, which went great. However, this semester has not been going well at all!

I started to take an Introduction to Design, and I found the teacher not helpful, and assumed that the students understood design, and so she was not there to help you, and would not answer any questions or help. I dropped this class very quickly!

I am also taking an Introduction to drawing class, which started out okay, but the teacher has turned it into an advanced drawing class, and yes assumes that you have been drawing for years. When I asked him why is there not a class for people who have no experience, such as a pre drawing class, I was told that people take this class twice or three times, and then this class becomes the pre drawing class. Also that I should look into taking a class at one of the art galleries if I am looking for a basic drawing class. The drawing teacher on the other hand is a very nice guy, and will help you, it is just the class is so over my head.

So why take an Introduction to X if you already know the subject matter? This makes no sense to me. Call me crazy, but I have taking many Computer Science classes and the introduction course also assumed that you know nothing, and for me Introduction to java was where I learn to program in java.

This really makes me sad as this program requires a very detailed portfolio entrance, and you really need to be a very good artist to be accepted into the program, and without it you cant take any classes.

This is why I am sad, as I already said it is a great program, but if I don’t become a great artist, and if I cant find people to teach you, then it most likely will not happen, and then I will never get into the program. Maybe I will need to find another school where they don’t except such high levels in drawing, and if fact I love drawing, and design. I am practicing drawing everyday, both on paper, and in flash & illustrator too!

Even if I do stay I will have to wait one year before I can start to take the design classes due to the fact that the portfolio only comes at the end of spring term. Furthermore, looking at the Introduction to Design course next term I see the same teacher is the instructor, and therefore it is not a good idea to re-take the class with her, as I already know it is going to be bad.

Then there is repeating the drawing class, but how would it be any different then this term? Finally, there is the Introduction to Photography, a class I would love to take, but I am sure that the teacher will assume that I have been taking pictures for years, but the truth of the matter is that I have not, in fact I have never even owned a camera!

I am not sure what I will do about this; I wish that I could just enroll in a class and learn the material without feeling lost. I think that if you sign up for a class with no classes needed to take before that class then you should be able to take the class do the work, and afterwards learning a little about the subject matter. After all it is an Introduction to X class, and you’re not going to be an expert after taking one class.

Wish me luck learning design

Flash:Zero To Hero

Zero to Hero

There is a new lecture series on Flash:Zero To Hero, which is being put on my my friend Ahmed Rabieh. He runs the Adobe RIAs Edge UG (Egypt), they specialize in Rich Internet Applications & Rich Media UG in Egypt. This is a great Adobe Group for RIAs!

He is having a series on Flash:Zero To Hero

Check it out, I think that it is going to be great!

This will be a chance for everybody to share their knowledge, and to talk about how flash and RIAs have turned you into a hero coming from a zero!

cfmail

I have a database of users that I want to create a NewsLetter for. Here is my database

DB

Here is my ColdFusion Code


<cfquery name="GetMembers" datasource="#REQUEST.dataSource#">

  SELECT *

  FROM test

</cfquery>

<cfloop query="GetMembers">

  <cfmail

  	to= "#email_address#"

    from="johnbarr@hawaii.edu"

    subject="Testing"

    type="HTML">



	 <html>

	   <head>



	   </head>

	   <body>

	     Testing cfmail

	 </html>

  </cfmail>

</cfloop>

<cfoutput>

your mail was send to: <br />

    <cfloop query="GetMembers">

	#GetMembers.email_address#,<br />

  </cfloop>

</cfoutput>

In the output it says that it was send, but I only get the first one to johnbarr@hawaii.edu. What could be going wrong?

Coffee Talk

I decided to make a flash effect for this coffee shop I come to often to drink tea

[kml_flashembed publishmethod=”static” fversion=”9.0.0″ movie=”http://blog.hawaiiflash.org/wp-content/uploads/2010/03/coffee_talk.swf” width=”400″ height=”300″ targetclass=”flashmovie”]Get Adobe Flash player

[/kml_flashembed]

Flash Remoting Query is fixed!

The flash remoting issues that I was having is now fixed! The solution was to realize that there is no record set in AS 3, and it is an arrayCollection, and this is why I think that I was getting the [object] returned when I tried to trace the results.

I am so very thankful to flash-db for posting the picture of the Charles debug tool, otherwise I would have never figured this out. I was able to see the name of the headers from their screen shot, but I have yet to figure out Charles myself

Charles

As you can see I needed the serverInfo.initialData

Here is my solution

//Import the classes

import flash.net.*;



//connect to the gateway

var gateway:NetConnection = new NetConnection();

var responder:Responder=new Responder(onResult,onFault);



// name the default cf test server on this machine

gateway.connect("http://localhost/flashservices/gateway/");



// name of the cfc and the function

gateway.call("com.cfcs.testing.GetResults", responder);



function onResult(responds:Object):void {

		var recordcount:Number = responds.serverInfo.totalCount

		//display the total records in the database(recordcount)

		trace("There are"+" "+recordcount+" "+"Members of the Hawaii Flash User Group:"+"n");

		//loop through the records in the database

    	for(var i:Number = 0; i<recordcount; i++){

			var query = responds.serverInfo.initialData;

			//display the results from the database

			trace(query[i]+"n");

		}

}



function onFault(responds:Object):void {

	//loop over the fault structure

	for (var i:String in responds) {

		trace( i + ":" + responds[i] );

	}

}

flash remoting

Seems like I am not able to fix my remoting code. Here is the actions panel


import flash.net.*;

var gateway:NetConnection = new NetConnection();

var responder:Responder=new Responder(onResult,onFault);



// name the default cf test server on this machine

gateway.connect("http://localhost/flashservices/gateway/");



// name of the cfc and the function

gateway.call("com.cfcs.testing.GetResults", responder);





function onResult(responds:Object):void {

	trace("cfc result"+":"+" "+responds.toString());

}



function onFault(responds:Object):void {

	//loop over the fault structure

	for (var i:String in responds) {

		trace( i + ":" + responds[i] );

	}

}

The file Testing.cfc(I have tested this cfc and it works perfect!


<cffunction name="getResults" access="remote" returntype="query">

   <cfquery name="qEmails" datasource="johnbarrett">

     SELECT *

     FROM testing

   </cfquery>

  <cfreturn qEmails>

</cffunction>

output

buttons within a scene

Here is the buttons within a scene that I was talking about.

Basically if you want to go from scene to scene, or within frames of a scene in a flash movie this is what you have to do.


stop();

button1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);

function mouseDownHandler(event:MouseEvent):void {

    gotoAndStop(1, "Scene 2");

}

first there is a stop action, then using the instance name of your button you need to add a event listener, and create a function. In this case I create a function called mouseDownHandler. In this function I simple tell it gotoAndStop(1, “Scene 2”); In the arguments you need a frame and Scene, so in my case I am saying gotoAndStop([frame]1, “Scene 2″);

Here is a live example
[kml_flashembed publishmethod=”static” fversion=”9.0.0″ movie=”http://blog.hawaiiflash.org/wp-content/uploads/2010/03/buttons-within-a-scene.swf” width=”400″ height=”300″ targetclass=”flashmovie”]Get Adobe Flash player

[/kml_flashembed]