Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

displaying images from xml

Guest
Nov 18, 2008 Nov 18, 2008
i am trying to display images taken from a mysql db in a text area inside flash 8. i can get the text taken from the db to display but for the images i just get null.

the xml sheet loaded into flash is generated from php running queries from the db. the images i want to be displayed are passed into flash from the xml sheet in the following format.

<image> <img src='image/thumbs/construction/internal/thumb87.jpg' /> </image>

i have now been trying to get this to work since last friday and would just like to know if it is possible to do this and if so where am i going wrong.

i can post any of the code i have created if needed.
TOPICS
ActionScript
538
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 18, 2008 Nov 18, 2008
I should have seen it with your first message, but didn't realize that was supposed to be an html tag (just like the xml parser didn't)... Dealing with html tags in xml data is something I just learned about this past weekend (I'm no xml expert... nor much of any other kind as well).

You have to exclude the html tags you use from being read as xml tags. Apparently what I show below is how it is done... surrounding it all with <![CDATA[ ..... html stuff.... ]]>

<image> <![CDATA[ <img src='image...
Translate
LEGEND ,
Nov 18, 2008 Nov 18, 2008
Can you post the code where you are extracting/saving the image strings from the xml fed in?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 18, 2008 Nov 18, 2008
thanks for your reply here is the code i am using to query the db and the code i am using top try and display the results in flash with. the first post contains the php code i wil post the flash action script now
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 18, 2008 Nov 18, 2008
here is the flash code
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 18, 2008 Nov 18, 2008
I should have seen it with your first message, but didn't realize that was supposed to be an html tag (just like the xml parser didn't)... Dealing with html tags in xml data is something I just learned about this past weekend (I'm no xml expert... nor much of any other kind as well).

You have to exclude the html tags you use from being read as xml tags. Apparently what I show below is how it is done... surrounding it all with <![CDATA[ ..... html stuff.... ]]>

<image> <![CDATA[ <img src='image/thumbs/construction/internal/thumb87.jpg' /> ]]></image>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 18, 2008 Nov 18, 2008
thanks for the reply i have modified the php page now to that it encapsulates the image inside the CDATA tag but it now fails when it gets to the loading the image section. it prints out the first part of the text but the image fails to display still.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 18, 2008 Nov 18, 2008
i had missed the ">" before the closing image tag thank you for all your help on this i was nearly pulling out what little hair i have on my head trying to work this one out.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 18, 2008 Nov 18, 2008
put ]]> at the end, you only have ]]
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 18, 2008 Nov 18, 2008
Hair loss is a side effect alot of us suffer... from the pulling and all.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 18, 2008 Nov 18, 2008
LATEST
thanks again. i will need to look into hair replacement products sooner rather than later if i get stuck like that again. well at least i can always be happy in the knowledge that i will definitely not be the last and will not be the only bald programmer.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines