
Welcome Guest
|
|
|
#1
|
|||
|
|||
|
Problem with Window content
Hi,
Back with yet another simple problem :? I'm trying to create a window and attach a pre-prepared movieclip into it's content path as follows Actionscript:
var bookCanvas:MovieClip;
createEmptyMovieClip("bookCanvas", getNextHighestDepth());
bookCanvas.attachMovie("myLabel", "testLabel", getNextHighestDepth(), {_x:0, _y:50});
bookCanvas.testLabel.value.htmlText = "this is a test label";
var bookWindow = PopUpManager.createPopUp(this, Window, true, {_x:100, _y:100, title:"Request Summary", closeButton:true});
bookWindow.setSize(500,200);
bookWindow.contentPath = bookCanvas;Thanks for any enlightement any of you can provide ![]() Euclid |
|
#2
|
|||
|
|||
|
ok...ahem.... I stoopid...
![]() The reason my movieclip wasn't attaching was a lack of speechmarks on the contenPath part... e.g. Actionscript:
bookWindow.contentPath = "bookCanvas"; // NOT bookWindow.contentPath = bookCanvas; for example a bit of dynamic text or something... I know I should be able to access it with bookWindow.content......but should I just be able to go ?? Actionscript:
bookWindow.content.attachMovie(yadayadayada); ![]() Cheers Euclid |
|
#3
|
|||
|
|||
|
right.. got my stuff sorted
..... I'm basically trying to give the window component too much to do too soon... i.e. I'm trying to set the values of textfields etc before the window component and its contents have finished initialising. Its therefore necessary to listen for a 'complete' event from the window before playing around with it's contents.e.g. Actionscript:
var windowListener:Object = new Object()
windowListener.complete = function() {
bookWindow.content.row1.htmlText = "I'll be well happy if this works :) ";
}
var bookWindow = PopUpManager.createPopUp(_root, Window, true, {_x:100, _y:100, title:"Request Summary", closeButton:true});
bookWindow.setSize(500,200);
bookWindow.contentPath = "bookCanvas";
bookWindow.addEventListener("complete", windowListener);![]() sorry for putting posts on the board and answering myself within a couple of hours (again :?) but hopefully someone else might find this useful ![]() Cheers Euclid |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Glitch in my first Flash project | keress | Newbies |
8 | 12-28-2006 02:49 PM |
| problem using targets to change content | tokolosche | Newbies |
2 | 07-06-2006 11:00 PM |
| new browser window problem | duffint | Flash MX |
8 | 08-26-2004 05:13 PM |
| Resizing window problem.... | rbruhn | Flash MX |
4 | 07-07-2003 04:10 PM |
| Overlapping window problem!! | Dark Jagwar | General Flash | 2 | 08-06-2001 10:01 AM |





