[Flashcoders] as3 to iphone app

2009-10-07 Thread Anthony Pace

I will totally be buying Flash professional CS5

http://labs.adobe.com/wiki/index.php/Applications_for_iPhone

Compiling for the iphone will work on windows systems too, and still be 
able to published on the app store.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] angular rotation with easing

2009-10-07 Thread jared stanley
Tyler Madison figured it out for me,

www.tylermadison.info - he is my hero.

used the tweenLite shortRotation plugin as an example.

Here's the code.


const SPEED:int = 3;

init();

function tick(e:Event):void{
var t:Number = (Math.atan2((mouseY - a.y), (mouseX - a.x)) * 180 /
Math.PI - a.rotation) % 360;
a.rotation += ((t != t % 180) ?  ((t < 0) ? t + 360 : t - 360) : t) / 
SPEED;
}

function init():void{
a.x = stage.stageWidth /2;
a.y = stage.stageHeight/2;
addEventListener(Event.ENTER_FRAME , tick);
}














On Wed, Oct 7, 2009 at 12:24 PM, jared stanley  wrote:
> yeah i'm aware of the short rotation parameter in tweenmax, but trying
> to roll my own, looking through that class now. thanks!
>
>
> On Wed, Oct 7, 2009 at 12:14 PM, Merrill, Jason
>  wrote:
>> Greensock's TweenMax and TweenLite classes have an optional parameter
>> that allows you to do rotation between 0 and 360 if that helps.  Yeah,
>> nobody's a real fan of the way Flash handles rotation.
>>
>>
>> Jason Merrill
>>
>> Bank of  America   Global Learning
>> Learning & Performance Soluions
>>
>> Monthly meetings on making the most of the Adobe Flash Platform -
>> presented by bank associates, Adobe engineers, and outside experts in
>> the borader multimedia community - join the Bank of America Flash
>> Platform Community  (note: this is for Bank of America employees only)
>>
>>
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] angular rotation with easing

2009-10-07 Thread jared stanley
yeah i'm aware of the short rotation parameter in tweenmax, but trying
to roll my own, looking through that class now. thanks!


On Wed, Oct 7, 2009 at 12:14 PM, Merrill, Jason
 wrote:
> Greensock's TweenMax and TweenLite classes have an optional parameter
> that allows you to do rotation between 0 and 360 if that helps.  Yeah,
> nobody's a real fan of the way Flash handles rotation.
>
>
> Jason Merrill
>
> Bank of  America   Global Learning
> Learning & Performance Soluions
>
> Monthly meetings on making the most of the Adobe Flash Platform -
> presented by bank associates, Adobe engineers, and outside experts in
> the borader multimedia community - join the Bank of America Flash
> Platform Community  (note: this is for Bank of America employees only)
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] angular rotation with easing

2009-10-07 Thread Merrill, Jason
Greensock's TweenMax and TweenLite classes have an optional parameter
that allows you to do rotation between 0 and 360 if that helps.  Yeah,
nobody's a real fan of the way Flash handles rotation.


Jason Merrill 

Bank of  America   Global Learning 
Learning & Performance Soluions

Monthly meetings on making the most of the Adobe Flash Platform -
presented by bank associates, Adobe engineers, and outside experts in
the borader multimedia community - join the Bank of America Flash
Platform Community  (note: this is for Bank of America employees only)



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] angular rotation with easing

2009-10-07 Thread jared stanley
hey all,

I can't believe i haven't come across this before now, but I am having
issue with the rotation of a movieclip when it hits 180 jumping to
-180 and doing the 'long way around' rotation.

The following code works fine:

var dx:Number = arrow_mc.x - mouseX;\r\nvar dy:Number = arrow_mc.y - mouseY;
var radians:Number = Math.atan2(dy, dx);
var degrees:Number = radians* (180/Math.PI);
arrow_mc.rotation = degrees;


but when there's easing applied on an EnterFrame event it hits a
certain point and rewinds back around 359 degrees...


I'm sure this is a common task with a common solution, no?

thanks for your help!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Font Style :: not working

2009-10-07 Thread artur

that worked !
thanks eric!

*artur :.*

- *www.artur.com*
- *ar...@artur.com*
- *ph:646.797.3320*



eric socolofsky wrote:
hey artur.  i've found the best/easiest way to apply a stylesheet to a 
textfield is via TextFormat:


var tft:TextFormat = stylesheet.transform(textfield.getStyleObject());
textfield.defaultTextFormat = tft;


that will work whether you're using .htmlText or just .text.

-eric


Message: 3
Date: Wed, 07 Oct 2009 11:19:11 -0300
From: artur 
Subject: [Flashcoders] Font Style :: not working
To: flashcoders 
Message-ID: <4acca35f.4090...@artur.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

h wise list,


im trying to apply a style to an html text field...with no luck.. please
help!

first we tried doing it this way..

|[Embed(source="../fonts/||Interstate-Light||.ttf",
fontName="||Interstate-Light||", 
mimeType="application/x-font-truetype")]

public static const ||Interstate||TTF:String;

[Embed(source="../fonts/||Interstate-||Bold.ttf", fontWeight="bold",
fontName="||Interstate-||Bold||", 
mimeType="application/x-font-truetype")]

public static const ||InterstateBoldTTF:String;

[Embed(source="../fonts/||Interstate-Italic.ttf",
fontStyle="italic", fontName="||Interstate-Italic||",
mimeType="application/x-font-truetype")]
public static const ||InterstateItalicTTF:String;


var defaultStyle:Object = new Object();
defaultStyle.fontFamily = "||Interstate||";

var style:StyleSheet = new StyleSheet();
style.setStyle(".defaultStyle", defaultStyle);

var t:TextField = new TextField();
t.embedFonts = true;
t.styleSheet = style;
t.htmlText = "My bold text";

|
then we also tried it using CSS and embedding the font in a swf:


|package
{
  import flash.display.*;
  import flash.events.*;
  import flash.net.*;
  import flash.text.*;

  [SWF(width='955', height='600', backgroundColor='#FF',
framerate='24')]

  public class Index extends Sprite
  {
  [Embed(
  source="font.swf",
  symbol="InterstateLight"
  )]
  private var ||Interstate||:Class;

  public function Index()
  {

  Font.registerFont(||Interstate-Light||);

  var style:StyleSheet = new StyleSheet();

var normal:Object = new Object();
  normal.color = "#FF4900";
  normal.fontFamily = "Interstate-Light";
  normal.fontLeading = 2;
  normal.fontSize = 11;

  var bold:Object = new Object();
  bold.color = "#FF4900";
  bold.fontFamily = "Interstate-Bold";
  bold.fontLeading = 2;
  bold.fontSize = 11;
  bold.fontWeight = "bold";

  var italic:Object = new Object();
  italic.color = "#FF4900";
  italic.fontFamily = "Interstate-Italic";
  italic.fontLeading = 2;
  italic.fontSize = 11;
  italic.fontStyle = "italic";

  style.setStyle(".normal", normal);
  style.setStyle(".italic", italic);
  style.setStyle(".bold", bold);

  var label:TextField = new TextField();
  label.antiAliasType = AntiAliasType.ADVANCED;
  label.autoSize = TextFieldAutoSize.LEFT;
  //label.embedFonts = true;
  label.multiline = true;
  label.styleSheet = style;
  label.htmlText = "HOLA HOLA HOLA
HOLA HOLAHOLA  DDDHOLAAA";
  addChild(label);

  var tf:TextFormat = new TextFormat("||Interstate-Light||", 11)
  var label1:TextField = new TextField();
  label1.defaultTextFormat = tf;
  label1.antiAliasType = AntiAliasType.ADVANCED;
  label1.autoSize = TextFieldAutoSize.LEFT;
  label1.embedFonts = true;
  label1.multiline = true;
  label1.htmlText = "HOLA HOLA HOLA HOLA HOLA";
 label1.y = 100;
  addChild(label1);
  }
  }
}


