Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I access flash function using javascript?

Community Beginner ,
Aug 21, 2013 Aug 21, 2013

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 = (this instanceof 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);    }

TOPICS
Scripting
865
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 21, 2013 Aug 21, 2013

just in case you are using AE CC, script communication with flash is broken in CC.

see this : http://forums.adobe.com/thread/1247861?tstart=30

Also please file a bug report for flash not working in estk under AE CC here - the more people filed those bug, the more chance they fixed it.

https://www.adobe.com/go/wish/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 21, 2013 Aug 21, 2013
LATEST

I use CS6. And then the other direction using communication JS and FLASH, from JS call Flash function.

I think that the error in my code. I have not found a working example for AE ESTK.

Sorry fom my googlenglish.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines