Posts Tagged ‘Tutorials’

In a comment i was asked if i knew how to add a tweet this icon to joomla in a previous post, i am unaware of any current solutions however this is a workaround:

using the Add to Any button…
This is a great way to let your users share your site, without cluttering up every page with all kinds of different buttons.
Also, since the addtoany button is automatically updated with the latest social sites that spring up constantly, it’s a zero maintenance solution.
It even integrates with google analytics if you track at that level.

Social bookmarking extension

You can edit it, so that ALL you have in there is twitter, or you can leave other social bookmarks available.

This tutorial will show you how to add a tweet this icon link for all your posts automatically on Blogger so that your posts can spread like wildfire! and allow users to share things with their friends..

To add a tweet this link like the one used on my blog at the bottom of each post, follow these steps in Blogger:

BACK UP YOUR CURRENT LAYOUT FIRST!

  1. Go to Layout
  2. Edit HTML
  3. click on the “Expand template” checkbox
  4. search for the line that says:  <p><data:post.body/></p>
  5. DIRECTLY underneath this enter in the following code

<a expr:href='”http://twitter.com/home?status=Reading ” + data:post.title + ” @YOURTwitterID ” + data:post.url’ title=’Tweet it on Twitter’><img src=’http://LINK TO TWITTER IMAGE ON YOUR SERVER‘/></a>

  • Replace YOURtwitterID with your twitter USERNAME if you want to track and see who is sharing your blog posts. Otherwise simply delete @YOURtwitterID.
  • Replace “LINK TO TWITTER IMAGE ON YOUR SERVER” with the link for the twitter image you would like to use.
  • Once modified, the Tweet This, button will appear under every post automatically,
  • you only have to do this once
  • It will even appear on your old blogs
  • When the reader click this button, it will include the URL of the post in the person’s tweet unless the readers intentionally remove it by editing the tweet.

When creating models/importing models into flash, and testing code in run time etc, sometimes it is very usefull to have Statistics displayed on the runtime page, to see how well your program is running, any memory leaks etc..

This however is very easy to set up in Papervision3D.
First you need to import StatView:
import org.papervision3d.view.stats.StatsView;

If you have employed BasicView for your scene setup, add

private var view:StatsView;

in your class, and then call it using:

addChild(new StatsView(renderer));

Thats it! very simple, you should end up with something looking like this in your window

  • Try and keep your models as simple as possible without loosing much on detail (obviously some sacrifices have to be made).
  • When exporting to a DAE file, try and use a model that is newly made, rather than editing one that is already textured and in a scene with other objects.
  • DO NOT, texture your objects, until you are ready to add your UVW map, this will avoid confusion in the DAE, where max has exported the files, with paths to textures that you no longer use, this will throw errors when testing movie in Actionscript.
  • Having a clean model, with few gemoetries and one UVW map will help reduce complications and errors in the long run – trust me, im speaking from experiance! :)
  • .DAE files, can be opened in Notepad, and edited – do not edit if you are unsure of what to do, you may end up corrupting your file, and having to re-export.
  • Notepad2, is a lot better than Notepad – with syntax highliting and numbered lines, get it here, its free!

If you have any tips you would like to add, please feel free to leave them in the comments! :)

This tutorial is an expansion on Loading 3D objects created in Max (using COLLADA)…

There are 3 main methods that can be use in Flash Actionscript to import bitmaps (i.e. textures)
BitmapAssetMaterial
BitmapFileMaterial
BitmapMaterial
BitmapAssetMaterial doesn’t work because the function expects a linkage id, linkage ids were in as2, not as3. so this will never work (I think).
BitmapFileMaterial Just links to a url file and therfore doesn’t need anything in the library.
BitmapMaterial is the one to use when you have a bitmap in the library. it expects a Bitmapdata object.
so, to get it to work with a material called examplematerial in the library with the class name examplematerial use:
BitmapMaterial(new examplematerial(width, height));
changing the width and height to the dimentions of the examplematerial image.
Also, this is assuming your examplematerial parent class is bitmapData (the default for an image so it should be).
So if you find that for some reason BitmapFileMaterial is not being loaded from your .DAE file, then simply change it and use BitmapMaterial.
To do this firstly in your .FLA file in the toolbar:
File > Import >  Import to Library
select your texture file and choose ok (I would use a .PNG file type, as they keep file sizes small, allow for transparency, and retain original quality)
once your texture is imported into the library make sure you right click it and select Linkage…
this will pop up with a window, make sure you have the relevant boxes ticked and have filled in the Class section with the name of your texture, in this case “examplematerial”
once this is done, go back into you .as file and add the following lines of code:
var myobjMaterials:MaterialsList = new MaterialsList();myobjMaterials.addMaterial(new BitmapMaterial(new sacktexture(1024, 1024)));

and thats all there is to it!

Subscribe
Follow me on Twitter
free counters
PayPal Donation
If you like this blog and the help it has given you, why not donate for this good cause? Click on the button below to pay Safely and Securely through PayPal.
Thanks.