actionscript 3 - AS3 calling function from .as file to .fla not in static class -


need , driving me nuts! calling function .as file , have done quite bit of research on it looks though doing right apparently not.

i trying call startfoxtel(); function .as .fla keeps coming

1061: call possibly undefined method startfoxtel through reference static type ngvtvair. (symbol 'foxtelcontainer', layer 'actions', frame 1, line 29) ngvtvair.fla

this on .fla (please bare in mind have removed other irrelevant functions , purely startfoxtel call doesn't like)

import flash.events.mouseevent; import flash.display.movieclip; import fl.transitions.easing.*; import fl.transitions.tween;  var ngvtv:ngvtvair = new ngvtvair();  function foxdown(event:mouseevent):void {   ngvtv.startfoxtel();   var twalpha:tween = new tween(movieclip(root).bg1,"alpha",strong.easeout,1,0,3,true);   var tw1alpha:tween = new tween(movieclip(root).buttons,"alpha",strong.easeout,1,0,3,true);   var tw2alpha:tween = new tween(movieclip(root).logo,"alpha",strong.easeout,1,0,3,true);   var tw3alpha:tween = new tween(movieclip(root).cityscape,"alpha",strong.easeout,1,0,3,true);   twalpha.start();   tw1alpha.start();   tw2alpha.start();   tw3alpha.start(); } 

this on .as

package { import flash.desktop.nativeprocess; import flash.desktop.nativeprocessstartupinfo; import flash.display.sprite; import flash.events.*; import flash.events.ioerrorevent; import flash.events.nativeprocessexitevent; import flash.events.progressevent; import flash.filesystem.file;  public class ngvtvair {     public var process:nativeprocess;     public var dispatch:eventdispatcher = new eventdispatcher();      public function startfoxtel():void     {         if(nativeprocess.issupported)         {             setupandlaunchfoxtel();         }         else         {             trace("nativeprocess not supported.");         }     } 

as3 case sensitive :

you need replace

ngvtv.startfoxtel(); 

to match function name

public function startfoxtel():void 

so be

ngvtv.startfoxtel(); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -