RE: [Flashcoders] Highligting words in a textField

2010-08-16 Thread Cor
myTextfield.htmlText = This is line 1.BRThis is line 2 with Bsome bold
text/B.

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ktt
Sent: maandag 16 augustus 2010 0:26
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Highligting words in a textField

Hello,

I have a multiline text in a dynamic textfield with a scroll.
How is it possible to higlight some words in a textFiled which is splited to
lines (\n) ?

Thank you in advance,
Ktt


  
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com 
Versie: 9.0.851 / Virusdatabase: 271.1.1/3073 - datum van uitgifte: 08/15/10
08:35:00

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


Re: [Flashcoders] Highligting words in a textField

2010-08-16 Thread ktt
Thank you for reply. I use setTextFormat, but the parsing of textfield's
lines content is quite tricky. I can extract text with getLineText,
but having problems accesing a word's indexOf.

Regrds,
Ktt

--- On Mon, 8/16/10, Henrik Andersson he...@henke37.cjb.net wrote:

 From: Henrik Andersson he...@henke37.cjb.net
 Subject: Re: [Flashcoders] Highligting words in a textField
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Date: Monday, August 16, 2010, 2:11 AM
 ktt wrote:
  How is it possible to higlight some words in a
 textFiled which is splited to lines (\n) ?
 
 I would use the setTextFormat method if I had to use a
 TextField. But I would rather use flash.text.engine and
 assign a separate content element instead.
 ___
 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] Highligting words in a textField

2010-08-16 Thread Karl DeSaulniers

Hey Ktt,
I found this, but it is AS2 I think. You might be able to convert to  
AS3 if you really need to.


var format1_fmt:TextFormat = new TextFormat();
format1_fmt.font = Arial;
var format2_fmt:TextFormat = new TextFormat();
format2_fmt.font = Courier;
format2_fmt.color = 0xFF;
format2_fmt.bold = true;
this.createTextField(my_txt, this.getNextHighestDepth(), 0, 0, 300,  
200);

my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt.setTextFormat(0, firstIndex, format1_fmt);
my_txt.text = hallo this is a test made by Xeef from As.Org;
var secondIndex:Number = my_txt.length;
my_txt.setTextFormat(format1_fmt);
SearcFor = Xeef;
q = my_txt.text.indexOf(SearcFor);
if (!(q+1)) {
trace(string NOT found);
} else {
my_txt.setTextFormat(q, q+SearcFor.length, format2_fmt);
}

Here is the thread if you want to read up.
http://www.bigresource.com/Tracker/Track-flash-dJD6qTTW2R/
Hope that is what you needed or at least get you going down the home  
stretch.


Best,

Karl


On Aug 16, 2010, at 1:35 AM, ktt wrote:

Thank you for reply. I use setTextFormat, but the parsing of  
textfield's

lines content is quite tricky. I can extract text with getLineText,
but having problems accesing a word's indexOf.

Regrds,
Ktt

--- On Mon, 8/16/10, Henrik Andersson he...@henke37.cjb.net wrote:


From: Henrik Andersson he...@henke37.cjb.net
Subject: Re: [Flashcoders] Highligting words in a textField
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Date: Monday, August 16, 2010, 2:11 AM
ktt wrote:

How is it possible to higlight some words in a

textFiled which is splited to lines (\n) ?

I would use the setTextFormat method if I had to use a
TextField. But I would rather use flash.text.engine and
assign a separate content element instead.
___
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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Re: [Flashcoders] Highligting words in a textField

2010-08-16 Thread Karl DeSaulniers

I did a google for dynamically highlighted words AS2
so maybe try dynamically highlighted words AS3
oops, well anyway..

GL

Karl


On Aug 16, 2010, at 1:35 AM, ktt wrote:

Thank you for reply. I use setTextFormat, but the parsing of  
textfield's

lines content is quite tricky. I can extract text with getLineText,
but having problems accesing a word's indexOf.

Regrds,
Ktt

--- On Mon, 8/16/10, Henrik Andersson he...@henke37.cjb.net wrote:


From: Henrik Andersson he...@henke37.cjb.net
Subject: Re: [Flashcoders] Highligting words in a textField
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Date: Monday, August 16, 2010, 2:11 AM
ktt wrote:

How is it possible to higlight some words in a

textFiled which is splited to lines (\n) ?

I would use the setTextFormat method if I had to use a
TextField. But I would rather use flash.text.engine and
assign a separate content element instead.
___
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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


RE: [Flashcoders] Highligting words in a textField

2010-08-16 Thread Benny
Maybe if you could give a sample text and the words that should be
highlighted we can advise you better. But in a nutshell I would use one or
more RegExp if the words you are looking for are only a few different ones.
If there are many or there is a complex syntax that needs to be analyzed
then probably you should look into a string tokenizer. 

- Benny

-Oorspronkelijk bericht-
Van: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] Namens ktt
Verzonden: maandag 16 augustus 2010 0:26
Aan: Flashcoders@chattyfig.figleaf.com
Onderwerp: [Flashcoders] Highligting words in a textField

Hello,

I have a multiline text in a dynamic textfield with a scroll.
How is it possible to higlight some words in a textFiled which is splited to
lines (\n) ?

Thank you in advance,
Ktt


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

__ Informatie van ESET NOD32 Antivirus, versie van database
viruskenmerken 5368 (20100815) __

Het bericht is gecontroleerd door  ESET NOD32 Antivirus.

