Re: [flexcoders] Re: call an ActionScript function from ActionScript

2009-02-22 Thread Jeffry Houser


The method you posted was not static, so you would have to instantiate 
the class. 

With a static method, you have to import the class and call the method 
on the class instead of on an instance of it. 


yossi.baram wrote:

Hi Jeffry,
Yep, with some of the methodes,
others are static, so I didnt have to instansiate

Thanks
--- In flexcoders@yahoogroups.com, Jeffry Houser  wrote:
  

 A few thoughts:

 Usually you have to import the class, create an instance of it and 

all 
  

the method from the instance.  Did you do any of that?

 As an aside, functions are not bindable, except for get / set 


functions
  

yossi.baram wrote:


Hi guys,

I have the following ActionScript file:
[Bindable]
public function callJavaScript():void {
ExternalInterface.call("sayString", "Hello World, from 
ActionScript");

}


When I try to call callJavaScript() in a different ActionScript 
  
class, 
  

it gives me a none recognize error :(

I included all AS's in my main mxml file.

How do I allow a function in AS to be shared among all AS's?

Thanks





--
Flexcoders Mailing List
FAQ: 
  

http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  
Alternative FAQ location: 
  

https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-
b4cf-1e62079f6847
  

Search Archives: http://www.mail-archive.com/flexcoders%
  

40yahoogroups.comYahoo! Groups Links
  



  
  

--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links




  


--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust



[flexcoders] Re: call an ActionScript function from ActionScript

2009-02-22 Thread yossi.baram
Hi Jeffry,
Yep, with some of the methodes,
others are static, so I didnt have to instansiate

Thanks
--- In flexcoders@yahoogroups.com, Jeffry Houser  wrote:
>
> 
>  A few thoughts:
> 
>  Usually you have to import the class, create an instance of it and 
all 
> the method from the instance.  Did you do any of that?
> 
>  As an aside, functions are not bindable, except for get / set 
functions
> yossi.baram wrote:
> > Hi guys,
> >
> > I have the following ActionScript file:
> > [Bindable]
> > public function callJavaScript():void {
> > ExternalInterface.call("sayString", "Hello World, from 
> > ActionScript");
> > }
> >
> >
> > When I try to call callJavaScript() in a different ActionScript 
class, 
> > it gives me a none recognize error :(
> >
> > I included all AS's in my main mxml file.
> >
> > How do I allow a function in AS to be shared among all AS's?
> >
> > Thanks
> >
> >
> >
> > 
> >
> > --
> > Flexcoders Mailing List
> > FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-
b4cf-1e62079f6847
> > Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.comYahoo! Groups Links
> >
> >
> >
> >
> >   
> 
> -- 
> Jeffry Houser, Technical Entrepreneur
> Adobe Community Expert: http://tinyurl.com/684b5h
> http://www.twitter.com/reboog711  | Phone: 203-379-0773
> --
> Easy to use Interface Components for Flex Developers
> http://www.flextras.com?c=104
> --
> http://www.theflexshow.com
> http://www.jeffryhouser.com
> --
> Part of the DotComIt Brain Trust
>




[flexcoders] Re: call an ActionScript function from ActionScript

2009-02-21 Thread yossi.baram
Ok I managed,
I just placed the function in an ActionScript class, not a file
and called the instance of that class from the other ActionScript

Thaks any way

--- In flexcoders@yahoogroups.com, "yossi.baram"  
wrote:
>
> Hi guys,
> 
> I have the following ActionScript file:
> [Bindable]
> public function callJavaScript():void {
> ExternalInterface.call("sayString", "Hello World, from 
> ActionScript");
>   }
> 
> 
> When I try to call callJavaScript() in a different ActionScript 
class, 
> it gives me a none recognize error :(
> 
> I included all AS's in my main mxml file.
> 
> How do I allow a function in AS to be shared among all AS's?
> 
> Thanks
>