|any ideas?!
time sensitive project.. thanks



--

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


End of Flashcoders Digest, Vol 25, Issue 6
**


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Font Style :: not working

2009-10-07 Thread eric socolofsky
hey artur.  i've found the best/easiest way to apply a stylesheet to a  
textfield is via TextFormat:


var tft:TextFormat = stylesheet.transform(textfield.getStyleObject());
textfield.defaultTextFormat = tft;


that will work whether you're using .htmlText or just .text.

-eric


Message: 3
Date: Wed, 07 Oct 2009 11:19:11 -0300
From: artur 
Subject: [Flashcoders] Font Style :: not working
To: flashcoders 
Message-ID: <4acca35f.4090...@artur.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

h wise list,


im trying to apply a style to an html text field...with no luck..  
please

help!

first we tried doing it this way..

|[Embed(source="../fonts/||Interstate-Light||.ttf",
fontName="||Interstate-Light||", mimeType="application/x-font- 
truetype")]

public static const ||Interstate||TTF:String;

[Embed(source="../fonts/||Interstate-||Bold.ttf", fontWeight="bold",
fontName="||Interstate-||Bold||", mimeType="application/x-font- 
truetype")]

public static const ||InterstateBoldTTF:String;

[Embed(source="../fonts/||Interstate-Italic.ttf",
fontStyle="italic", fontName="||Interstate-Italic||",
mimeType="application/x-font-truetype")]
public static const ||InterstateItalicTTF:String;


var defaultStyle:Object = new Object();
defaultStyle.fontFamily = "||Interstate||";

var style:StyleSheet = new StyleSheet();
style.setStyle(".defaultStyle", defaultStyle);

var t:TextField = new TextField();
t.embedFonts = true;
t.styleSheet = style;
t.htmlText = "My bold text";

|
then we also tried it using CSS and embedding the font in a swf:


|package
{
  import flash.display.*;
  import flash.events.*;
  import flash.net.*;
  import flash.text.*;

  [SWF(width='955', height='600', backgroundColor='#FF',
framerate='24')]

  public class Index extends Sprite
  {
  [Embed(
  source="font.swf",
  symbol="InterstateLight"
  )]
  private var ||Interstate||:Class;

  public function Index()
  {

  Font.registerFont(||Interstate-Light||);

  var style:StyleSheet = new StyleSheet();

var normal:Object = new Object();
  normal.color = "#FF4900";
  normal.fontFamily = "Interstate-Light";
  normal.fontLeading = 2;
  normal.fontSize = 11;

  var bold:Object = new Object();
  bold.color = "#FF4900";
  bold.fontFamily = "Interstate-Bold";
  bold.fontLeading = 2;
  bold.fontSize = 11;
  bold.fontWeight = "bold";

  var italic:Object = new Object();
  italic.color = "#FF4900";
  italic.fontFamily = "Interstate-Italic";
  italic.fontLeading = 2;
  italic.fontSize = 11;
  italic.fontStyle = "italic";

  style.setStyle(".normal", normal);
  style.setStyle(".italic", italic);
  style.setStyle(".bold", bold);

  var label:TextField = new TextField();
  label.antiAliasType = AntiAliasType.ADVANCED;
  label.autoSize = TextFieldAutoSize.LEFT;
  //label.embedFonts = true;
  label.multiline = true;
  label.styleSheet = style;
  label.htmlText = "HOLA HOLA HOLA
HOLA HOLAHOLA  DDDHOLAAA";
  addChild(label);

  var tf:TextFormat = new TextFormat("||Interstate-Light||",  
11)

  var label1:TextField = new TextField();
  label1.defaultTextFormat = tf;
  label1.antiAliasType = AntiAliasType.ADVANCED;
  label1.autoSize = TextFieldAutoSize.LEFT;
  label1.embedFonts = true;
  label1.multiline = true;
  label1.htmlText = "HOLA HOLA HOLA HOLA HOLA";
 label1.y = 100;
  addChild(label1);
  }
  }
}


|any ideas?!
time sensitive project.. thanks



--

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


End of Flashcoders Digest, Vol 25, Issue 6
**


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Font Style :: not working

2009-10-07 Thread artur

h wise list,


im trying to apply a style to an html text field...with no luck.. please 
help!


first we tried doing it this way..

|[Embed(source="../fonts/||Interstate-Light||.ttf",
fontName="||Interstate-Light||", mimeType="application/x-font-truetype")]
public static const ||Interstate||TTF:String;

[Embed(source="../fonts/||Interstate-||Bold.ttf", fontWeight="bold",
fontName="||Interstate-||Bold||", mimeType="application/x-font-truetype")]
public static const ||InterstateBoldTTF:String;

[Embed(source="../fonts/||Interstate-Italic.ttf",
fontStyle="italic", fontName="||Interstate-Italic||",
mimeType="application/x-font-truetype")]
public static const ||InterstateItalicTTF:String;


var defaultStyle:Object = new Object();
defaultStyle.fontFamily = "||Interstate||";

var style:StyleSheet = new StyleSheet();
style.setStyle(".defaultStyle", defaultStyle);

var t:TextField = new TextField();
t.embedFonts = true;
t.styleSheet = style;
t.htmlText = "My bold text";

|
then we also tried it using CSS and embedding the font in a swf:


|package
{
  import flash.display.*;
  import flash.events.*;
  import flash.net.*;
  import flash.text.*;
  
  [SWF(width='955', height='600', backgroundColor='#FF',

framerate='24')]

  public class Index extends Sprite
  {
  [Embed(
  source="font.swf",
  symbol="InterstateLight"
  )]
  private var ||Interstate||:Class;
 
  public function Index()

  {

  Font.registerFont(||Interstate-Light||);
 
  var style:StyleSheet = new StyleSheet();
   
var normal:Object = new Object();

  normal.color = "#FF4900";
  normal.fontFamily = "Interstate-Light";
  normal.fontLeading = 2;
  normal.fontSize = 11;

  var bold:Object = new Object();
  bold.color = "#FF4900";
  bold.fontFamily = "Interstate-Bold";
  bold.fontLeading = 2;
  bold.fontSize = 11;
  bold.fontWeight = "bold";
 
  var italic:Object = new Object();

  italic.color = "#FF4900";
  italic.fontFamily = "Interstate-Italic";
  italic.fontLeading = 2;
  italic.fontSize = 11;
  italic.fontStyle = "italic";
 
  style.setStyle(".normal", normal);

  style.setStyle(".italic", italic);
  style.setStyle(".bold", bold);
  
  var label:TextField = new TextField();

  label.antiAliasType = AntiAliasType.ADVANCED;
  label.autoSize = TextFieldAutoSize.LEFT;
  //label.embedFonts = true;
  label.multiline = true;
  label.styleSheet = style;
  label.htmlText = "HOLA HOLA HOLA
HOLA HOLAHOLA  DDDHOLAAA";
  addChild(label);
 
  var tf:TextFormat = new TextFormat("||Interstate-Light||", 11)

  var label1:TextField = new TextField();
  label1.defaultTextFormat = tf;
  label1.antiAliasType = AntiAliasType.ADVANCED;
  label1.autoSize = TextFieldAutoSize.LEFT;
  label1.embedFonts = true;
  label1.multiline = true;
  label1.htmlText = "HOLA HOLA HOLA HOLA HOLA";
 label1.y = 100;
  addChild(label1);
  }

  }
}


|any ideas?!
time sensitive project.. thanks

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders