hi,
How can you make links to actions in a textfield for Ipad?
if I put <a href="event:someaction()" >action</a>
I get an error: safari doesnt know how to open this link.
hi,
How can you make links to actions in a textfield for Ipad?
if I put <a href="event:someaction()" >action</a>
I get an error: safari doesnt know how to open this link.
onclick in the plugin element
Hi!
Hm....
it's realy don't work (works for PC but not for HTML5)
Well... you can use a little trick
put <a href="javascript:someaction()" >action</a>
and in html put
script
function someaction(){
var krpano = document.getElementById("krpanoSWFObject");
krpano.call("yourKrpanoAction()");
}
/script
Hope it's help
Andrey
All my texfield actions use ondown/onclick on iPad which works ok if there just one action needed per plugin.
It would be a good idea for textfield to do what you're saying internally.
Well basicly Im making a breadcrum. Home -> floor 1 -> location.
I have an action that puts textstrings together and makes links of m, which work perfectly fine in flash, but safari complains.
I could do it with multiple textfields and just one ondown per textfield (global on the plugin, not internally on the text). But since the breadcrum is automaticly made, I would need to check how long the text is, so the next one fits perfectly next to it with the correct letterspacing, and the arrows -> would be repeated couple of times. Which is ofcourse is not the optimal way.
The javascript version would work, I guess, thanks! But im still secretly hoping on support of Klaus :) I need to make it both work on flash and ipad (and javascript wouldnt work in fullscreen flash). And I rather would not make a extra check, for maintenance sake.
Thanks for thinking with me :)
I've done what you said with multiple plugins. But I'm about to scrap it. Calculating the exact length of the plugin is too complex with modern typography.
Why can you use txtadd and js calls in the href to replace event:?
I can, but it means that I have to write 2 breadcrums, one for flash and one for ipad. Flash in fullscreen mode doesnt allow javascript (security). Not a problem, just a hassle.
Oh, I forgot about that.
Thanks for stopping me from wasting my time.
Yes, you'll have to do it the way I've been doing it but you still have the serious issue of trying to find out what size to make each textfield.
For instance these are both 10 characters.
(iiiiiiiiii)
(wwwwwwwwww)
I'm not sure if there are any PC/Mac compatible block fonts.
If you learn anything let me know.
best way atm would be making 2 textfields, one with devices="flash" in which you put the event:action() stuff and other with the ipad links in it js(action());
other way would be using conditions to create a string of text.
if(isflash,
set(_html, '<a href="events:action()" >link</a>');
,
set(_html, '<a href="js(openlink(thelinkoraction, url))" >link</a>');
);
copy(plugin[tf].html, _html);
javascript:
function openlink(url,type){
if(type == "url"){
window.open(url);
} else {
krpano.call(url);
}
}
Ipad doesnt have fullscreen, and the viewer is based on javascript, so there is no problem using javascript for links.
you can use txtadd to chain multiple links and dashes/arrows -> That way the html stays in 1 textfield, so you dont have issues with placing text next to eachother
Don’t have an account yet? Register yourself now and be a part of our community!