Flash and javascript, Lightbox
I'm working with a mask within a flash document in which text can be entered to create a news archive. Typically, there will be a blurb, and then a link within dynamic text that opens a new web browser tab.
What I want to do instead opening a separate tab is to open a lightbox
overlay within the same web page.Up to now, I've used ActionScript
within other flash documents to trigger lightbox
windows, but I don't think that's going to be an option with this mask.
I saw that another user had a similar question. One person suggested an actionscript
response and buttons. That's not going to work from within the dynamic text in this case, I think.
This time, I tried plugging in the lightbox
code into the "link" box for the dynamic text. But Flash really objects. It hides or erases all the dynamic text from the point where I inserted the lightbox
trigger forward, and needless to say I can't get to the lighbtox
trigger within the .swf
file, let alone get it to load.
I don't know how to copy or post the raw code for the dynamic code, so instead I've made a simple copy of the .swf file that should show what I'm trying to do, and copies of what I believe are the relevant actionscript
sections. First, the link to the .swf:
available here:
I went ar开发者_JAVA百科ound and around with stack-overflow's interface, trying to paste in what I believe is the relevant actionscript
, but it came out very messy and difficult to read. Here's a link to to the ActionScript
:
http://dl.dropbox.com/u/35549996/ActionScriptForStackOverflow.txt
Thanks in advance for any suggestions.
If you want to do something other than the default when a link in a text is clicked, you can define a listener for the TextEvent.LINK event:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/TextEvent.html
精彩评论