Styling Textfield plugin for Flash AND iPhone/iPad: strange behaviour

  • I'd like to use the textfield plugin for both the Flash viewer and the iPhone/iPad viewer. However, I can't get the css styling to work on any of them. Here's the XML I use:

    Code
    <plugin
    name="heading"
    url="swf/textfield.swf"
    x="20"
    y="10"
    html="[span]This is the heading[/span]"
    css="span{color: #ffffff; font-weight: bold; font-family: sans-serif; font-size: 14px; text-align: left;}"
    />

    This doesn't work in the Flash viewer, neither in the iPhone/iPad viewer. In the iPhone/iPad viewer, this is the source code that is generated:

    Code
    <div style="width:100%;height:100%;border:1px solid rgba(0,0,0,0);span{color: #ffffff; font-weight: bold; font-family: sans-serif; font-size: 14; text-align: left;"><span>This is the heading</span></div>

    That doesn't seem to be valid html/css (a style declaration for a specific html-element inside a 'style'-attribute won't validate). Could this be a bug?

    Einmal editiert, zuletzt von pdp (1. März 2012 um 15:50)

  • I may not be the best person to talk to about textfields, but I had the same problem on my ipad, sometimes they were not there, sometimes there, sometimes wrong style.

    So I edited the hotspot image in photoshop with what text I wanted and added it in as a new plugin.

  • Hello Klaus,

    I've followed to the release notes and clicked the link on my ipad and the textfield worked as it should. I even went to the textfield plugin page and tested it from there as well and it worked. I found a page in this forum that had the xml but when using it within my own code it doesn't work. I've downloaded the latest release but nothing. Can you actually provide the correct xml to the group. I'm sure others are having the same issue and could use the code.

    Thanks,

    Robert

  • What xml doesnt work where? The new js version is pretty nice. You dont have build your own javascript calls to replace events.
    Some notes.. p font size in css are halved automatically for iphone, but not other tags.
    If you're having issues, post a link to your tour.

  • Sacha,

    Klaus points to the example in the release notes for textfield and it works on the ipad as an example. The example on the plugin page shows version 1.0.7. If I use the code from that archived download with the new js and swf, it simply doesn't work on the ipad. the text is distorted plain and simple. Works great on flash. I even tried Michel's code found here and it does not work!My point is not all of us on this site are programmers, I can follow examples but not providing them doesn't help anyone. If the new JS is as good as you say then why not provide a sample of what can be done. This textfield plugin has been in the works for a year and it still is a mystery. If you want to be paid to give me an example then send me a private message and I will pay you.

    Thanks,

    Robert

  • Haha.. 1.0.7 is quite erroneous. You can press "O" or the secret swipe up on ipad/iphone devices to bring up the console which indeed shows the example to be "current". The plugin page shows exactly what can be done.
    This is the code.
    http://www.krpano.com/examples/textfield/textfield.xml

    You can find the code to any krpano project by viewing the html source and hunting for the xml used.
    http://www.krpano.com/examples/textfield/
    this project works just fine on my ipad / iphone

    Anyway, I took the example code and made you a special archive guaranteed to work based on 3/16.
    http://www.seeit360.com/krpano/textfield.zip


    Sacha,

    The example on the plugin page shows version 1.0.7. If I use the code from that archived download with the new js and swf, it simply doesn't work on the ipad. the text is distorted plain and simple. Works great on flash. I even tried Michel's code found here and it does not work!My point is not all of us on this site are programmers, I can follow examples but not providing them doesn't help anyone. If the new JS is as good as you say then why not provide a sample of what can be done. This textfield plugin has been in the works for a year and it still is a mystery. If you want to be paid to give me an example then send me a private message and I will pay you.

    Thanks,

    Robert

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!