Innovativedesigns V0.4 goes live

March 1st, 2010

It’s only taking just under a couple of years. A lot of start stop and restart. Finally I can say “Damn it I am done!” :)

Yes it was about this time 2 years ago that I decided I would take the leap and start learning/using AS3. I did have 8 years of prior code experience with AS1 and AS2 but AS3 would be a whole different ball game. As it turned out it wasn’t that bad. Once I discovered how things I took for granted in AS2 where done in AS3 things got a lot easier. I am now at the stage where if something doesn’t work then it usually doesn’t take long to figure it out or find some other way of doing it.

There is still so much to learn and I don’t doubt for a second that version 4 code have been coded better but hey it runs error free and dose what it is supposed to do.

Version 4 has lost some sections and gained some new features. I wont bother going through them all you can just visit the site and check it out.
I have to say a special thanks to Richard Leggett and Michael Lawrence (byteface). Both these guys where on hand to give help and advice when I asked  for it and without them I would not got to the point I am at now.

I do plan to continue adding new sections and features to the site. I’ve already started working on a new section when done will hopefully see a nice little shopping cart where i can sell my flash files from.

So go visit my new flash site and sign my guestbook and possibly leave some nice comments.

Bookmark and Share

Trigger Javascript functions from Flash AS3

February 4th, 2010

Using the ExternalInterface in AS3 it’s never been easier to trigger Javascript functions on your page that holds your swf.
Previously with AS2 and below We would have used the getURL(“javascript:yourFunction();”) or
fscommand(“messagebox”, “Message box called from within Flash.”)

I was asked on the forums today how this would be done in AS3.

After quickly looking up ExternalInterface in the flash Doc’s I was able to through together a quick working example.
A working example can be seen here.

Here is the code:

  1. // import classes we need
  2. import flash.external.*;
  3. import flash.net.*;
  4. //Make sure buttons show mouse over
  5. but1.buttonMode=true;
  6. but2.buttonMode=true;
  7. but3.buttonMode=true;
  8. //Added mouse event to buttons
  9. but1.addEventListener(MouseEvent.MOUSE_DOWN,triggerJavascript,false,0,true);
  10. but2.addEventListener(MouseEvent.MOUSE_DOWN,triggerJavascript,false,0,true);
  11. but3.addEventListener(MouseEvent.MOUSE_DOWN,triggerJavascript,false,0,true);
  12.  
  13. //Function to be triggered by mouse event
  14. function triggerJavascript(e:Event) {
  15. //check name of button pressed
  16. switch (e.target.name) {
  17. case "but1" :
  18. //open url in fixed size popup
  19. ExternalInterface.call("openPopup", "http://www.innovativedesigns.org.uk");
  20. break;
  21. case "but2" :
  22. //open url in new window
  23. ExternalInterface.call("openURL", "http://www.innovativedesigns.org.uk");
  24. break;
  25. case "but3" :
  26. //trigger javascript alert box
  27. ExternalInterface.call("triggerAlert", "Alert was triggered from Flash");
  28. break;
  29. }
  30. }
Bookmark and Share

DOPE Awards html site goes live

November 20th, 2009

logoFor the past couple of months I’ve been working very hard converting the current DOPE Awards.com flash site over to HTML. That’s not to say the Flash site is going to disappear this is more to improve SEO with the site. The main aspect of this project was to have the html version of the site as near identical of the flash site.  Looking at the DOPE Awards html version of the site i think it’s pretty close and I hope you think so to.

Coming from a flash background of 8+ years this certainly was going to be a challenge. Well a few months later and it is finished. The site fully conforms to W3C and is also cross browser compatible on most popular browsers and even IE8.

Dope Flash website awards

Dope Flash website awards

Be sure to check out DOPE Awards.com as there is some great new features coming it’s way soon.  Also if you think you have a site Dope Awards worthy then why not get it posted.

Bookmark and Share

3 Contact forms, 3 Sizes AS2/AS3

July 8th, 2009

With the Simple flash AS3 contact form recently seeing over 5000 downloads I’ve decided to add a new one.

Bit better looking than the last with help file and all code commented :)

Get Adobe Flash player

Included are:

  • contactForm.fla (Flash 8 )/contactForm.fla (Flash 9 )
  • caurina tweener classes AS2/caurina tweener classes AS3
  • contact.php
  • kharon4a_mini font
  • index.html
  • contactForm.swf
  • AC_RunActiveContent.js

Features:

  • Three different sized forms
  • All fields validation
  • Email validation
  • No reference to root. Simply drag the required form on to your project from the library
  • Courtesy thank you email sent to the form submitter, can be turned off
  • IP address capture and display link to ip look up tools in sent email
  • Nicely formatted html email. Can be set to send html or none html formatted email
  • Only 3 variables to be set in the php script and your good to go

Font(s) used:

  • kharon4a_mini

http://www.orgdot.com/aliasfonts/

How to modify the file:

Instruction 1: Open the contact.php script and go to line 11 and add your email, sitename and your name
php vars to change in php script

Once that is done you can upload the script to your server

Instruction 2: There are 3 other options found between line 16-21. $sendHtml, $sendCourtesy and $fColour

Additional php vars option that can be changed

These option can be left as they are.

Instruction 3: Simply drag ‘n’ drop the required form mc from the library onto your project. Also make sure to copy over the caurina tweener classes to your project folder and the contact.php script.

Movieclips that should be dragged onto your projects

The php script has been tested on a linux based server and windows dedicated server with php support.

Bookmark and Share

Avoid manic button press

July 1st, 2009

I had to create a function where by I could avoid the button being pressed to quickly as some clicks where not being registered.


Some people will click a button as quickly as they can to see if they can break it lol.

  1. var reEnable:Number;
  2. button_mc.onPress = function() {
  3.  trace("the button was pressed");
  4.  disableButton(this);
  5. };
  6. function disableButton(b:MovieClip):Void {
  7.  b.enabled = false;
  8.  clearInterval(reEnable);
  9.  reEnable = setInterval(this, "reEnableButton", 1000, b);
  10. }
  11. function reEnableButton(b:MovieClip):Void {
  12.  b.enabled = true;
  13.  clearInterval(reEnable);
  14. }
Bookmark and Share