Re: [Flashcoders] rotationX not working In Flex actionscript Projects

2009-04-11 Thread Muzak
In FlexBuilder, in the Project properties (right click the project select properties), set the required Flash Player to 10 in the 
Flex Compiler tab.

By default FlexBuilder compiles to Flash 9, which doesn't have the new 3D stuff.

regards,
Muzak

- Original Message - 
From: "Omar Fouad" 

To: "Flash Coders List" 
Sent: Saturday, April 11, 2009 10:51 PM
Subject: [Flashcoders] rotationX not working In Flex actionscript Projects


Hi all,

Since I switched to Mac now, I am using Flex Builder for my ActionScript
Projects, I've got the latest Flex SDK 3.2 (I think that is the latest) and
edited the flex_config xml file. I've added the playerglobal swc file to the
build path of Flex for Auto Completion and all.

Here is the problem: it seems that the specific FP 10 new properties as .z,
.rotationX, .rotationY and .rotationZ are not recognized by the compiler.

mc.rotationX = 45; // this is not working as it is ignored.

Using Tweener:
Tweener.addTween(mc, { rotationX:45, time:1}); // throws "Property rotationX
not found on [object name ]  and there is no default value"

Is there anything wrong I am doing in flex?

Thanks for the support.

Cordially.

--
Omar M. Fouad - Adobe Flashâ„¢ Platform Developer
www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: m...@omar-fouad.net


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


Re: [Flashcoders] How to smooth bitmap?

2009-04-11 Thread Patrick Matte
Here's a facebook API.

http://code.google.com/p/facebook-actionscript-api/




> From: Pavel Repkin 
> Reply-To: Flash Coders List 
> Date: Sat, 11 Apr 2009 20:28:14 +0400
> To: , Flash Coders List
> 
> Subject: Re: [Flashcoders] How to smooth bitmap?
> 
> Thanks, Latcho!
> 
> Inside discussions over BitmapData.draw() on Flash-help site I've found this
> script
>  $file = $_GET["file"];
> header("Content-Type: image/jpg");
> readfile($file);
> ?>
> 
> But it looks very insecure.
> Do you know a proper one with correct input checking?
> I'm a new to PHP and it's hard for me to make this script secure.
> 
> Yes, there is the crossdomain.xml on Facebook, but it opens Facebook for a
> small set of domains, mostly of them are Facebook servers. Have a look
> facebook.com/crossdomain.xml
> 
> Of course there are several Facebook APIs, but the ones I've seen do nothing
> special about image download. Though they help to easily access image url.
> And, as far as I know, there are no official Facebook Flash API.
> 
> 
> On Sat, Apr 11, 2009 at 7:29 PM, Latcho  wrote:
> 
>> I'm afraid that you need to implement a proxy script on your own server
>> that loads the image from facebook.
>> But isn't there a crossdomain.xml to load from FB ? Or isn't there an API
>> (yet) ?
>> Latcho
>> 
>> Pavel Repkin wrote:
>> 
>>> Hey!
>>> 
>>> I have a bitmap image loaded from external site (Facebook user avatar).
>>> Its size is 50x50 pixels and it looks very pixelated when the Flash Stage
>>> size changes.
>>> The image would look much better if it was smoothed.
>>> 
>>> But, smoothing does not work for images loaded from external domains.
>>> MovieClip.forceSmoothing = true just does not work.
>>> However if the image resides on the same server as the script, smoothing
>>> works like a charm.
>>> 
>>> Do you know how can I smooth the bitmap?
>>> Is it possible?
>>> 
>>> AS 2.0, FP 9.0
>>> 
>>> Pasha.
>>> ___
>>> 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



This e-mail is intended only for the named person or entity to which it is 
addressed and contains valuable 
business information that is proprietary, privileged, confidential and/or 
otherwise protected from disclosure.

If you received this e-mail in error, any review, use, dissemination, 
distribution or copying of this e-mail 
is strictly prohibited. Please notify us immediately of the error via e-mail to 
disclai...@tbwachiat.com and 
please delete the e-mail from your system, retaining no copies in any media. We 
appreciate your cooperation.

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


[Flashcoders] rotationX not working In Flex actionscript Projects

2009-04-11 Thread Omar Fouad
Hi all,

Since I switched to Mac now, I am using Flex Builder for my ActionScript
Projects, I've got the latest Flex SDK 3.2 (I think that is the latest) and
edited the flex_config xml file. I've added the playerglobal swc file to the
build path of Flex for Auto Completion and all.

Here is the problem: it seems that the specific FP 10 new properties as .z,
.rotationX, .rotationY and .rotationZ are not recognized by the compiler.

mc.rotationX = 45; // this is not working as it is ignored.

Using Tweener:
Tweener.addTween(mc, { rotationX:45, time:1}); // throws "Property rotationX
not found on [object name ]  and there is no default value"

Is there anything wrong I am doing in flex?

Thanks for the support.

