Application Uploader for the Mac is now the only way you can upload your apps

Application Uploader for the Mac is now the only way you can upload your apps. Lets hope this changes ????? otherwise development is dead in the water!

Unless you use Matthew’s uploader service.

Posted in The Daily Mail | Leave a comment

Contacting Twitter using tweetr.swc – coming soon

The mysteries of sending Tweets to Twitter – and Status Updates to Facebook are unravelling slowly. Both have their own methods, and they are not similar at all.

I know it can be done, as I see it being done in iPhone Apps. However – I suspect that development is in the native Apple/iOS code. I find nothing of any real value related to the CS5 iPhone Packager. That is using AS3 with Flash and the iPhone template. There are lots of things close to what I want – but not the actual code.

However – there is light at the end of the tunnel. A very helpful person on the discussion list of https://tweetr.tenderapp.com/discussions/questions/2-packager-for-iphone has come to the rescue. He’s a legend.

So if you are struggling with this – that’s the place to look.

Watch this space.

Posted in The Daily Mail | Leave a comment

Missing Classes, and the dreaded Warning 5004: Playerglobal.swc missing

Missing Classes and the related problems it causes. 

“Warning: 5004: The file ‘playerglobal.swc’, which is required for typechecking ActionScript 3.0, could not be found. Please make sure the directory ‘$(AppConfig)/ActionScript 3.0/Classes’ is listed in the global classpath of the ActionScript 3.0 Preferences.”

I am running Win7 x64, with Adobe CS5 Flash Pro (Master Collection)

The other day for reasons unknown to me or anyone else it seems, Syntax Checking failed with what is a common error it seems.

So I set about hunting down the problem. Adobe’s help pages, particularly the File Location information became the final piece of the jigsaw. It wasn’t until I set up my paths as I show below in Section 2 that it all started working again.

 

Section 1.

Wherein I solve a puzzle that had me stumped for a week.
That sucker would NOT publish and show the image on the stage.

For goodness sake, make sure you put the working Class path into the appropriate window. I will eventually make this global, and simply store all my working Classes (.as) in a common directory that is easy to find. For now I am keeping each little development in its own directory. Guess what. I forgot to tell the compiler.

This is what I should have had in the class path in the ActionScript settings for this project.

C:\Users\Robert\Documents\iPhone Apps Development\GestureMania\Classes

 

 

 

 

 

Having problems with this error:

 ”Warning: 5004: The file ‘playerglobal.swc’, which is required for typechecking ActionScript 3.0, could not be found. Please make sure the directory ‘$(AppConfig)/ActionScript 3.0/Classes’ is listed in the global classpath of the ActionScript 3.0 Preferences.”

Very misleading warning. Well, on Win7 x64 it is, because it’s not looking for it here at all. It’s looking for playerglobal.swc in a completely different location.

Open your CS5 Flash Pro, click on Edit, then Preferences….

 

 

 

Edit -> Preferences -> ActionScript

Edit -> Preferences -> ActionScript

->ActionScript 3.0 Settings

 

 

Make sure you have all of the areas shown below on the form filled in correctly. I may have more in there than I need, but hey – I just wasted a week fixing this.

………………………. In the ActionScript 3.0 Advanced Settings box, do this.

Flex SDK Path: (Contains)

$(AppConfig)/ActionScript 3.0/flex_sdk/4.0.0/

 

Source Path: (Contains)

$(LocalPath)/Classes
$(AppConfig)/ActionScript 3.0/Classes

 

LibraryPath: (Contains).

C:\Program Files (x86)\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\FP9
C:\Program Files (x86)\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\FP10
C:\Program Files (x86)\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\Fl140
C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs

*** Note the third ‘F’ library directory is FL, not FP

OK everything – and presto bumpo – it should work. Did for me, when even a reinstall did NOT fix the problem.

 

Enjoy

Posted in The Daily Mail | Leave a comment

Create a button with a button symbol for the Uber-Beginner. Using Adobe Flash CS5

Create a button with a button symbol for the Uber-Beginner. Using Adobe Flash CS5.

