SoFunction
Updated on 2025-04-13

Easy way to execute a javascript method in flex

For example, open a new window:
Copy the codeThe code is as follows:

("eval", "myWin = ('" + url + "', '" + windowId + "', 'toolbar=1,scrollbars=0,location=1,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + "');()");

Note: Here we cleverly use the eval global function in JavaScript, which is very good and saves writing JavaScript functions in web page files embedded in flash.