Cordially.

-- 
Omar M. Fouad - Adobe Flash™ Platform Developer
www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: m...@omar-fouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Math: Is this correct?

2009-04-11 Thread Mark Winterhalder
On Sat, Apr 11, 2009 at 5:57 PM, Jer Brand  wrote:
> Thanks Mark, Gonna go read with the faq's.  And you hit the nail on the
> head. It looked right, but the behavior wasn't quite right

There's a picture on the Wikipedia page, just look at where the axis'
go and replace x, y and z with where they go in your coordinate
system.

> Time to learn some vector math I suppose. Thanks again everyone. I hafta
> wonder if it'd be easier if I just made the day job pay for a few math
> courses, I work on campus, so it's not like it'd cost em.

I'm not going to argue that a formal math course is a bad idea, it
certainly would be valuable and be a better foundation than a random
web tutorial. However... formal math courses are very, well, formal.
:)
The way I see it, to simply go through an online tutorial would be
more pragmatic. All you need are two or three dimensions, not a
general definition. Frankly, it's usually enough to have heard
something before so you know it's there and can look it up when you
need it.
Then again, if the course would be during work hours, then why not
follow up with one after you've got a basic understanding.

Of course, those on the list with a formal math background will disagree. :)

Mark

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


Re: [Flashcoders] How to smooth bitmap?

2009-04-11 Thread Pavel Repkin
Thanks, Latcho!

Inside discussions over BitmapData.draw() on Flash-help site I've found this
script


But it looks very insecure.
Do you know a proper one with correct input checking?
I'm a new to PHP and it's hard for me to make this script secure.

Yes, there is the crossdomain.xml on Facebook, but it opens Facebook for a
small set of domains, mostly of them are Facebook servers. Have a look
facebook.com/crossdomain.xml

Of course there are several Facebook APIs, but the ones I've seen do nothing
special about image download. Though they help to easily access image url.
And, as far as I know, there are no official Facebook Flash API.


On Sat, Apr 11, 2009 at 7:29 PM, Latcho  wrote:

> I'm afraid that you need to implement a proxy script on your own server
> that loads the image from facebook.
> But isn't there a crossdomain.xml to load from FB ? Or isn't there an API
> (yet) ?
> Latcho
>
> Pavel Repkin wrote:
>
>> Hey!
>>
>> I have a bitmap image loaded from external site (Facebook user avatar).
>> Its size is 50x50 pixels and it looks very pixelated when the Flash Stage
>> size changes.
>> The image would look much better if it was smoothed.
>>
>> But, smoothing does not work for images loaded from external domains.
>> MovieClip.forceSmoothing = true just does not work.
>> However if the image resides on the same server as the script, smoothing
>> works like a charm.
>>
>> Do you know how can I smooth the bitmap?
>> Is it possible?
>>
>> AS 2.0, FP 9.0
>>
>> Pasha.
>> ___
>> 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] Math: Is this correct?

2009-04-11 Thread Jer Brand
Thanks Mark, Gonna go read with the faq's.  And you hit the nail on the
head. It looked right, but the behavior wasn't quite right
Time to learn some vector math I suppose. Thanks again everyone. I hafta
wonder if it'd be easier if I just made the day job pay for a few math
courses, I work on campus, so it's not like it'd cost em.
.
Jer
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to smooth bitmap?

2009-04-11 Thread Latcho
I'm afraid that you need to implement a proxy script on your own server 
that loads the image from facebook.
But isn't there a crossdomain.xml to load from FB ? Or isn't there an 
API (yet) ?

Latcho

Pavel Repkin wrote:

Hey!

I have a bitmap image loaded from external site (Facebook user avatar).
Its size is 50x50 pixels and it looks very pixelated when the Flash Stage
size changes.
The image would look much better if it was smoothed.

But, smoothing does not work for images loaded from external domains.
MovieClip.forceSmoothing = true just does not work.
However if the image resides on the same server as the script, smoothing
works like a charm.

Do you know how can I smooth the bitmap?
Is it possible?

AS 2.0, FP 9.0

Pasha.
___
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] How to smooth bitmap?

2009-04-11 Thread Pavel Repkin
Hey!

I have a bitmap image loaded from external site (Facebook user avatar).
Its size is 50x50 pixels and it looks very pixelated when the Flash Stage
size changes.
The image would look much better if it was smoothed.

But, smoothing does not work for images loaded from external domains.
MovieClip.forceSmoothing = true just does not work.
However if the image resides on the same server as the script, smoothing
works like a charm.

Do you know how can I smooth the bitmap?
Is it possible?

AS 2.0, FP 9.0

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


Re: [Flashcoders] onEnterFrame question

2009-04-11 Thread Zeh Fernando
>
> Hi Zeh,
> I tested the theory and put the onEnterFrame = null inside if(loaded ==
> filesize) right at the beginning and it did not finish the alpha that was
> under it.
> Does that mean that my code does not finish because I made it null or does
> that mean that it does matter where you place the termination?
>

