Groups | Blog | Home
all groups > flash actionscript > september 2007 >

flash actionscript : Problem with Window Component


califa
9/10/2007 11:58:05 AM
[quoted text, click to view]

Hi, try casting the return of the PopUpManager!

var windowInstance = Window(PopUpManager.createPopUp(this, Window,
false, getWindowInitObject()));

chieffan
9/10/2007 4:37:24 PM
I am using the Window component in the following manner. User clicks a button
called audioText_btn and the window will popup with audio script, like a closed
captioning. Up unitl 30 min ago I could publish with this code just fine. Now I
get this error in all the files I used this in. As I said, all had published
just fine. Any help is appreciated.

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 27: Type mismatch.
var my_win:MovieClip = PopUpManager.createPopUp(this, Window, true,
{closeButton:true, title:"Script", contentPath:"contenttext"});

Total ActionScript Errors: 1 Reported Errors: 1


----------------Here is my code----------------------

import mx.managers.PopUpManager;
import mx.containers.Window;
audio_btn.onRelease = function() {
_global.styles.windowStyles.setStyle("fontSize", "12");
var my_win:MovieClip = PopUpManager.createPopUp(this, Window, true,
{closeButton:true, title:"Script", contentPath:"contenttext"});
var winListener:Object = new Object();
winListener.click = function() {
my_win.deletePopUp();
};
my_win.addEventListener("click", winListener);
winListener.complete = function(evt_obj:Object) {
my_win.setSize(my_win.content._width+25, my_win.content._height+25);
};
my_win.addEventListener("complete", winListener);
};
chieffan
9/10/2007 6:23:54 PM
AddThis Social Bookmark Button