Re: [Flashcoders] Setting up loadVars onLoad handler within custom class

2007-06-04 Thread Jolyon Russ

I tend not to use Delegate and go for this easier/cleaner alternative

private var scope : ClassName = this ;

this.my_mc.onRelease = function ( ) {
scope.doSomething ( great! ) ;
}

function doSomething ( id : String ) {
trace(what's my id:  + id ) ;
}



On 6/4/07, Daniel Glue [EMAIL PROTECTED] wrote:


Thanks everyone, I've been reading through the article on scope and
using the Delegate Class that Alain reccomended which was very useful
and had just come round to code a very similar solution as written out
by Fernando, thanks everyone!
Danny

On 04/06/07, Fernando Castillo [EMAIL PROTECTED] wrote:
 Hi Daniel,

 Just something like this.


 code
 import mx.utils.Delegate;
 class VersionChecker{
 private var my_lv:LoadVars;
 private var xmlAdd:String;
 private var browserType:String;
 private var ipAddress:String;

 public function VersionChecker(xmlAddy:String) {
 my_lv = new LoadVars();
 my_lv.onLoad = Delegate.create(this, onXMLLoad);
 xmlAdd = xmlAddy;
 startCheck();
 }

 private function startCheck() {
 trace(version checker starting to check:+xmlAdd);
 my_lv.load(xmlAdd);
 }

 private function onXMLLoad(success:Boolean):Void {
 if(success){
 trace(OK);
 }else{
 trace(ERROR);
 }
 }
 }

 /code



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Daniel
Glue
 Sent: lunes, 04 de junio de 2007 16:21
 To: Flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] Setting up loadVars onLoad handler within custom
 class

 Hey there, I am creating a custom class with a loadVars object that
 gets data from a web page. My problem is I can't get my loadVars
 object to load! I think I am setting the onLoad handler in the wrong
 place. Might anyone have any ideas how I set this inside my custom
 class?

 Thanks in advance guys!
 Danny


 Here is my code:

 Class VersionChecker{
 private var my_lv:LoadVars;
private var xmlAdd:String;
   private var browserType:String;
   private var ipAddress:String;


 //receives url to connect to sets onLoad handler
  public function VersionCheck(xmlAddy:String {
 xmlAdd = xmlAddy;
 my_lv.onLoad = function(success:Boolean) {
 if (success) {
 trace(loaded);
 browserType = this.browser;
 ipAddress = this.ip;
 } else {
 trace(load failed);
 }
 };
 startCheck();
 }

   private function startCheck() {
 trace(version checker starting to check:+xmlAdd);
 my_lv.load(xmlAdd);
 }
 }
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] flash and Arabic

2007-05-02 Thread Jolyon Russ

Has anyone had any experience of using the Flash RTL classes from here:
http://www.flashrtl.com/

They seem to be good for Persian, but need porting to other char sets, and a
general clean up/re-write.

To do this I need to get a better idea of what needs to be converted, the
order of words or the order of characters but not words, or both? I guess
this is also dependant on the source, for me I'm loading in from XML.

It's still early in the project and I'd like to get this nailed down before
committing 100% to doing RTL.

Help appreciated.


Jolyon

On 3/29/07, Yehia Shouman [EMAIL PROTECTED] wrote:


I once emailed Kevin Lynch and the guy generously replied with this:

 Hi Yehia-

 Thanks for your note.

 Right-to-left text support in Flash Player is an important feature,
 and we know it would be a key addition to the platform. Implementing
 this feature to deliver the right quality is a fairly big undertaking
 -- and we also need to factor in cross-platform support, maintaining
 the stability of the player, and keeping the code size small.  All
 requests for new features are investigated using these same standards
 as we prioritize features for each release. Product Management is
 aware of the need for right-to-left text support. Although we cannot
 provide an exact date for when it will be supported, it is definitely
 under evaluation.

 thanks

 Kevin


Flash supports unicode, it just isn't RTL supportive. Furthermore to this
issue, if you try to use arabic, you won't be able to get a proper text
wrap. There will be compatibility issues on different Windows versions and
between Mac, worth saying backward compatibility with older Flash players
that knows not of unicode. I seriously hope Adobe 's involvement will be
beneficial. (Wish:Adobe Flash CS3 ME)

