Skip to main content
Participant
December 4, 2014
Question

Call function from action panel in second frame

  • December 4, 2014
  • 1 reply
  • 322 views

I am starting to learn Adobe Flash. I'm using Flash CS6.

I have a file called test.fla and another called bikertest.as

Bikertest has this code:

package as3.grey{

import com.grey.utils.Console;

//import com.grey.utils.ClickTag;

import flash.display.MovieClip;

import com.greensock.TweenNano;

import com.greensock.easing.*;

import flash.events.*;


public class bikertest extends MovieClip {


private var mc:MC;

private var console:Console; 


public function ray():void{

init();

trace("hi from here");

mc=new MC 

; addChild(mc);

}

  ....................

I tried:

import as3.grey.bikertest.as; 


var t = new bikertest(); 


t.ray();

I want to be able to call ray() from the Action Panel in the second frame in test.fla . I hope this is clear. How can I do that? /Thanks!

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
December 5, 2014

assuming your fla is in a super directory of as/grey and everything in bikertest is defined, use:

import as3.grey.bikertest;

var t:bikertest=new bikertest();

t.ray();