http://www.eset.com



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


Re: [Flashcoders] Photo-realistic 3d in as3

2010-08-16 Thread Kerry Thompson
Mika wrote:

 For an upcoming project, I will need to dwelwe in the 3d world of flash. I
 am in the stage of choosing the engine.

 If you were to keep as sole paramater the best photo realistic render, to
 display products (very little animation, mostly rotate around), what engine
 would you choose ?

If FP 10 is your target, you probably wouldn't need anything but Flash
(or, more accurately, AS3). Flash now has z-order, and you can do
simple rotations just by manipulating the z depth of your faces.

It is kind of primitive, and you have to do some fancy dancing even to
rotate a cube, but it can be done.

Cordially,

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


[Flashcoders] image issue

2010-08-16 Thread Lehr, Theodore
I have an image that is getting blurred a bit - is there anyway to prevent this 
- I want it to be sharp

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


Re: [Flashcoders] image issue

2010-08-16 Thread Henrik Andersson

Lehr, Theodore wrote:

I have an image that is getting blurred a bit - is there anyway to prevent this 
- I want it to be sharp


Turn off smoothing. Display it at no higher resolution than the same 
resolution that it is stored. Make a non blurred image.

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


RE: [Flashcoders] image issue

2010-08-16 Thread Lehr, Theodore
smoothing is off I tried to fool around with the jpeg quality in the 
publish settings - but that did not seem to impact it when I look at the 
properties - the image looks fine in the preview window... it is when the movie 
is published...


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson 
[he...@henke37.cjb.net]
Sent: Monday, August 16, 2010 8:30 AM
To: Flash Coders List
Subject: Re: [Flashcoders] image issue

Lehr, Theodore wrote:
 I have an image that is getting blurred a bit - is there anyway to prevent 
 this - I want it to be sharp

Turn off smoothing. Display it at no higher resolution than the same
resolution that it is stored. Make a non blurred image.
___
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] image issue

2010-08-16 Thread Glen Pike

Hi,

That sounds like your compression settings for the image maybe 
overriding the SWF ones.


Right click the image in the Flash IDE library to check the 
compression settings for that image?


HTH

Glen

On 16/08/2010 13:49, Lehr, Theodore wrote:

smoothing is off I tried to fool around with the jpeg quality in the 
publish settings - but that did not seem to impact it when I look at the 
properties - the image looks fine in the preview window... it is when the movie 
is published...


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson 
[he...@henke37.cjb.net]
Sent: Monday, August 16, 2010 8:30 AM
To: Flash Coders List
Subject: Re: [Flashcoders] image issue

Lehr, Theodore wrote:
   

I have an image that is getting blurred a bit - is there anyway to prevent this 
- I want it to be sharp
 

Turn off smoothing. Display it at no higher resolution than the same
resolution that it is stored. Make a non blurred image.
___
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


   


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


Re: [Flashcoders] image issue

2010-08-16 Thread Matt Perkins
Make sure its on the stage at even x and y positions, no decimal
places. That's gotten me a few times.

--
Matt Perkins
-
http://www.nudoru.com

On Aug 16, 2010, at 8:49 AM, Lehr, Theodore ted_l...@federal.dell.com wrote:

 smoothing is off I tried to fool around with the jpeg quality in the 
 publish settings - but that did not seem to impact it when I look at the 
 properties - the image looks fine in the preview window... it is when the 
 movie is published...

 
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson 
 [he...@henke37.cjb.net]
 Sent: Monday, August 16, 2010 8:30 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] image issue

 Lehr, Theodore wrote:
 I have an image that is getting blurred a bit - is there anyway to prevent 
 this - I want it to be sharp

 Turn off smoothing. Display it at no higher resolution than the same
 resolution that it is stored. Make a non blurred image.
 ___
 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
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] image issue

2010-08-16 Thread Lehr, Theodore
I think that was it! thanks


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt Perkins 
[nudoru.m...@gmail.com]
Sent: Monday, August 16, 2010 9:09 AM
To: Flash Coders List
Subject: Re: [Flashcoders] image issue

Make sure its on the stage at even x and y positions, no decimal
places. That's gotten me a few times.

--
Matt Perkins
-
http://www.nudoru.com

On Aug 16, 2010, at 8:49 AM, Lehr, Theodore ted_l...@federal.dell.com wrote:

 smoothing is off I tried to fool around with the jpeg quality in the 
 publish settings - but that did not seem to impact it when I look at the 
 properties - the image looks fine in the preview window... it is when the 
 movie is published...

 
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson 
 [he...@henke37.cjb.net]
 Sent: Monday, August 16, 2010 8:30 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] image issue

 Lehr, Theodore wrote:
 I have an image that is getting blurred a bit - is there anyway to prevent 
 this - I want it to be sharp

 Turn off smoothing. Display it at no higher resolution than the same
 resolution that it is stored. Make a non blurred image.
 ___
 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
___
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


[Flashcoders] free fdt pure from facebook group

2010-08-16 Thread allandt bik-elliott (thefieldcomic.com)
hi guys

i'm just doing this myself but it seems that powerflasher is giving away fdt
pure until the end of the month. It's a bit like the way adobe was giving
flexbuilder away during the flashbuilder beta and the way drug dealers give
away a free sample to get you hooked

from the site:

*Sign-up for your free FDT Pure license today!*