Regards,
Yehia Shouman
Senior AS Developer and TL
www.santeon.com


On 3/29/07, Omar Fouad [EMAIL PROTECTED] wrote:

 Well the most thing i used is importing arabic written text from
freehand
 (converted to vectors) and it is just fine... Regarding writing it in
 dynamic text boxes at runtime like this:

 myTextField.text ولا حاجة it works but you still have to take care
 about text wrapping as in flash doesnt recognize the end of a word, and
 so,
 in multi line cases, sometimes a single word splits.. i used to solve
this
 problem by adding some extra spaces before the last word in a single
 line...
 and the same by parsing text from a metadata in xml...

 Hope this helps

 regards...



 On 3/29/07, Shaun Collins [EMAIL PROTECTED] wrote:
 
  I've worked with Arabic in Flash and yes those are the
  exact problems I experienced. There is an application
  that will allow you to cut and paste arabic to other
  applications without destroying the format. It won't
  work if you're looking for a dynamic solution - if
  anyone knows of one that would be great.
 
  http://www.layoutltd.com/alrassam.php
 
  There are arabic fonts you can use in flash but that
  still doesn't solve the problem of getting the arabic
  into flash in the right format if you are cutting and
  pasting.
 
  Hope that helps some.
 
  --- Omar Fouad [EMAIL PROTECTED] wrote:
 
   I work A lot using arabic in flash... I used to
   write arabic text
   dynamically into dynamic textfields, from xml, or
   action script in run
   time... Or by writing the arabic text in Free Hand,
   Than breaking it into
   vector and pasting it into flash as Vector...
  
   On 3/26/07, James Tu [EMAIL PROTECTED] wrote:
   
We have an approach to deal with a list of 100
   phrases in Arabic.
When you copy and paste a phrase of Arabic into a
   Flash textbox,
Flash reverses it!  So, we first reversed the
   characters outside of
Flash and then copied and pasted the phrases into
   Flash.  Problem
solved right?
   
We'll, when someone that can read Arabic read it,
   they told us that
the characters look funny.  In essence, the
   characters weren't
connecting to each other correctly!  It's as if
   you took a cursive
font and laid out the characters and the cursive
   writing was not
continuous.
   
Does anyone have any suggestions on handling Flash
   and Arabic?  I did
some extensive searching and there aren't any
   definitive
solutions...Some suggested using a special Flash
   Arabic font, which I
couldn't find.
   
Help!
-James
   
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the
   archive:
   
  
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
   
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
   
  
  
  
   --
   Omar Fouad - Digital Emotions...
  
   Love is always patient and kind. It is never
   jealous. Love is never boastful
   nor conceited It is never rude or selfish. It does
   not take offense and is
   not 

Re: [Flashcoders] flash and Arabic

2007-05-02 Thread Jolyon Russ

Thanks for the help!

In your professional opinion is almost the same good enough or will I need
to tweak the char set? So you know I'm only displaying short button labels
and headings.

The languages I'm going to be needing to display are Arabic and Sorani. I
think Sorani is as different to Arabic as Persian is to Arabic, but what do
I know?

Also we're getting the copy supplied from a translation house, the Project
Manager said this will be coming over as pdf. I've got a full copy of
Acrobat so hope this shouldn't be a problem. If it is would you recommend
any other format for them to supply in?

I can't seem to log into the archives, which is frustrating.

Cheers again.


Jolyon

On 5/2/07, Danny Kodicek [EMAIL PROTECTED] wrote:


 Has anyone had any experience of using the Flash RTL classes
 from here:
 http://www.flashrtl.com/

 They seem to be good for Persian, but need porting to other
 char sets, and a general clean up/re-write.

 To do this I need to get a better idea of what needs to be
 converted, the order of words or the order of characters but
 not words, or both? I guess this is also dependant on the
 source, for me I'm loading in from XML.

 It's still early in the project and I'd like to get this
 nailed down before committing 100% to doing RTL.

If you look back over the archives you'll find a few posts from me on this
subject. For display purposes you may find these classes are enough for
you
- Persian and standard Arabic are almost the same in terms of the
character
set, and Hebrew is much simpler (just plain bidirectional).

Best
Danny

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: Re: [Flashcoders] loading external movie, then attachMovie items of IT's library?

