kram_snd
09-07-2008, 05:18 PM
hi there
I tried the tutorial "building your first flash aplication" but instead of using the dimentions/text/images provided I decided to use my own to personalise it.
I folowed the step by step tutorial exactly, using the same names for the movie clips, images etc. I thought in theory all i needed to change was the text that i wanted to use.
What I have is a 550px X 400px stage with a transparent blue section at the bottom with 2 text boxs, and a "next" button.
When I test the movie and press next, the text changes as it should but the screen remains grey instead of displaying the photos.
I have tried moving the images folder to different locations (in the same folder as the .fla file, in the folder above the .fla file etc.) but none of it seems to work, i have also checked that all of the symbols and movie-clips are named as they should be but nothing works. I know that the button is working fine because it changes the text when i click it.
Here is the action script i have.
/*The following four sections contain the data
/*for each menu item.
/* 0 */
var image0title:String = "kram";
var image0desc:String = "macclesfield, 2003";
var image0uri:String = "images/image0.jpg";
/* 1 */
var image1title:String = "kram";
var image1desc:String = "barcelona 2005";
var image1uri:String = "images/image1.jpg";
/* 2 */
var image2title:String = "kram & oringes";
var image2desc:String = "york, 2007";
var image2uri:String = "images/image2.jpg";
/* 3 */
var image3title:String = "kram";
var image3desc:String = "barcelona 2007";
var image3uri:String = "images/image3.jpg";
var currImage:Number = 0;
var totalImages:Number = 4;
menu_mc.title_txt.text = this["image"+currImage+"title"];
menu_mc.description_txt.text = this["image"+currImage+"desc"];
for (var i:Number = 0; i<totalImages; i++) {
slideShow_mc.slides_mc["holder"+i].loadMovie(this["image"+(i)+"uri"],slideShow_mc.slides_mc.getNextHighestDepth());
}
slideShow_mc.slides_mc["holder4"].loadMovie(this["image0uri"],slideShow_mc.slides_mc.getNextHighestDepth());
// function for the Next button
function nextMenuItem(eventObj:Object) {
slideShow_mc.gotoAndPlay("slide"+(currImage));
if ((currImage+1)>=totalImages) {
currImage = 0;
} else {
currImage++;
}
menu_mc.title_txt.text = this._parent["image"+currImage+"title"];
menu_mc.description_txt.text = this._parent["image"+currImage+"desc"];
}
// add the event listener for the button
next_btn.addEventListener("click", nextMenuItem);
any help/pointers would be appreciated
thanks
kram_snd
I tried the tutorial "building your first flash aplication" but instead of using the dimentions/text/images provided I decided to use my own to personalise it.
I folowed the step by step tutorial exactly, using the same names for the movie clips, images etc. I thought in theory all i needed to change was the text that i wanted to use.
What I have is a 550px X 400px stage with a transparent blue section at the bottom with 2 text boxs, and a "next" button.
When I test the movie and press next, the text changes as it should but the screen remains grey instead of displaying the photos.
I have tried moving the images folder to different locations (in the same folder as the .fla file, in the folder above the .fla file etc.) but none of it seems to work, i have also checked that all of the symbols and movie-clips are named as they should be but nothing works. I know that the button is working fine because it changes the text when i click it.
Here is the action script i have.
/*The following four sections contain the data
/*for each menu item.
/* 0 */
var image0title:String = "kram";
var image0desc:String = "macclesfield, 2003";
var image0uri:String = "images/image0.jpg";
/* 1 */
var image1title:String = "kram";
var image1desc:String = "barcelona 2005";
var image1uri:String = "images/image1.jpg";
/* 2 */
var image2title:String = "kram & oringes";
var image2desc:String = "york, 2007";
var image2uri:String = "images/image2.jpg";
/* 3 */
var image3title:String = "kram";
var image3desc:String = "barcelona 2007";
var image3uri:String = "images/image3.jpg";
var currImage:Number = 0;
var totalImages:Number = 4;
menu_mc.title_txt.text = this["image"+currImage+"title"];
menu_mc.description_txt.text = this["image"+currImage+"desc"];
for (var i:Number = 0; i<totalImages; i++) {
slideShow_mc.slides_mc["holder"+i].loadMovie(this["image"+(i)+"uri"],slideShow_mc.slides_mc.getNextHighestDepth());
}
slideShow_mc.slides_mc["holder4"].loadMovie(this["image0uri"],slideShow_mc.slides_mc.getNextHighestDepth());
// function for the Next button
function nextMenuItem(eventObj:Object) {
slideShow_mc.gotoAndPlay("slide"+(currImage));
if ((currImage+1)>=totalImages) {
currImage = 0;
} else {
currImage++;
}
menu_mc.title_txt.text = this._parent["image"+currImage+"title"];
menu_mc.description_txt.text = this._parent["image"+currImage+"desc"];
}
// add the event listener for the button
next_btn.addEventListener("click", nextMenuItem);
any help/pointers would be appreciated
thanks
kram_snd