LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 


  #1  
Old 06-30-2005, 09:54 AM
euclid euclid is offline
Registered User
 
Join Date: Mar 2005
Location: Reading, UK
Posts: 96
Rep Power: 9
euclid is on a distinguished road
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;
I know that is a pretty simple test, but for some reason its confounding me (as usual...hehe).
Thanks for any enlightement any of you can provide
Euclid
Reply With Quote
  #2  
Old 06-30-2005, 10:16 AM
euclid euclid is offline
Registered User
 
Join Date: Mar 2005
Location: Reading, UK
Posts: 96
Rep Power: 9
euclid is on a distinguished road
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;
I'm now having a problem attaching things to the bookCanvas though 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);
If so it's still causing me probs
Cheers
Euclid
Reply With Quote
  #3  
Old 06-30-2005, 11:31 AM
euclid euclid is offline
Registered User
 
Join Date: Mar 2005
Location: Reading, UK
Posts: 96
Rep Power: 9
euclid is on a distinguished road
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);
and tadaa it work
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
Reply With Quote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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




All times are GMT. The time now is 09:51 PM.