2006-11-04 Thread Jolyon Russ

Not so much with loadMovie, I don't think.

However if you use swfmill to inject the swf at compile time you can
then use attachMovie on it and any subsequent clips within it.

The above assumes you're using eclipse with MTASC and swfmill :-|

If you're not head on over to osflash.org.


Jolyon

On 11/4/06, Yehia Shouman [EMAIL PROTECTED] wrote:

in Flash 9  with actionscript 3, yes. but with flash 8 I doubt that, anybody
?

On 11/4/06, grimmwerks [EMAIL PROTECTED] wrote:

 Is it possible to load in an external swf using loadMovie into a main
 movie, and then creating new movies on the fly using attachMovie with
 ids of the loaded movie?
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: Re: [Flashcoders] math for getting textField's line number? ie height/(font.size+font.leading) ??

2006-11-04 Thread Jolyon Russ

Flash/CSS/Photoshop/et al accept negative values for leading and kerning.

0 is your baseline negative pulls tighter positive pushes looser.

On 11/3/06, Ray Chuan [EMAIL PROTECTED] wrote:

Hi,
are you sure negative leadings are allowed? I've tried and don't see
any difference.

I'm guessing lineCount should be an integer, so you should use:

Math.floor(ht/(size+leading))

Assuming leading0.

On 11/3/06, grimmwerks [EMAIL PROTECTED] wrote:
 It's time for one of those brainfarts.

 I'm trying to position a textField's bottom in line with other
 textfields; I've added leading to all the textField's so my math is
 now off.

 All the single-line textFields are positioned properly, but the
 mutli-line textfields are not.

 In the one I'm testing out with, the font size is 30, and the leading
 is -10. So I did this:

 lineCount = (txt._height/(font.size + font.leading))

 This never works for my example, ie ht = 70, size = 30, leading = -10
   ie  70/(30+-10) == 1.6


 What am I missing?
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com



--
Cheers,
Ray Chuan
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] exporting dynamic swf art to other apps

2006-06-30 Thread Jolyon Russ

This is a method used a lot by Joshua Davis, I took his FITC boot camp
course and no, you can't retain the alpha values and presumably filter (not
tried w/filters).

I think you'll find that because the alpha and filter properties are applied
at run-time the pdf you output will only embed the standard library symbols
without any of this information.

Also, you might find you get better result printing as .ps files,
Illustrator will like them more than pdf but it still won't solve your
problem, sadly.

Jolyon

PS. First reply so :-P

On 6/30/06, Mason Wendell [EMAIL PROTECTED] wrote:


Thanks a lot. I haven't explored decompilers. I'll check some out and see
what my options are. Has anyone else tried this method? Any
recommendations
for a good decompiler or technique?

On 6/30/06, Lee McColl-Sylvester [EMAIL PROTECTED] wrote:

 I think the issue you'll find here is that, the work area of the Flash
 IDE is not the Flash player.  Any content created in the IDE can be made
 use of however Adobe see fit as it's an IDE, but the player is cut down
 for file size and speed purposes.

 Your best bet is to either look up exporting frames from an SWF in the
 IDE itself, or lookup other IDE's / decompilers and see if they support
 it.

 Lee




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Mason
 Wendell
 Sent: 30 June 2006 15:36
 To: Flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] exporting dynamic swf art to other apps

 Hey all,

 I'm generating art in actionscript that I need to export from my swf and
 bring into Illustrator or Photoshop for final tweaks before sending it
 out
 to a large format printer. I know you can export from the IDE but since
 everything I'm using is dynamic I can't use those functions.

 My current best method is to print the swf to a pdf from the player and
 open
 that pdf in Illustrator. Unfortunatly I lose all my alpha and filter
 data in
 this process, and since I might have 1000 or more instances in my export
 those values are nearly impossible to recreate. I've tried adjusting the
 pdf
 settings but I haven't found the right combo yet.

 Does anybody here know of a method to export still frames (I'm not
 trying to
 export video or motion here) from the swf in a vector format?

 This issue has been nagging me for quite a while now, and I haven't
 found
 any tutorials or tips online on how to do it. I'd really appreciate any
 feedback from this forum. Thanks a lot.

 -=Mason
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com