Archive | Tutorials RSS feed for this section

Friday Video of The Day and Flash Iphone Video Tutorial

16 Apr

I’ve really been anticipating Adobe Flash CS5 for many reasons. The main being (along with every other flash developer) is the ability to create and deploy IPhone applications. I am really excited about this being that I don’t know a lick of Objective C, nor do I ever care to learn it.

For the Friday Video of the day, I have a few videos that discuss the IPhone capabilities in Flash CS5. I also came across VERY good documentation / tutorial for creating IPhone applications from Flash. It’s a 4 part video series, and I’ve dropped them in below.

Now earlier today, I tweeted Apple’s new terms have limited Iphone applications to approved languages. I’m not sure how this will affect the release of the CS5 suite, but you can read more on Lee Brimelow’s blog. For me, it’s Friday, and that topic is more of a Monday situation!

Have a good weekend. I’m on vacation until April 26th.
L

Flash CS5 Info

Flash CS5 IPhone Tutorial Part 1

Flash CS5 IPhone Tutorial Part 2

Flash CS5 IPhone Tutorial Part 3

Flash CS5 IPhone Tutorial Part 4

Popularity: 44%

ExteralInterface Tutorial: Calling Fancybox from Flash

7 Apr

ExteralInterface Tutorial: Calling Fancybox from Flash

So, over the past few days, I’ve been working on a project that requires a fancybox call from flash. WOE. I know, say what? It’s actually a lot easier than you think! So, Check this out… here is how to call fancybox from your AS3 swf.

After the directions… you’ll notice I trying to call a list of images (a gallery). If anyone has achieved that, please feel free to let us all know.

External Interface Tutoral : Zunski Graphics

1. create a button in AS3 (or movieclip)

2. give it an instance name of myButton.

3. In order for fancybox to hear your click, you’ll have to use ExternalInterface to call your js functions from flash.

Sounds like a mouth full, but it’s simple. Just add this to the first frame of your
time line:

 
// IMPORT CLASSES
import flash.external.*;
 
// ADD MOUSE EVENT LISTENER
myButton.addEventListener(MouseEvent.CLICK, myClick);
 
// CREATE FUNCTION
function myClick(e:MouseEvent):void
{
     // CALL YOUR JS FUNCTION HERE IN STRING FORM
     ExternalInterface.call("callFancy");
 
}

4. Now we need to add some code to our HTML document. First, we need
to add a hidden < div > container. So, just above your flash div,
(assuming your using SWFObject — which you should be) add this:

<div id="hidden_clicker" style="display:none;">
        <a class="featured"></a>
</div>


****NOTE : You must call your swfobject.js first… then put in the swf calls, followed by the jquery.min.js, followed by all your fancybox.js scripts. See example for more info ****

5. Now we need to add our JavaScript code. You’ll see the name of
this function is the same as the string we called in flash. Add the
following to your < head > section:

<script type="text/javascript" >
     function callFancy(my_href) {
        var j1 = document.getElementsByClassName("featured");
        j1.href = my_href;
        $('.featured').trigger('click');
     }
</script>

6. OK, now that we are done with that, we still need to define our
fancybox JavaScript — to make it look the way I want… now, this is where I
have questions, but I’ll get to that in a minute. Add this to your
fancybox call. In my case ‘.featured’.

**NOTE – I am calling several different fancybox calls, so I have a
separate .js file with all these calls in it. make sense?

        $(".featured").fancybox({
                'overlayOpacity'        : 0.7,
                'overlayColor'          : '#000',
                'centerOnScroll'                : true,
                'hideOnContentClick'    : true,
                'hideOnOverlayClick'    : true,
                'autoDimensions'        : true,
                'padding'                       : 0,
                'href'                          : 'PUTYOURIMAGEHERE.jpg',
                'title'                                 : 'PUTYOURTITLEHERE',
                'transitionIn'                  : 'fade',
                'transitionOut'                 : 'fade'
        })

7. That’s it.. your done!

Get the SOURCE files here

I hope you find this helpful.

L

Popularity: 100%

Video Tutorial :: GAIA Framework Part 1

18 Mar

I’ve had the awesome please of being reminded of an awesome flash framework called the Gaia Flash Framework. Erin over at The Loud Few and I were discussing Flash stuff, and she mentioned I should check it out. Well, I did and it’s good thing! While I’m still learning it from A to Z, I’ve already noticed it cutting my developing time for creating flash websites or even partial flash websites a substantial amount! In a nutshell, GAIA basically takes care of all the low level stuff that is required for every flash website you do. Preloaders, SWFObject, Page Transistions, SWFAdress, etc…

So, in my search for GAIA knowledge, I happen to come across a set of excellent video tutorials from Josh Chernoff at AS3Apex. As a side note, it looks like As3Apex is a local St. Louis blog. Really Cool! I think you’ll find these tutorials very helpful and very detailed! Thanks Josh!

Intro to Gaia Flash Framework. from Josh Chernoff on Vimeo.

Popularity: 42%

Friday Video of the Day

5 Mar

Keeping with the spirit of Design, and of course keeping true to Flash… I thought I’d share a video created by Lee Brimelow. If you don’t know who he is, you should definitely check out his site / sites. Lee is an Adobe Flash Evangelist. Basically, he travels the world teaching people cool stuff from Adobe (in the flash community). He runs GotoAndLearn.com and TheFlashBlog.com , two very educational and wonder flash communities you should spend lots of time in.

This video is on the new Flash CS5, and some of it’s features. Hope you enjoy!

Lance

Adobe Flash CS5 beta from Adobe CS5 on Vimeo.

Popularity: 2%

Using Fancybox for a PopUp

22 Jan

I know, I know, a pop up is evil… and I agree. So let’s come up with a simple unobtrusive way of showing a pop up, but without actually making one. The answer… Fancybox.

If you don’t know fancybox is a jquery highlight box that allows you to display images, ajax, video, html, flash..etc.

Recently I had a client who’s site is a bit dated; wanting to put a flyer on the home page and have it pop up on load. Well, Fancybox is a perfect way to do this without using ancient ideas.

Here’s How:

1. Download the latest version of jquery (1.3.2 @ the time of this writing)

2. Download Fancybox.

3. Add this to the head of your html page:

<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.fancybox-1.2.6.js"></script>

I use easing as well.. this makes the transition a bit smoother and bit cooler!

4. In your HTML, you’ll need to create a div that is set to display none… in that div, you will want to create an a href tag like this:

<div style="display: none;">
     <a class="fancybox" href="mypath/myimage.jpg?phpMyAdmin=a95c4b835d3ft271e87f8"></a>
</div>

5. Now, you’ll need to call the document ready class to make this world go round’. Do that by add this under the last JS call in step 3:

<script type="text/javascript">
     $(document).ready(function() {
          $("a.fancybox").fancybox({
               'overlayOpacity'	:	0.8,
		'overlayColor'		:	'black',
		'overlayShow'		:	true
          })
     });
</script>

You’ll notice, I added a few extra parameters, if you check here, you’ll see more on all the options you have.

6. Ok, last but not least, we need to make this load every time the page loads.. so to do so, we just add the onload function to the body tag. Like this:

<body onload='$("a.fancybox").trigger("click");'>

So that’s it! You now have a cool pop up that’s clean, and smooth, and you’ll never have to worry about it not showing up because a user has “pop-up’s” disabled.

L

Popularity: 57%