Answered
Loading images into movieclip
Hi guys,
I'm new here! I wondered if anyone could explain to me what I'm doing wrong here.
As part of a Flash-based campus mapping system, I am trying to create a 'Room Information' box that will display certain information regarding rooms around the campus, based upon data stored in a Microsoft Access database.
The .asp file I am using is working correctly, and my dynamic text boxes are correctly displaying the information as each database record is queried.
However, I am also trying to display an image of the room. The image files are located in the same directory as the .swf, they are non-progressive .jpgs. I have been trying to use the following code (which works for everything but the images):
onClipEvent(data)
{
// Create a Movie Clip to load images into
mcRoomDatabase.createEmptyMovieClip("MyImagesHolder", 0);
strName = Name;
strBuilding = Building;
strType = Type;
strProjector = Projector;
strSeats = Seats;
strRoamNet = RoamNet;
strPosition = "Record " add String(CurrentRecord+1) add " of " add String(TotalRecords);
loadMovie(Name + ".jpg", mcRoomDatabase.MyImagesHolder);
}
-----------
Nothing is loading into the movieclip. If I use the code (for an imaginary room called Room100)
loadMovie("Room100.jpg", mcRoomDatabase.MyImagesHolder);
the image displays perfectly. If I set a new dynamic text box to display
Name + ".jpg"
it displays Room100.jpg, which is the same as what I'm entering when I try it directly above.
I'm confused as to where I'm going wrong? Sorry for the long post!
Many thanks for reading
Alex
I'm new here! I wondered if anyone could explain to me what I'm doing wrong here.
As part of a Flash-based campus mapping system, I am trying to create a 'Room Information' box that will display certain information regarding rooms around the campus, based upon data stored in a Microsoft Access database.
The .asp file I am using is working correctly, and my dynamic text boxes are correctly displaying the information as each database record is queried.
However, I am also trying to display an image of the room. The image files are located in the same directory as the .swf, they are non-progressive .jpgs. I have been trying to use the following code (which works for everything but the images):
onClipEvent(data)
{
// Create a Movie Clip to load images into
mcRoomDatabase.createEmptyMovieClip("MyImagesHolder", 0);
strName = Name;
strBuilding = Building;
strType = Type;
strProjector = Projector;
strSeats = Seats;
strRoamNet = RoamNet;
strPosition = "Record " add String(CurrentRecord+1) add " of " add String(TotalRecords);
loadMovie(Name + ".jpg", mcRoomDatabase.MyImagesHolder);
}
-----------
Nothing is loading into the movieclip. If I use the code (for an imaginary room called Room100)
loadMovie("Room100.jpg", mcRoomDatabase.MyImagesHolder);
the image displays perfectly. If I set a new dynamic text box to display
Name + ".jpg"
it displays Room100.jpg, which is the same as what I'm entering when I try it directly above.
I'm confused as to where I'm going wrong? Sorry for the long post!
Many thanks for reading
Alex
