Quantcast
Channel: Adobe Community : Unanswered Discussions - After Effects
Viewing all articles
Browse latest Browse all 30854

How do I access flash function using javascript?

$
0
0

I try change list size in swf from js. It`s not work.

 

SWF

import flash.external.ExternalInterface; 
ExternalInterface.addCallback( "methodResize", this, swfResize); 
function swfResize(winX, winY) {   my_list.setSize(winX, winY);  } 
function init (){    this.createClassObject(mx.controls.List, "my_list", 1);    my_list.setSize(260,224);
....

 

JS

var win = (thisinstanceof Panel) ? this : new Window("palette", scriptName, undefined, {resizeable: true});
win.flashPlayer = win.add("flashplayer", [0, 0, 260, 224], flashFile); 
win.onResizing = function () {    var winX = win.windowBounds[2];    var winY = win.windowBounds[3];    win.flashPlayer.preferredSize = [winX, winY];    win.flashPlayer.methodResize(winX, winY);    }

Viewing all articles
Browse latest Browse all 30854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>