Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 10 of 10

Thread: help with updating images on a html page?

  1. #1

    Fla Script help with updating images on a html page?

    hey all i'm updating my html pages through my flash website and backend but there is one problem with it when i go to the html pages i have editited the text and that changes but absolutely none of my images or styles bg colours etc...won't show up just white with plain text is what i get....

    Also is updating or adding a graphic to html from php the same principal as text??

    a little guidance? or direction?

    Cheers Peeps

  2. #2
    How are you storing the text, you could just edit the main HTML or create tags of your own.

  3. #3
    i'm not storing the text its updating from what ever i'm typing from flash straight into another text field in my html page so i guess its being help as just straight html text in the doc. What do you by edit the main html?? in what manner when i test the html doc on its on the design is working fine and its all there except the text because i haven't passed variables through to it from flash.

  4. #4
    so let me get this so I can help:

    you have main page viwed by public (HTML)
    then the admin panel (flash)

    how does the flash data get to the HTML?

  5. #5

    Fla Script

    FLASH:
    i use a POST Method which is sending my variables from flash using "loadVariablesNum" in flash to a PHP page.

    PHP:
    PHP Code:
    <?php
    $filename 
    $_POST["filename"];
    $theText $_POST["theText"];

    $theText = ($theText);

    $data fopen($filename"w");

    fwrite($data,$theText);

    fclose($data);

    echo 
    "File created or updated";
    ?>
    this gets my variables from flash and writes over any content with corresponding variables in my HTML document.

    HTML:
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>HTML Newsletter</title>
    <style type="text/css">
    <!--
    body {
    	background-color: #D6C18A;
    }
    -->
    </style></head>
    
    <body>
    <table width="100%" height="294" border="0" bgcolor="#D6C18A">
      <tr>
        <td width="2%" rowspan="3" valign="top">&nbsp;</td>
        <td height="43" colspan="2"><img src="Logos/mylogo.jpg" width="800" height="115" /></td>
      </tr>
      <tr>
        <td width="22%"><textarea name="theText" id="theText" readonly="readonly"></textarea></td>
        <td width="76%">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>
    this is my html code which recieves the variables from the php page and updates them accordingly. As the variable name "theText" is the same it updates.

    I Hope this is a bit more specific and clear...let me know if you need anymore info.

    PS. also im assuming i would use the same method to change images over etc correct??

    Cheers for the help so far!

  6. #6
    any body have any ideas how to get images to update and why it won't show my html design it just shows the variable text field with the correct text...what am i doing wrong??

  7. #7
    thats because its taking the raw file from what I assume, try in flash enetring:
    [code]
    <p>Testing Raw Data<img href="/images/example.pmg" /></p>

  8. #8
    ok i'll give it ago and let you know how i go with it.

  9. #9
    did it work:

  10. #10
    ummm i tried a few things with that but...where would be the correct place to put this code in flash as it's HTML??

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012