No, it's an unrelated error. The function continues to execute. You did not
make the code itself null, just a reference you have to it. You can nullify
the reference at the very start of the function, and the coe will continue
to work as usual until the function ends.

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


Re: [Flashcoders] Math: Is this correct?

2009-04-11 Thread Mark Winterhalder
On Fri, Apr 10, 2009 at 4:52 PM, Jer Brand  wrote:
> Anyone care to school me on this or confirm the math is correct?

It looks correct to me.

> public static function polarToCartesian3D(distance:Number, degrees1:Number,
> degrees2:Number ):Point3D

Ah, that's your problem right there -- your code converts /Spherical/
coordinates to Cartesian, not /Polar/ coordinates... :)

Seriously, though, it's correct. The ever knowing Wikipedia agrees
with you, too:


However, your axis might not align to the coordinate system your code
(and Wikipedia) assumes, which might explain unexpected but
almost-right looking behaviour. I usually use X right, Y down and Z
into the screen, because that seems like the natural way for screen
coordinates. If that's what you're using, then you have to rearrange
the math in your code accordingly, i.e, swap the x, y and z around to
make it fit.

If you want to get into that, I recommend you refresh your vector math
skills and have another look at matrix math. You'll need that all the
time. It's actually not that difficult, and it doesn't require
anything but very basic prior math knowledge to get into. There are
many vector math tutorials on the web.

Finally, despite of Wikipedia and Math World, I still find those two
ugly text based old skool Usenet FAQs invaluable:



They'll answer pretty much any question you could possibly have.

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


Re: [Flashcoders] Loading MC

2009-04-11 Thread Karl DeSaulniers

Thanks Cor,
I do appreciate that, in leu though he did say "not everyone".

The reason I posted the code in that manner was because I felt  
"you" (whom ever it would be)

would need all the code to really assess this problem I am having.
Pardon me I am new to forums.

I have followed your responses to posts and seen how you work with  
peoples codes. You do like em chunky. :P
I do understand and appreciate a form of etiquette with these forums  
though.
So I learned from this how to better assess how I wanted to ask for  
help.

(which in turn helps me understand my code a little more
because I have to think about it more to explain it.. Win Win  
situation  :D)


Anyhoo,
To put it short, because my code is trying to find the width and  
height from a dynamic image

that is loaded with this class, There is a hiccup.

The class loads a bitmap into a mc then deletes that mc and creates a  
blank new one
to draw that bitmap into for smoothing purposes, my code is setting  
the previewW and previewH

to the background image that is in the MC before anything is loaded.
But, once the new image is loaded, the MC resizes to its new width  
and height.
I need previewW and previewH to equal the new loaded image width and  
height.


--
NOW, there is one thing that may not need all this chunk.
All I am really trying to do is smooth my dynamically loaded images  
and use a preloader.
This class fit the bill when I was researching. There is probably  
always a better way.

--

Hope this is more clear.

If you want to explain in AS3 then please do!!!
I love AS3 just haven't made the migration yet.
Kind of need to learn AS2 first... as you can see. :)
I can take that and reverse translate. so to speak.


Here is my code: (shortened & centralized) -


ImageLoader Class:




import com.martijndevisser.ImageLoader;  //--- this is important to  
figure out problem. see attached


var checkLoader:Object = new Object();
checkLoader.onLoadStart = function(target:MovieClip):Void  {
   trace("Start Width:" + _root.stage_mc["LargePic" + ID].previewW);
   trace("Start Height:" + _root.stage_mc["LargePic" + ID].previewH);
//  This is where the problem starts.
//---this equals the background before an image is loaded
};
checkLoader.onLoadComplete = function(target:MovieClip) {
   target = _root.stage_mc["LargePic" + ID].newPic.Image_mc;
//  this is where I noticed the problem.
   target._width = target._width / 3;
   target._height = target._height / 3;
//---this works fine and keeps the right width and ehight. Weird...
   _root.stage_mc["LargePic" + ID].previewW =
_root.stage_mc["LargePic" + ID].newPic._width;
   _root.stage_mc["LargePic" + ID].previewH =
_root.stage_mc["LargePic" + ID].newPic._height;
   trace("End Width:" + _root.stage_mc["LargePic" + ID].previewW);
   trace("End Height:" + _root.stage_mc["LargePic" + ID].previewH);
//  this is what I want to fix. the end in almost any of  
the previews loaded will NOT equal the start

};
var loader:ImageLoader = new ImageLoader(_root.stage_mc["LargePic" +
ID].newPic.Image_mc);
loader.addListener(checkLoader);
loader.loadImage(_global.projectPic,_root.stage_mc["LargePic" +
ID].newPic.Image_mc);


Best Regards to All,
Thank you for all help,

Karl DeSaulniers
Design Drumm
k...@designdrumm.com
http://designdrumm.com




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