We’re excited to have your User Group join our program and to celebrate
we’re giving away FDT Pure licenses (normally valued at $129) to all its
members. FDT Pure turns Eclipse into a powerful Flex/Flash, ActionScript,
MXML and haXe editor providing coders with sophisticated coding functions
including:

   - Advanced Code Completion
   - Outline View
   - Jump to Declaration
   - Open Resource
   - AS2, AS3, haXe, Flex and AIR support
   - Creation wizards
   - Switchable Flex SDKs
   - Flex SDK 3 and MTASC support
   - Flash CS3 and CS4 support
   - Customizable and incremental compilation
   - Syntactic and Semantic Highlighting

if you're interested, join the following facebook group
http://www.facebook.com/group.php?gid=140912345930270

you'll need the name of the facebook group and it's url when you sign up for
the fdt key

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


Re: RE: [Flashcoders] image issue

2010-08-16 Thread Nathan Mynarcik
Is your image on exact pixels? Make sure the x and y are not on decimals but
whole numbers.

On Aug 16, 2010 8:49 AM, Lehr, Theodore ted_l...@federal.dell.com wrote:

smoothing is off I tried to fool around with the jpeg quality in the
publish settings - but that did not seem to impact it when I look at the
properties - the image looks fine in the preview window... it is when the
movie is published...


From: flashcoders-boun...@chattyfig.figleaf.com [
flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [
he...@henke37.cjb.net]
Sent: Monday, August 16, 2010 8:30 AM
To: Flash Coders List
Subject: Re: [Flashcoders] image issue


Lehr, Theodore wrote:
 I have an image that is getting blurred a bit - is there anyway to prevent
...
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Facebook API GetPhotos not working

2010-08-16 Thread David Hunter

Thanks for the suggestion Steven. I've spent a week trying to work with 
Facebook and the best I have managed is an AIR app using the 
actionscript-facebook api with AIR CONNECT. I can successfully log in and allow 
extended permissions and upload a picture from a webcam. I'm reasonably happy 
with that. Although I can't seem to grant regular permissions to access a 
user's photos. Do you know how this is done? I have had a quick go with Graph 
API (just making URLLoader calls and ignoring the actionscript api) and I can 
get an access token but I'm getting errors trying to grant access to 
user_photos as I'm not passing a redirect_uri as a parameter. But as its an AIR 
app I don't want/need a redirect so what should I be doing? Do I need to switch 
this back to a web based app rather than desktop app to use this method? In 
which case logging in might become an issue again! Thanks for your help,  David
 Date: Sat, 14 Aug 2010 23:36:34 -0700
 From: flash...@stevensacks.net
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Facebook API GetPhotos not working
 
 I _highly_ recommend using the Graph API instead of the RESTful API.
 
 It's S much simpler and easier.
 
 http://developers.facebook.com/docs/api
 ___
 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


[Flashcoders] Saving MC as image

2010-08-16 Thread Lehr, Theodore
I am finding some tutorials for saving a mc as an image - using 
com.adobe.images.JPGEncoder ---

What I am finding seems to show that you need some type of server-side code to 
actually save the image locally (php, ...)

Is there a way to do it all just in Flash?

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


[Flashcoders] AS2.0 - Parsing special HTML characters in CDATA - onLoad vs onData

2010-08-16 Thread Greg Ligierko
Hi everyone,

It is a bit outdated topic of AS2.0. I just wonder if somebody can
explain me why onLoad and (inderectly) onData produces different
CDATA node values. I lost a lot of time trying to figure this out,
searching the Web did not help much...

Let's consider an XML file source:
  node![CDATA[lt;]]/node


1) After loading to an XML object, when tracing the xml in its onLoad
handler, the output is:
   nodelt;/node

When trying to pass the CDATA node's nodeValue to a HTML enabled text
field (as html text), then the text field is blank. The reason is that
nodeValue returns a single character  instead of lt;, so the
html text field tries to open a html tag displaying nothing...


2) When capturing onData and creating a new XML object from raw XML
file source like this:

 xml.onLoad=function(source){
var newXML = XML(source);
trace(newXML);
 }

...then the trace outputs:
   nodeamp;lt;/node (the ampersand is converted !)

After passing CDATA node's nodeValue to an HTML text field I got:
  (less than)
... as want and expected. The nodeValue returned lt; this time
instead of the single less-than character.

I couldn't find a way to display less-than after capturing onLoad
other than writing in the xml file:
  ![CDATA[.amp;lt;]]
Is this an onLoad parsing bug of the Flash Player ? Or maybe using
onLoad is just not a good idea and should be avoided ? I have a number
of onLoad handlers around in a big project, probably all need
conversion... 

Thanks,

Greg





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


RE: [Flashcoders] Trigonometry Problem

2010-08-16 Thread Merrill, Jason
 have the items align into a circle at the nearest point, *keeping the
   same angle*

I'm not sure what that means exactly, but check out Point.polar()


Jason Merrill 

Instructional Technology Architect
Bank of America   Global Learning 

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(Note: these resources are only available for Bank of America
associates)






-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of jared
stanley
Sent: Wednesday, August 11, 2010 3:51 PM
To: Flash Coders List
Subject: [Flashcoders] Trigonometry Problem

hey all,

working on getting a grid to expand into a circle.

I would like to:

   - place items in a grid
   - calculate angle from centerpoint(or any desired point)
   - have the items align into a circle at the nearest point, *keeping
the
   same angle*


here's my progress:
http://lab.freestyleinteractive.com/jared/maths/radius.html

the start and end is pretty close to what i want, but i'd like the items
to rearrange keeping the same angle, so an item that was on the top left
would stay on the top left area and an item to the right in the grid
would stay to the right in a circle.

hope this makes sense.

code is below, thanks for any help!

private function init():void{
//create and center container clip
mainClip = new MovieClip(); //container clip for all items
addChild(mainClip);
mainClip.x = stage.stageWidth / 2;
mainClip.y = stage.stageHeight / 2;

createParticles();

//draw circle around centerpoint for visual reference
mainClip.graphics.lineStyle(2, 0xff, .5);
mainClip.graphics.drawCircle(0, 0, 100);
//
stage.addEventListener(MouseEvent.CLICK, expand);

}

private function createParticles():void{
for(var i:int = 0; imaxParticles; i++){

var particle:Particle = new Particle();//just a sprite
with some properties
   //create grid, calculate original X  Y positons;
particle.i = i;
particle.x = (particle.width + 5) * (i % 20);
particle.y = (particle.height + 5) * Math.floor(i / 20);
particle.ox = particle.x;
particle.oy = particle.y;
//calculate angle from the 0 point;
var rad:Number = Math.atan2(mainClip.x-particle.y,
mainClip.y-particle.x);
var angle:Number = rad * 180 / Math.PI;
particle.angle = angle;
mainClip.addChild(particle);
//put all particles in an array to be referenced below
particlesArr.push(particle);
}

//code below is to recenter the grid on the centerpoint
instead of top left
var tmpw:Number = mainClip.width;
var tmph:Number = mainClip.height;
//loop through to offset the grid so it's even within the
page
for(i = 0; iparticlesArr.length; i++){
var p:Particle = particlesArr[i];
p.x -= tmpw* 0.5;
p.y -= tmph* 0.5;
p.ox = p.x;
p.oy = p.y
}

addEventListener(Event.ENTER_FRAME, moveAll);
}


private function expand(e:MouseEvent):void{
isGrid = !isGrid;

for each (var p in particlesArr) {
p.tgtx = Math.cos(p.angle)*mag;
p.tgty = Math.sin(p.angle)*mag;
}

}


private function moveAll(e:Event):void{
var mainTgtX:Number;
var mainTgtY:Number;

if(!isGrid){
for each (var p in particlesArr) {
p.x += (p.tgtx - p.x) /20;
p.y += (p.tgty - p.y) /20;
}

}else {

   for each (p in particlesArr) {
p.x += (p.ox - p.x) /20;
p.y += (p.oy- p.y) /10;
}

}
___
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] Saving MC as image

2010-08-16 Thread Henrik Andersson

Lehr, Theodore wrote:

 server-side code ... save the image locally


I hope that you see the issue here.

Just use a FileRefference instead.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Trigonometry Problem

2010-08-16 Thread Patrick Matte
I always refer to this for all my trigonometry needs

http://www.actionscript.org/resources/articles/155/1/trigonometry-and-flash/
Page1.html




 From: Merrill, Jason jason.merr...@bankofamerica.com
 Reply-To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Date: Mon, 16 Aug 2010 12:57:22 -0400
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Conversation: [Flashcoders] Trigonometry Problem
 Subject: RE: [Flashcoders] Trigonometry Problem
 
 have the items align into a circle at the nearest point, *keeping the
same angle*
 
 I'm not sure what that means exactly, but check out Point.polar()
 
 
 Jason Merrill 
 
 Instructional Technology Architect
 Bank of America   Global Learning
 
 Join the Bank of America Flash Platform Community  and visit our
 Instructional Technology Design Blog
 (Note: these resources are only available for Bank of America
 associates)
 
 
 
 
 
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of jared
 stanley
 Sent: Wednesday, August 11, 2010 3:51 PM
 To: Flash Coders List
 Subject: [Flashcoders] Trigonometry Problem
 
 hey all,
 
 working on getting a grid to expand into a circle.
 
 I would like to:
 
- place items in a grid
- calculate angle from centerpoint(or any desired point)
- have the items align into a circle at the nearest point, *keeping
 the
same angle*
 
 
 here's my progress:
 http://lab.freestyleinteractive.com/jared/maths/radius.html
 
 the start and end is pretty close to what i want, but i'd like the items
 to rearrange keeping the same angle, so an item that was on the top left
 would stay on the top left area and an item to the right in the grid
 would stay to the right in a circle.
 
 hope this makes sense.
 
 code is below, thanks for any help!
 
 private function init():void{
 //create and center container clip
 mainClip = new MovieClip(); //container clip for all items
 addChild(mainClip);
 mainClip.x = stage.stageWidth / 2;
 mainClip.y = stage.stageHeight / 2;
 
 createParticles();
 
 //draw circle around centerpoint for visual reference
 mainClip.graphics.lineStyle(2, 0xff, .5);
 mainClip.graphics.drawCircle(0, 0, 100);
 //
 stage.addEventListener(MouseEvent.CLICK, expand);
 
 }
 
 private function createParticles():void{
 for(var i:int = 0; imaxParticles; i++){
 
 var particle:Particle = new Particle();//just a sprite
 with some properties
//create grid, calculate original X  Y positons;
 particle.i = i;
 particle.x = (particle.width + 5) * (i % 20);
 particle.y = (particle.height + 5) * Math.floor(i / 20);
 particle.ox = particle.x;
 particle.oy = particle.y;
 //calculate angle from the 0 point;
 var rad:Number = Math.atan2(mainClip.x-particle.y,
 mainClip.y-particle.x);
 var angle:Number = rad * 180 / Math.PI;
 particle.angle = angle;
 mainClip.addChild(particle);
 //put all particles in an array to be referenced below
 particlesArr.push(particle);
 }
 
 //code below is to recenter the grid on the centerpoint
 instead of top left
 var tmpw:Number = mainClip.width;
 var tmph:Number = mainClip.height;
 //loop through to offset the grid so it's even within the
 page
 for(i = 0; iparticlesArr.length; i++){
 var p:Particle = particlesArr[i];
 p.x -= tmpw* 0.5;
 p.y -= tmph* 0.5;
 p.ox = p.x;
 p.oy = p.y
 }
 
 addEventListener(Event.ENTER_FRAME, moveAll);
 }
 
 
 private function expand(e:MouseEvent):void{
 isGrid = !isGrid;
 
 for each (var p in particlesArr) {
 p.tgtx = Math.cos(p.angle)*mag;
 p.tgty = Math.sin(p.angle)*mag;
 }
 
 }
 
 
 private function moveAll(e:Event):void{
 var mainTgtX:Number;
 var mainTgtY:Number;
 
 if(!isGrid){
 for each (var p in particlesArr) {
 p.x += (p.tgtx - p.x) /20;
 p.y += (p.tgty - p.y) /20;
 }
 
 }else {
 
for each (p in particlesArr) {
 p.x += (p.ox - p.x) /20;
 p.y += (p.oy- p.y) /10;
 }
 
 }
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 

Re: [Flashcoders] Photo-realistic 3d in as3

2010-08-16 Thread mika
I plan to target FP10, but I have a 3d designer doing the modelling work, so
i will need to import models. The app is part of a large project, and I want
it to be able to grow overtime.
A solid engine is hence required.

The models will range from soccer balls, rugby ball, hand ball ... to
shirts, sockets and so on. But I'd like to be able to extend to any kind of
3d model over time.
We might also model a full character to 'wear' the products.


On Mon, Aug 16, 2010 at 11:09, Kerry Thompson al...@cyberiantiger.bizwrote:

 Mika wrote:

  For an upcoming project, I will need to dwelwe in the 3d world of flash.
 I
  am in the stage of choosing the engine.
 
  If you were to keep as sole paramater the best photo realistic render, to
  display products (very little animation, mostly rotate around), what
 engine
  would you choose ?

 If FP 10 is your target, you probably wouldn't need anything but Flash
 (or, more accurately, AS3). Flash now has z-order, and you can do
 simple rotations just by manipulating the z depth of your faces.

 It is kind of primitive, and you have to do some fancy dancing even to
 rotate a cube, but it can be done.

 Cordially,

 Kerry Thompson
 ___
 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] Saving MC as image

2010-08-16 Thread Taka Kojima
Like Henrik says, just use FileReference.

http://www.quietless.com/kitchen/dynamically-create-an-image-in-flash-and-save-it-to-the-desktop-or-server/

On Mon, Aug 16, 2010 at 10:01 AM, Henrik Andersson he...@henke37.cjb.netwrote:

 Lehr, Theodore wrote:

  server-side code ... save the image locally


 I hope that you see the issue here.

 Just use a FileRefference instead.

 ___
 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] Photo-realistic 3d in as3

2010-08-16 Thread Merrill, Jason
Then you should probably narrow it down between Away3D and
Papervision3D.  Adobe is announcing 3D support for the Flash player at
Max in October it sounds like, but that's a ways off.

I know Papervision3D can do what you're asking.


Jason Merrill 

Instructional Technology Architect
Bank of America   Global Learning 

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(Note: these resources are only available for Bank of America
associates)






-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of mika
Sent: Monday, August 16, 2010 1:47 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Photo-realistic 3d in as3

I plan to target FP10, but I have a 3d designer doing the modelling
work, so i will need to import models. The app is part of a large
project, and I want it to be able to grow overtime.
A solid engine is hence required.

The models will range from soccer balls, rugby ball, hand ball ... to
shirts, sockets and so on. But I'd like to be able to extend to any kind
of 3d model over time.
We might also model a full character to 'wear' the products.


On Mon, Aug 16, 2010 at 11:09, Kerry Thompson
al...@cyberiantiger.bizwrote:

 Mika wrote:

  For an upcoming project, I will need to dwelwe in the 3d world of
flash.
 I
  am in the stage of choosing the engine.
 
  If you were to keep as sole paramater the best photo realistic 
  render, to display products (very little animation, mostly rotate 
  around), what
 engine
  would you choose ?

 If FP 10 is your target, you probably wouldn't need anything but Flash

 (or, more accurately, AS3). Flash now has z-order, and you can do 
 simple rotations just by manipulating the z depth of your faces.

 It is kind of primitive, and you have to do some fancy dancing even to

 rotate a cube, but it can be done.

 Cordially,

 Kerry Thompson
 ___
 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
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Photo-realistic 3d in as3

2010-08-16 Thread Taka Kojima
I would like to point out that photo realistic 3d in Flash is not exactly
possible. Especially, seeing as this is your first 3D project, I feel
obligated to inform you of this.

