By inserting the asfunction into the href and listing the function, you can call the function from within the html text. I thought that was sort of the coolest thing ever. You may ask why not just use AS3's event listener (TextField.LINK) as joshiverson also describes. Well this is for a banner, which many Flash banner ad developers may know still requires us to use AS2 to meet publisher specs, which is a debate for another time. :/ For now I have stretching my google and problem solving skills!
function myFunc(arg:String):void {
trace ("You clicked me!Argument was "+arg); } myTextField.htmlText ='<a href="asfunction:myFunc,Foo">Click Me!</a>';
eLemonade
Tuesday, March 1, 2011
AS2 HtmlText Href listener
So a colleague of mine was working on an RSS reader that linked the title of the feed to the feed url. Problem was he was lumping all of the text into one htmltext field. This was fine until we realized we havefor something a colleague was working on we needed to be able to run a tracking script when a user clicked on an htmltext href link. After a fair amount of Googling, I found the answer here. As this was a truly glorious find, I named myself "Queen of the Mountain," of course. Anywho, the code joshiverson so generously provides is this:
Friday, November 19, 2010
Harry Potter Gryffindor Tie print out
I know this isn't one of the designs I listed above, but its something right? I didn't feel like buying an outfit for the Harry Potter party I am hosting (yes I know I am a total dork), so I designed this instead. I plan on printing it out on TShirt paper, like from Staples, and ironing it onto a tee shirt. Just thought I would share the design!
Voila!
Voila!
Thursday, September 30, 2010
Days of the Week Daily Design Challenge!
So I've been thinking I need to ramp up my design skills and portfolio, so I'm going to spend 15-20 minutes everyday just designing something. I've worked up a schedule based on areas of skill I want to ramp up and here it is:
Monday - Redesign a page. This can be your own website/blog, something for work, or any site.
Tuesday - Design a logo for something. This can be for yourself, work or something totally random like Flying Pig Man.
Wednesday - Design a letter. Yes stealing this one from Daily Drop cap, but its fun.
Thursday - Draw a cartoon character or object and redesign in Illustrator.
Friday - Create a collage of any kind expressing how you feel.
We'll see if I get to today's. Wish me luck!
-Liz
Monday - Redesign a page. This can be your own website/blog, something for work, or any site.
Tuesday - Design a logo for something. This can be for yourself, work or something totally random like Flying Pig Man.
Wednesday - Design a letter. Yes stealing this one from Daily Drop cap, but its fun.
Thursday - Draw a cartoon character or object and redesign in Illustrator.
Friday - Create a collage of any kind expressing how you feel.
We'll see if I get to today's. Wish me luck!
-Liz
Subscribe to:
Posts (Atom)