Adobe help file is very good. I’ve learnt a lot from it, but like all tutorials, it is full of “options” on how you can do things. Way too many choices.

When you need to make a button – or in fact you need to make 4 buttons, so that you can show pressed and released etc, and not just a plain old vanilla button that does nothing – it all gets a bit vague. Remember this is a Button with a Button Symbol, and lives in your Library.

So here are the little steps to get an exciting little button in Flash – but also to get the ultra-mini-button-exercise onto your iPhone to demonstrate your prowess!

Mostly you follow the Adobe instructions, which I include here, but with a few pointers and tips for the uber beginner. NOTE for at the end of this file: I started this in the iPhone OS stage option,

You can find the help file here: http://help.adobe.com/en_US/flash/cs/using/ and search the file for “Create a button with a button symbol” if you would like to see the whole help file.

It goes like this: “Button symbols are actually a special type of four-frame interactive movie clip. When you select the button type when creating a symbol, Flash Pro creates a Timeline with four frames. The first three frames display the button’s three possible states, Up, Over, and Down; the fourth frame defines the active area of the button. The button symbol timeline doesn’t actually play linearly like a normal timeline; it reacts to pointer movement and actions by jumping to the appropriate frame.

To make a button interactive, you place an instance of the button symbol on the Stage and assign actions to the instance. You assign the actions to the root timeline of the FLA file. If the button is inside a movie clip, you can add the actions to the movie clip timeline. Do not add actions to the timeline of the button symbol.

Each frame in the Timeline of a button symbol has a specific function:

  • The first frame is the Up state, representing the button whenever the pointer is not over the button.
  • The second frame is the Over state, representing the button’s appearance when the pointer is over the button.
  • The third frame is the Down state, representing the button’s appearance as it is clicked.
  • The fourth frame is the Hit state, defining the physical area that responds to the mouse click. This area is invisible whenever a SWF file plays in Flash Player.

To create a button symbol:

  1. Choose Edit > Deselect All, or click an empty area of the Stage to ensure that nothing is selected on the Stage.
  2. Choose Insert > New Symbol, or press Control+F8 (Windows) or Command+F8 (Macintosh).
  3. In the Create New Symbol dialog box, enter a name for the new button symbol. For the symbol Type, select Button.

    Flash Pro switches to symbol-editing mode. The Timeline changes to display four consecutive frames labeled Up, Over, Down, and Hit. The first frame, Up, is a blank keyframe.

  4. To create the Up state button image, select the Up frame in the Timeline. Then use the drawing tools, import a graphic, or place an instance of another symbol on the Stage.

    You can use graphic symbols or movie clip symbols inside a button, but you cannot use another button symbol.

  5. In the Timeline, click the Over frame, and then choose Insert > Timeline > Keyframe.

    Flash Pro inserts a keyframe that duplicates the contents of the preceding Up frame.

  6. With the Over frame still selected, change or edit the button image on the Stage to create the appearance you want for the Over state.
  7. Repeat steps 5 and 6 for the Down frame and the Hit frames.

    Editing the Hit frame is optional. The contents of the Hit frame are not visible on the Stage during playback. However, the graphics you add to it define the physical area of the button that responds when clicked. This behavior is useful when the graphic elements of the button are discontinuous, which can make the button harder for a user to click.

    The graphic for the Hit frame must be a solid area large enough to encompass all the graphic elements of the Up, Down, and Over frames. It can also be larger than the visible button. If you do not specify a Hit frame, the image for the Up state is used as the Hit frame.

    You can make a button that responds when a different area of the stage is clicked or rolled over (also called a disjoint rollover). Place the Hit frame graphic in a different location than the other button frame graphics.

  8. To assign a sound to a state of the button, select that state’s frame in the Timeline, choose Window > Properties. Then select a sound from the Sound menu in the Property inspector. Only sounds you have already imported appear in the Sound menu.
  9. When you finish, choose Edit > Edit Document. Flash returns you to the main timeline of your FLA file. To create an instance of the button you created on the Stage, drag the button symbol from the Library panel to the Stage.”

 

Now here’s where I got confused.