Most of the better looking 3D sites done with Flash, use a mix of
PaperVision and optical illusions of rendered animation (i.e. after effects
pieces) and dovetail them together. Importing 3D models to use in AS3
through pv3d, is not exactly fast. Models have to have a low polygon count
otherwise your fps is going to be horrible.

On Mon, Aug 16, 2010 at 10:50 AM, Merrill, Jason 
jason.merr...@bankofamerica.com wrote:

 Then you should probably narrow it down between Away3D and
 Papervision3D.  Adobe is announcing 3D support for the Flash player at
 Max in October it sounds like, but that's a ways off.

 I know Papervision3D can do what you're asking.


 Jason Merrill

 Instructional Technology Architect
 Bank of America   Global Learning

 Join the Bank of America Flash Platform Community  and visit our
 Instructional Technology Design Blog
 (Note: these resources are only available for Bank of America
 associates)






 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of mika
 Sent: Monday, August 16, 2010 1:47 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Photo-realistic 3d in as3

 I plan to target FP10, but I have a 3d designer doing the modelling
 work, so i will need to import models. The app is part of a large
 project, and I want it to be able to grow overtime.
 A solid engine is hence required.

 The models will range from soccer balls, rugby ball, hand ball ... to
 shirts, sockets and so on. But I'd like to be able to extend to any kind
 of 3d model over time.
 We might also model a full character to 'wear' the products.


 On Mon, Aug 16, 2010 at 11:09, Kerry Thompson
 al...@cyberiantiger.bizwrote:

  Mika wrote:
 
   For an upcoming project, I will need to dwelwe in the 3d world of
 flash.
  I
   am in the stage of choosing the engine.
  
   If you were to keep as sole paramater the best photo realistic
   render, to display products (very little animation, mostly rotate
   around), what
  engine
   would you choose ?
 
  If FP 10 is your target, you probably wouldn't need anything but Flash

  (or, more accurately, AS3). Flash now has z-order, and you can do
  simple rotations just by manipulating the z depth of your faces.
 
  It is kind of primitive, and you have to do some fancy dancing even to

  rotate a cube, but it can be done.
 
  Cordially,
 
  Kerry Thompson
  ___
  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
 ___
 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] Photo-realistic 3d in as3

2010-08-16 Thread mika
Thats the path I will probably take. Havent found any valuable
usability/features comparisons between sandy3d and away3d tho.
As for papervision, this
http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/ sounds like
away3d is the one to keep.

I read Thibault Imbert thoughts about FP11 and 3d, but my deadline is in
october, so that's out of the loop.

Thanks for the input.

Could you point me out to some ressources about modeling good practices for
away3d ?

mika

On Mon, Aug 16, 2010 at 19:50, Merrill, Jason 
jason.merr...@bankofamerica.com wrote:

 Then you should probably narrow it down between Away3D and
 Papervision3D.  Adobe is announcing 3D support for the Flash player at
 Max in October it sounds like, but that's a ways off.

 I know Papervision3D can do what you're asking.


 Jason Merrill

 Instructional Technology Architect
 Bank of America   Global Learning

 Join the Bank of America Flash Platform Community  and visit our
 Instructional Technology Design Blog
 (Note: these resources are only available for Bank of America
 associates)






 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of mika
 Sent: Monday, August 16, 2010 1:47 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Photo-realistic 3d in as3

 I plan to target FP10, but I have a 3d designer doing the modelling
 work, so i will need to import models. The app is part of a large
 project, and I want it to be able to grow overtime.
 A solid engine is hence required.

 The models will range from soccer balls, rugby ball, hand ball ... to
 shirts, sockets and so on. But I'd like to be able to extend to any kind
 of 3d model over time.
 We might also model a full character to 'wear' the products.


 On Mon, Aug 16, 2010 at 11:09, Kerry Thompson
 al...@cyberiantiger.bizwrote:

  Mika wrote:
 
   For an upcoming project, I will need to dwelwe in the 3d world of
 flash.
  I
   am in the stage of choosing the engine.
  
   If you were to keep as sole paramater the best photo realistic
   render, to display products (very little animation, mostly rotate
   around), what
  engine
   would you choose ?
 
  If FP 10 is your target, you probably wouldn't need anything but Flash

  (or, more accurately, AS3). Flash now has z-order, and you can do
  simple rotations just by manipulating the z depth of your faces.
 
  It is kind of primitive, and you have to do some fancy dancing even to

  rotate a cube, but it can be done.
 
  Cordially,
 
  Kerry Thompson
  ___
  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
 ___
 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] Photo-realistic 3d in as3

2010-08-16 Thread Kerry Thompson
Mika wrote:

 I plan to target FP10, but I have a 3d designer doing the modelling work, so
 i will need to import models. The app is part of a large project, and I want
 it to be able to grow overtime.
 A solid engine is hence required.

 The models will range from soccer balls, rugby ball, hand ball ... to
 shirts, sockets and so on. But I'd like to be able to extend to any kind of
 3d model over time.
 We might also model a full character to 'wear' the products.

Then Flash's rather weak built-in 3D capabilities won't work for you.
They're good for primitives (spheres, cubes, and the like), but not
complex models.

You should probably look into Papervision--it's a much more capable 3D
engine. Or, if you're not married to Flash, you should look into Unity
or Director. Both offer much more powerful 3D engines. Unity is
probably easier to user, and the company seems to have a stronger
commitment to it than Adobe does to Shockwave, but the Shockwave
player penetration is way, way higher than Unity's. And, despite
rumors you may have heard, Director isn't dead. I hear rumors that a
Director update is coming, and may be in alpha or beta testing.

