Re: [Flashcoders] External Interface with looped parameters

2010-06-06 Thread Ashim D'Silva
The last 2 weeks were crazy and I completely lost track of this so I
apologise for not responding to the answers (cheers though!). We
couldn't find a solution so we used an array instead, but the idea was
this.

I have:

var objs:Array = [1, 2, 3, 4, 5]; // arbitrary length defined by the
number of parameters I receive from the XML.

I want to pass it to javascript like this:

ExternalInterface.call('jsFunc', objs[0], objs[1], objs[2], …);

so that the JS can use whatever params are provided.

I realise now however, that passing an Array (or name-value pairs) is
a far more stream-lined method of achieving this, but I'm still
curious if I could in fact build a function in a loop and then call it
after. Interpretive languages could possibly handle this real easily,
but is there an interesting workaround?

Maybe something like:

var st:String = function() { jsFunc(;
for each(var i:String in objs)
{
st += i+, ;
}
st+=);;

ExternalInterface.call(st);

It's reaching for stupidity because I lose the beautiful automatic
Array conversion that AS3 does, but curiosity has the better of me at
the moment.

Cheers,

Ashim

The Random Lines
www.therandomlines.com




On 28 May 2010 22:13, Anthony Pace anthony.p...@utoronto.ca wrote:
 
 If you want an array from javascript to actionscript
 
 somewhere in your class put something like:

     ExternalInterface.addCallback('SWFReceiver', as3Receiver);

 but remember that you need a receiver in as3:

     public function as3Receiver(a:Array /*or object, or *, etc...*/):void {
          //do something with your array
     }

 then in js:

    var swfo = document.getElementById('idOfYourSwfElement');
    swfo.SWFReceiver(yourArrayObject);

 
 if you want an array from AS3 to javascript
 

 var dataScript:XML= new XML(![CDATA[ function(){ jsReceiver([+
 formattedArrayAsString +]);} ]]);
 ExternalInterface.call(dataScript);



 On 5/26/2010 3:07 AM, Ashim D'Silva wrote:

 This seems fairly impossible but if there's an awesome way to do it
 I'll be heaps grateful.

 I receive a function name and a set of parameters via XML

 analytics
        function
                namewebtrends/name
                params
                        param98780/param
                        paramJoseph/param
                        paramIceland/param
                /params
        /function
 /analytics

 I'm hoping there's a way for me to fire an ExternalInterface.call()
 function with any amount of parameters provided to me.
 I'm one step away from telling the other side I'll send them an array,
 but hoping for the long shot.

 Cheers,

 Ashim

 The Random Lines
 www.therandomlines.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


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


[Flashcoders] External Interface with looped parameters

2010-05-26 Thread Ashim D'Silva
This seems fairly impossible but if there's an awesome way to do it
I'll be heaps grateful.

I receive a function name and a set of parameters via XML

analytics
function
namewebtrends/name
params
param98780/param
paramJoseph/param
paramIceland/param
/params
/function
/analytics

I'm hoping there's a way for me to fire an ExternalInterface.call()
function with any amount of parameters provided to me.
I'm one step away from telling the other side I'll send them an array,
but hoping for the long shot.

Cheers,

Ashim

The Random Lines
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] fullScreenSourceRect scale factor

2010-04-14 Thread Ashim D'Silva
Turns out if you use the full screen source rectangle, flash uses
hardware scaling to improve performance (apparently fairly
drastically). So there's no way out of that.
Only solution I'd imagine is to make the video the entire size of your
screen just before you launch fullscreen and leave the
fullScreenSourceRect = null. Then NO_SCALE will actually make a
difference.
I don't see this helping a lot, and will also resulting in some hacky
code. I'm going with it the way it was intended: glorious pixelated
HD.

Cheers,

Ashim

The Random Lines
www.therandomlines.com




On 13 April 2010 20:37, Mattheis, Erik (MIN - WSW)
ematth...@webershandwick.com wrote:
 I'm currently using StageScaleMode.NO_SCALE and increasing the size of the 
 video when it goes full screen - and banging my head up against IE7 which 
 just won't behave.

 If you come up with something you're satisfied with, I'd love to see it.

 _ _ _
 Erik Mattheis
 Senior Web Developer
 Minneapolis
 T  952 346 6610
 C 612 377 2272

 Weber Shandwick
 Advocacy starts here.

 PRWeek Global Agency Report Card 2009 - Gold Medal Winner
 The Holmes Report Global Agency of the Year
 PR News Agency of the Year

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ashim D'Silva
 Sent: Tuesday, April 13, 2010 5:21 AM
 To: Flash Coders List
 Subject: [Flashcoders] fullScreenSourceRect scale factor

 I'm using the fullScreenSourceRect parameter of the stage to make a
 just the video from my app go full screen. Is there a way I can then
 get the factor everything has been scaled so I can compensate the
 controls so they remain the required pixel size?

 Right now, they get scaled large and blurred, and I'd like to avoid this.

 Cheers,

 Ashim

 The Random Lines
 www.therandomlines.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


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


[Flashcoders] fullScreenSourceRect scale factor

2010-04-13 Thread Ashim D'Silva
I'm using the fullScreenSourceRect parameter of the stage to make a
just the video from my app go full screen. Is there a way I can then
get the factor everything has been scaled so I can compensate the
controls so they remain the required pixel size?

Right now, they get scaled large and blurred, and I'd like to avoid this.

Cheers,

Ashim

The Random Lines
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Calculator

2010-03-18 Thread Ashim D'Silva
I really can't believe this reply chain has lasted this long.

450 is 15% of 3000.
0.5% of 3000 is 15.

% simply means out of 100.

15/100 * 3000 = 450;
0.5/100 * 3000 = 15;

The equations through most of these emails have been right. Nobody seems to
actually be reading them.

Jonathan said:
sum/total * 100 = percentage

Karl said:
sum = percent*total/100

That's the same thing!!! Stop arguing.
However Karl, I'd recommend, for simplicity, you don't separate the percent
and the 100.
So - (percent/100)*total | Not percent*total/100
It'll help when things get more complicated.

Cheers,

Ashim

The Random Lines
www.therandomlines.com



On 18 March 2010 13:41, dr.ache dr.a...@gmx.net wrote:

 sarcasm doesn't make it better.

 Am 18.03.2010 04:12, schrieb Steven Sacks:

  I sincerely apologize for my sarcastic remark regarding the current state
 of the public educational system in America, and for any emotional trauma it
 may have caused to those whose proficiency at arithmetic is equivalent to or
 less than that of an elementary school student. In the future, I will
 moderate my tone accordingly. Apparently, my social maturity is equal to
 their mathematics maturity.
 ___
 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] Paypal integration.

2009-10-24 Thread Ashim D'Silva
I would simply handle all the cart stuff myself, and send Paypal the
cart on check out via cart_upload.
You get a nice, responsive cart that way...

Cheers,

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/10/24 Karl DeSaulniers k...@designdrumm.com:
 Has anyone messed with paypal shopping cart code? Is there a way to receive
 the contents of your cart (not go to the paypal view cart page) to import
 into your own cart?

 Karl

 Sent from losPhone

 On Oct 23, 2009, at 8:25 PM, Brett Artrahn brtrah...@yahoo.com.au wrote:

 Helmut, Grant Skinner link below might help you with your event framework.

 http://www.gskinner.com/blog/archives/2007/07/building_a_stat_1.htm

 And you can access public static constants anywhere in your application as
 long as you import the class? Are you saying this is not true?




 __


 Get more done like never before with Yahoo!7 Mail.
 Learn more: http://au.overview.mail.yahoo.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

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


Re: [Flashcoders] Paypal integration.

2009-10-24 Thread Ashim D'Silva
It's temporary, so I just went with a shared object, but if you add a
login and want a persistant cart, database may be the way to go.

On 24/10/2009, Karl DeSaulniers k...@designdrumm.com wrote:
 What would be the best way to store their selections?
 Database or cookies?

 Thanks for the idea Ashim.

 Karl

 On Oct 24, 2009, at 1:28 AM, Ashim D'Silva wrote:

 I would simply handle all the cart stuff myself, and send Paypal the
 cart on check out via cart_upload.
 You get a nice, responsive cart that way...

 Cheers,

 Ashim

 The Random Lines
 My online portfolio
 www.therandomlines.com



 2009/10/24 Karl DeSaulniers k...@designdrumm.com:
 Has anyone messed with paypal shopping cart code? Is there a way
 to receive
 the contents of your cart (not go to the paypal view cart page) to
 import
 into your own cart?

 Karl

 Sent from losPhone

 On Oct 23, 2009, at 8:25 PM, Brett Artrahn
 brtrah...@yahoo.com.au wrote:

 Helmut, Grant Skinner link below might help you with your event
 framework.

 http://www.gskinner.com/blog/archives/2007/07/building_a_stat_1.htm

 And you can access public static constants anywhere in your
 application as
 long as you import the class? Are you saying this is not true?




 
 __


 Get more done like never before with Yahoo!7 Mail.
 Learn more: http://au.overview.mail.yahoo.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

 ___
 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



-- 
Cheers,

Ashim

The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] 2.5D playing cards - how to restore original image?

2009-10-21 Thread Ashim D'Silva
Hey Alex,

Once you've used a 3D feature, it has something like cacheAsBitmap
turned on internally that doesn't go off. You have to clear the 3d
matrix once you don't need it anymore.

mc.transform.matrix3D = null;

If I remember right, this will reset everything, so before you do it,
remember all the transformations you want to keep: x, y, rotation,
scaleX, scaleY... and then set those back.

Haven't dealt with this in a while, so I might be a bit off on it, but
I had to deal with it earlier, and this is approximately where you
should look.

Cheers,

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/10/21 Alexander Farber alexander.far...@gmail.com:
 Hello,

 I have a game with nice detailed playing cards (the only
 nice graphics in my app) which can be dragged around.

 On the MOUSE_DOWN event I add a shadow to filters
 and set scaleX = scaleY = 1.2. And on MOUSE_UP
 I remove shadow and set scaleX = scaleY = 1.

 Now I've decided to try the new 3D-features and
 instead of changing the scale I set card properties:
   z = -100;
   rotationY = 10;
 and on MOUSE_UP I set those back to zero.

 The dragged card looks geometrically correct, but
 not nice (it is distorted) - which is understandable...

 What annoys me is that when I release the mouse,
 the card looks even worse instead of going back to
 the original clean image.

 Does anybody please have an advice here?

 Thank you
 Alex
 ___
 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] Converting .swf playback to .mov

2009-10-21 Thread Ashim D'Silva
Pretty sure CS4 handles it fine. Including actionscripted animation.
Haven't pushed it hard, but worth a shot.

Cheers,

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/10/21 Joel Stransky j...@stranskydesign.com:
 Ok, I'm well aware of the limitation in exporting an .fla to quicktime. You
 only get the main timeline, no sub clips or scripted animation. What I'm
 asking is if there's some new product on the market that has tackled this
 issue successfully. So far is looks like a screen reader is the way to go,
 I'd just like to get some alpha (key) control over the output that doesn't
 require me recording it over a green background.

 Thanks for any direction.

 --
 --Joel Stransky
 stranskydesign.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


[Flashcoders] Problem with Inline Images and Href in a Text Field

2009-09-02 Thread Ashim D'Silva
Hi,
AS2 problem from an old site I've had to edit.
Having trouble with inline images used as HTML hyperlinks in flash.

A snipet of the HTML looks like this:

p
a href=asfunction:_root.showLightBox
img src=gallery/t2.jpg align=left /
/a
font size=14Person's Name/fontbrLorem ipsum dolor sit amet,
consectetuer adipiscing...

and so on...

For some reason image links only seem to fire the second time you click
them.
I thought this might be a focus problem and tried to use Selection.setFocus
when the cursor got close enough to its target, but that didn't help.
It's the same whether I use asfunction or a link to a web address.
First click, nothing. Second Click, it works. The cursor changes fine
however, so I am completely confused at the moment and would really
appreciate some help.

Cheers,

Ashim

The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Missing wait(), notify(), sleep() in AS3

2009-08-21 Thread Ashim D'Silva
Just call your next function in two places...
I don't really see the problem. If it's not important just cancel it can
call the new function, otherwise, wait for the complete event to fire and
then call it...

Ashim

The Random Lines
My online portfolio
www.therandomlines.com


2009/8/21 Alexander Farber alexander.far...@gmail.com

 Hello,

 I have an AS3 app which continuously send HTTP requests to a server.

 If there is a HTTP request in progress already and it's not important
 (kind of I am alive event) I would like to cancel it.

 But if the ongoing request is important, I'd like to wait its completion
 before I send another one. I wonder how to implement this waiting
 properly, since AS3 doesn't seem to provide wait() and notify()

 Here is my code

private var request:URLRequest;
private var loader:URLLoader;
private var vars:URLVariables;
private var notImportant:Boolean;


 
loader.addEventListener(Event.COMPLETE, handleComplete);
 .
private function fetch(event:Number, arg:String=null):void {
// fix the caching problems in MSIE
vars.mod = (new Date()).getTime();

vars.event = event;
if (arg != null)
vars.arg = arg;
else
delete vars.arg;

if (notImportant) {
try {
loader.close();

 DO NEW CALL


} catch (error:StreamError) {
trace(error);
}
} else {
// XXX call wait() here? XXX
}

loader.load(request);
}

   private function handleComplete(event:Event):void {
 
// XXX call notify() at the end

 DO NEW CALL


   }

 How could I solve this? I can't keep looping and checking
 some variable (like requestCompleted) because there is
 no sleep() function either and CPU usage would be high:

 private function fetch(event:Number, arg:String=null):void {
 .
  while (! requestCompleted) {
 // XXX call sleep(10) here XXX
 }

 Thank you for any suggestions
 Alex
 ___
 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] as3 -re-dimensioning spirte but not its children

2009-07-29 Thread Ashim D'Silva
I'd say extend a new class from Sprite, and override the getters and
setters for width and height, and scaleX and scaleY if you need them.

However, if you don't want to do that, make two sprites inside your
sprite. One with things you want to change and one width those you
don't. Then just resize the sprite that you want to.

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/7/30 Isaac Alves isaacal...@gmail.com:
 Hi list,

 Is it possible to alter the width or height of a sprite dynamically without
 altering the width and height of its children ?

 Even when I add children to a Sprite that had its dimensions altered
 dynamically, these children have their dimensions changed.

 Could I do something like sprite.resetScaleXandY ?

 What do you suggest in this kind of situation?

 Thanks in advance,
 Isaac
 ___
 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] Dancing characters...

2009-07-23 Thread Ashim D'Silva
I'd say the width value you're using isn't so dependable because of
the way text scales. If you turn autoSize off it may help.
Failing that, I'd render each piece to a bitmapData and use a bitmap.
They work better for scaling and rotation, although scaling up is
ofcourse a bad idea, so render your largest size and then scale down.

Ash

The Random Lines
My online portfolio
www.therandomlines.com



2009/7/22 Sander Schuurman b...@chello.nl:
 Hi list...

 I'm trying to make some kind of Dock...

 http://www.sentoplene.com/dock

 But sometimes when I stop with the mouse, some characters keep on moving
 slightly... How can I get rid of that?

 I'm simply doing on Event .ENTER_FRAME: scaleIcons and then positionIcons.
 I'v tried to trigger the 2 functions only on MouseMove, but the
 responsiveness isn't accurate when you suddenly stop your mouse...

 So anyone any idea with this?

 thnx!

 Sander Schuurman
 sentoplene.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] DisplayObject's filtered dimensions too large to be drawn

2009-05-26 Thread Ashim D'Silva
If you have a filter applied to a container (Movieclip, sprite) and
something inside it has moved far off stage, that will make the
container's dimensions very large. Take a peek for stray objects.

The Random Lines
My online portfolio
www.therandomlines.com



2009/5/26 Alan Neilsen aneil...@gotafe.vic.edu.au:
 Can anybody tell me what might cause this, Warning: Filter will not render.  
 The DisplayObject's filtered dimensions (4365, 240) are too large to be 
 drawn. There is nothing in my project with dimensions anywhere near that, so 
 I am at a loss as to what it means.
 Alan Neilsen

 This message is for the named person’s use only. It may contain
 confidential, proprietary or legally privileged information. No
 confidentiality or privilege is waived or; lost by any mistransmission. If
 you receive this message in error, please immediately delete it and all
 copies of it from your system, destroy any hard copies of it and notify
 the sender. You must not directly or indirectly, use, disclose,
 distribute, print or copy any part of this message if you are not the
 intended recipient. GOULBURN OVENS INSTITUTE OF TAFE and
 any of its subsidiaries each reserve the right to monitor all e-mail
 communications through its networks. Any views expressed in this
 message are those of the individual sender, except where the
 message states otherwise and the sender is authorised to state them
 to be the views of any such entity.

 #
 This e-mail message has been scanned for Viruses and Content and cleared
 by MailMarshal
 #
 ___
 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] Papervision Help

2009-05-24 Thread Ashim D'Silva
Well, papervision will be able to do that, and the docs are quite
helpful. You'll have to be specific when you search google for this
stuff though. I did find some nice tutorials on lighting and shaders
that should be helpful but that I can't remember offhand.

However, you might want to re-evaluate using the default flash 10
stuff. Lighting and shadowing live is only necessary if your object
are going to change enough to make a difference. You might find you
can get away with baking all that into textures and saving your
processing power.

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/5/24 Omar Fouad omarfouad@gmail.com:
 Hi all,

 I am working on a project where I need to create 6 circles (planes) with
 different colors. the cirlces are placed one over the other and centered, so
 when I move the mouse down those they rotate to show something like a
 piramid. I could just use the native 3d in Flash but my boss needs each
 circle to be clickable, have a shadow and be shaded (lighted).

 I actually played around with papervision lately, using BasicView and some
 kind of materials, but now I feel frustrated as I just can't figure out how
 to do this work.

 Any Ideas?

 I also cannot find a decent papervision explanation on the net. What I am
 looking for is a conceptual explanation about papervision not just how to
 create some shapes and put them on the stage.


 --
 Omar M. Fouad -
 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

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


Re: [Flashcoders] Dynamic Images and the Library

2009-05-02 Thread Ashim D'Silva
If you're dynamically loading an image, it doesn't have to be an mc,
it's bitmap data and can be treated so.

If you want to save the contents of an mc to an image, use
bitmapData.draw(mc) to get bitmapData and write that to a jpeg/png on
your server. You should be able to find a tutorial that runs you
through the whole process.

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/5/2 Karl DeSaulniers k...@designdrumm.com:
 The more I thought about it the more I came to think this would be a silly
 way about doing this,
 so I am wondering instead, is there a way to save the contents of an MC as a
 new image, say,
 on a server and have it then listed in a dynamically drawn XML file for
 later use?

 This may be a textbook one, so if I can get pointed to a tutorial, that
 would be great.
 Thanks in advance.

 Karl DeSaulniers
 Design Drumm
 http://designdrumm.com

 On May 1, 2009, at 11:54 PM, Karl DeSaulniers wrote:

 Hello all,
 Is there a way to get a dynamically loaded image to be inserted into the
 library of the SWF?
 For instance. I have an upload form that creates a preview image of what
 is being uploaded.
 I want the preview that is created of the image to be the thumbnail of the
 image once displayed in a list of images later down the road.
 My thoughts are to place the dynamically loaded image into the library
 somehow so its always available.
 This may not be the best way of doing this, so any suggestions are
 welcome.
 Thanks,


 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

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


[Flashcoders] Nested 3D transforms conflicting with interactivity

2009-05-01 Thread Ashim D'Silva
Hi All,

I'm having a bit of a problem with nested transforms and interactivity.

I have a parent sprite that has 9 children sprites, and the children
have listeners for roll over/out.

Transforming/animating the parent seems to be absolutely fine; it
rotates fine and the children act as expected.
However, when I individually animate the children or even just change
a 3D property) the children start flickering, firing over and out
events repeatedly while the mouse is moving. I then tried setting the
transform.matrix3D to null after the animation finishing - and
resetting the positions - and this seems to help to some extent. It
works fine right upto about 1000px from the left of the stage.
Everything to the right of this point has the same old problem.

I've seen some really interactive flash3d stuff (although that's
possibly papervision) that work fine. I'm just not sure where the
problem is and need some help.

Tried looking around for info, but maybe I just failed at google. Help
is much appreciated either way.

Cheers,

Ashim
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] SWF Child - Parent Comunication

2009-04-24 Thread Ashim D'Silva
when you do dispatchEvent(new Event()); the presumption is that it is
'this' that is firing it.
if you do mc1.dispatchEvent... mc2.dispatchEvent... depending on the
clip that's clicked, that should work out nicely.

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/4/24 Dav d...@funkdaweb.com:
 Hi all!

 I have a problem with sending data between two SWF's.

 Basically I have the parent SWF that loads in a child SWF. On the child SWF
 there are several pictures that are clickable.

 Now let's say the user clicks picture 2. I need the child SWF to tell the
 main SWF that a picture was clicked, and also what picture it was from say
 picture 1 to 10. The main SWF will then do something with that information.

 So far all I have been able to find is something like this, in the child SWF
 create add a dispatchEvent(new Event(jumpToImage, true)); to each
 picture on click. Then in the main SWF add an event listener to the child
 SWF.

 Now the problem is, when I click on a picture the main SWF's listener
 event.target equals the child SWF's document class ([object Child]), not the
 image Movieclip instance name.

 I don't really want to add a different dispatchEvent to every image:

 dispatchEvent(new Event(jumpToImage1, true));
 dispatchEvent(new Event(jumpToImage2, true));
 
 dispatchEvent(new Event(jumpToImage10, true));

 cause this seems wasteful, instead I would rather do this:

 Child:
 dispatchEvent(new Event(jumpToImage, true));

 Main:
 private function jumpToImage(event:Event):void
 {
        switch (event.target.name)
        {
                case picture1:
                        // do something with picture 1
                break;
                case picture2:
                        // do something with picture 2
                break;
                ...
                case picture10:
                        // do something with picture 10
                break;
        }
 }

 Any ideas?

 Thanks,
 Dav

 ___
 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] 3D transformation and interactivity trouble

2009-04-21 Thread Ashim D'Silva
Hi All,

I'm having a bit of a problem with nested transforms and interactivity.

I have a parent sprite that has 9 children sprites, and the children
have listeners for roll over/out.

Transforming/animating the parent seems to be absolutely fine; it
rotates fine and the children act as expected.
However, when I individually animate the children (I'm using Doyle's
TweenGroup class) the children start flickering, firing over and out
events repeatedly while the mouse is moving. I then tried setting the
transform.matrix3D to null after the animation finishing - and
resetting the positions - and this seems to help to some extent. It
works fine right upto about 1000px from the left of the stage.
Everything to the right of this point has the same old problem.

I've seen some really interactive flash3d stuff (although that's
possibly papervision) that work fine. I'm just not sure where the
problem is and need some help.

Tried looking around for info, but maybe I just failed at google. Help
is much appreciated either way.

Cheers,

Ashim

The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] need suggestions

2009-04-21 Thread Ashim D'Silva
Experiment, and follow blogs for one.

I'll bet there's heaps of great books out, but I've never bought one
so I'm not sure. I find printed information expires too quickly.

check out www.gotoandlearn.com as a great starting place.

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/4/21 Rajiv Seth (Pixeldust) pixels.ra...@gmail.com:
 Hi All,

 I know AS2.0 as not so expert level but now I want to switch to AS3.0 and
 really want to go to expert level. I am already working, so cannot join any
 full time course and in India, I don't think any expert level courses are
 available.

 Can you please guide me how to go about it?

 Thanks in advance

 Rajiv
 ___
 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] Just a quick one

2009-04-17 Thread Ashim D'Silva
If you're using Loader to load images, both wh of the image itself
and that of the Loader should be the same.
Sometime however, I do like taking out the data if I'm going to play
with it at bitmapData level.

Bitmap(loader.content).bitmapData

If you get the wh of the resulting bitmap data, that's the images
actual dimensions.

If you're loading an SWF however, I think contentLoaderInfo contains
the nominated width, height, framerate etc. All of which can change
anyway.

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/4/17 Ian Thomas i...@eirias.net:
 Let's try that again - perhaps I wasn't clear.

 I'm assuming - from your first email - you're using a flash.display.Loader?

 Look for the property called contentLoaderInfo on the instance of your
 Loader class.

 Documentation here:
 http://livedocs.adobe.com/flex/3/langref/flash/display/Loader.html#contentLoaderInfo

 HTH,
  Ian


 On Fri, Apr 17, 2009 at 10:26 AM, Karl DeSaulniers k...@designdrumm.com 
 wrote:
 That looked like it was going to work.
 Thanks for your response.
 It just told me there was no property called contentLoaderInfo in my class
 file.

 Karl DeSaulniers
 Design Drumm
 http://designdrumm.com

 On Apr 17, 2009, at 3:21 AM, Ian Thomas wrote:

 myLoader.contentLoaderInfo.width
 myLoader.contentLoaderInfo.height


 HTH,
   Ian

 On Fri, Apr 17, 2009 at 6:09 AM, Karl DeSaulniers k...@designdrumm.com
 wrote:

 Hello all,
 Quick question.
 I am using a loader class to load some preview images and I am trying to
 make a couple of variables eq the width and heigth of the preview once
 the
 class is done actually loading the image. I am running into a snag with
 the
 variables eq the holder MCs width and height after the image loads and
 not
 the loaded images wh.

 What is the best way to get actual loaded images wh and not the holder
 MCs
 wh?

 Thanks for any help

 Karl

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


Re: [Flashcoders] ColorTransform GTween

2009-04-08 Thread Ashim D'Silva
Never used GTween before, but Grant is joining forces with Jack Doyle
of TweenLite, and that library is incredibly easy to use. If the
possibility exists, you might want to switch libraries, and soon, you
should get the best of both worlds.

2009/4/9 Jiri jiriheitla...@googlemail.com:
 I am experimenting with GTween from Grant Skinner. I cant seem to figure out
 how to do a color transform. Does somebody know how to do that?
 Here is what i have:

 import fl.motion.easing.*;
 import com.gskinner.motion.*

 var colorInfo:ColorTransform = clip.transform.colorTransform;

 trace(colorInfo);

 var myTween:GTween = new GTween(clip,2,{color:0xFFcc00});
 myTween.setAssignment(clip.transform,colorTransform);

 //resulting in flickering of color of the clip.

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Pixel recognition?

2009-03-29 Thread Ashim D'Silva
If all you want is a visible loader, you might even try a blend mode,
like difference. Which you would then have to deal with stylistically,
but that would make the code required null.

If not, I have done this before to place text on an image and I used
the scaledBitmap system. The inaccuracies are forgivable for the most
part, but remember to only take the area that you're going to place
the loader on. That way it's not affected by dramatic changes in
colour in other parts of the image.

Cheers,

Ashim

-- 
The Random Lines
My online portfolio
www.therandomlines.com

2009/3/30 Juan Pablo Califano califa010.flashcod...@gmail.com:
 Honestly, I'm not sure if I'm following you at this point...

 However, I was not talking about *displaying* a grey-scaled image. Just
 using it as way to calculate each pixel's luminance / brightness. Which in
 this case will give you the same results as transforming to HLS and reading
 the L value.

 If you want to manipulate brightness, saturation or hue, the only sane way I
 can think of is transfroming to HLS. There's not built-in way to do it that
 I'm aware of, so in this case you'dl have to use an AS routine (I've pasted
 one such routine I've used for this in the past).

 But, since (apparently) you only want to know how dark / light a given pixel
 is (and then calculate an average), you can just copy the image to a
 BitmapData object and convert it to grey scale. Reading a grey-scaled pixel,
 you can know how dark or light it is. Just read any of the RGB channels
 (they are equal, because it's a grey scaled image); 0 is black (the
 darker value) and 255 is white (the lighter value).

 The result is the same as transforming to HLS -- it may vary a bit due to
 rounding and such, but it's not a significative difference, I think.

 This is faster because most of the hard work is done by a native method of
 the player, instead of Actionscript code.

 Cheers
 Juan Pablo Califano


 2009/3/29 Karl DeSaulniers k...@designdrumm.com

 I actially wanted to get the density. How dark and how light. Not
 necessarily black and white. Dark color or light color. I also don't want to
 convert any images.  Now if it takes converting the image to calculate, then
 the user can never see this conversion of the photo. Just the conversion of
 the loader. If that makes sense. :)

 Sent from losPhone


 On Mar 29, 2009, at 3:41 PM, Ian Thomas i...@eirias.net wrote:

 Flash's smoothing may introduce irregularities, I guess.

 But given that the original poster only wanted to know grey or white,
 surely it's a good enough approximation for that purpose?

 Ian

 On Sun, Mar 29, 2009 at 9:08 PM, Juan Pablo Califano
 califa010.flashcod...@gmail.com wrote:

 It's indeed much faster (five times faster than transforming to grey
 scale),
 though the results I'm getting are incorrect (the other 2 methods seems
 to
 return consistently similar results, though trasnforming to HLS takes
 about
 3200 ms for a 1152 x 864 image, and transform to grey scale takes around
 130
 ms).

 It could be the case that I'm doing it the wrong way, of course... This
 is
 the code I'm using.


 function getAverageFromScaledBitmap(src:DisplayObject):Number {
   var dest:BitmapData = new BitmapData(1,1);
   var mat:Matrix   = new Matrix();
   var sx:Number   = 1 / src.width;
   var sy:Number   = 1 / src.height;

   mat.scale(sx,sy);
   dest.draw(src,mat,null,null,null,true);
   var hls:Object = ColorUtils.RGBtoHLS(dest.getPixel(0,0));

   return hls.l;
 }
 Cheers
 Juan Pablo Califano

 2009/3/29 Ian Thomas i...@eirias.net

 On Sun, Mar 29, 2009 at 8:14 PM, Juan Pablo Califano
 califa010.flashcod...@gmail.com wrote:

 As it's been said already, you could try converting to HLS and the get

 the

 average luminance (brigthness). Here's a handy class to convert from
 RGB

 to

 HSL and viceversa.

 http://www.dreaminginflash.com/2007/11/19/hls-to-rgb-rgb-to-hls/
 Another approach, which might be faster (but you'd have to test it to
 see

 if

 that's true), could be transforming to bitmap to a grey scale. You
 would
 then know how black / white each pixel is, so you could get the average
 value by adding the value of each pixel and dividing for the total
 number

 of

 pixels. Instead of reading the whole pixel value, you can just read one
 channel, because since it' s a grey scale, the three color channels
 will

 be

 equal.


 If you're going to test any kind of average pixel value, it'd be far
 faster to take a bitmap copy of the frame scaled to 1 pixel x 1 pixel
 (with smoothing on) - and just read the colour value of that pixel...

 HTH,
  Ian
  ___
 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] Actionscript 3.0 Coding Niggles

2009-03-08 Thread Ashim D'Silva
just put a stop() on the last frame (when the text is big)

2009/3/9 Joel Stransky stranskydes...@gmail.com

 is there a stop() on frame 1 of text_mc?

 On Sun, Mar 8, 2009 at 3:29 PM, Ali Hitch hitchy@gmail.com wrote:

  Hey guys,
 
  Having problems on the coding side of what I thought would be a very
 simple
  task.
 
  The task is:
 
  I am creating a navigation bar for a website. On the navigation bar, when
  the user does a mouse over on a certain area of the bar (invisible
 button),
  a specified movie will play once and will not play again unless the user
  does a mouse over again. When the user clicks on the invisible button, it
  will perform the action of a link and direct the user to another page.
 
  In a bit more detail:
 
  In flash I have created a document (actionscript 3.0). On the document
 for
  this example, there is a piece of text called labelled 'home'. This text
  has
  been converted into a movieclip labelled home_mc. Inside the movie clip
  there are 7 frames. Frame1 = home font size20 | Frame2 = home font size21
 |
  Frame3 = home font size22 | Frame 4 = home font size23 | Frame 5 = home
  font
  size 22 | Frame6 = home font size21 | Frame7 = home font size20. As you
 can
  probably tell, I am trying to make a growing text effect in flash.
 
  Coming out of the movieclip to Scene 1 I have created another layer
 called
  invivisible button1. This has then been converted to a button called
  home_btn and made 'invisible'.
 
  What I have been trying to do with actionscript is make the movieclip
  home_mc play once when there is a mouse over event with home_btn
 (invisible
  button), but with all the code I have tried so far nothing has really
  worked
  and when I test the movie, the movieclip home_mc is just constantly
 playing
  and looping back on itself.
 
  The latest code I have tried is:
 
  **Start code**
 
  var home_mc:MovieClip = new MovieClip ();
  //home_mc = someClip you embedded;
  text_mc.name = myButton;
 
  home_mc.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
  home_mc.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
  //adds event listeners
 
 
 
  funtion mouseOver (event:MouseEvent):void
  {
 trace (event.currentTarget.name + mouse over);
 // the trace event is asking for the name property (which is like a
  method) we set that property above.
 //otherwise tracing event.currentTarget just tells us the type of
 object
  we are dealing with = MovieClip
 event.currentTarget.play();
 //this function can be used on ANY subject that has an event handler -
  addEventListener
  }
 
  funtion mouseOut (event:MouseEvent):void
  {
 trace (event.currentTarget.name + mouse out);
 event.currentTarget.gotoandstop(1);
  }
 
  **end code**
 
  I have had some vague help previously and have read and looked at
  tutorials/books but still don't quite get this. I am after all trying to
  learn a new programming language without any previous experience with
  programming languages.
 
  Any help with this hopefully simple problem would be gratefully
  appreciated.
 
  Thanks,
  Ali Hitch
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 --Joel Stransky
 stranskydesign.com
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Remote Fonts and Sandbox?

2009-02-24 Thread Ashim D'Silva
Might be a sandbox issue that needs a crossdomain file. Try adding one and
see what happens. The crossdomain file sits in the root of the server that
is serving the assets.
Eg: http://twitter.com/crossdomain.xml

2009/2/25 Mike Grunwald mgrunw...@mcdilldesign.com

 Hello All,

 I've run into a confusing issue:

 I've created several font SWFs that contain only the characters that I need
 for a particular language and I was loading them in using a FontLoader class
 that I pass a language parameter to. After the FontLoader class loads the
 proper font (Event.COMPLETE), It calls a method that had Font.registerFont
 in it, to add it to the list of available fonts.

 This was working perfectly until the client threw a wrench into the gears.
 I now have to have the font files on a different server because the CMS that
 they're using only allows them to upload a single SWF into the page (no
 assets are allowed).  I added the proper Security.allowDomain stuff and I
 know the fonts are loading because they trace out, but now when I try to
 register the font, I get this error:

 ArgumentError: Error #1508: The value specified for argument font is
 invalid.
at flash.text::Font$/registerFont()
at com.johnsoncontrols.bsrbanner.utils::FontLoader/registerFont()


 Here's my registerFont method that used to work:

private function registerFont(e:Event):void
{
 var FontLibrary:Class =
 e.target.applicationDomain.getDefinition(ArialUnicode_ + _language);

 Font.registerFont(FontLibrary[ArialUnicode_ +
 _language]);

 _loadedFont = FontLibrary[ArialUnicode_ +
 _language];

trace(FONTS:  + Font.enumerateFonts());
}


 ...And here's the document class of the font SWF I'm loading in:

package
{
import flash.display.Sprite;
import flash.system.Security;
import flash.text.Font;


public class ArialUnicode_ENG extends Sprite
{

[Embed(source='/Users/mike/MCDILL FONTS/A/Arial
 Unicode/Arial Unicode.ttf', fontName='ArialUnicode_ENG',
 unicodeRange='U+0041-U+0041,U+0042-U+0042,...')]


public static var ArialUnicode_ENG:Class;


public function ArialUnicode_ENG()
{
Security.allowDomain(*);
}
}
 }


 Anybody know what the problem might be?

 Thanks for any help in advance,
 _mike


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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Javascript Flash resizing

2009-02-20 Thread Ashim D'Silva
I wouldn't really like that as a user, a webpage that takes my screen
without asking.If it's an app, try AIR, that might have something. You
should be able to launch a window with javascript without interaction
(window.open - look it up)
Other than that, I'm really not sure.

2009/2/20 Cor c...@chello.nl

 Hi Ashim,

 Thanks.
 I have it already working with StageDisplayMode.FULLSCREEN, but this still
 needs a user interaction.
 And I would like to open my app fullscreen without any browser visuals, and
 even better if the user is not able to switch to any other display mode.

 Kind regards
 cor



 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ashim
 D'Silva
 Sent: donderdag 19 februari 2009 11:23
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Javascript Flash resizing

 Hey Cor,
 I'm just putting this back on the list because I actually don't really know
 javascript. I write basic stuff because it resembles actionscript (ECMA).
 Specific stuff I'd look up. I'd imagine you'll need to launch a new window
 for that but maybe somebody else will know.

 You could also go fullscreen from flash by setting the stage.displayMode
 property to StageDisplayMode.FULLSCREEN (check that, gmail doesn't have
 intellisense).

 Ashim

 2009/2/18 Cor c...@chello.nl

  Hello Ashim,
 
  I am not familiair with JS.
  I hope I may ask you a question.
  Is it possible to set my index.htm maximized, so only my Flash is showing
  maximized?
  So there will be no browser items, like the menubar, browser buttons,
 etc.?
 
  Kind regards
  Cor van Dooren
 
 
  -Original Message-
  From: flashcoders-boun...@chattyfig.figleaf.com
  [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ashim
  D'Silva
  Sent: woensdag 18 februari 2009 1:14
  To: Flash Coders List
  Subject: Re: [Flashcoders] Javascript Flash resizing
 
  Javascript and flash can do some interesting things together. I built a
  flash gallery that would load up images and depending on how much space
 it
  needed, resize the div the flash was sitting in so browser scroll-bars
 came
  into effect if necessary. Then, when a certain image is displayed large,
  scrolling in the browser would move the large image inside the flash so
  it's
  always centred within the browser window.
  Here's my javascript, the flash should be simple to work out:
 
  script type=text/javascript
   if (window.addEventListener)
  {
  window.addEventListener('scroll',scrollingDetector,false);
  window.addEventListener('resize',resizeDetector,false);
  }
  else if (document.addEventListener)
  {
  document.addEventListener('scroll',scrollingDetector,false);
  document.addEventListener('resize',resizeDetector,false);
  }
 
  function scrollingDetector()
  {
  var scrollY;
  if (navigator.appName == Microsoft Internet Explorer)
  {
  scrollY = document.body.scrollTop;
   }
  else
  {
  scrollY = window.pageYOffset;
  }
  getFlashMovie(excl).setScrollY(scrollY);
  }
   function resizeDetector()
  {
  var height;
  if (navigator.appName == Microsoft Internet Explorer)
  {
  height = documentbody.offsetHeight;
  }
  else
  {
  height = window.innerHeight;
  }
  getFlashMovie(excl).setHeight(height);
  }
   function runFirst()
  {
  scrollingDetector();
  resizeDetector();
  }
   function getFlashMovie(movieName)
  {
  var isIE = navigator.appName.indexOf(Microsoft) != -1;
  return (isIE) ? window[movieName] : document[movieName];
  }
   function setFlashHeight(newH)
  {
  gid = document.getElementById(flashHolder);
  //gid.style.width = 965px;
  gid.style.height = newH +px;
  }
  /script
 
 
  2009/2/18 Matt S. mattsp...@gmail.com
 
   Have you guys had experience with dynamic resizing of the flash via
   Javascript in order to use the browser scrollbar to scroll, eg with
   http://swffit.millermedeiros.com/ or something similar? any
   recommendations?
  
   thx,
  
   .m
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
 
 
 
  --
  The Random Lines
  My online portfolio
  www.therandomlines.com
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  No virus found in this incoming message.
  Checked by AVG - www.avg.com
  Version: 8.0.237 / Virus Database: 270.10.25/1956 - Release Date:
 02/16/09
  18:31:00
 
 


 --
 The Random Lines
 My online portfolio
 www.therandomlines.com
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 8.0.237 / Virus Database: 270.10.25/1957 - Release Date: 02/17/09
 07:07:00

Re: [Flashcoders] Javascript Flash resizing

2009-02-19 Thread Ashim D'Silva
Hey Cor,
I'm just putting this back on the list because I actually don't really know
javascript. I write basic stuff because it resembles actionscript (ECMA).
Specific stuff I'd look up. I'd imagine you'll need to launch a new window
for that but maybe somebody else will know.

You could also go fullscreen from flash by setting the stage.displayMode
property to StageDisplayMode.FULLSCREEN (check that, gmail doesn't have
intellisense).

Ashim

2009/2/18 Cor c...@chello.nl

 Hello Ashim,

 I am not familiair with JS.
 I hope I may ask you a question.
 Is it possible to set my index.htm maximized, so only my Flash is showing
 maximized?
 So there will be no browser items, like the menubar, browser buttons, etc.?

 Kind regards
 Cor van Dooren


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ashim
 D'Silva
 Sent: woensdag 18 februari 2009 1:14
 To: Flash Coders List
 Subject: Re: [Flashcoders] Javascript Flash resizing

 Javascript and flash can do some interesting things together. I built a
 flash gallery that would load up images and depending on how much space it
 needed, resize the div the flash was sitting in so browser scroll-bars came
 into effect if necessary. Then, when a certain image is displayed large,
 scrolling in the browser would move the large image inside the flash so
 it's
 always centred within the browser window.
 Here's my javascript, the flash should be simple to work out:

 script type=text/javascript
  if (window.addEventListener)
 {
 window.addEventListener('scroll',scrollingDetector,false);
 window.addEventListener('resize',resizeDetector,false);
 }
 else if (document.addEventListener)
 {
 document.addEventListener('scroll',scrollingDetector,false);
 document.addEventListener('resize',resizeDetector,false);
 }

 function scrollingDetector()
 {
 var scrollY;
 if (navigator.appName == Microsoft Internet Explorer)
 {
 scrollY = document.body.scrollTop;
  }
 else
 {
 scrollY = window.pageYOffset;
 }
 getFlashMovie(excl).setScrollY(scrollY);
 }
  function resizeDetector()
 {
 var height;
 if (navigator.appName == Microsoft Internet Explorer)
 {
 height = documentbody.offsetHeight;
 }
 else
 {
 height = window.innerHeight;
 }
 getFlashMovie(excl).setHeight(height);
 }
  function runFirst()
 {
 scrollingDetector();
 resizeDetector();
 }
  function getFlashMovie(movieName)
 {
 var isIE = navigator.appName.indexOf(Microsoft) != -1;
 return (isIE) ? window[movieName] : document[movieName];
 }
  function setFlashHeight(newH)
 {
 gid = document.getElementById(flashHolder);
 //gid.style.width = 965px;
 gid.style.height = newH +px;
 }
 /script


 2009/2/18 Matt S. mattsp...@gmail.com

  Have you guys had experience with dynamic resizing of the flash via
  Javascript in order to use the browser scrollbar to scroll, eg with
  http://swffit.millermedeiros.com/ or something similar? any
  recommendations?
 
  thx,
 
  .m
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 The Random Lines
 My online portfolio
 www.therandomlines.com
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 8.0.237 / Virus Database: 270.10.25/1956 - Release Date: 02/16/09
 18:31:00




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Javascript Flash resizing

2009-02-17 Thread Ashim D'Silva
Javascript and flash can do some interesting things together. I built a
flash gallery that would load up images and depending on how much space it
needed, resize the div the flash was sitting in so browser scroll-bars came
into effect if necessary. Then, when a certain image is displayed large,
scrolling in the browser would move the large image inside the flash so it's
always centred within the browser window.
Here's my javascript, the flash should be simple to work out:

script type=text/javascript
 if (window.addEventListener)
{
window.addEventListener('scroll',scrollingDetector,false);
window.addEventListener('resize',resizeDetector,false);
}
else if (document.addEventListener)
{
document.addEventListener('scroll',scrollingDetector,false);
document.addEventListener('resize',resizeDetector,false);
}

function scrollingDetector()
{
var scrollY;
if (navigator.appName == Microsoft Internet Explorer)
{
scrollY = document.body.scrollTop;
 }
else
{
scrollY = window.pageYOffset;
}
getFlashMovie(excl).setScrollY(scrollY);
}
 function resizeDetector()
{
var height;
if (navigator.appName == Microsoft Internet Explorer)
{
height = documentbody.offsetHeight;
}
else
{
height = window.innerHeight;
}
getFlashMovie(excl).setHeight(height);
}
 function runFirst()
{
scrollingDetector();
resizeDetector();
}
 function getFlashMovie(movieName)
{
var isIE = navigator.appName.indexOf(Microsoft) != -1;
return (isIE) ? window[movieName] : document[movieName];
}
 function setFlashHeight(newH)
{
gid = document.getElementById(flashHolder);
//gid.style.width = 965px;
gid.style.height = newH +px;
}
/script


2009/2/18 Matt S. mattsp...@gmail.com

 Have you guys had experience with dynamic resizing of the flash via
 Javascript in order to use the browser scrollbar to scroll, eg with
 http://swffit.millermedeiros.com/ or something similar? any
 recommendations?

 thx,

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] multiple fonts in TextField?

2009-01-13 Thread Ashim D'Silva
It's a style sheet. CSS. So everything is strings or number, you can't use
references to flash objects.You can just use the font name directly. It'll
probably be marginally faster.

fontFamily = Helvetica;

That's the font name not the name you gave the library item.

2009/1/14 Mendelsohn, Michael michael.mendels...@fmglobal.com

 Thanks everyone.  I got multiple fonts working wonderfully.  I'll never
 look back.

 One quirky AS3 thing though:  why do I have to refer to the font this
 way:

 private function styler():StyleSheet{
var ss:StyleSheet = new StyleSheet();
var uplain:Object = new Object();
uplain.fontFamily =  new Univers().fontName;
uplain.fontSize = 30;
uplain.color = #FF;
uplain.marginLeft = uplain.marginRight = 10;
uplain.textAlign = left;
ss.setStyle(.uplain, uplain);
return ss;
 }


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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] multiple fonts in TextField?

2009-01-12 Thread Ashim D'Silva
It depends on the compiler, but in the Flash IDE go into your library, and
click New Font, then embed the font you want. Bold and Italic have to be
embedded separately if required. Remember to turn on Export for Actionscript
as well.
You also might want to look into style sheets. It keeps things more
organised and will let you do hovers.

2009/1/13 Mendelsohn, Michael michael.mendels...@fmglobal.com

 Thanks for replying Rob.  I did this in the document class, but nothing
 happened.
 Import flash.text.Font;

 In the constructor:
 Font.registerFont(XYZBold);

 Then I tried:
 Font.registerFont(new XYZBold().fontName);

 But that didn't work either.  Where do you make it available?

 - MM

  If your second font is not embedded in any text field but only
 available via linkage then while it is embedded in your file it is not
 available for usage. To make it available you need to use the
 registerFont function with your linked font. After that it should show
 up in any text field with embedFonts set to true.

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] change the origin of rotation for a movieclip?

2009-01-12 Thread Ashim D'Silva
Scale  rotate around an arbitrary centre | Web
2.1http://web.2point1.com/2008/04/13/scale-rotate-around-an-arbitrary-centre/
first result on google.

2009/1/13 Anthony Pace anthony.p...@utoronto.ca

 Oh yeah this definitely works.  I was having trouble because I needed to
 delete ASO files(thought things had changed in the fp10 upgrade and I was
 going nuts until I figured it out); yet, I am still looking for a better
 way.

 I am looking into the matrix transformer class right now.


 Ian Thomas wrote:

 That shouldn't be the case.

 You will have to offset the original mc's x and y by half the width
 and height of the original; but the rotation of the wrapping mc should
 always take place around that mc's origin.

 e.g.

 var wrapper:Sprite=new Sprite();
 wrapper.addChild(original);
 original.x=-original.width/2;
 original.y=-original.height/2;

 addChild(wrapper);

 wrapper.rotation=45;

 ... or whatever.

 If you're really getting erroneous results from that sort of setup,
 I'd love to see the source code.

 Ian

 On Sun, Jan 11, 2009 at 2:00 AM, Anthony Pace anthony.p...@utoronto.ca
 wrote:


 I have actually tried that yet, it seems that when I move the mc in the
 wrapper, the origin of the wrapper changes to be that of mc upper left
 most
 point.

 Leandro Ferreira wrote:


 The easiest way is to wrap it arount another object, move its position
 and
 rotate the wraper.

 Leandro Ferreira


 On Sat, Jan 10, 2009 at 10:11 PM, Anthony Pace
 anthony.p...@utoronto.cawrote:




 How do you change the origin of rotation dynamically? can it be done?
  or
 will it always be 0,0

 I was hoping that with the new features of as3 that this I would be
 able
 to
 indicate where I wanted the origin; yet, I am starting to think that I
 was
 hoping for too much.


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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Thoughts on new features in CS4

2009-01-07 Thread Ashim D'Silva
One app the does everything would be terrible. You'd have to pay for
features you don't want and will have to run an incredibly beefy program
that will take the strongest of systems down. Maybe at some point, maybe
when quantum computing is around!, but till then I'd say it's organised
well.That however, is not an excuse for the terrible code editor.

As for the original post, I have gotten my hands on CS4 just yet, but I've
seen demo's and video tuts, and WOW.. its a pretty big jump and fantastic
features for animators, which possibly means power for devs as well. But all
of it could be done through code in 9, so maybe they've just made it easier
for animators to do, but that's great none the less.

2009/1/8 Mendelsohn, Michael michael.mendels...@fmglobal.com

 Anthony, I'm going out on a limb and guessing that the why don't they
 just make it all one app that does everything suggestion has been
 around longer than you've been alive.  Don't lose any sleep over that
 one.  :-D

 - MM


   They don't care enough about users to make one application that does
 everything, or
 an app that integrates extremely easily with another feature set if
 purchased; for, they don't think like that.


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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Custom buttons - radio style

2008-12-22 Thread Ashim D'Silva
I'd say you need to wrap the system in a RadioControl class of some sort.
This is a group class and knows of all the radio buttons that are affected
as part of this group. That was you can have a second group if you need it.
This class can have a currentSelection variable which stores whatever is
clicked. Right before you change its value though, you first reset its
contents
Eg:

private function onClick(e:MouseEvent):void
{

if (currentSelection)
{
currentSelection.mouseEnabled = true;
currentSelection.goToAndStop(up);
}
currentSelection = e.currentTarget;
currentSelection.goToAndStop(down);
currentSelection.mouseEnabled = false;

}

I'm not entirely sure how you can connect things from the Flash library. I'd
generate the buttons from the group class.
However you could put all the buttons into a movieclip and type as the group
class. I guess you can then run through the names and assign listeners. THat
may not be the best though.

Ashim

2008/12/23 jim skolmoski skol...@hotmail.com


 Listers,As an experienced AS2 coder, and a very new AS3 coder, I'm having
 trouble writing some classes.Since I work with a few Flash designers, I'm
 hoping that I can create some classes that would automatically add
 functionality to interactive programs that they are designing.The current
 project's design calls for a left nav with custom buttons.  Each of these
 buttons (movieclips) have UP, OVER, and DOWN states (as labels). As a button
 is selected by the user, that button will remain in DOWN state and lose its
 functionality (via several removeEventListeners).  Then as a different
 button is selected from the left nav, I would like it to enter a DOWN state,
 and also trigger an event that would make the initial button move to its UP
 state and gain functionality once again.I have a MainNav class that provides
 all the functionality for the buttons.  My designers would simply name the
 stage instance to MainNav1_MainLabel1 and link the button movieclips to my
 class.  My class will dissect the instance name to to two items: the
 button's name and the label that the root should gotoAndStop.  I however
 have yet to figure out how to implement the communication that changes the
 earlier depressed button back to the UP state when another button is
 clicked.  How should I implement this communication?  via the document
 class?  make a event class?Another part of this story is that when the root
 goes to another label, often times the screen will have subNav buttons which
 will also work in this custom radio fashion.  It would be nice if I could
 use the same classes.Thanks for your timeany hints or pointers are
 appreciatedJim
 _
 Life on your PC is safer, easier, and more enjoyable with Windows Vista(R).

 http://clk.atdmt.com/MRT/go/127032870/direct/01/___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: A funny little hover problem with CSS

2008-12-17 Thread Ashim D'Silva
Now that is odd. Is 0.5 the general rule to follow or is it simply different
for every object you put down?

2008/12/18 Jon Bradley jbrad...@postcentral.com


 On Dec 16, 2008, at 10:49 PM, Ashim D'Silva wrote:

  I always round everything I place. That was one of the first things I
 checked. Rotated bitmaps and text often have this problem, which is fair
 enough because half pixels don't exist.


 Actually, they do. The native coordinate space for Flash is a twip, which
 is 1/20th of a pixel. The rasterizer in Flash has to do some funky stuff
 anyway with rotated content.

 There are some really annoying display bugs in Flash for this - consider a
 nice vector shape that's rotated through AS very, very slowly. You'll
 actually see it jump around when zoomed up. I discovered this one when
 rendering content for a 1080p animation project ... so annoying.

 One of the most interesting tests  is to create a rounded rectangle and add
 a 1 pixel border line around it. Notice it looks funky and isn't smooth.
 Position the rounded rectangle on a half pixel (+0.5 on x and y). It's all
 nice and smooth again.

 cheers,


 jon

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: A funny little hover problem with CSS

2008-12-16 Thread Ashim D'Silva
Wow. Thanks. I wouldn't have thought rotating a text field would make it
better. Whenever I need to rotate text I usually render it to a bitmap and
rotate that.
Help is much appreciated.

Ashim

2008/12/17 Jon Bradley jbrad...@postcentral.com


 On Dec 14, 2008, at 8:04 PM, Ashim D'Silva wrote:

  Right. I recreated everything slowly in a new file, introducing things one
 by one and here's the culprit - Advanced Anti-Aliasing.Now I really would
 like to use advanced, because text looks dramatically better, but there
 has
 to be a solution, doesn't there?


 The issue affects more than just static fields (with hovers). It
 dramatically affects applications where users are allowed to rotate and
 scale dynamic text fields. In that instance, the kerning, leading and
 character positions are offset and randomly jump around in value. The
 kerning is the worst - as a field is scaled the kerning will jump anywhere
 between 0-2 em on the characters ... randomly between each.

 The only work around is to have the text field rotated by a small amount
 (0.01, for example). I submitted this bug to Adobe quite while back, along
 with the 'workaround.'

 Sorry to be the bearer of bad news. At least you can give the rotation of
 the field a shot. You may need to use AS to set the rotation via a Matrix.

 var m:Matrix = new Matrix();
 m.rotate(0.01);
 myTextfield.transform = m;

 The rotaion might need to be tweaked a tad - I don't have my bug app open
 right now to check out the exact value that I ended up using.

 - jon

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: A funny little hover problem with CSS

2008-12-16 Thread Ashim D'Silva
I always round everything I place. That was one of the first things I
checked. Rotated bitmaps and text often have this problem, which is fair
enough because half pixels don't exist.
Cheers though.

2008/12/17 Taka Kojima t...@gigafied.com

 p.s. make sure all of the textfield's parents also have their x,y values as
 whole pixels.

 -Taka

 On Tue, Dec 16, 2008 at 4:18 PM, Taka Kojima t...@gigafied.com wrote:

  I think I know the solution
 
  It's quite a different approach... but a lot of times text has shifting
  problems on hovers and whatnot when their x,y's are not set at exact
 pixels.
 
  Maybe try changing the positioning on the stage so that the elements use
 an
  exact x,y value, or do a Math.round() if you're positioning them through
 AS.
 
  Hope this helps.
 
   -Taka
 
 
  On Tue, Dec 16, 2008 at 4:05 PM, Ashim D'Silva as...@therandomlines.com
 wrote:
 
  Wow. Thanks. I wouldn't have thought rotating a text field would make it
  better. Whenever I need to rotate text I usually render it to a bitmap
 and
  rotate that.
  Help is much appreciated.
 
  Ashim
 
  2008/12/17 Jon Bradley jbrad...@postcentral.com
 
  
   On Dec 14, 2008, at 8:04 PM, Ashim D'Silva wrote:
  
Right. I recreated everything slowly in a new file, introducing
 things
  one
   by one and here's the culprit - Advanced Anti-Aliasing.Now I really
  would
   like to use advanced, because text looks dramatically better, but
 there
   has
   to be a solution, doesn't there?
  
  
   The issue affects more than just static fields (with hovers). It
   dramatically affects applications where users are allowed to rotate
 and
   scale dynamic text fields. In that instance, the kerning, leading and
   character positions are offset and randomly jump around in value. The
   kerning is the worst - as a field is scaled the kerning will jump
  anywhere
   between 0-2 em on the characters ... randomly between each.
  
   The only work around is to have the text field rotated by a small
 amount
   (0.01, for example). I submitted this bug to Adobe quite while back,
  along
   with the 'workaround.'
  
   Sorry to be the bearer of bad news. At least you can give the rotation
  of
   the field a shot. You may need to use AS to set the rotation via a
  Matrix.
  
   var m:Matrix = new Matrix();
   m.rotate(0.01);
   myTextfield.transform = m;
  
   The rotaion might need to be tweaked a tad - I don't have my bug app
  open
   right now to check out the exact value that I ended up using.
  
   - jon
  
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
 
 
 
  --
  The Random Lines
  My online portfolio
  www.therandomlines.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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] A funny little hover problem with CSS

2008-12-15 Thread Ashim D'Silva
Thanks guys,
Still having trouble though. I have scaled anything, and I tried all those
combinations of resetting the style sheet each time.
I'm pretty close to giving up and sticking with normal anti-aliasing.

Flash's support for HTML and CSS has always been a bit iffy though. It's
just useful for CMS control.

Cheers,

Ashim

2008/12/16 Matt S. mattsp...@gmail.com

 I seem to remember solving this problem once by changing where the
 stylesheet gets set, but I cant remember the order. I would try a few
 options, like:

 txt.htmlText = xmlTXT;
 CreateStyleSheet();

 or

 CreateStyleSheet();
 txt.htmlText = xmlTXT;

 or even ( I know it looks stupid)

 CreateStyleSheet();
 txt.htmlText = xmlTXT;
 CreateStyleSheet();

 kinda kludgy, but if it works...

 .m

 On Sun, Dec 14, 2008 at 7:33 PM, Ashim D'Silva as...@therandomlines.com
 wrote:
  Hi all,
  I'm having a really odd problem, that I haven't been able to find
 anything
  about. I have a multiline, word wrapped TextField that uses CSS (built as
  objects), with content coming from HTML in an XML file.
  It all works fine, but for some reason, when I hover over a link (whether
 I
  have CSS for hover or not) it moves a pixel or two. Sometimes only the
 first
  time, sometimes all the time.
  If I have a a:hover in the CSS it definitely moves every time.
 
  Has anyone encountered this, got a solution or have any idea why this
 would
  happen?
 
  Thanks,
 
  Ashim
 
  --
  The Random Lines
  My online portfolio
  www.therandomlines.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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] A funny little hover problem with CSS

2008-12-14 Thread Ashim D'Silva
Hi all,
I'm having a really odd problem, that I haven't been able to find anything
about. I have a multiline, word wrapped TextField that uses CSS (built as
objects), with content coming from HTML in an XML file.
It all works fine, but for some reason, when I hover over a link (whether I
have CSS for hover or not) it moves a pixel or two. Sometimes only the first
time, sometimes all the time.
If I have a a:hover in the CSS it definitely moves every time.

Has anyone encountered this, got a solution or have any idea why this would
happen?

Thanks,

Ashim

-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: A funny little hover problem with CSS

2008-12-14 Thread Ashim D'Silva
Right. I recreated everything slowly in a new file, introducing things one
by one and here's the culprit - Advanced Anti-Aliasing.Now I really would
like to use advanced, because text looks dramatically better, but there has
to be a solution, doesn't there?

2008/12/15 Ashim D'Silva as...@therandomlines.com

 Hi all,
 I'm having a really odd problem, that I haven't been able to find anything
 about. I have a multiline, word wrapped TextField that uses CSS (built as
 objects), with content coming from HTML in an XML file.
 It all works fine, but for some reason, when I hover over a link (whether I
 have CSS for hover or not) it moves a pixel or two. Sometimes only the first
 time, sometimes all the time.
 If I have a a:hover in the CSS it definitely moves every time.

 Has anyone encountered this, got a solution or have any idea why this would
 happen?

 Thanks,

 Ashim

 --
 The Random Lines
 My online portfolio
 www.therandomlines.com




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Ashim D'Silva
I'd say, if the freedom is troubling you in general, disable strict mode.Not
a good solution if you want to do some real heavy stuff, but doesn't seem
the case.

