Hey there,
I'm trying to create a button that sends you to a webpage which you enter in an input text field on the button itself. I made the button(named teamLiquid_mc) and the textfield(named yourLink_txt) on the stage, since I'm not quite sure how to code that yet :P
I tried to put the input text into the URLRequest but that doesn't work(at least not the way i wrote it). So basically i wonder, what's wrong with my code? should i use classes instead, or write more separate functions for what's happening(and in that case, how would I go about that? ^^)?
I realize this is probably a pretty newbie question, but if anyone could help me out i would really appreciated it! I just recently started learning flash on my own and just can't wrap my head around to finding a solution to my problem, and what's wrong with what i already have :/ thanks a lot in advance!var _loadTL:URLRequest = new URLRequest("http://www." + yourInput);
var yourInput:TextField;
yourInput = yourLink_txt;
teamLiquid_mc.addEventListener(MouseEvent.CLICK, runLiquid);
teamLiquid_mc.addEventListener(MouseEvent.MOUSE_OV ER, startLiquid);
teamLiquid_mc.addEventListener(MouseEvent.MOUSE_OU T, stopLiquid);
function runLiquid(event:MouseEvent):void {
navigateToURL(_loadTL);
}
function startLiquid(event:MouseEvent):void {
teamLiquid_mc.alpha = 0.5;
}
function stopLiquid(event:MouseEvent):void {
teamLiquid_mc.alpha = 1;
}
teamLiquid_mc.buttonMode = true;
Kind regards, bloodstyle
edit: oh I just saw there was a newbie section.. if it should go there instead I'm sorry :/





Bookmarks