html - how to embed swf file in ahref tag? -
I have a href tag I want to embed an embedded SVF tag in an href, I do not want to add events to SWF Wish, a href link is to be separated and dynamic. Underestand it? What can i do
OK Reply:
1. Used in TextField's HTML text property Process HTML: - and Lieutenant; A & gt; ... & lt; / A & gt;
Arrays to the strings
- Check if the array string contains
and are inside strings and
{url: hrefFromString, img: idFromString, object: null}
new arrays
2. Create MouseDownHandle:
Function MouseDownHandler (E: Mouse Event): Zero {for (var i: uint = 0; I & lt; array.label; i ++) {if (e.target == array [i] . Ojject) {Navigate to URL (new URLREECC (array [URL]. URL); }}
3. Add such addEventListener event. To textfile with ADDED handler:
for (var i: int = 0; i & lt; array.length; I ++) {var dsp: loader = textField.getImageReference (Array [i] .img) as a loader; If (dsp! = Null and array [i] .object! = Null) {array [i] .object = dsp; Dps.addEventListener (MouseEvent.MOUSE_DOWN, MouseDownHandler); Dsp.mousChildren = false; }}
Finito! Remember to add the html id for images you do not have a mouse cursor cursor only! Sample:
& lt; A href = 'http: //...'> & Lt; Img id = 'img1' src = '...' & gt; & Lt; / A & gt;
Comments
Post a Comment