2008/12/11 Dave Watts [EMAIL PROTECTED]

  I'm not sure what Strk means about no free flash player supports
  AS3, since the last time I checked the ADOBE Flash Player was free...

 I would assume he means free software in the software libre sense:
 http://en.wikipedia.org/wiki/Free_software

 That said, I wouldn't take that as serious advice, because the vast
 majority of people have Adobe Flash Player.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/

 Fig Leaf Software provides the highest caliber vendor-authorized
 instruction at our training centers in Washington DC, Atlanta,
 Chicago, Baltimore, Northern Virginia, or on-site at your location.
 Visit http://training.figleaf.com/ for more information!
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] JavaFX released

2008-12-06 Thread Ashim D'Silva
I'll back processing. It's an incredible tool. Relatively simple and pretty
damn powerful. I got facial recognition going (with a library) for a 3D
scene you can look around and I've seen a good amount of excellent stuff
come out of it.
As for Java, yes, it's the original, yes, it's a more powerful engine, but
as far as front-end web work goes, both those don't matter too much, ease of
production, I think, trumps them. And with Flash 10 (CS4) artists and
developers have an incredible platform, with simple 3D, inverse kinematics
with soft skinning, and a shit load more all ready to go. I don't see Java
competing with that too easily. Java always seemed to have its own space,
which I knew nothing about; Fx is confusing me.

That said, I'd back open source if its got a chance.

2008/12/7 Latcho [EMAIL PROTECTED]

 Hi Dr. Ache,
 It's not about it's power. It's also about marketing and market penetration
 and providing newcomers a solid entry point.  Furthermore ...
 The level of complexity that flash can have now can be harder on starters;
  AS3, compilers, design patterns and so on will be are no out of the box
 toys. The main difference for me is that you can start easy and animation
 friendly via the flash IDE and it's fine documentation.
 The historical super technical java docs, silly examples. the packaging,
 the badly documented differences between compiling for online and local aps,
 and a missing IDE or compiler gui pulled me from going further after some
 experimenting with it. Just now, nearly half a decade later, after being
 mentored by good tutorials, a very communicative and a helpful flash and AS
 community from a simple video editor up to a design-pattern-level coder,
 just now I would have the courage to check it out again.
 By the way:  processing providde me with a nice wrapper and support to get
 visual stuff done for starters;  I loved it and it's betst part - : the
 java displaying power and the easy applet pubishing.
 http://processing.org/

 Latcho



 dr.ache wrote:

 What I am concerned I do not see any reason why they should NOT do this.
 I find its pretty obvious.

 a) They do already have a language actionscript tries to mimic more and
 more with every release.
 b) They do have the power flash is lacking especially what desctop is
 concerned.
 c) Java was meant to be the internet language ever since. Meaning it has
 all you need for web based systems.
 d) Its open source
 e) Serious corporations DO use Java for their networks and with Flex Adobe
 is trying to become more mature to be recognized by those companies (SAP,
 etc)
 d) Just a guess, but I would say there are more Java developer out there
 then flash developers - so a hugh audience.
 e) etc etc

 I dont think JavaFX will replace something like flash... but it has great
 power and this is the first release... do you remember flash 1?



 Latcho schrieb:

 Dunno why they put energy in this. Java, they had their chances for
 online animation-focussed penetration, too late now I guess.
 And the site crashed my pretty stable FF3.

 Anthony Pace wrote:

 I am sure if better coders provided better examples it would work well;
 yet, the applications seem to take forever to load and I have a pretty
 decent system.

 Eric E. Dolecki wrote:

 On my Mac in Firefox when I scroll the page, that player UI flickers on
 and
 off. Pretty lame.

 On Sat, Dec 6, 2008 at 1:15 PM, Jim Robson [EMAIL PROTECTED]
 wrote:



 I checked out the drag-able component sample on javafx.com and it
 didn't work. If you're interested in the details, I put them in a
 comment on Sten Andersen's blog here:

 http://blogs.citytechinc.com/sanderson/?p=49#comment-714

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] JavaFX released

2008-12-05 Thread Ashim D'Silva
I'm actually not entirely sure where Java (applets) fit into the front end
web thing. I'd really like to see where this goes, because as far as
usability and increased interactivity go, javascript and flash each have a
good solid space; as well as competing for some common areas. I haven't
really used Java, so I'd love some light shed.
Ashim

2008/12/6 Jason Van Cleave [EMAIL PROTECTED]

 Curious to what others think...

 Interesting that it can play flvs out of the box. I haven't seen the
 feature in action but supposedly you can drag applications from the
 browser to the desktop. The free NetBeans IDE is a nice touch too.

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] structuring singletons in AS3

2008-12-03 Thread Ashim D'Silva
It sounds like you're replacing the document class for some reason. Which,
most often, is indeed a singleton. Although I normally aim towards it being
static for all intents and puposes, and use that as my central information
source for passing around shared assets/code etc.Tell me if I'm confused.

2008/12/3 Steven Sacks [EMAIL PROTECTED]

 Why aren't you using a static class for that instead of a Singleton?



 Mendelsohn, Michael wrote:

 Thanks for the responses everyone.
 Steven, I could use some constructive feedback:

 Usually what I do is have a singleton instanced when the swf is
 initialized, and using composition, other classes are instanced within
 the singleton.  So the singleton becomes a sort of tree trunk with
 everything branching off of it.  How would you say that this is a bad
 idea?  It's worked well for me.  What would be a more effective
 alternative to structuring my swfs?

 - MM



 Singletons are overused and, except in rare instances, are a bad idea.

 Singletons are acceptable if you're writing throwaway code, like agency
 stuff where getting it done under tight deadlines is more important than
 getting it done in the most scalable and flexible way.

 A Singleton is just a global.  IMO, globals are helpful when hacking,
 but generally bad practice. If it was called Globalton, people wouldn't
 think so highly of it just because it's a Design Pattern.  Most people
 misuse Singleton, anyway.

 http://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/

 http://googletesting.blogspot.com/2008/05/tott-using-dependancy-injectio
 n-to.html

 http://googletesting.blogspot.com/2008/08/where-have-all-singletons-gone
 .html


 Google even has a tool that detects Singletons in Java so you can
 refactor them out.

 http://linux.softpedia.com/get/Programming/Quality-Assurance-and-Testing
 /Google-Singleton-Detector-29295.shtml

 ___
 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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] binary-coded image

2008-12-03 Thread Ashim D'Silva
If you're just after the look the TweenFilterLite library has a great
inbuilt filter. But if you actually want to convert it, I imagine you'd just
run through every pixel and if the value (calculated however you'd like) is
greater than your decided threshold, make it white, else black. I'm not sure
what it will save you within flash however.
Ashim

2008/12/4 Ian Thomas [EMAIL PROTECTED]

 Really? Wow. Must be new additions - excellent.

 Ian

 On 12/3/08, David Hershberger [EMAIL PROTECTED] wrote:
  Also Flex supports PNG and JPEG:
   mx.graphics.codec.PNGEncoder and mx.graphics.code.JPEGEncoder.
 
   Dave
 
 
   On 12/3/08, Ian Thomas [EMAIL PROTECTED] wrote:
   
If you mean 'how do I encode a bitmap into an image format' e.g. PNG
or JPEG, check out this library:
http://code.google.com/p/as3corelib/wiki/Main
   
which has code for both PNG and JPEG.
   
HTH,
   
   Ian
   
   
On 12/3/08, laurent [EMAIL PROTECTED] wrote:
 Hi,

  How could I convert a bitmap to a binary-coded bitmap ... or
 anything
else
 that will represent a binary-coded image ?

  Thanks
  L
  ___
  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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] computeSpectrum not working with mp3 from different server.

2008-12-01 Thread Ashim D'Silva
That is how the cross domain policy for flash runs, and has run since player
7. It affects quite a few other things as well like bitmap data operations
and other stuff I don't know off the top of my head. Read up on it.

2008/12/1 Carl Welch [EMAIL PROTECTED]

 Does it matter that I can still hear the sound? It seems weird that I can
 hear the song playing from a different server but not have the ability to
 render the computeSpectrum.



 On Nov 30, 2008, at 5:58 PM, Latcho wrote:

  SecurityError: Error #2123: Security sandbox violation:
 SoundMixer.computeSpectrum:
 http://oniricdev.com/carl/modules/audioPlayer.swf cannot access
 http://setlist.matisyahuworld.com/2008-11-19-09_Dispatch_The_Troops.mp3.
 No policy files granted access.
  at flash.media::SoundMixer$/computeSpectrum()
  at audioPlayer_fla::MainTimeline/*drawMyShit*()

 You have to put a crossdomain.xml file on the mp3-server that grants acces
 to the swf-server domain:
 http://setlist.matisyahuworld.com/crossdomain.xml  [ with xml inside, not
 html as it renders now]

 Put it in root of the swf-server or define non-top-level xml location
 within the swf by Security.loadPolicyFile(urltocrossdomain);


 Latcho



 Carl Welch wrote:

 Hi guys,

 I just ran into a funky problem with computeSpectrum. it appears that it
 won't work if the mp3 isn't located on the same server as the swf calling
 it. Is there a work around for this issue?

 I tried using this as a solution but it didn't have any effect at all:

 import flash.media.SoundLoaderContext;
 var context:SoundLoaderContext = new SoundLoaderContext();
 context.checkPolicyFile = true;
 _sound.load(new URLRequest('http://server/song.mp3'), context);


 Here is an example of what I have:

 swf and mp3 on the same server:
 http://oniricdev.com/carl/modules/audioPlayer_test.swf

 mp3 from a server other than the one that is hosting my swf:
 http://oniricdev.com/carl/modules/audioPlayer.swf


 Thanks!


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


 --
 Carl Welch
 http://www.carlwelch.com
 http://www.jointjam.com
 [EMAIL PROTECTED]
 805.403.4819




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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] adding physics to pivot object around a point

2008-12-01 Thread Ashim D'Silva
From your description you don't really want to 'move' the pivot really, but
have it different everytime the object is picked up; which is simpler.The
pendulum should work nicely.

2008/12/2 allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED]

 yes that's definitely close - the only difference that i can see is that i
 want to be able to move the pivot and have it react accordingly

 thanks for the help guys
 a

 On Mon, Dec 1, 2008 at 7:48 PM, Glen Pike [EMAIL PROTECTED]
 wrote:

  Hi,
 
Sounds like a pendulum to me - you want to work out the angular
 velocity,
  it's probably a good idea to start with something like below, then
 roughly
  simulate your gravity / angular velocity enough for it to look nice:
  http://www.myphysicslab.com/pendulum1.html
 
If that does not work try Googling pendulum and angular velocity.
 
Glen
 
 
  allandt bik-elliott (thefieldcomic.com) wrote:
 
  hi guys
 
  could anyone point me in the right direction to do the following,
 please?
 
  I'd like an object that is dragged to correctly respond to being pulled
  around by pivoting around the point it is dragged by (also applying
  downward
  force to represent gravity)
 
  for example, if i hold a pencil lightly at one end, it will pivot around
  the
  point i am holding and swing until it comes to a rest pointing straight
  down.
 
  does anyone know of any tutorials that go into this kind of thing?
 
  thanks for your help
  a
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 
 
  --
 
  Glen Pike
  01326 218440
  www.glenpike.co.uk http://www.glenpike.co.uk
 
 
  ___
  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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Blurry TextField Issue

2008-11-17 Thread Ashim D'Silva
My last ditch effort with fussy type, it to make a dummy bitmap copy of the
sprite (bitmapdata.draw(dispObj)) and use that for the animation times.
Switch back to the original when you need selections/links to work...Not the
most elegant, but it should work...

2008/11/17 Meinte van't Kruis [EMAIL PROTECTED]

 fonts are cached as bitmap when they get turned in 3d space, same as when
 applying filters,
 you can;t turn that off.

 One last thing to try is to tween with rounded values only, but I'm quite
 sure that wont make a difference,
 I think any font moved or turned in 3d space gets a bit 'blurry'.


 On Mon, Nov 17, 2008 at 7:43 AM, Omar Fouad [EMAIL PROTECTED]
 wrote:

  Nope i already tried it. It does not make any difference.
 
  On 11/16/08, Joel Stransky [EMAIL PROTECTED] wrote:
   set .cacheAsBitmap to false.
  
   On Sun, Nov 16, 2008 at 11:09 AM, Omar Fouad [EMAIL PROTECTED]
  wrote:
  
   So No ideas yet?
  
   On Tue, Nov 11, 2008 at 1:36 PM, Omar Fouad [EMAIL PROTECTED]
   wrote:
  
I've tried everything...By the way I am tweening from rotationX -90
 to
rotationX 0 so I think that the font dimensions should return back
 to
   their
initial size...
By the was if they are immediately cashed as bitmap, is there a way
 to
   get
the back as vectors and not bitmap?
   
   
On Mon, Nov 10, 2008 at 7:11 PM, Joel Stransky 
  [EMAIL PROTECTED]
   wrote:
   
I'm pretty sure any text fields immediately become cached as
 bitmaps
   when
their dimensions are modified.
   
On Mon, Nov 10, 2008 at 8:01 AM, Omar Fouad omarfouad.net@
 gmail.com
  
wrote:
   
 I'm also placing the textField into whole pixel coordinates and
 the
pixel
 font is in it's default size.
 Cordially

 On Mon, Nov 10, 2008 at 3:00 PM, Omar Fouad omarfouad.net@
  gmail.com
 wrote:

  Hi,I have a Sprite that contains some MovieClips and a Dynamic
  Text
 Field.
  I am using a simple transition where I tween Both the alpha and
  the
  rotationY property (flash Player 10).
  I noticed that when using rotationX(), rotationY and
 rotationZ(),
   the
  TextField font that is inside the sprite tweened becomes blurry
  and
   it
  becomes bold. I used Pixel fonts and non pixel fonts, checked
 and
 unchecked
  Auto Kerning, used all types of Anti-aliasing, bitmap text and
   device
 font,
  but in vain!!!
  It definitively works and fonts look great without using any 3d
property
 as
  in when i use tween alpha only.
 
  Is there a solution to use those properties without loosing the
  font
  quality?
 
  Thanks
 
  --
  Omar M. Fouad - www.omar-fouad.net
  Cellular: (+20) 1011.88.534
  Mail: [EMAIL PROTECTED]
 
  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.
 



 --
 Omar M. Fouad - www.omar-fouad.net
 Cellular: (+20) 1011.88.534
 Mail: [EMAIL PROTECTED]

 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

   
   
   
--
--Joel
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
   
   
   
   
--
Omar M. Fouad - www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: [EMAIL PROTECTED]
   
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.
   
  
  
  
   --
   Omar M. Fouad - www.omar-fouad.net
   Cellular: (+20) 1011.88.534
   Mail: [EMAIL PROTECTED]
  
   This e-mail and any attachment is for authorised 

Re: [Flashcoders] Re: Blurry TextField Issue

2008-11-17 Thread Ashim D'Silva
I don't see what OO has to do with it. It's a little processor intensive if
you have heaps and heaps of text fields, but if you wrap it up nicely, it
doesn't have to interfere with anything.

2008/11/18 Omar Fouad [EMAIL PROTECTED]

 I thought about it, but when working with Pure AS, especially if it is
 object oriented, it wouldn't be a good approach.

 On Mon, Nov 17, 2008 at 3:19 PM, Ashim D'Silva [EMAIL PROTECTED]
 wrote:

  My last ditch effort with fussy type, it to make a dummy bitmap copy of
 the
  sprite (bitmapdata.draw(dispObj)) and use that for the animation times.
  Switch back to the original when you need selections/links to work...Not
  the
  most elegant, but it should work...
 
  2008/11/17 Meinte van't Kruis [EMAIL PROTECTED]
 
   fonts are cached as bitmap when they get turned in 3d space, same as
 when
   applying filters,
   you can;t turn that off.
  
   One last thing to try is to tween with rounded values only, but I'm
 quite
   sure that wont make a difference,
   I think any font moved or turned in 3d space gets a bit 'blurry'.
  
  
   On Mon, Nov 17, 2008 at 7:43 AM, Omar Fouad [EMAIL PROTECTED]
   wrote:
  
Nope i already tried it. It does not make any difference.
   
On 11/16/08, Joel Stransky [EMAIL PROTECTED] wrote:
 set .cacheAsBitmap to false.

 On Sun, Nov 16, 2008 at 11:09 AM, Omar Fouad omarfouad.net@
  gmail.com
wrote:

 So No ideas yet?

 On Tue, Nov 11, 2008 at 1:36 PM, Omar Fouad omarfouad.net@
  gmail.com
 wrote:

  I've tried everything...By the way I am tweening from rotationX
  -90
   to
  rotationX 0 so I think that the font dimensions should return
 back
   to
 their
  initial size...
  By the was if they are immediately cashed as bitmap, is there a
  way
   to
 get
  the back as vectors and not bitmap?
 
 
  On Mon, Nov 10, 2008 at 7:11 PM, Joel Stransky 
[EMAIL PROTECTED]
 wrote:
 
  I'm pretty sure any text fields immediately become cached as
   bitmaps
 when
  their dimensions are modified.
 
  On Mon, Nov 10, 2008 at 8:01 AM, Omar Fouad omarfouad.net@
   gmail.com

  wrote:
 
   I'm also placing the textField into whole pixel coordinates
 and
   the
  pixel
   font is in it's default size.
   Cordially
  
   On Mon, Nov 10, 2008 at 3:00 PM, Omar Fouad omarfouad.net@
gmail.com
   wrote:
  
Hi,I have a Sprite that contains some MovieClips and a
  Dynamic
Text
   Field.
I am using a simple transition where I tween Both the alpha
  and
the
rotationY property (flash Player 10).
I noticed that when using rotationX(), rotationY and
   rotationZ(),
 the
TextField font that is inside the sprite tweened becomes
  blurry
and
 it
becomes bold. I used Pixel fonts and non pixel fonts,
 checked
   and
   unchecked
Auto Kerning, used all types of Anti-aliasing, bitmap text
  and
 device
   font,
but in vain!!!
It definitively works and fonts look great without using
 any
  3d
  property
   as
in when i use tween alpha only.
   
Is there a solution to use those properties without loosing
  the
font
quality?
   
Thanks
   
--
Omar M. Fouad - www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: [EMAIL PROTECTED]
   
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.
   
  
  
  
   --
   Omar M. Fouad - www.omar-fouad.net
   Cellular: (+20) 1011.88.534
   Mail: [EMAIL PROTECTED]
  
   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
  
 
 
 
  --
  --Joel
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http

Re: [Flashcoders] Re: Blurry TextField Issue

2008-11-17 Thread Ashim D'Silva
Not so much a copy, but a render of it within flash. As long as it's not
animated.

2008/11/18 Omar Fouad [EMAIL PROTECTED]

 You mean I should create a copy of the MovieClip that will undergo the 3D
 Tweening and when completed i'd remove it and show the real one that have
 the interaction with it?
 On Mon, Nov 17, 2008 at 4:39 PM, Ashim D'Silva [EMAIL PROTECTED]
 wrote:

  I don't see what OO has to do with it. It's a little processor intensive
 if
  you have heaps and heaps of text fields, but if you wrap it up nicely, it
  doesn't have to interfere with anything.
 
  2008/11/18 Omar Fouad [EMAIL PROTECTED]
 
   I thought about it, but when working with Pure AS, especially if it is
   object oriented, it wouldn't be a good approach.
  
   On Mon, Nov 17, 2008 at 3:19 PM, Ashim D'Silva 
 [EMAIL PROTECTED]
   wrote:
  
My last ditch effort with fussy type, it to make a dummy bitmap copy
 of
   the
sprite (bitmapdata.draw(dispObj)) and use that for the animation
 times.
Switch back to the original when you need selections/links to
  work...Not
the
most elegant, but it should work...
   
2008/11/17 Meinte van't Kruis [EMAIL PROTECTED]
   
 fonts are cached as bitmap when they get turned in 3d space, same
 as
   when
 applying filters,
 you can;t turn that off.

 One last thing to try is to tween with rounded values only, but I'm
   quite
 sure that wont make a difference,
 I think any font moved or turned in 3d space gets a bit 'blurry'.


 On Mon, Nov 17, 2008 at 7:43 AM, Omar Fouad omarfouad.net@
 gmail.com
  
 wrote:

  Nope i already tried it. It does not make any difference.
 
  On 11/16/08, Joel Stransky [EMAIL PROTECTED] wrote:
   set .cacheAsBitmap to false.
  
   On Sun, Nov 16, 2008 at 11:09 AM, Omar Fouad omarfouad.net@
gmail.com
  wrote:
  
   So No ideas yet?
  
   On Tue, Nov 11, 2008 at 1:36 PM, Omar Fouad omarfouad.net@
gmail.com
   wrote:
  
I've tried everything...By the way I am tweening from
  rotationX
-90
 to
rotationX 0 so I think that the font dimensions should
 return
   back
 to
   their
initial size...
By the was if they are immediately cashed as bitmap, is
 there
  a
way
 to
   get
the back as vectors and not bitmap?
   
   
On Mon, Nov 10, 2008 at 7:11 PM, Joel Stransky 
  [EMAIL PROTECTED]
   wrote:
   
I'm pretty sure any text fields immediately become cached
 as
 bitmaps
   when
their dimensions are modified.
   
On Mon, Nov 10, 2008 at 8:01 AM, Omar Fouad omarfouad.net
 @
 gmail.com
  
wrote:
   
 I'm also placing the textField into whole pixel
 coordinates
   and
 the
pixel
 font is in it's default size.
 Cordially

 On Mon, Nov 10, 2008 at 3:00 PM, Omar Fouad 
 omarfouad.net
  @
  gmail.com
 wrote:

  Hi,I have a Sprite that contains some MovieClips and a
Dynamic
  Text
 Field.
  I am using a simple transition where I tween Both the
  alpha
and
  the
  rotationY property (flash Player 10).
  I noticed that when using rotationX(), rotationY and
 rotationZ(),
   the
  TextField font that is inside the sprite tweened
 becomes
blurry
  and
   it
  becomes bold. I used Pixel fonts and non pixel fonts,
   checked
 and
 unchecked
  Auto Kerning, used all types of Anti-aliasing, bitmap
  text
and
   device
 font,
  but in vain!!!
  It definitively works and fonts look great without
 using
   any
3d
property
 as
  in when i use tween alpha only.
 
  Is there a solution to use those properties without
  loosing
the
  font
  quality?
 
  Thanks
 
  --
  Omar M. Fouad - www.omar-fouad.net
  Cellular: (+20) 1011.88.534
  Mail: [EMAIL PROTECTED]
 
  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.
 



 --
 Omar M. Fouad - www.omar-fouad.net
 Cellular: (+20) 1011.88.534
 Mail: [EMAIL PROTECTED]

 This e-mail and any attachment is for authorised use by
 the
  intended
 recipient(s) only. It may

Re: [Flashcoders] runtime instantiation

2008-10-28 Thread Ashim D'Silva
If you want to add a class in the future, you will definitely have to
recompile, because flash doesn't compile at runtime as far as I know.
But I have also looked for a way to simply import classes without also
having a var defined. It's not too big a deal, but it's an interesting
topic.

2008/10/28 Jiri Heitlager [EMAIL PROTECTED]:
 I know it is possible to instantiate a class at runtime, but one always
 needs to put in a concrete piece of code that forces the compiler to
 actually add the class to the swf. I am currently looking into using this
 technique to gain flexibility in an application, but the fact that I will
 always need to add concrete code to force the compiler seems to be counter
 productive.
 Here is what I have.

 interface aInterface

 class abstractA impl aInterface

 class injectedB extends abstractA
 class injectedC extends abstractA

 then I have a factory method that reads an xml file and instantitated a
 class based on the @reference node using getDefinitionByName()
 class reference='injectedB' /

 My idea is that I can in the future write  an new class injectedC and just
 add it to the xml list. But this won't work because I will always need to
 add something like this to var foo:injectedC = null to add the class to the
 compiler. Meaning I will always need to recompile.
 Is there any way to get around this?

 Jiri








 artur wrote:

 need to know a few things:

 1 - can i render/export to QT an AS based animation that will be 40min
 long?
 it will be incorporating an FLV ( soundtrack ) with Cuepoints..that will
 trigger different AS animations made from an XML file.
 is there a chance that the animation and sound can become out of sync (
 this has been known to happen with timeline based animations )

 2 - the FLV will have over 10k cuepoints.
 is there a way to Scrub through to the middle of the animation by giving
 an ID# to each CuePoint?
 and then giving each XML node that same ID#?

 then just create a simple textfield form and have the client enter that
 ID#
 and the animation can Jump to that section of the animation ( for
 testing/previewing )

 but then how can the client add/delete cuepoints in the FLV and have them
 be resorted numerically? so they can match the xml IDs?
 im sure there is a clever  flexible solution out there..anyone?
 thanks!

 p.s. i need to do this in AS2..if possible.

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 Object.watch equivalent

2008-10-27 Thread Ashim D'Silva
Use classes and getters and setters. Getting into details with this
would take a while, but look it up. It's far more efficient than a
watch.

2008/10/27 Samuel Adu [EMAIL PROTECTED]:
 Hey guys,
 I need a little help here... I'm working on porting some existing AS2 code
 to AS3. A porting of the AS2 class watched _root variables which were
 updated by javascript (using setVariable) - When a change occurred the
 callback method would change instance properties, fire events etc etc...

 Now - Object.watch is not around in AS3 (I understand that the overheads for
 utilising this method was pretty awful), and my flashVars are contained
 within the Stage LoaderInfo obect (LoaderInfo.parameters). Does anybody have
 any idea how I can monitor these variables for any changes now? Looking at
 the api doc, I can't see any evidence of a LoaderInfo instance firing an
 event of any use to me...

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 - Code problem, can anyone help?

2008-10-22 Thread Ashim D'Silva
I don't know why its crashing but:

I don't see what your frame++ is doing because you reset it to 0 right
before anyway, so you should keep getting EnterFrame 1 anyway.
Secondly, your else should also carry code to disable the Submit button, so
that if someone fills things in and then deletes it the button will disable
again.

I would recommend individual onChange listeners though, since you only
really have two things to check; it better than running a continuous
EnterFrame.

That's all I got,

Ashim

2008/10/23 sebastian [EMAIL PROTECTED]

 Assuming the form is also in the same flash file:

 I see no reason to use 'Event.ENTER_FRAME'

 Just have the other parts of your code 'activate' when you click the
 'submit' button.

 Sebastian


 jonathan howe wrote:

 But he wants the button to be disabled until it passes validation. Maybe
 it's okay to do it the dirty way instead of assigning 4 different
 listeners
 to each of the validated fields but... I guess I would still have a
 single validation function that is called onchange of the various entry
 fields.

 On Wed, Oct 22, 2008 at 5:12 PM, Paul Andrews [EMAIL PROTECTED] wrote:

  I'm surprised if it compiles.

 First look: trace(EnterFrame+(frame+)); should at least be
 trace(EnterFrame+(frame++));

 Try that. I'd be tempted not to use enterframe at all and validate on
 submit.

 Paul


 - Original Message - From: FlashDev [EMAIL PROTECTED]
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Sent: Wednesday, October 22, 2008 8:32 PM
 Subject: [Flashcoders] AS3 - Code problem, can anyone help?



 Hi Guys

 Im trying to write a little piece of code to stop the submit button of a
 form be active until the form fields have been completely filled in, its
 a
 really simple for consisting of 1 form field and 1 checkbox, ive had a go
 at
 writing some code of my own but for some reason flash quits on export.

 Whats wrong with my code?
 What do you think could be causing it to crash?

 here is my stab at it...

 submit_btn.useHandCursor = false;
 submit_btn.mouseEnabled = false;

 submit_btn.addEventListener(MouseEvent.CLICK, submit_btn_CLICK);
 this.addEventListener(Event.ENTER_FRAME, ENTERFRAME);

 function ENTERFRAME(ev:Event):void
 {
  if((mobileNumber.text != ) || (mobileNumber.text != NaN) ||
 (mobileNumber.text != undefined)  (terms.selected != false)){
  submit_btn.useHandCursor = true;
  submit_btn.mouseEnabled = true;
  }else{
  var frame:int = 0;
  trace(EnterFrame+(frame+));
  }
 }
 function submit_btn_CLICK(ev:Event):void
 {
  var url:String = formSubmit.php;
  var request:URLRequest = new URLRequest(url);
  var variables:URLVariables = new URLVariables();
  variables.mobile = mobileNumber.text;
  request.data = variables;
  request.method = URLRequestMethod.POST;
  try {
  navigateToURL(request, _blank);
  }
  catch (err:Error) {
  trace(err);
  }
 }

 Thanks
 SJM
 ___
 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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Drag and drop in AS3

2008-09-23 Thread Ashim D'Silva
When you recieve an event the difference between event.currentTarget and
event.target could be of much help. I can never remember which is which but
check the language reference. But nothing like disabling the childrens mouse
events with mouseChildren = false;

2008/9/24 Matt S. [EMAIL PROTECTED]

 I find that sometimes if the font for the dynamic text isnt embedded
 it can cause weird mouseover issues, where the mouse is affected by
 the dynamic text, even if I set mouseChildren and mouseEnabled to
 false.

 2¢...

 .m

 On Tue, Sep 23, 2008 at 10:58 AM, Lord, Susan, CTR, DSS
 [EMAIL PROTECTED] wrote:
  Hi there,
 
  I am programming a drag and drop using a instance array.   The problem I
  am having is that the instances have dynamic text within them.  I am
  trying to track what symbol the user clicked so that I can drag that
  instance.  Well... sometimes, the program registers the button name, and
  sometimes it registers the text within the button.  Is there a clean way
  to prevent this from happening?
 
  Any help you can provide is appreciated!
 
  Thanks!
  Susan
 
  ~~
 
  var aButtons:Array  = new Array(b0, b1, b2, b3);
  aButtons[0].txDrag.text= Drag 1;
  aButtons[1].txDrag.text= Drag 2;
  aButtons[2].txDrag.text= Drag 3;
  aButtons[3].txDrag.text= Drag 4;
 
  //var _rectangle:Sprite;
  var i:Number;
 
 
  for (i= 0; i  aButtons.length; i++) {
 aButtons[i].addEventListener(MouseEvent.MOUSE_DOWN,
  startDragging);
 aButtons[i].addEventListener(MouseEvent.MOUSE_UP, stopDragging);
 
  }
 
 
 
  function startDragging(event:MouseEvent):void {
 var count:Number = aButtons.length;
 var index:Number;
 trace(event.target.name)
  for (i = 0; i  count; i++) {
 if (evt.target.name == aButtons[i].name ) {
 //drag code to be added...
 aButtons[i].startDrag();
  }
 
 
 
  ___
  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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Spinning world..

2008-09-05 Thread Ashim D'Silva
They only seem to have frame for one rotation around one (slighlty shaky)
axis. The genius, like sebastian said, is the 2D rotation which makes it
feel like its reacting to you. Really well done!

2008/9/6 sebastian [EMAIL PROTECTED]

 further reinforced by the fact that I cant actually spin the ball in any
 position I want, it has 'limits' [try getting green China to be exactly in
 the middle... you can't]. Also, much of the 3d is simple 2d rotation, which
 you can see from the way the sphere spins slightly 'off center'.

 so yeah, I'm pretty sure its all just frame based; very well done.


 sebastian wrote:

 because the droptlets of liquid seem to always be in the same location
 when you are at a specific x,y,z location, I'm guessing they exported a
 gazob of frames from a 3D program and then just selected the frame to play
 based on a matrix... but yeah, no idea really - looks nice!

 seb.

 Paul Andrews wrote:

 Today I took a spin around the FWA site www.thefwa.com and came across
 http://www.bartleboglehegarty.com/ where they have a sphere with cities
 attached to it and it responds to mouseover and drags, to control selection
 and rotation. Very nice.

 Usually I can make a good guess as to how a particular effect is
 achieved, but in this case I'm not so sure.

 First thought was PaperVision3D, but I really wonder if it's up to doing
 the rotating globe with cities attached effect.

 Second thought was pre-rendered sequences switched frame by frame, but it
 looks rather more sophisticated than that - it rotates at any angle.

 Lastly, I can only imagine custom 3D routines  transforming a 3D dataset
 to 2D on the fly.

 So the question is, how do you think the globe effect is done?

 However it's done - great job BBH.

 Paul

 ___
 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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Open Source YouTube Player

2008-09-03 Thread Ashim D'Silva
The JW Player seems to be popular. Haven't used it yet, but I intend to
soon.
http://www.jeroenwijering.com/?item=JW_FLV_Player

2008/9/3 Elia Morling [EMAIL PROTECTED]

 Is there a stable open source FLV player? Or should I reinvent the wheel?

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Memory usage and bitmapdata issue in flash game design

2008-09-02 Thread Ashim D'Silva
I'd really like to see where this thread goes because efficiency in Flash is
a touch subject I guess.
First suggestion I have is stop using MovieClips. They're kinda useless.
Move as far down the chain as possible... to bitmapData and shapes. The
simpler you go and the more low level stuff you write, the better it gets.
We wrote an animated bitmap class for a flash game we wrote, and we got more
than 5000 of them running without a problem (in the world, not on screen).
The display list and event listeners are two other places that chew up a lot
of power. I've been tempted many a time to eliminate the display list
entirely and do everything rendered to a bitmapData and then display that -
not sure if it would make a difference but it would be a fun experiment, and
a telling one.
Hope this helped... its two cents from a designer and part time coder, so
don't trust it too much!

Cheers,

Ashim

2008/9/2 Beach Boy [EMAIL PROTECTED]

 We have a huge movieclip of 5000 by 5000 pixels with different
 (transparant)
 layers.
 We can make an instance of the movieclip and work with it, we can move
 layers, scale them, ...

 But as soon as we add the MovieClip to the stage the ram memory-usage jumps
 to 200 MB!
 My guess is that flash retrieves all the bitmapdata from the MovieClip (all
 25 million pixels) so it can display it. And all this data takes up around
 200MB.

 For cpu performance and obviously the memory-issue we use bitmapdata with
 clipRect to extract a single 'screenshot' of 600 by 400 and add that to the
 stage instead of the entire mc. At first the memory-usage is reasonable,
 but
 as we start to explore the map it goes up again. It keeps rising to the
 point that, when you have explored the entire map, the memory-usage is back
 at around 200MB, same as when we added the mc to the stage.

 We use BitmapData.dispose() but this doens't seem to help either as the
 garbage-collector doesn't free up the ram instantly.
 We tried using tiles, we cut the entire mc up in tiles and added and
 removed
 the necessary tiles, but again, the memory starts low and rises as we
 explore the map.

 It's hard to believe that all those papervision-applications run so
 smoothly
 using BitmapData while we only use a couple large jpg's and have such
 extreme memory-usage.
 Is there any way to make the garbage-collector pass (we use flash player 9)
 or reduce the memory-usage?

 Any help or tips would be greatly appreciated!
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flash vars questions.

2008-09-02 Thread Ashim D'Silva
AS3 example:

http://www.permadi.com/tutorial/flashVars/indexAs3.html

link was at the top of the page..

2008/9/3 Gustavo Duenas [EMAIL PROTECTED]

 do you know something that  actually can work in as3?

 Regards,

 Gustavo

 On Sep 2, 2008, at 2:36 AM, Rajiv Seth (Pixelated) wrote:

  Hi,

 it's very simple process. you can view this tutorial
 http://www.permadi.com/tutorial/flashVars/index.html

 You can view this too
 http://kb.adobe.com/selfservice/viewContent.do
 ?externalId=tn_16417sliceId=1

 hope it will help.

 Rajiv Seth

 On Tue, Sep 2, 2008 at 7:39 AM, Gustavo Duenas 
 [EMAIL PROTECTED] wrote:

  Hi have a swf file which has a flv inserted and I'd like to know a way to
 pass url variables with the name of the file to the flv.


 like this:

 index.html?video=123.flv

 and I want this to goes to the video.swf, and then to the flv source, any
 ideas or you know a good tutorial, I've been trying one, but for so long
 no
 results.


 Regards,


 Gustavo

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




 --
 Regards

 Rajiv Seth
 Ph: 09839157388
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




 Gustavo A. Duenas
 Creative Director
 LEFT AND RIGHT SOLUTIONS
 904.  265 0330 - 904. 386 7958
 www.leftandrightsolutions.com
 Jacksonville - Florida




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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Ashim D'Silva
If it's specifically for a countdown, you can just ask your php guy to give
you the number of seconds to the deadline (or milliseconds if you need it).
Then just divide it up however you want. Make the class nice and clean and
unrestricted.

2008/8/26 Hans Wichman [EMAIL PROTECTED]

 Hi,

 isnt milliseconds since 1970 easier?
 Something like:
 date value=103810313 /
 new Date ().setTime(103810313))

 greetz
 JC

 On Tue, Aug 26, 2008 at 1:33 PM, allandt bik-elliott (thefieldcomic.com) 
 [EMAIL PROTECTED] wrote:

  The app is designed for people only in the uk - it will show the current
  time and the amount of time remaining until the countdown is finished so
 it
  will probably be worth giving the time based on the server time and
 setting
  the time in flash based on that
 
  the original question was about the best practise for getting the time
 for
  flash from xml
 
  thanks for the input so far guys
  a
 
  On Tue, Aug 26, 2008 at 12:16 PM, Cor [EMAIL PROTECTED] wrote:
 
   So what if a user (from another continent) starts your app.
   The difference will be greater or even before the server time.
   So you would get a negative value???
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of
 allandt
   bik-elliott (thefieldcomic.com)
   Sent: dinsdag 26 augustus 2008 12:56
   To: Flash Coders List
   Subject: Re: [Flashcoders] is there a recognised date format for xml?
  
   yes it's local
  
   On Tue, Aug 26, 2008 at 11:46 AM, Cor [EMAIL PROTECTED] wrote:
  
Mmmm, I don't know??
Somebody out there who does???
   
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
  Kenneth
Kawamoto
Sent: dinsdag 26 augustus 2008 12:43
To: 'Flash Coders List'
Subject: Re: [Flashcoders] is there a recognised date format for xml?
   
Isn't that always the case no matter how you construct the date
 object?
   
Kenneth Kawamoto
http://www.materiaprima.co.uk/
   
Cor wrote:
 Yes, but still it is depending of the localtime.

 Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
GMT+0200
 2008



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
   Kenneth
 Kawamoto
 Sent: dinsdag 26 augustus 2008 12:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] is there a recognised date format for
 xml?

 If so I'd ask my PHP coder to generate formatted string so that I
  need
 to code less ;)

 e.g.
 var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
 var targetDate:Date = new Date([EMAIL PROTECTED]());

 ...a lot less code than yours!

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Cor wrote:
 In PHP you can do whatever you want: see http://nl.php.net/date
 I think it can also depend on your server.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
   allandt
 bik-elliott (thefieldcomic.com)
 Sent: dinsdag 26 augustus 2008 11:48
 To: Flash Coders List
 Subject: [Flashcoders] is there a recognised date format for xml?

 hi guys

 i'm speccing an xml file for a server side dev that needs to
 return
  a
 target
 date and time and i wanted to make sure i wasn't doing anything
  stupid

 what would a php dev be expecting to use for time / date and how
  would
 that
 be supplied in an xml file? And what would the best way of
  converting
the
 return string for flash to use?

 I was thinking something along the lines of
 data date=2008,08,26 time=12,0,0 /

 and using something like

 var sDate:String = node.attributes.date;
 var sTime:String = node.attributes.time;

 var arDate:Array = sDate.split(,);
 var nYear:Number = Number(arDate[0]);
 var nMonth:Number = Number(arDate[1]-1); // months start at 0
 var nDate:Number = Number(arDate[2]);

 var arTime:Array = sTime.split(,);
 var nTimeHours:Number = Number(arTime[0]);
 var nTimeMinutes:Number = Number(arTime[1]);
 var nTimeSeconds:Number = Number(arTime[2]);

 var targetDate:Date = new Date(nYear, nMonth, nDate, nTimeHours,
 nTimeMinutes, nTimeSeconds);

___
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] calling a JSP page from a different server location SWF

2008-08-18 Thread Ashim D'Silva
The cross-policy file is meant to be on the server which runs the JSP file.
However, if you don't have access to that server, I don't think it possibly
directly. However, you can write a small server side script on your server
(where the SWF is) and let that script call the required JSP. And let flash
call the local script.
I've done this heaps in situations like this, with ASP and PHP, but I'm sure
you can with JSP as well.
If you find an easier way, you should post it... cause I'm curious now!

2008/8/19 sebastian [EMAIL PROTECTED]

 Question in Flash 7, AS2:

 Trying to figure out if there is any solution to how to send data to a JSP
 page that is not located on the same server as my SWF file.

 Since I don't have access to the server hosting the JSP page I can't add a
 cross-domain XML file to that machine.

 In the SWF file I can access the JSP page fine if I run the SWF file
 locally, but as soon as I put it on a test web server I get 'connection
 failed' instead.

 At the top of the SWF file I have included:

 System.security.allowDomain(http://name.ofJSPdomain.com;);
 System.security.allowInsecureDomain(http://name.ofJSPdomain.com;);

 and I also tried it with * instead to no avail.

 I'm using code like this:

 var send_lv:LoadVars = new LoadVars();
 send_lv.loginName = somename;
 send_lv.loginPassword = somepassword;

 var result_lv:LoadVars = new LoadVars();

 result_lv.onLoad = function(success) {
  if (success) {
  result_ta.text = load working?;
  } else {
  result_ta.text = Error connecting to server.;
  }
 };

 send_lv.sendAndLoad(http://name,ofJSPdomain/locationtofile/nameoffile.jsp;,
 result_lv, POST);

 I'm using sendAndLoad but honestly I only need to send data, not receive
 it.

 Can anyone help? I've been stuck now for over 2 hours spinning after my
 tail...
 :(

 Thanks!

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Full Screen issue on a Mac

2008-08-16 Thread Ashim D'Silva
Fine on Firefox, doesn't work on Safari for some reason.
Intel Mac Book Pro.

And you should really look into SWFObject for embedding your flash content
in html. Will help you integrating and make things easier.

2008/8/17 Dave Wood [EMAIL PROTECTED]

 Could someone with a Mac check if this is working in fullscreen?



 Sorry, no. And clicking your go full screen button does nothing. No
 crashes though.

 Intel Max OSX 10.5.4, Safari 3.1.2, Flash player version 9.0.124.

 Cheers

 David





 http://venturawave.com/fs/fullscreen.html

 This site crashed on my client's  Mac.  The problem was likely that I
 didn't
 include or nest the the embed tags within the object tags in my html page
 when I modified for full screen.  Here's my new code in the html (which
 hopefully works) ...


 object
   data=fullscreen.swf type=application/x-shockwave-flash width=640
 height=510
   param name=movie value=fullscreen.swf /
   param name=allowFullScreen value=true /
   embed
   src=fullscreen.swf
   quality=high
   bgcolor=#ff
   width=640
   height=510
   name=stage
   align=middle
   allowScriptAccess=sameDomain
 type=application/x-shockwave-flash pluginspage=
   http://www.macromedia.com/go/getflashplayer;
   /
 /


 carlos
 ___
 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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Using BitmapData to make a mask (AS3)

2008-08-14 Thread Ashim D'Silva
You should be able to copyChannel the BitmapDataChannel.ALPHA from the image
you loaded onto the bitmap you use for the gleam. However animating this
then means moving only a single channel. Which may or may not be possible
without reprocessing the bitmapData.
It's only a rough idea, but take a look...
You could also copy the alpha channel onto all the other channels of a new
bitmapData which will give you a black silhouette which you could use as a
mask.

2008/8/14 jonathan howe [EMAIL PROTECTED]

 Hallo,

 I'm loading transparent pngs in as Bitmaps and placing them within a
 display
 object. I'd like to create a mask that is the same shape as the
 non-transparent pixels, (so that I can overlay a gleam animation).  Is
 there
 an easy way to use a Bitmap or BitmapData as a mask that respects the shape
 of the bitmap?

 Please lend me your awesomeness for a moment,
 -jonathan





 --
 -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Flash - cross-platform? really?

2008-08-13 Thread Ashim D'Silva
Hate to push this around again, but I've been searching heaps for this to no
avail. I found one random post about performance differences but it didn't
hint at any solutions.Are more people facing this problem, and does anybody
know why?

2008/8/10 Ashim D'Silva [EMAIL PROTECTED]

 We've been developing a flash game over the last few weeks, and we're
 finding more and more that the flash player on PC and Mac run terrifyingly
 differently. In my previous experience, website I've built have run far
 better on my Mac than on other PCs, but this time its the opposite. The PC
 version runs great, but on Mac, there's a nasty nasty chug. It seems to get
 better if I compile it on a Mac. And gets far better if I compile to a Mac
 self executable.

 We're trying to find out what's causing it, and thinking it may be the
 animated sprites, although all they're doing is reassigning bitmapData. All
 processing sprite sheets is done at initial setup.

 So, is there anything people know about or have experienced?

 The WIP is here: http://raws.adc.rmit.edu.au/~s3155488/

 Thanks for the help in advance...

 --
 The Random Lines
 My online portfolio
 www.therandomlines.com




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Flash - cross-platform? really?

2008-08-13 Thread Ashim D'Silva
Hey, thanks for all the feedback.
I'd like to think we've tested on a large enough amount of machines to
eliminate differences in power, and I hate to say it but PC's are performing
better than Macs.
There's no filters used anywhere but there's heaps of bitmapData everywhere
which isn't being reprocessed, only stored and displayed in cycles.
Thanks for the article Peter, it seems to make a good deal of sense. We're
going to try and drop the event listeners driving the animated bitmaps and
run it in a single update loop.
Any more information would be highly appreciated. Is this a problem more
people are facing though? It really can't be that rare, can it?

Cheers,

Ashim

2008/8/13 Peter B [EMAIL PROTECTED]

 FYI the massive GIF of the guy falling onto the goat at the end seems
 to be a massive performance bottleneck...

 Also, you may find some useful information here:


 http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/

 HTH

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Flash - cross-platform? really?

2008-08-13 Thread Ashim D'Silva
Nice article. And really nice to see so much more on the subject. However,
we have no device text in the entire game and the text everywhere else is
rendered to bitmapData initially so it doesn't get re-rendered.

Good to get more inputs though.

2008/8/14 Kenneth Kawamoto [EMAIL PROTECTED]

 This post from Tinic Uro sounds promising:

 http://www.craftymind.com/guimark/#comment-1032

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/


 Matt S. wrote:

 Mac has always been inferior to PC when it comes to Flash performance
 (and I say that as a dedicated Mac user). It's improved alot with
 Flash 9+ and newer Macs, but nonetheless there seems to be a
 frustratingly persistent performance hit on the Mac which I've never
 seen a good explanation for.

 .m

 On Wed, Aug 13, 2008 at 4:21 AM, Ashim D'Silva [EMAIL PROTECTED]
 wrote:

 Hate to push this around again, but I've been searching heaps for this to
 no
 avail. I found one random post about performance differences but it
 didn't
 hint at any solutions.Are more people facing this problem, and does
 anybody
 know why?

 2008/8/10 Ashim D'Silva [EMAIL PROTECTED]

  We've been developing a flash game over the last few weeks, and we're
 finding more and more that the flash player on PC and Mac run
 terrifyingly
 differently. In my previous experience, website I've built have run far
 better on my Mac than on other PCs, but this time its the opposite. The
 PC
 version runs great, but on Mac, there's a nasty nasty chug. It seems to
 get
 better if I compile it on a Mac. And gets far better if I compile to a
 Mac
 self executable.

 We're trying to find out what's causing it, and thinking it may be the
 animated sprites, although all they're doing is reassigning bitmapData.
 All
 processing sprite sheets is done at initial setup.

 So, is there anything people know about or have experienced?

 The WIP is here: 
 http://raws.adc.rmit.edu.au/~s3155488/http://raws.adc.rmit.edu.au/%7Es3155488/

 Thanks for the help in advance...

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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Flash - cross-platform? really?

2008-08-13 Thread Ashim D'Silva
Thanks Peter, I know its hard to address a problem without seeing it in
full. We're working on anything we can think of: eliminating event listeners
is first on the list. Hoping for the best.

2008/8/14 peter ginsberg [EMAIL PROTECTED]

 On Wed, Aug 13, 2008 at 10:04 AM, Ashim D'Silva [EMAIL PROTECTED]
 wrote:

  Hey, thanks for all the feedback.
  I'd like to think we've tested on a large enough amount of machines to
  eliminate differences in power, and I hate to say it but PC's are
  performing
  better than Macs.
  Any more information would be highly appreciated. Is this a problem more
  people are facing though? It really can't be that rare, can it?
 


 Flash has been slower on Macs as long as I have been developing for it (8
 years), just a simple fact of life.  It's got nothing to do with the
 relative merits of the platforms, just something to do with the way Flash
 was developed.

 That said, things have improved considerably in recent versions of the
 Flash
 Player, believe it or not the difference used to be much more dramatic.

 It's hard to say what might be causing your particular issue without seeing
 the code.  I will say that the ending animation seemed to run slow on my PC
 as well, and I don't see anything going on on the screen to justify that
 performance hit.  Makes me think there's something in your code that is
 more
 intensive than it needs to be, regardless of platform.  Not very helpful
 advice, I know, but I'd consider trying to approach this as a general
 performance issue not necessarily a platform specific one.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Flash - cross-platform? really?

2008-08-09 Thread Ashim D'Silva
We've been developing a flash game over the last few weeks, and we're
finding more and more that the flash player on PC and Mac run terrifyingly
differently. In my previous experience, website I've built have run far
better on my Mac than on other PCs, but this time its the opposite. The PC
version runs great, but on Mac, there's a nasty nasty chug. It seems to get
better if I compile it on a Mac. And gets far better if I compile to a Mac
self executable.

We're trying to find out what's causing it, and thinking it may be the
animated sprites, although all they're doing is reassigning bitmapData. All
processing sprite sheets is done at initial setup.

So, is there anything people know about or have experienced?

The WIP is here: http://raws.adc.rmit.edu.au/~s3155488/

Thanks for the help in advance...

-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] BUG: Channel.position returns out of range positions on looping Sounds

2008-08-07 Thread Ashim D'Silva
Correct me if I'm wrong because I'm not sure what you want to get done
but...
if you want to start the sound from the beginning when you unpause, this
should be no problem.
and if you want to start at the position you stopped at call a Sound.play
and pass it the position value you grab when you pause and MOD it (%) with
the length.

Ash


2008/8/7 Steven Sacks [EMAIL PROTECTED]

 I don't know if this has been documented or not.  I've never seen anyone
 report it.

 If you set a Sound to loop, it's channel.position property returns a number
 out of range of the Sound.length after it loops.  The position property just
 keeps on incrementing beyond the length when you loop a sound.

 If you try to play a Sound from that out of range position, the Sound
 glitches out, because that position is invalid.  Flash should not return a
 position to you that you cannot use.

 This all revolves around the fact that Sound has absolutely no way to pause
 right now.  I don't know why Adobe did not give us a channel.pause() method,
 but they didn't.  Because they didn't, this bug gets worse.

 The only way to pause and unpause a sound in Flash is to store the current
 position of the channel and call channel.stop, and when you unpause, you
 call sound.play(position).

 If the sound is looping, the position returned will eventually be higher
 than the length, which means the Sound glitches because you're passing an
 out of range position, a position, once again, that Flash returned to you as
 VALID.

 Wait, it gets worse.  If you unpause a looping sound by passing its
 position, when it loops, it will loop from that position, not the beginning
 of the Sound.  Do you see how this gets worse?

 There is no pause method, and without a pause method, there is no
 workaround for the above bug and issue except to manually loop a Sound by
 adding an event listener to the sound complete event (which can be
 unreliable), and calling play on it again and managing the looping manually,
 which undermines the loops argument of the Sound.play() method and requires
 a fair amount of code.

 We need a channel.pause(flag:Boolean) method.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] BUG: Channel.position returns out of range positions on looping Sounds

2008-08-07 Thread Ashim D'Silva
Can't argue with that. It seems really odd that you call stop on the
channel, destroy it, and then call play on the sound and receive a new
channel... I don't get it.

2008/8/7 Steven Sacks [EMAIL PROTECTED]

 Modulus works, too, but that doesn't solve the issue that looping sounds
 return out of range values, nor does it fix the issue that channel doesn't
 have a proper pause() method like NetStream does.


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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flex 3 // Tile Component // Mutliple Drag Selection

2008-07-23 Thread Ashim D'Silva
A selection box should not be a problem at all: remember the coords
when MouseDown and then scale the box on MouseMove.
Actually making the selection I'd guess would require some basic form
of collision detection with bounding boxes.

Rough guesses, maybe there's a more efficient way?

Ashim

2008/7/23 artur [EMAIL PROTECTED]:
 is something like this possible in Flex 3?

 http://www.design2dev.com/dragSelect.jpg
 http://www.design2dev.com/dragSelect.jpg

 -- im not talking about the ability to drag around multiple tiles.
 im looking to select multiple tiles via clickdrag.
 while at the same time generating a selection box over the tiles.

 has anyone successfully achieved this?

 if so..any direction would be greatly appreciated.

 thanks

 artur
 --

 *artur :.*

 - *www.artur.com*
 - [EMAIL PROTECTED]
 - *ph:646.797.3320*

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




-- 
Yet another Random Lines
More usable than ever!
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] The Charges Against ActionScript 3.0

2008-07-17 Thread Ashim D'Silva
I like the way Steven split this into child's toy and adult's toy
because at heart: yes, Flash is indeed a toy. But like in all cases of
everything, everywhere, things do need to grow. This big jump has been
at the expense of the easy-of-use aspect of Flash, just as the
introduction of Filters and Blend Modes were at the expense of
efficiency. All children grow albeit at different rates, but they must
grow if they want to survive. To keep the toy metaphor going, Lego
started with a really simple ideal, and every piece fitted into every
other. You could take multiple sets of Lego and just stick them all
together in random fun. And then it got complex: things like Lego
Technics came about, and the pieces got more complex. You could still
do all the old stuff, but it took more doing and the previous versions
still existed.

I think Barry has a good point. If you do just like it as it is, use
that version. Use AS2, for as long as it survives, and for as long as
it takes to make the move. But if you want to grow, make the move. As
a designer with little programming knowledge, I was terrified of the
move. But the things being done with AS3 were way to cool.

Hopefully, with the next release, Adobe will make things easier. This
is the first release of the new VM and has a lot of things that can be
improved. But it's opened a massive world online of really powerful
tools and finally an engine efficient enough to drive some incredible
websites. Ease of use is important, but I'd be disappointed if
innovation and power took a back seat to it. Learn grow every
other area of your life requires you to; why do you expect the web to
be different?

2008/7/17 elibol [EMAIL PROTECTED]:
 The only one that makes any sense is #2, and that is being addressed with
 Loader.unloadAndStop(), except for the most part I'm kind of wary about
 having the Loader class tear my loaded swfs a new one. I kind of agree with
 Sacks when he more subtly articulates that this is for noobs. I was
 expecting charges more along the lines of Remove auto-declare stage
 instances and ever having to declare stage instances and just use
 getChildByName(). - but I guess that would be a charge against the Flash.

 Thats my two cents.

 H

 On Wed, Jul 16, 2008 at 10:46 PM, Kerry Thompson [EMAIL PROTECTED]
 wrote:

 Steven Sacks wrote:

  Flash used to be a toy, and, up until Flash 8, it still could beThe
 reason
  you see so much BAD Flash is because it was SO EASY to use for even non
  programmers.

 Steven has a point (even though I cut most of his post). Remember the days
 when Flash's nickname was Skip-intro?

 The Internet has changed, and will continue to change. It has gotten more
 sophisticated. Browsers have gotten more sophisticated. Users have gotten
 more sophisticated. To keep Flash/Flex as a premier Web development tool,
 it
 has to get more sophisticated, and its users must get more sophisticated.

 Having said that, I'd like to see Flash have drag-and-drop behaviors like
 Director has. In its first decade or so, Director followed a similar path
 as
 Flash. It started out as a simple animation tool with an easy-to-use
 language, and developed into a sophisticated programmer's tool. The
 introduction of drag-and-drop behaviors brought it back into the realm of
 the designer, while remaining a sophisticated programmer's tool.

 Of course, Macromedia made a number of blunders with Director/Shockwave
 that, I hope, will not be repeated by Adobe on Flash. Making it more
 sophisticated was not one of those blunders, though.

 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




-- 
Yet another Random Lines
More usable than ever!
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] The Charges Against ActionScript 3.0

2008-07-16 Thread Ashim D'Silva
I love flash and have been using it since 5.  And although at the
time, it was almost possible to drag and drop what you needed to get
something going, we know there were a host of disadvantages that came
with everything being so dynamic and code being everywhere. So as
Flash has gotten stricter, I've had to learn more and more about
coding practices and OOP of course, and let me say, it's brilliant.
Let me say straight up, I'm a designer,  not a programmer so much
however, if you're going to work with Flash you really NEED to be a
bit of both.

Flash is not a toy. You can't pick it up, with no prior knowledge, and
expect to have a app 2 hours later. And I'll gladly put in the work to
learn for the amount of power flash is beginning to put at our
disposal. 3D, EFFICIENT filters and blend modes, pixel level controls
- if I was to chose between a system that works well, and a system
that's easy to use, I would much rather have the former - shopping
online should be easy, building an online shop: not so.

And as for flash banners: glorified or otherwise; I detest them and if
it were possible to burn them, I would.

Ashim

-- 
Yet another Random Lines
More usable than ever!
www.therandomlines.com



2008/7/17 Steven Sacks [EMAIL PROTECTED]:
 Everyone forgets their roots.  Nobody remembers what it was like when they
 were first learning Flash and learning the basics of programming.

 Colin Moock forgot his roots when six months ago he wrote an article about
 how easy AS3 was to learn and how n00bs should be learning it right out the
 gate.

 Colin Moock has now remembered his roots and written what amounts to an
 effective retraction of his original article.

 Anyone who looks at the archives of Flashcoders knows where I stand on this
 issue.  People who say all these features in AS3 are much better are either

 1. Experienced, talented coders, or people who came from other programming
 languages.

 2. See 1.

 Yes, it's really bad to put scripts on MovieClips or nested in some timeline
 somewhere.  But, it's also really good for some designer who just needs to
 get some glorified banner out the door.

 Yes, it's questionable OOP to use _parent._parent, and it's certainly hard
 to maintain, but it's also really good for some animator who just needs to
 set the text of some TextField two levels up.

 Advanced coders often take their intelligence and knowledge for granted.
 ___
 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] Verifying Numerical Input

2008-07-16 Thread Ashim D'Silva
I'd say if it doesn't influence your system too much, restrict what's
put in the text field (txtField.restrict) to just numbers. That way,
it saves you trouble, and it shows the user what you're expecting
instead of doing 'magic' in the background.

2008/7/17 Juan Pablo Califano [EMAIL PROTECTED]:
 A quick way to do it I can think of off the top of my head is making a copy
 of the user's input, strip the thousands separator, cast to Number and pass
 the result to some formatNumber function (like the one in the ActionScript
 CookBook lib). Then, just compare that with the original input;  if they're
 equal, the input should be ok.

 Cheers
 Juan Pablo Califano


 2008/7/16, [EMAIL PROTECTED] [EMAIL PROTECTED]:

 Hello Everybody,

 Before I try to maybe re-invent the Wheel, and write my own code.  I  was
 wondering whether anyone has a sample Actionscript 3.0 code for
 verifying  the
 input to a text field is a Number.

 Generally, the isNaN() is ok.  But when one input a number with  the
 Thousand Separator (Comma) or ((Period) in certain countries)),
 isNaN()  does not
 work.

 For example, suppose the required answer (input) is 1.00.  If the  user
 inputs 10,000.00.  Flash does not consider that as a number. If  the user
 inputs 100,00.00 that is certainly not a number.

 So, unless I am missing some built-in Actionscript fuction/class, the code
 needs to check whether the input contains Thousand separator(s)
 and  whether
 they are in the right position.

 Once the check on the Thousand Separator(s) proves to be OK, i.e.,
 the  input
 is a legal number, we can than compare this number to the one  required.


 Thank you,
 D. Abramovich


 Interactive Training Solutions  (ITS)
 _www.its-metacentre.com_ (http://www.its-metacentre.com)



 **Get the scoop on last night's hottest shows and the live
 music
 scene in your area - Check out TourTracker.com!
 (http://www.tourtracker.com?NCID=aolmus0005000112)
 ___
 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




-- 
Yet another Random Lines
More usable than ever!
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Overlay problem

2008-07-14 Thread Ashim D'Silva
simplest is to stick a mouse enabled layer (sprite/mc) on top. it
should override everything under it.

2008/7/14 Rajiv Seth (Pixelated) [EMAIL PROTECTED]:
 Hi,

 I want to create an effect like
 http://www.limoosoft.com/Limoosoft-En.html

 When user clicks on zoom image, large image loads in a movie, and all
 links, rollver effects/actions are disabled by a semi-transparent image. How
 to create such layer, which can disable all links?
 --
 Regards

 Rajiv Seth
 Ph: 09839157388
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Yet another Random Lines
More usable than ever!
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Basic loop problem (with end of message)

2008-07-08 Thread Ashim D'Silva
You can reset your text field before you loop. That will clear it up
and you can start filling it up again.

textField.htmlText = ;

2008/7/8 Paul Jinks [EMAIL PROTECTED]:
 Thanks to everyone for your help. This gets me closer to what I'm looking
 for.

 Unfortunately, there's a complicating factor: if the user scrubs across
 the same point in the video again, they end up with duplicates/triplicates
 of the list.

 Since we actually want people to do this, I'm looking for a solution that
 will replace the existing text with the full array on each cuePoint event.
 I thought that my original code would do this - unless there's a better
 way of achieving this?

 Hope this makes sense and thanks again.

 Paul


 On Tue, July 8, 2008 12:09 pm, Piers Cowburn wrote:
 Hi Paul,

 Try:

   var len2 = cueArray.length;
 for (var i = 0; ilen2; i++)
 {
   mainText.htmlText += b+cueArray[i]+/bbr;
 }

 Piers



 On 8 Jul 2008, at 11:56, Paul Jinks wrote:

 Apologies for last post: it got sent before I'd finished. That'll
 teach me
 to try to use the tab key using IMAP ;-). Here's the message again in
 full:

 I'm new to coding and I'm having a problem getting a for loop to do
 what I
 want it to. I think this is pretty basic, but I'll let you be the
 judge.

 I have a project to play through an flv which fires event cue
 points at
 certain points. At these points, text appears at the side of the video
 window as summaries of what's being said. The summary text is the
 name of
 the cue point and is added to an array called cueArray after
 checking that
 it doesn't already exist. So far so good.

 The last step is to output the full array to the text field and
 it's at
 this point that I'm at hitting head against wall pitch. I just
 can't get
 it to output the whole array in sequence. What I'm using is:
var len2 = cueArray.length;
 for (var i = 0; ilen2; i++)
 {
 mainText.htmlText = b+cueArray[i]+/b;
 }
 But what this does is print only the last item in the array,
 whereas I'm
 expecting it to print the array in full.

 TIA

 Paul


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

 [EMAIL PROTECTED]
 0207 631 3278


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



 --
 
 Check out my website: http://www.pauljinks.co.uk :o)


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




-- 
Yet another Random Lines
More usable than ever!
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Bitmap vs beginBitmapFill

2008-07-03 Thread Ashim D'Silva
From what I can gather, if you have bitmapData, there's 2 ways to
display it. By embedding it in a Bitmap; or by using beingBitmapFill
on a Shape (or anything that supports it).
Now I presume using a Bitmap is the recommended way, but is there
anything wrong or resource intensive with the other way. In context, I
want to use the Shape to mask a part of the bitmapData as opposed to
using a mask over a bitmap. Then moving the bitmapData inside using a
matrix.

So, any thoughts? Am I doing something incredibly wrong?

-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Two problems with BitmapData.draw() w/r/t registration point and transparency

2008-07-03 Thread Ashim D'Silva
I've found you have to set up the bitmapdata to have 4 channels
instead of 3 to get transparency.
So for a transparent image...

new BitmapData(width, height, true, 0x);

That should make it truly transparent.

And for the first part, I haven't tried it, but have you looked into
using a Matrix?

2008/7/3 jonathan howe [EMAIL PROTECTED]:
 Hi, gang,

 I have a long list of MovieClips. For each one, I want to create a bitmap
 icon that shows the first frame.

 The problems I'm having:
 1. The MovieClips often have content above and before (-y and -x) the
 registration point, and simply performing BitmapData.draw() I don't seem to
 get the negative data
 2. I'd like transparency on the resultant bitmaps.

 Problem #1 I solved in a seemingly complicated way: by creating another
 movieclip, nesting the one I want inside it, and repositioning it based on
 the bounding box.
 Problem #2 I can't seem to decipher the documentation on proper use of
 BlendModes and could really use some guidance.

 
var sample_mc:MovieClip = AssetManager.getMovieClipAsset(classnames[i]);
 // assume this returns a MovieClip instance
var sampleParent_spr:Sprite = new Sprite(); // Note I never add it as a
 child to anything
sampleParent_spr.addChild(sample_mc);
var boundingBox:Rectangle = sample_mc.getBounds(sampleParent_spr);
if (boundingBox.x  0) {
   sample_mc.x = -boundingBox.x;
}
if (boundingBox.y  0) {
   sample_mc.y = -boundingBox.y;
}
var bitmapDataCopy:BitmapData = new BitmapData(boundingBox.width,
 boundingBox.height,true); // here I have set transparent to true (although
 it is default!)
bitmapDataCopy.draw(sampleParent_spr,null,null,BlendMode.LAYER);  //
 have I selected the correct blendMode? Do I need to change blendMode of
 sampleParent_spr ?
// Resultant Bitmap objects made from bitmapDataCopy do not have
 transparent channel.
 

 Can anyone help me improve #1 or solve #2?

 -jonathan


 --
 -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Strange Masking Bug in Flash

2008-07-03 Thread Ashim D'Silva
For patterns on Shapes, look no further that the beginBitmapFill
function. It takes a bitmap and repeats it on a Shape. You call it
from the Shape's graphics functions; as follows:

var bd:BitmapData = Your bitmapData of your repeatable pattern goes here;
var sh:Shape = new Shape();
sh.graphics.beginBitmapFill(bd);
sh.graphics.drawRoundRect(0, 0, 200, 200, 8);

That will generate a square, but you can do anything with it...

Hopefully, that will help though. I'm not quite sure about how to use
the IDE very much.


Ashim

-- 
Random Lines 3D
My online portfolio
www.therandomlines.com

2008/7/4 peter ginsberg [EMAIL PROTECTED]:
 Hoping to get some help with a bizarre bug that has been haunting
 development of the current game we're working on.

 The situation is this:
 We have character animations where we swap in dynamic clothing.  We
 developed a system where we add patterns dynamically to the clothing by
 doing the following with code:
 1. Dupe the movieclip/sprite which is going to get a pattern
 2. Use the dupe as a mask on a big square sprite that has the graphic
 pattern in it.
 3. Put the resulting masked element as a MULTIPLY overlay on the underlying
 original clip.

 It works great in most cases EXCEPT for this bizarre issue we keep running
 into where in some clips the mask is partially broken -- seemingly random
 parts of the movieclip are not masked, or in other parts weird extra lines
 appear, or even big blocks.

 *Sometimes* you can fix this by going into the movieclip and grouping
 ungrouped graphical elements.  It gets really messed up if there are more
 complicated graphical elements in there (like a gradient).  In these cases,
 even attempts to group elements, or make them movieclips, or whatever,
 doesn't seem to help much.

 I was able to create a super simple demonstration of this bug, and posted
 here:
 http://www.thup.com/maskbug.zip

 Surprisingly, I was able to replicate the error without any code, just
 using  CS3.   The movieclips on the left and right are both the same, but
 the one on the right has the lines and fills inside the movieclip groups
 *separately*.  You'll note both of these look just fine in preview, but when
 you build the swf, the one on the left has a big block of the masked object
 showing for no reason.

 Someone is probably going to tell me to just group items as I've done in
 this example, but like I said above that doesn't always work.  For some
 elements nothing works at all.

 This is sort of a bug in flash, but I can't have been the first person to
 notice it.  Does anyone have any idea how we caused it?  Is it just that
 flash can only support masks that are simple flat color fills?

 If it's the latter, I have a follow up question, can anyone think of a
 clever way to take the movieclips we are using and convert them into
 monotone fills of the same exact dimensions (some kind of bitmapdata
 conversion maybe?).

 Thanks in advance for any advice!
 ___
 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] Flash CMS

2008-07-02 Thread Ashim D'Silva
We normally use our own CMS running off MySQL, however, we have worked
with Alfresco as well. XML makes things pretty easy to integrate
although there are always hiccups you'll face. In which case, it's
good to have some server side script on your side to translate if
nessecary, especially with WebServices.

2008/7/2 Paul Andrews [EMAIL PROTECTED]:
 From what I've seen, most CMS platforms are (unsurprisingly) oriented

 towards HTML. I'm just checking that there isn't some Flash CMS gem out
 there that I'm not aware of. I can't help feeling that there's as much
 effort involved in bending Joomla (say) to be useful for flash as just
 rolling out some CMS functionality through a bespoke database.

 This is just a finger in the air to test which way the wind blows in the
 flash community.

 Paul
 - Original Message - From: Cedric Muller [EMAIL PROTECTED]
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Sent: Wednesday, July 02, 2008 9:58 AM
 Subject: Re: [Flashcoders] Flash  CMS


 Depends on what you need to do. And depends on what you are able to do.

 I do prefer setting things up in a clean way and develop from scratch.

 Some prefer using already existing systems and try to modulate /  alterate
 / integrate. (Joomla or Typo3).

 Depends on your (or your team) skills and on the time you have for
 developpement.
 I think you are still better off rolling your own CMS (again:  depending
 on the application's goals).
 And by experience, regarding the application's evolution, taking over  a
 custom CMS or a 'standard' CMS 's data is just the same. (none of  them is a
 black box)

 Cedric

 I just wondered if there was a favourite CMS that was popular for  use
 with Flash applications, or (as I suspect) do most developers  just roll
 their own with MySQL?

 Paul
 ___
 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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] drag and rotate, where do I begin?

2008-07-02 Thread Ashim D'Silva
Basically it's using velocity well. The dragging and throwing is
pretty easy to figure out with basic physics (velocity and
decay/friction). The rotation is a little trickier I imagine using
some sort of Matrix transformations to dynamically decide a point to
rotate around. Look for rotations around an arbitratrary point. I
don't have enough knowledge to actually help you out directly but
hopefully this will lead you in some direction.

Maybe there are some ready made classes...

Ashim

-- 
Random Lines 3D
My online portfolio
www.therandomlines.com

2008/7/3 Leandro Ferreira [EMAIL PROTECTED]:
 Hi there,

 I was trying to understand how this(
 http://www.ffiles.com/flash/templates/drag_and_rotate_website_1670.html )
 kind of movement works, but I have no idea on what to search for.
 At first I got an physics book about classical mechanics, but didn't find it
 useful, and can't find the exact theories involved in order to look for and
 applied use.
 Then I began working 'intuitively' in it, with some trigonometics and so,
 but things got ugly and now I'm kind of stuck.

 Does anyone here know where can I find some information/article/readable
 source about this?



 Thanks,
  Leandro Ferreira
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] random drawing

2008-06-30 Thread Ashim D'Silva
If your item classes are card1, card2, card3 and so on, and your code
currently works...

AboutButton.addEventListener(MouseEvent.CLICK, gocard);
function gocard(e:MouseEvent):void {
///
var cardName:String = card+String(1 + uint(Math.random()*49));  //
49 is the number of clips you have
var cardClass:Object = getDefinitionByName(cardName) as Object
var newcard:* = new cardClass();
// replace the asterisk i used for the base class that all your cards
extend from
///
 this.addChild(newcard);
 newcard.x = 25;
 newcard.y = 45;
}

i haven't really tested this code so you might need to fiddle with it.

2008/6/30 Bassam M [EMAIL PROTECTED]:
 Dear Ashim

 I didn't understanad hot to do it can you do sample for me with button on
 click on the button will insert the card to the stage

 I tryed to do it my self  I user this code to insert the card from stage but
 I couldn't use with your code

 this is my code to insert card1 i don't know how to make it random

 AboutButton.addEventListener(MouseEvent.CLICK, gocard);
 function gocard(e:MouseEvent):void {
  var newcard:card1 = new card1();
  this.addChild(newcard);
  newcard.x = 25;
  newcard.y = 45;
 }

 thank you

 On 6/30/08, Ashim D'Silva [EMAIL PROTECTED] wrote:

 If you're using AS3, everything in your library that's set to export
 for Actionscript will have a unique Class which you need to call to
 instantiate it.
 Use getDefinitionByName to turn a randomly selected string into a
 class definitiion and then call it.

 Example:

 If your library has 50 objects and their named: Card1, Card2, Card3 and so
 on.

 var cardName:String = Card+String(1 + uint(Math.random()*49));
 var cardClass:Object = getDefinitionByName(cardName) as Object
 var card:Sprite = new cardClass();

 The last line you can substitue your classes and parameters. Then run
 this code 7 times.

 2008/6/30 Bassam M [EMAIL PROTECTED]:
  Hi
 
  I'm trying to make game in this game I have 50 movie clip in the library
  I want when I click on one button call draw i want to show 7 of this
 movie
  clips on the stage but i want to select randomly 7 of 50 or more or once
 i
  click draw i want to draw one card  by one random
  can anyone help me please how to do it
 
  Tank you
  Bassam
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 Random Lines 3D
 My online portfolio
 www.therandomlines.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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] random drawing

2008-06-29 Thread Ashim D'Silva
If you're using AS3, everything in your library that's set to export
for Actionscript will have a unique Class which you need to call to
instantiate it.
Use getDefinitionByName to turn a randomly selected string into a
class definitiion and then call it.

Example:

If your library has 50 objects and their named: Card1, Card2, Card3 and so on.

var cardName:String = Card+String(1 + uint(Math.random()*49));
var cardClass:Object = getDefinitionByName(cardName) as Object
var card:Sprite = new cardClass();

The last line you can substitue your classes and parameters. Then run
this code 7 times.

2008/6/30 Bassam M [EMAIL PROTECTED]:
 Hi

 I'm trying to make game in this game I have 50 movie clip in the library
 I want when I click on one button call draw i want to show 7 of this movie
 clips on the stage but i want to select randomly 7 of 50 or more or once i
 click draw i want to draw one card  by one random
 can anyone help me please how to do it

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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] trace all properties of a class recursively

2008-06-27 Thread Ashim D'Silva
I normally end up writing a toString function for all classes that I
write so that I can at any point know what state the class is in.

2008/6/27 Patrick Matte | BLITZ [EMAIL PROTECTED]:
 Yeah but describe type won't loop through the tree in a recursive manner.

 So I ended up writing a typed recursive function that will recursively trace 
 each object in the tree. It works fine.

public static function recurse(page:Page, level:Number = 
 0):void {
var string:String = ;
for (var j = 0; j  level; j++) {
string = string +   ;
}
trace(string + page);
level++;
for (var i in page.pages) {
recurse(page.pages[i], level);
}
}
 /*
 Outputs
 [Page id=Nav]
  [Page id=Green1]
[Page id=Green2]
  [Page id=Green3]
[Page id=Green4]
  [Page id=Red1]
[Page id=Red2]
  [Page id=Red3]
[Page id=Red4]
 */

 BLITZ | Patrick Matte - 310-551-0200 x214

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wagner Amaral
 Sent: Thursday, June 26, 2008 12:15 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] trace all properties of a class recursively

 You may want to take a look at flash.utils.describeType()
 http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/package.html#describeType()


 On Thu, Jun 26, 2008 at 3:43 PM, Patrick Matte | BLITZ 
 [EMAIL PROTECTED] wrote:

 Is it possible to trace all the properties of a class with AS3? I kwow it
 works on dynamic properties on Object or Array...

 My class is like a tree and I want to see if the tree is built correctly.

 ___
 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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 - Button follow cursor within image area