And, while you're exploring the engine, You might want to advise your
3D designers to go light on the polygons (I assume your models will be
polygon-based, and not bones). The more polygons your model has, the
more it will tax the system.

I'd use enough to make it look good, but not go overboard. It doesn't
sound like you're going to need things like lights or shaders, which
also can stress the system, but you still need to keep the poly count
low.

Cordially,

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


RE: [Flashcoders] Photo-realistic 3d in as3

2010-08-16 Thread Merrill, Jason
 As for papervision, this
http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/ 
sounds like away3d is the one to keep.

Possibly, given the Papervision3D team has changed and lately doesn't
seem to be doing much development, but that post, from almost a full
year ago, was just about one of the core team members leaving.
Papervision3D as a library is still in wide use.  Even if Papervision3D
doesn't ever go to the next version, I wouldn't completely throw it out
of consideration.  I'd google some stuff on Papversion3D vs. Away3D
and do some feature comparisions.


Jason Merrill 

Instructional Technology Architect
Bank of America   Global Learning 

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(Note: these resources are only available for Bank of America
associates)


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


Re: [Flashcoders] Photo-realistic 3d in as3

2010-08-16 Thread Karl DeSaulniers

Hi,
I guess I'll chime in one more time and say Swift 3D is a very  
powerful tool for flash 3d.
Swift was built to integrate to flash and it also will let you import  
your 3DSMAX files (and many other formats including Papervision3D  
support) into it.
But I believe, but don't quote me, that swift has a poly reduction  
filter so you can bring in your 3DSMAX file in and if it has too many  
polys, it will help you reduce them.
Kind of like illustrators simplify path filter. Again, Swift was  
built so you could create 3D FOR Flash.


I have seed some amazing 3D work from swift.
Haven't heard too many talk about it though, but it caught my eye.
Might be worth a look-see.

http://www.erain.com/


Best,


Karl


On Aug 16, 2010, at 1:46 PM, Merrill, Jason wrote:


As for papervision, this
http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/
sounds like away3d is the one to keep.


Possibly, given the Papervision3D team has changed and lately doesn't
seem to be doing much development, but that post, from almost a full
year ago, was just about one of the core team members leaving.
Papervision3D as a library is still in wide use.  Even if  
Papervision3D
doesn't ever go to the next version, I wouldn't completely throw it  
out

of consideration.  I'd google some stuff on Papversion3D vs. Away3D
and do some feature comparisions.


Jason Merrill

Instructional Technology Architect
Bank of America   Global Learning

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(Note: these resources are only available for Bank of America
associates)


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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


RE: [Flashcoders] Photo-realistic 3d in as3

2010-08-16 Thread Merrill, Jason
 Swift was built to integrate to flash and 

Regarding that, depending on what kind of rotation you require, Swift3D
might work. But know a few things about that:

1) Swift 3D, as one of the export options, exports to Papervision3D, so
it will look as good as things rendered with Papervision3D look. Which
is pretty good, but it may not be good enough for you if you are going
for photo realism.
2) Swift 3D also exports sequences and .swf animations.  This is cool,
and you could tweak rendering settings to get the optimal look, but you
will be confined to rotate the product one way (for example, export an
animation of the product rotating 360 on a single axis) but would not
allow for dynamic user controlled rotation if you get what I mean - at
least along a single axis.  Actionscript could be used to control how
far around the object is rotated based on mouse position or whatever.
3) If you really want photo realism, render the entire sequence as a
movie, .swf or bitmap sequence in the original 3D renderer app (like
Renderman, Maya, SoftImage, Lightwave, Blender, or StudioMax or
whatever) and bring that into flash.  This will have the same
interactive limitations as #2 above, but could potentially look better
than Swift3D.
4) some 3D apps like Maya have Flash animation export, (it uses Swift
3D's renderer) so that might also be an option (though same interactive
limitations again as #2)


Jason Merrill 

Instructional Technology Architect
Bank of America   Global Learning 

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(Note: these resources are only available for Bank of America
associates)






-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: Monday, August 16, 2010 3:37 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Photo-realistic 3d in as3

Hi,
I guess I'll chime in one more time and say Swift 3D is a very powerful
tool for flash 3d.
Swift was built to integrate to flash and it also will let you import
your 3DSMAX files (and many other formats including Papervision3D
support) into it.
But I believe, but don't quote me, that swift has a poly reduction
filter so you can bring in your 3DSMAX file in and if it has too many
polys, it will help you reduce them.
Kind of like illustrators simplify path filter. Again, Swift was built
so you could create 3D FOR Flash.

I have seed some amazing 3D work from swift.
Haven't heard too many talk about it though, but it caught my eye.
Might be worth a look-see.

http://www.erain.com/


Best,


Karl


On Aug 16, 2010, at 1:46 PM, Merrill, Jason wrote:

 As for papervision, this
 http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/
 sounds like away3d is the one to keep.

 Possibly, given the Papervision3D team has changed and lately doesn't 
 seem to be doing much development, but that post, from almost a full 
 year ago, was just about one of the core team members leaving.
 Papervision3D as a library is still in wide use.  Even if 
 Papervision3D doesn't ever go to the next version, I wouldn't 
 completely throw it out of consideration.  I'd google some stuff on 
 Papversion3D vs. Away3D
 and do some feature comparisions.


 Jason Merrill

 Instructional Technology Architect
 Bank of America   Global Learning

 Join the Bank of America Flash Platform Community  and visit our 
 Instructional Technology Design Blog
 (Note: these resources are only available for Bank of America
 associates)


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

Karl DeSaulniers
Design Drumm
http://designdrumm.com

___
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] Saving MC as image

