hello guys,
have a new question for ya. I have a variable that i finally got from my php.
so i need some help. I have a movie clip in my fla called prods. I need to be able to get the variable which is placed in a text box called item_id and use it along with a URL to get an image.
example.
item_id = 12345
baseUrl = ‘http://www.mysite.com/images/’ + item_id.text + ‘.jpg’;
this was my attempt at getting it to show up
prods.addEventListener(Event.INIT, _changeImg);
function _changeImg(evt:Event):void{
var idStr:String = item_id.text;
var BaseUrl = 'http://www.mysite.com/images/' + item_id.text + '.jpg' ;
if(item_id.text != null){
prods.addChild(BaseUrl);
}
}
this is where i am confused… would i have to put an event listener on the movie clip where i want the image to be placed? or would i put it on the text box which gets this variable? further more what kind of Event Listener would i need to accomplish this?
any code snippets would be greatly appreciated as i am totally confused on this…