2008-06-24 Thread Ashim D'Silva
You can also disable the button and use the image itself as a button.
On click on the image, the event will feed you local mouse coords
which will tell you which side of the image the mouse is on.
Layered buttons are a bit troublesome, but there's workarounds.

2008/6/25 Vayu Robins [EMAIL PROTECTED]:
 I think I have found a solution to my problem.  Dont know if its the best,
 but instead of adding a listener to the image, I added a listener to the
 stage and found the coordinates and width of image and made my buttons
 visible when inside these coordinates.

 Cordially
 Vayu


 On 6/24/08 7:27 PM, Vayu Robins [EMAIL PROTECTED] wrote:

 Hi coders.

 I have an issue I cant seem to find a solution to.

 I have an image gallery with invisble next and previous buttons.  When the
 mouse is over the left side of the image, the left button becomes visible
 and follows the mouse.  So far so good. :-)  The problem is that when the
 button is under the mouse the button only moves when the mouse has moved
 away from the button, which creates a very jagged movement.  Furthermore,
 this can be solved if I set prevImg.mouseEnabled = false, but then I disable
 the button.

 So the cursor needs to know when its over the image, even when the button is
 between the mouse and the image.

 Heres code I use:

 private function navigationMove(event:Event):void{
 var target = event.target;
 var location:Point = new Point(target.mouseX, target.mouseY);
 location = target.localToGlobal(location);
 if(event.target.mouseX  278) {
 prevImg.visible = true;
 nextImg.visible = false;
 prevImg.x = location.x;
 prevImg.y = location.y;
 }else{
 prevImg.visible = false;
 nextImg.visible = true;
 nextImg.x = location.x;
 nextImg.y = location.y;
 }
 }

 I hope someone can help me on this one.

 Thanks
 Vayu


 ___
 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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Bitmap data for presentation