Do I draw the buttons on the stage? Or in Photoshop? You do have Photoshop I hope. Or at least something that can create .png and .jpg files. Lets go with Photoshop. So ignoring the ‘stage’ option, I ran up PS5, and created one button. That’s a letter i for info by the way.

Why ignore the ‘stage’ option for drawing the button? I am trying to avoid confusion. I suspect that it is a whole ‘nother learning exercise!

I strongly recommend that you call your buttons Up.jpg, Down.jpg, Over.jpg and Hit.jpg which are the four options for the button symbol. Nothing worse that trying to locate an image in a directory with thousands of them in it.

Being the bright spark that I am, I thought “Now what”, I have my button, how do I make it change?

Then it dawned on me. I need four buttons in total.

 

Each button representing the four possible states. Up, Down, Over, and Hit. I know you may not need ‘hit’ but do it anyway for this exercise.

This means that what I did was NOT follow my own advice. Plan first.

If I have a button that has four states, plan for it and design the button in its four forms first. Not half way through the project.

 

Now the instructions in the Adobe tutorial become clear.

 

Your work space should look like this now.

If you look carefully at the time line, and the symbol library, you will see the four individual instances, each imported in a separate operation into the symbol library, making up the button.

 

For the last bit of advice, keep everything in one directory.

This one is called “Flash Buttons”

Ok, everything is working, now to put it on my iPhone – because I can…

In your CS5 Flash screen, with the stage visible just like above, select Properties on the right, and edit your iPhone settings, with your provisioning development information, publish it, and sync it to your iPhone. If you don’t know how to set that up, see the previous entry in this Blog on getting it right.

If you don’t have an Apple provisioning certificate thing yet, then we have another tute to do.

Enjoy. It won’t do anything but change colour – but that’s a start.

Posted in The Daily Mail | Leave a comment

Buttons for iPhone in Flash

Fed up with the patchy tutorials? I know I am, so I’ve decided to take those I have managed to get working, and apply the ‘logged, step by step’ approach to describing what I have discovered.
Beginning with the latest little thing. Making a 4 state button in Flash, and testing it on the iPhone. Watch the next post.

Posted in The Daily Mail | Leave a comment

Setting up Flash for iPhone

iPhone in CS5 Flash+Actionscript 3 – In the Beginning.
A look at how to set up CS5 to make programming for the iPhone and probably others, a lot simpler.

Posted in The Daily Mail | Leave a comment

iPhone in CS5 Flash+Actionscript 3 – In the Beginning

iPhone in CS5 Flash+Actionscript 3 – In the Beginning.

I have finally decided to put down the planning steps I have to take each time I begin even the smallest test project. If I don’t follow these steps, I will find myself wondering why something doesn’t work the way it should, and even worse, go to install the test project on my iPhone and get all sorts of warnings/errors that something is up, and it won’t install. I figure others have the same problems, as I surely can’t be alone on this planet..

I am assuming here that you have already got your provisioning files and certificates from Apple. If you haven’t – you will find an excellent tutorial on doing just that in the Adobe CS5 – Flash – Help section. Read it carefully and be prepared for an extended stay at your keyboard.

So here goes.

Set up a development directory. Don’t just dump everything into the same directory like My Documents. Make it something easy to recognise, like “iPhone Development Directory”. Create a directory structure in your development directory, as shown below. Always use the same structure, you can’t go wrong then.

 

What goes in each one?

  • Icons: These are the actual Icons that iPhone apps use. Do not confuse these with Images you may import into your app for other things.
  • Images: These are the images you may or may not be importing into apps for use in the movies etc.
  • Sounds: mp3 files etc for use in movies and scripts
  • Classes: This is where you should save your Class files, for easy location.
  • Build: Note the lower case. This is where your ipa file to install into iTunes -> iPhone will go.

Now to set up CS5. Open cs5, and select the Developer screen layout.

Create a New Project from the Project window. Give it a name, and browse to the development root directory that you have already created for it.

Click on Create Project. It should look similar to this.

Select -> Create New -> iPhone OS.

Don’t select Actionscript 3 first. This is a project, and you want all files related. Selecting the iPhone OS will begin by opening a new, blank .fla window. (Stage) – even if you don’t need it!

 

Select -> Save As, and save the named .fla into the root of directory you created. Remember, give it the same name as your project, and be careful you don’t accidentally save it into a previous directory – CS5 remembers where you were last night!

Look carefully now at the Properties Box displayed on the right.

 

Where you see the blank Class entry field, type in FlipScreen. No spaces. CS5 requires it to be one word.

Now you will most likely get a popup like this.

 

You can tick the box to “Not show this again” but I leave it un-ticked, just to remind me to … slow down…

 

 

You have a list of things to set up before you begin anything. If you don’t – nothing will work.

Look for your Class Name input,on the right, click on the little pencil just to the right of the Class Name field.

Flash Professional is the default editor. Leave that as is and select OK.

You are then presented with this screen. Where you will see that you now have an Actionscript Class template set up ready. But with no name yet.

IMPORTANT STEP NEXT

From the screen as just shown with your un-named class script in it, go to the main bar and select:

File -> Save All and this screen will popup. I select Save All, not Save As, because I want the Project File, and the .fla file all to be saved, and Linked to this Class file.

The name that the class file will be will be automatically placed in the file name field, …

BUT WAIT…

Don’t save it here in the root of your project directory, select the Classes folder for it. Then click Save

 

You now have some more setting up to do. Yes, I know, but believe me, it’s worth it in the end.

And necessary!

You now have this screen – study it carefully. File names, positions etc. However – the Properties box on the right pane is greyed out …

Of your two files, now select the Flip Screen.fla file. Presto Bumpo – the Properties box comes alive.

 

Now, just below where the Class name box is, you will see

Profile: Default

Click on Edit next to this. Up comes your Edit Screen. This takes some thought, so proceed carefully, and check your work that you have missed NOTHING. One mistake – and you may as well start again.

The default is showing the Flash options. If not, select the Flash Tab.

First thing, select the Player – in our case, the iPhone -> settings. And up it comes for you to edit.

Tricky bit here, which you will often forget.

 

It is already named for you, Flip Screen.ipa (ipa is the iPhone file type). (or whatever you are calling your project)

HOWEVER – you don’t want it in the development root, you want it saved in the Build directory, so browse to that directory and select it as the save directory.

Save it

You don’t need to change anything else on that screen.

You will now be at this screen. In the General Tab.

Select the Deployment tab. Can I assume that you have mastered the art of getting yourself registered with Apple so you can actually create apps? If not, I’ll put that exercise up later anyway. It really isn’t as complex as it sounds. Well, a little bit!

Make sure you put the correct – and only .p12 – file into the Certificate field, type in the password you used to create it, the exact same, and tick the Remember password for this session box.

DON’T click save yet…

 

See where it says App ID. It will default to having just the app name there. You MUST add in the full App ID string, usually made up of the last part of the domain name you used in setting up the Development/Provisioning Profile.

I set up a Wildcard Profile, just the *, as in au.com.chalmers.* so I can use the same one for lots of development, but you still must put in the domain name – in reverse order – in this field. Or it will all fail at installation time.

Check Carefully …. then…. ignoring the rest of the stuff, Click on OK, then click on OK again, and you should be back to this screen

The last box, that may need setting depending on your progress, is the Actionscript settings. However, you can leave this alone for now. Sometimes you will need a link to the Flash SDK folder – but that’s another story. I put that link into the overall, CS5 Preferences section, so it remains global, and is there if I need it.

You are nearly done.

Have a close look at the Flip Screen.fla tab, and you will see a little star next to it, telling you it is unsaved. Now, go to File -> Save All again. Now you are ready to code.

 

If you go to your Windows Explorer screen, and navigate to you development directory, it should now look like this

 

I hope this has been of some help to you. It has certainly fixed it in my mind now.

Robert Chalmers

robert@chalmers.com.au

http://www.chalmers.com.au

http://www.quantum-radio.net

#Quantum_Radio

 

Posted in The Daily Mail | 4 Comments