— React-Native Programmierer . Patrick Tresp

in 1998, The Raspberry ketone diet drops Raspberry Ketones erection necessary for lovemaking. Research workers screened the African mango fat african mango

During a Project i needed a method which shuffles a Vector. Since i could not find an implemented shuffle() function i remembered how PHP works with sort-functions and came up with this really simple comparison function:

package de.patricktresp.util
{
	/**
	 * @author patricktresp
	 */
	public class VectorUtil
	{
		public static function shuffleVector( a : Object, b : Object ) : int
		{
			// HIDE FDT WARNINGS
			a;
			b;
 
			return Math.floor( Math.random() * 3 - 1 );
		}
	}
}

So whenever needed i just go:

vector.sort( VectorUtil.shuffleVector );

This works fine for now, but i am very sure there is some more efficient and faster methods.

Suggestions are appreciated.

Read More

Another FFK ( Flash Forum Konferenz ) / beyondtellerrand has passed and left me with new inspirations on how i want to work on and what i want to work on in the future.

Find some interesting Ressources here:

FDT

Molehill

JavaScript

The conference hat obviously more topics than listet before but these are the resources i will need to use in the future.

I am very curious, how molehill will affect the complete Flash importance in the web.

Thanks FFK11!

Read More

When having an external SWF file which needs to be tweened in frames ( e.g. multiple buttons to control the position of swf file ) it always throws performance issues while tweening a frame which is before the current frame ( meaning: reverse tweens ).

After some research i thankfully found following way to force a tween to play forward and loop to reach the desired frame. ( e.g. movie with totalframes 100 is at frame 50, button action: tween to frame 10 )

I was really glad i found this!

TweenLite is downloadable at : http://www.greensock.com/

// header
import com.greensock.TweenLite;
import com.greensock.plugins.*;
 
// function
TweenPlugin.activate( [ FramePlugin ] );
TweenPlugin.activate( [ FrameForwardPlugin ] );
 
var frameForward : uint = 10;
var time: Number = 1;
var _animation : Sprite = getChildByname("animation");
 
TweenLite.to( _animation, time, { frameForward:targetFrame, ease:"easeInOutExpo" } );
Read More

During a Project which had to handle large amounts of BitmapData-Objects i had problems in displaying dynamically created TextFields in the DisplayList. TextFields were not visible on stage, even though the properties were all correct.

Surpisingly i could add other Bitmap-Objects, which are displayed correct, so i used this workaround:

// note: Application.getInstance().getTextFieldTextBounds( textField ) returns the correct amount of space taken from the textField according to http://blog.derraab.com/2010/05/16/aligning-flash-textfield-instances-visually-correct/
 
// create new BitmapData Object using the TextFields bounds and use alpha values
var bm : BitmapData = new BitmapData( Application.getInstance().getTextFieldTextBounds( tf ).width + 20, Application.getInstance().getTextFieldTextBounds( tf ).height + 20, true, 0x00000000 );
// take a SnapShot of the TextField
bm.draw( tf );
// create new Bitmap Object
var bitmap : Bitmap = new Bitmap( bm );
bitmap.x = tf.x;
bitmap.y = tf.y;
// deleting the reference TextField
tf = null;
// adding new Bitmap to a Sprite
s.addChild( bitmap );
Read More

Just a try to use WP-Syntax available at the Plugins page…

ActionScript Code Snippet Test

public static function getSquareButton( width : uint, height : uint, color : uint ) : Sprite
{
	var s : Sprite = new Sprite();
	s.graphics.beginFill( color );
	s.graphics.drawRect( 0, 0, width, height );
	s.graphics.endFill();
	return s;
}
Read More