2008-06-24 Thread Ashim D'Silva
I've thought about it, but it didn't make enough sense to me to try.
That was under the assumption that Flash's re-draw area organisation
would make it more efficient. If your performance is improving, I
might give it a look for certain situations. Any numbers yet?

2008/6/25 eric e. dolecki [EMAIL PROTECTED]:
 I don't know if it would always be prudent, but I've found if I have
 components or UI composed of lists of Sprites, etc. instead of using a mask,
 I use BitmapData to present the visuals instead... so basically you need
 almost nothing on the display tree whatsoever. I know its a RAM hit (a
 little), but so far its been working really, really well. I produce UI from
 stuff not on the display tree at all, represented by a bitmap. I remove the
 2nd bitmap in a displayObjectContainer so there is only ever one in there,
 next step I'll add a dispose().

 Anyone else doing this yet? It's more difficult to develop initially, so
 basically I get it looking right when on the display tree, then I just don't
 add it and use BMD.

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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash player crashes

2008-06-23 Thread Ashim D'Silva
Oh, its very easily an issue with memory management because
regrettably that's one of the parts of AS3 I continue to have trouble
with. I try hard to pick up after myself (listeners, bitmapdata,
cancel loaders, close connections), and run ActiveGraph to get an
estimate. But how do you track it down once it's started!

I with I could switch to Flash Develop, but I'm on Mac, and I haven't
found an alternate IDE yet. Any ideas there maybe?

By the way, this is also killing my browser sometimes. So I'm in quite
a bit of trouble.
The last time I had a similar problem, it was to do with Flash Player.
Apparently masking a text field and then moving it under the mask
(scrolling) is bad. So you stick it in a container and then mask and
move that! I was hoping there was a limited amount of things that can
actually crash Flash, but then again...

2008/6/23 Cedric Muller [EMAIL PROTECTED]:
 Memory management not done right = garbage collector piling up

 I noticed Flash crashes very quickly when memory management is not done
 right. I am NOT implying that you did something wrong. I am just adding my
 observations to the thread.
 Could it be memory management ?

 Cedric

 I believe Flash Cs3 is not ready for serious projects.
 Nowadays I am really having huge problems. It started with loading an
 external swf, it begin to not to load the external swf all the times.
 While
 I am working on it, i noticed that it is a bug after over 100 trys. And
 then
 I am having problems casting objects. I can not cast my custom class
 instance to its custom class. Flash gives me stupid errors.
 Below is my bug report to Adobe. You can register and vote so that it can
 be
 fixed
 http://bugs.adobe.com/jira/browse/ASC-3436

 My advice is, like the big companies, game writers, DO NOT USER CS3 for
 your
 commercial projects. There are really big problems that need to be
 solved,
 but the worst is adobe engineers are not aware of that.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of mario
 gonzalez
 Sent: Monday, June 23, 2008 9:42 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Flash player crashes

 I have that happen to me too ALL the time, once it starts on a project
 it's very very hard to track down.
 Usually related to garbage collection it only crashes in the IDE
 right?

 I wish i had better advice, but one thing you can do is when you test
 your movie, test using the debugger (control  debug movie (off my head)
 ) instead... that way when it crashes it doesn't crash the whole flash
 IDE, just the debugger projector..


 Ashim D'Silva wrote:

 Hey,

 I'm using the Flash IDE CS3 to produce a project in AS3, and Flash is
 continually crashing erratically. Is there a way for me to figure out
 what's causing it? I can't seem to tie it to any action or recreate
 it, but it happens often enough to be a large problem. I would
 normally think there isn't much I can do with AS to actually crash the
 player, but it seems I have... Please help!

 Cheers,

 Ashim

 --
 Random Lines 3D
 My online portfolio
 www.therandomlines.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

 ___
 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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash player crashes

2008-06-23 Thread Ashim D'Silva
Thanks for the response Kerry. Makes me appreciate even more the work
that gets done in Flash. And although blaming the tool is easy enough
I'm pretty sure its in my code somewhere. However, all the problems
you mentioned I encounter often enough to spot. Plus Flash is helpful
enough to tell you where these are. I use traces profusely in
troublesome area's as well. But I'm just not being able to recreate my
problem, which is ofcourse frustrating. So I was hoping I could count
on some log somewhere so I know what was called; which class it was
called from; anything to pin it close to the problem spot. I've used
debugger (local and remote) but ofcourse, when it crashes, it crashes,
and there's no bread crumb trail...
If I could figure out what the problem was, there'd be the possibility
of diagnosis, till then I guess its blind testing and lots of comment
tags.

Cheers again!

Ash

2008/6/23 Kerry Thompson [EMAIL PROTECTED]:
 Ashim D'Silva wrote:

 I'm using the Flash IDE CS3 to produce a project in AS3, and Flash is
 continually crashing erratically. Is there a way for me to figure out
 what's causing it?

 I've had similar problems, and it has always turned out to be an infinite
 loop, memory management, a null value, or something of the like.

 The first thing to do is figure out _where_ it is crashing, then figure out
 _why_

 Some people prefer to use trace() statements. Personally, if it's not a
 time-critical issue, I use the debugger. Since I started using Flash (F4), I
 have found that the issue is inevitably in my coding. I'm not initializing a
 variable; I'm using a class wrong; or I just plain had faulty logic.

 It's not always easy, but it is seldom Flash's fault, though I often wish I
 could blame the tool. Track your problem down to a specific code segment. If
 it's failing for a reason you don't understand, post that code, with a
 description of the problem, and we'll be glad to help. I'm afraid that you
 have only given a very vague complaint, so we can only give vague answers at
 this point.

 Don't give up, though. Flash is a great tool--not perfect, but pretty darn
 good. It's biggest problem is that it does what you tell it to, not what you
 want it to.

 Cordially,

 Kerry Thompson

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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash player crashes

2008-06-23 Thread Ashim D'Silva
Aha! That seems highly likely. I shall continue with renewed vigour. Cheers.

2008/6/24 Kerry Thompson [EMAIL PROTECTED]:
 Yes, those sporadic bugs can be the dickens to find and fix, usually because
 the code that's causing the problems is far removed from the place where it
 actually crashes. I remember spending a couple of days once on a crash bug.
 I'd find a problem, only to find that it was being caused by something
 earlier. I'd track that down, and find that it caused by something even
 earlier. I had to write a flow chart on a white board to keep track of
 everything that was going on.

 I finally tracked it down to an unlikely source--the programmer who worked
 on the project before me was doing a Boolean comparison on a value that
 could sometimes be void. Void is neither true nor false, so it was setting
 off a chain reaction, culminating in a crash somewhere down the line.

 Those are the hardest, but can be the most satisfying. I convinced myself
 about 10 times during the course of tracking down that bug that it was the
 VM's fault, then I'd notice something, and I'd be off and running, chasing
 that bug, slowly spiraling ever close to the true culprit.

 Good luck!

 Cordially,

 Kerry Thompson

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Ashim D'Silva
 Sent: Monday, June 23, 2008 7:55 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Flash player crashes

 Thanks for the response Kerry. Makes me appreciate even more the work
 that gets done in Flash. And although blaming the tool is easy enough
 I'm pretty sure its in my code somewhere. However, all the problems
 you mentioned I encounter often enough to spot. Plus Flash is helpful
 enough to tell you where these are. I use traces profusely in
 troublesome area's as well. But I'm just not being able to recreate my
 problem, which is ofcourse frustrating. So I was hoping I could count
 on some log somewhere so I know what was called; which class it was
 called from; anything to pin it close to the problem spot. I've used
 debugger (local and remote) but ofcourse, when it crashes, it crashes,
 and there's no bread crumb trail...
 If I could figure out what the problem was, there'd be the possibility
 of diagnosis, till then I guess its blind testing and lots of comment
 tags.

 Cheers again!

 Ash

 2008/6/23 Kerry Thompson [EMAIL PROTECTED]:
  Ashim D'Silva wrote:
 
  I'm using the Flash IDE CS3 to produce a project in AS3, and Flash is
  continually crashing erratically. Is there a way for me to figure out
  what's causing it?
 
  I've had similar problems, and it has always turned out to be an
 infinite
  loop, memory management, a null value, or something of the like.
 
  The first thing to do is figure out _where_ it is crashing, then figure
 out
  _why_
 
  Some people prefer to use trace() statements. Personally, if it's not a
  time-critical issue, I use the debugger. Since I started using Flash
 (F4), I
  have found that the issue is inevitably in my coding. I'm not
 initializing a
  variable; I'm using a class wrong; or I just plain had faulty logic.
 
  It's not always easy, but it is seldom Flash's fault, though I often
 wish I
  could blame the tool. Track your problem down to a specific code
 segment. If
  it's failing for a reason you don't understand, post that code, with a
  description of the problem, and we'll be glad to help. I'm afraid that
 you
  have only given a very vague complaint, so we can only give vague
 answers at
  this point.
 
  Don't give up, though. Flash is a great tool--not perfect, but pretty
 darn
  good. It's biggest problem is that it does what you tell it to, not what
 you
  want it to.
 
  Cordially,
 
  Kerry Thompson
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 Random Lines 3D
 My online portfolio
 www.therandomlines.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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Flash player crashes

2008-06-22 Thread Ashim D'Silva
Hey,

I'm using the Flash IDE CS3 to produce a project in AS3, and Flash is
continually crashing erratically. Is there a way for me to figure out
what's causing it? I can't seem to tie it to any action or recreate
it, but it happens often enough to be a large problem. I would
normally think there isn't much I can do with AS to actually crash the
player, but it seems I have... Please help!

Cheers,

Ashim

-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to add bitmaps from my library to the stage AS3?

2008-06-19 Thread Ashim D'Silva
When you call a Library class (eg:LibImage()), you need to give it 2
parameters which represent the width and height of the BitmapData
class. Here however, they dont do anything. So simply call :: new
LibImage(0, 0);

2008/6/20 jonathan howe [EMAIL PROTECTED]:
 Here's the function I use (it uses getDefinitionByName  Class because it
 lets me get bitmaps in externally loaded swfs as well):

  public static function getBitmapAsset(assetName:String):Bitmap {
   try {
var ClassReference:Class = getDefinitionByName(assetName) as Class;
var data:BitmapData = new ClassReference(0, 0);
   } catch (error:Error) {
trace(AssetManager:: attempted to instantiate class (Bitmap) that was
 not found (asset misnamed or does not exist in loaded libraries ,
 assetName, error.toString());
   }
   var instance:Bitmap = new Bitmap(data);
   return instance;
  }



 On Thu, Jun 19, 2008 at 4:11 PM, Ali Drongo [EMAIL PROTECTED]
 wrote:

 Hello there, thanks for checking my post. I have a bunch of jpgs that I've
 imported into my library and have given class names, they default to extend
 the BitmapData class. When I try and instantiate them I get an error message
 saying I need to pass them 2 arguments. Here is my code:

 var formatImg = new LibImage();

 var image:Bitmap = new Bitmap(formatImg);

 mainMC.addChild(image);

 Could someone let me know the correct syntax for doing this?
 As I am using a document class I think I may need to use the
 [Embed(source='myPhoto.png')] syntax also

 Thanks!
 Ali


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




 --
 -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Image Hyperlinks in TextFields

2008-06-17 Thread Ashim D'Silva
This is supposed to be relatively simple, but I'm facing a rather odd
problem. I've got almost everything working but the link only works if you
right click the image and click Open or Open in new window. Just
clicking the link, seems to do nothing at all. The text field has
mouseEnabled on and the cursor is changing when I roll over, but clicks do
nothing!
What is going on??

Cheers!

-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Paste rich text possible in Flash?

2008-06-17 Thread Ashim D'Silva
I've got a feeling its possible. Using
useRichTextClipboard:Booleanhttp://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Boolean.htmlFrom
adobe help:
useRichTextClipboard property (for TextField class)
Specifies whether to copy and paste the text formatting along with the text.
When set to true, Flash Player will also copy and paste formatting (such as
alignment, bold, and italics) when you copy and paste between text fields.
Both the origin and destination text fields for the copy and paste procedure
must haveuseRichTextClipboard set to true. The default value is false.

I haven't tried it myself, but look into it.

Ash

2008/6/18 Kerry Thompson [EMAIL PROTECTED]:

  Just say you have text in Microsoft Word which is formatted bold and a
  certain colour. Is it possible to copy that text into a Flash (MX2004 or
 8)
  input field and retain (or at least discover and recreate) that
 formatting?

 Have you tried saving the file as HTML? Flash does have support for HTML
 text--limited, admittedly--but I don't know about RTF.

 I think Word has an option to reveal codes, which should show the HTML
 tags.
 I don't know this for sure--it's a guess, but it's worth a try.

 RTF codes aren't that tough to figure out--I had to do it for a Director
 project where I had to format print output with RTF, and if I can do it
 without documentation, anybody can. It's cryptic, though, and much more
 sensitive to minor deviations than HTML.

 Cordially,

 Kerry Thompson

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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Paste rich text possible in Flash?

2008-06-17 Thread Ashim D'Silva
Just noticed you said MX2004 or 8. This help is for AS3. Sorry about that.
But if you don't have a compelling reason to stick to AS2, you should switch
anyway.

2008/6/18 Ashim D'Silva [EMAIL PROTECTED]:

 I've got a feeling its possible. Using 
 useRichTextClipboard:Booleanhttp://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Boolean.html
  From
 adobe help:
 useRichTextClipboard property (for TextField class)
 Specifies whether to copy and paste the text formatting along with the
 text. When set to true, Flash Player will also copy and paste formatting
 (such as alignment, bold, and italics) when you copy and paste between text
 fields. Both the origin and destination text fields for the copy and paste
 procedure must haveuseRichTextClipboard set to true. The default value is
 false.

 I haven't tried it myself, but look into it.

 Ash

 2008/6/18 Kerry Thompson [EMAIL PROTECTED]:

  Just say you have text in Microsoft Word which is formatted bold and a
  certain colour. Is it possible to copy that text into a Flash (MX2004 or
 8)
  input field and retain (or at least discover and recreate) that
 formatting?

 Have you tried saving the file as HTML? Flash does have support for HTML
 text--limited, admittedly--but I don't know about RTF.

 I think Word has an option to reveal codes, which should show the HTML
 tags.
 I don't know this for sure--it's a guess, but it's worth a try.

 RTF codes aren't that tough to figure out--I had to do it for a Director
 project where I had to format print output with RTF, and if I can do it
 without documentation, anybody can. It's cryptic, though, and much more
 sensitive to minor deviations than HTML.

 Cordially,

 Kerry Thompson

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




 --
 Random Lines 3D
 My online portfolio
 www.therandomlines.com




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Image Hyperlinks in TextFields

2008-06-17 Thread Ashim D'Silva
It's AS3, and I can catch the TextEvent.LINK when it fires, but it doesn't
fire. The first time I click the image, the text gets selected to the line,
and only if I move and click again is the event dispatched. It seems to make
no sense. If I set selectable to false, then it doesn't work on the click at
all. Both these times though, if I right click the image and click Open, it
works fine. So the link is registering but the click isn't.

2008/6/17 Gerry [EMAIL PROTECTED]:

 Is this AS2 or AS3?
 Have you looked up asfunction if it's AS2? If it's AS3 look up
 flash.text.TextField dispatches event: link .



 On Jun 17, 2008, at 4:06 AM, Ashim D'Silva wrote:

  This is supposed to be relatively simple, but I'm facing a rather odd
 problem. I've got almost everything working but the link only works if you
 right click the image and click Open or Open in new window. Just
 clicking the link, seems to do nothing at all. The text field has
 mouseEnabled on and the cursor is changing when I roll over, but clicks do
 nothing!
 What is going on??

 Cheers!

 --
 Random Lines 3D
 My online portfolio
 www.therandomlines.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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: Re: [Flashcoders] Insert breakpoints and run debugger withoutFlash CS3?

2008-06-16 Thread Ashim D'Silva
SHOOT THIS GUY

2008/6/16 EDELSTAR [EMAIL PROTECTED]:

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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Inserting Smiley Images in Textarea

2008-06-13 Thread Ashim D'Silva
small little inline images? htmlText property parses that. Maybe you can
write a server side script that converts text gestures to an img/ tag.

2008/6/13 Elia Morling [EMAIL PROTECTED]:

 Yes, I need full 8-bit smilies. :(

 Elia

 - Original Message - From: Kerry Thompson 
 [EMAIL PROTECTED]
 To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
 Sent: Friday, June 13, 2008 2:40 AM
 Subject: RE: [Flashcoders] Inserting Smiley Images in Textarea


  Keith Reinfeld wrote:

  I am guessing that Elia needs more than what Wingdings has to offer along
 these lines. J = smiling, K = embarrassed, L = frowning.


 Only Elia knows for sure ^_^

 At any rate, there are always custom fonts.

  So anyway... supper's ready!


 You're making me hungry. I'm going upstairs to start the oven for
 tonight's
 jerk chicken ^_^

 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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Unhandled IOError and IOErrorEvent when closing browser during load

2008-06-12 Thread Ashim D'Silva
I only started getting this error when I switched to the debug player. Seem
to get stream errors as well, when nothing is loading!If it is a feature of
the debug feature; is there a way to disable the debug part of the player? I
wouldn't want to keep reinstalling different versions of flash for browsing
and developing!

2008/6/13 Steven Sacks [EMAIL PROTECTED]:

 I posted this to Flash_tiger but it seems to be down or something, so I'm
 xposting it here.

 Am I missing something, or is this a bug with the Flash player (9.0.124)?

 If you're loading something and during the load you close the browser, the
 Flash player spits out an Error #2044, from either ioError or IOErrorEvent
 or both.

 Error #2044: Unhandled ioError:. text=Error #2036: Load Never Completed.
 Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never
 Completed.

 Ok, fine. Adobe wants to enforce strictness even when you're annihilating
 the swf, I can deal with that, or so I thought...

 I listen for the IOErrorEvent and I try..catch the load and Flash still
 spits out the same error.  What gives?   Flash still throws an allegedly
 unhandled error that I am most assuredly handling?

 Sample code:

 _loader = new Loader();
 _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError,
 false, 0, true);

 try
 {
   _loader.load(request);
 }
 catch (error:Error)
 {
   trace(Caught error!, error.name +  ::  + error.message);
 }

 function onError(event:IOErrorEvent):void
 {
   trace(onError, event);
 }

 I believe I'm doing everything I should do to capture these errors and I
 still get them.  Why?

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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Effective Cursor Switching

2008-06-12 Thread Ashim D'Silva
I'm curious because its becoming a large requirement for usability and I shy
away from it; but changing the mouse cursor can be highly beneficial.
I'd like to know however, it there's a way to tap into the OS's cursors,
instead of changing the cursor position on mouse move. For instance when you
have a selectable text field, flash changes your cursor, as when you roll
over a buttonMode enabled object.

So is there a way to tell it to fall into that state?

Cheers,

Ashim

-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Effective Cursor Switching

2008-06-12 Thread Ashim D'Silva
Yeah, the text fields and buttons do it fine. I was hoping to use it for
more features such as a drag hand, loading cursors, magnifying glass, etc...

2008/6/13 Barry Hannah [EMAIL PROTECTED]:

 As with buttons forcing the OS pointer/hand cursor, selectable
 textfields should also change the standard arrow cursor into an I-beam
 one?
 I thought this was default behavior when the Textfield.selectable
 property was set to true?

 Flash went part way there with including a useHandCursor property, I
 agree it would be nice to have access to the OS cursor set e.g. to use a
 grab cursor for panning a map ala google.


  I'd like to know however, it there's a way to tap into the OS's
 cursors,
  instead of changing the cursor position on mouse move. For instance
 when you
  have a selectable text field, flash changes your cursor, as when you
 roll
  over a buttonMode enabled object.


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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] 3 level drop down menu - AS3

2008-06-11 Thread Ashim D'Silva
Yes, but you'll undoubtedly use a server side script to access that
information form the database. Formatting that into XML and feeding it to
Flash means you get an XML object, which is simply a set of arrays to run
through.I just re-read your problem. And maybe I approached it wrong.
If you've already build your setup then every object has an id and all its
children should know what that id is (parent_id). But each object that has a
parent has a .parent paramenter, if its in its display list. and if your not
structuring it that way, you should add a parent parameter to your class so
that all objects know who their parents are. Then you simply call its id.
Hope that made sense.

2008/6/9 Vayu Robins [EMAIL PROTECTED]:

 Hmmm, thanks Ashim, but the site is managed by a cms that runs on a
 database.  Hence , the content is stored in a database.



 On 6/9/08 10:50 AM, Ashim D'Silva [EMAIL PROTECTED] wrote:

  XML will solve all your troubles. With as3 flash now natively handles the
  E4X syntax. You'll be able to run through everything that way.
 
  2008/6/9 Vayu Robins [EMAIL PROTECTED]:
 
  Hi.
 
  I am struggling with something I never thought would be an issue.
 
  I'm trying to develop a 3 level drop down menu in as3 and I am connected
 to
  a database where all the menu items are stored.  I am getting the stored
  data with the help of amfphp.
 
  I naively assumed I could just run the data I got from the database in
 some
  for loops and have the following structure:
 
  Topmenu1
 Submenu1
 Submenu2
 SubSubmenu1
 SubSubmenu2
  Topmenu2
 Submenu1
 Submenu2
 
  Etc.
 
  The top menus have a parent_id = 0. The submenus have parent_id = its
  parents id and so on.
 
  Could anyone please help me out of this pickle?
 
  Cordially
  Vayu
 
 
  ___
  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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flip in same postion

2008-06-11 Thread Ashim D'Silva
two options:
1. put it inside another container at object.y = (object.height/2)*-1; and
then negetive scale the container.
or
2. move the y of the object as you scaleY, so for the code below, add
mySampleMC.y = orginalY - mySampleMC.height;

2008/6/10 sense co moh [EMAIL PROTECTED]:

 Hi
 I have Video playing in the center of the stage and I'm using button to
 filp it
 function filp(event:MouseEvent):void {

  mySampleMC.scaleY *= -1;
 }

 mySampleMC.addEventListener(MouseEvent.CLICK, flip);

 but the problem when I flip it change Y postion and go up ,
 I wnat to flip it and keep it in same postion
 Help please
 Thanks
 Bassam



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




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  1   2   >