• MooseHead

    (@moosehead)


    Hi everyone,
    I’m wandering if there’s a way to pass the title of a post on WP’s loop as variable inside a .swf file. In other words I have a dynamic textfield within my .swf waiting for an external variable to pass a certain info (the title of a post). Is this possible to do?

    I know that the title is called by <?php the_title(); ?> inside the loop…how would i get the information that this string calls and load it inside the .swf?

    tnx

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter MooseHead

    (@moosehead)

    Damn i’m bad at coding…ok I’m trying to create a variable inside the loop:

    <?php $the_title=$_POST["myTitle"]; ?>

    is this correct sintax or? I’m trying to say ‘the variable myTitle correspond to the title of the post’.
    Then i should find a way to pass this variable to a swf so that the title will be displayed inside the flash file (which contains a dynamic textfield).
    Any idea?? ??

    Thread Starter MooseHead

    (@moosehead)

    The idea I had is to circumvent the problem of embedding nonstandard fonts inside a css. Usual drawback for those who wish to have their web pages to display contents in a more fancy way. Well, to make it short, I though of using a .swf file to load the title of my posts and display them according to the font embedded in the swf!
    I’m trying to find out a way but so far no improvements…

    <?php
    $titolo = the_title();
    $vars = "" ;
    $vars .= "titolo=" . $titolo ;
    
    echo $vars ;
    ?>

    this is not the way apparently.

    Thread Starter MooseHead

    (@moosehead)

    Ok this is the code to include the swf (containing a dynamic textfield) and to assign a variable to be displayed.
    <div align="center"><object type="application/x-shockwave-flash" data="https://myserver/wp-content/themes/mytheme/var loader.swf" width="300px" height="40px"> <param name="FlashVars" value="&Title=myTitle" /> <param name="movie" value="https://myserver/wp-content/themes/mytheme/var loader.swf"></param><param name="menu" value="false" /> </object></div>

    one step forward..if i put this code outside the loop in the index.php of my theme it works fine. Instead, I want each post to have its instance of flash movie to display the relevant title. To do this i’d need to put the code directly inside the loop and get a string to send to the swf about the title. Interestingly the variable becomes undefined if I put the code within the loop!
    Does the_title() pass a string which i can put as variable for the flash movie?

    Has anyone come up with a way to get post_title assigned to a variable?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pass a post title to a .swf file within the loop’ is closed to new replies.