2010-08-16 Thread Lehr, Theodore
Thanks - that is doing the trick...

One issue: I am doing:

var file:FileReference = new FileReference();

var jpgSrc:BitmapData = new MitmapData(mc.width, mc.height);
jpgSrc.draw(mc);

var jpgEncoder:JPGEncoder = new JPGEncoder(85);
var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);

file.save(jpgStream, 'test.jpg');


The issue I am having is that the mc is not lining up with the image... the 
image seems to be capturing the stage at 0,0 which is only getting like the top 
right of the mc anyway to line the mc up with the jpg?





From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson 
[he...@henke37.cjb.net]
Sent: Monday, August 16, 2010 1:01 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Saving MC as image

Lehr, Theodore wrote:
  server-side code ... save the image locally

I hope that you see the issue here.

Just use a FileRefference instead.
___
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] Photo-realistic 3d in as3

2010-08-16 Thread Karl DeSaulniers
I believe it will let you, in swift, create an interactive animation  
utilizing the vectors
of your polys and integrate AS code to control it, but it is output  
to a swf file like Jason was saying.
It has been a while, but I saw a example that had a wire frame with  
graphics on it that was rotatable by the user and was linked to  
popups that had info in them.
Meaning you could probably, for your project, pull off the 360  
rotation plus link to descriptors, etc, etc.


The example I saw was from Swift 3, but Swift 4 is promising IMO.  
Take a look...


http://www.erain.com/products/swift3d/examples/

But as a side note, I also think Unity 3D and Away 3D would be a good  
choice as well for the whole photo realism.

Just depends on what env you want to work with.

Best,
Karl


On Aug 16, 2010, at 3:02 PM, Merrill, Jason wrote:


Swift was built to integrate to flash and


Regarding that, depending on what kind of rotation you require,  
Swift3D

might work. But know a few things about that:

1) Swift 3D, as one of the export options, exports to  
Papervision3D, so

it will look as good as things rendered with Papervision3D look. Which
is pretty good, but it may not be good enough for you if you are going
for photo realism.
2) Swift 3D also exports sequences and .swf animations.  This is cool,
and you could tweak rendering settings to get the optimal look, but  
you

will be confined to rotate the product one way (for example, export an
animation of the product rotating 360 on a single axis) but would not
allow for dynamic user controlled rotation if you get what I mean  
- at

least along a single axis.  Actionscript could be used to control how
far around the object is rotated based on mouse position or whatever.
3) If you really want photo realism, render the entire sequence as a
movie, .swf or bitmap sequence in the original 3D renderer app (like
Renderman, Maya, SoftImage, Lightwave, Blender, or StudioMax or
whatever) and bring that into flash.  This will have the same
interactive limitations as #2 above, but could potentially look better
than Swift3D.
4) some 3D apps like Maya have Flash animation export, (it uses Swift
3D's renderer) so that might also be an option (though same  
interactive

limitations again as #2)


Jason Merrill

Instructional Technology Architect
Bank of America   Global Learning

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(Note: these resources are only available for Bank of America
associates)






-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: Monday, August 16, 2010 3:37 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Photo-realistic 3d in as3

Hi,
I guess I'll chime in one more time and say Swift 3D is a very  
powerful

tool for flash 3d.
Swift was built to integrate to flash and it also will let you import
your 3DSMAX files (and many other formats including Papervision3D
support) into it.
But I believe, but don't quote me, that swift has a poly reduction
filter so you can bring in your 3DSMAX file in and if it has too many
polys, it will help you reduce them.
Kind of like illustrators simplify path filter. Again, Swift was built
so you could create 3D FOR Flash.

I have seed some amazing 3D work from swift.
Haven't heard too many talk about it though, but it caught my eye.
Might be worth a look-see.

http://www.erain.com/


Best,


Karl


On Aug 16, 2010, at 1:46 PM, Merrill, Jason wrote:


As for papervision, this
http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/
sounds like away3d is the one to keep.


Possibly, given the Papervision3D team has changed and lately doesn't
seem to be doing much development, but that post, from almost a full
year ago, was just about one of the core team members leaving.
Papervision3D as a library is still in wide use.  Even if
Papervision3D doesn't ever go to the next version, I wouldn't
completely throw it out of consideration.  I'd google some stuff on
Papversion3D vs. Away3D
and do some feature comparisions.


Jason Merrill

Instructional Technology Architect
Bank of America   Global Learning

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(Note: these resources are only available for Bank of America
associates)


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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

___
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


Karl DeSaulniers
Design Drumm

Re: [Flashcoders] Photo-realistic 3d in as3

2010-08-16 Thread Peter B
On 17 August 2010 07:31, Karl DeSaulniers k...@designdrumm.com wrote:

 I believe it will let you, in swift, create an interactive animation
 utilizing the vectors
 of your polys and integrate AS code to control it,


Swift is just generating the polygon ,odel and textures. In order to add
interactivity you're still going to need a 3D engine like Papervision. imho
if you're going to take this approach you'd be better to use a 'real' 3D
modeller, asJason has suggested.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders