all groups > flash actionscript > june 2005 >
You're in the

flash actionscript

group:

Actionscript Syntax Question


Actionscript Syntax Question mourning2night
6/18/2005 9:44:43 PM
flash actionscript:
I have a syntax question. I have a pop-up window and I'm trying to load a
picture into a Loader instance, but the Loader instance resides in a movie clip
that is exported for actionscript. The movie clip has the identifier:
"mc_Foto".

//Create Pop_Up window
var popUpWindow:MovieClip = PopUpManager.createPopUp(_root, Window, true,
{closeButton:true});
popUpWindow.contentPath = "mc_Foto";
popUpWindow.setSize(500,500);
popUpWindow.title = "New Photos";

mc_Foto.spContent.contentPath = "images/" + newRecord.photoFile;

This won't work, and I've tried things like:
"mc_Foto".spContent.contentPath = "images/" +
newRecord.photoFile;
mc_Foto[spContent]contentPath = "images/" +
newRecord.photoFile;

What is the correct syntaxt to target spContent in movieclip "mc_Foto"?
Re: Actionscript Syntax Question David Stiller
6/19/2005 9:07:12 PM
mourning2night,

[quoted text, click to view]

I'm trying to follow your question. How are mc_Foto and your popup
window related? Are they?


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

Re: Actionscript Syntax Question NSurveyor
6/20/2005 12:00:00 AM
I believe the question is, how do you reference the mc_Foto as it is the content of a PopUp? Use, poppWindow.content:

poppWindow.content.spContent.contentPath = "images/" + newRecord.photoFile;
Re: Actionscript Syntax Question NSurveyor
6/20/2005 12:00:00 AM
I believe the question is, how do you reference the mc_Foto as it is the content of a PopUp? Use, poppWindow.content:

popUpWindow.content.spContent.contentPath = "images/" + newRecord.photoFile;
Re: Actionscript Syntax Question NSurveyor
6/20/2005 12:00:00 AM
Whoops, I guess I should proof read better (keep missing that damn U!):

I believe the question is, how do you reference the mc_Foto as it is the
content of a PopUp? Use, popUpWindow.content:

popUpWindow.content.spContent.contentPath = "images/" + newRecord.photoFile;
Re: Actionscript Syntax Question Jeckyl
6/20/2005 12:00:00 AM
[quoted text, click to view]
The evil keyboard fairy keeps moving keys on my keyboard too.
--
Jeckyl

Re: Actionscript Syntax Question rlc5611
6/20/2005 12:00:00 AM
NSurveyor is on the right path (no pun intended - well - maybe a little) but I
will also through this out:

This may or may not be relevant but I have been having trouble with scripting
for the content of things that are loaded out of the library. For example, if
"mc_Foto" contains something like a scrollpane and you load it into a popup and
then immediately try to load its content without any kind of progress listener,
it can fail because, for example, spContent may not yet exist when you try to
assign its content path.
Re: Actionscript Syntax Question NSurveyor
6/21/2005 12:00:00 AM
Originally posted by: rlc5611
NSurveyor is on the right path (no pun intended - well - maybe a little) but I will also through this out:


AddThis Social Bookmark Button