View Full Version : Multiple images in htmlText = error #2025
Zillosophy
04-04-2008, 12:16 PM
I'm thinking this is old and resolved but I can't find a solution. In FlashCS3 debugger I keep getting the error...
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.text::TextField/set styleSheet() ... set htmlText()... even touch its content
...when I set HTML content with multiple images into a TextField and then change it. No images causes no error as well as only a single image.
Zillosophy
04-06-2008, 12:20 PM
Any confirmation?
Where do I find a listing of the known bugs for Flash? Keep ending up with the list of flex bugs.
Zillosophy
04-10-2008, 04:04 PM
The only solution I have found is on hydrotik's blog and the consensus is that my problem is due to getImageReference only working on a single image or that something isn't quite working when unloading the images and that it can be resolved by loading them through a swf <img src="something.swf" />
http://blog.hydrotik.com/2007/12/19/as3-html-text-tags/#comments
It's good and all that it works but I really don't want something floating around with a url as it's name.
Thinking out load:
(Hmm actually this should/could/might/possibly work. but it requires getting to the TextField from the loaded swf which I haven't checked and could be hazardous for the sites health)
Make a function that replaces all img's src with a swf and stores their original src in an array along side the tags id. With that array of associated sources and ids the loaded swf should be able to determine it's request.url. The TextField would likely need to be extended to get images:Array in there and so the loaded swf doesn't need to go too far for it.
Gonna check that out - if someone noticed a flaw in the thought process, I'd like to know before I put a few hours into this.
[Edit:reason:I'm an idiot] To solve the problem I came here for all I needed to do was not reuse the same Textfield and no worries... but I'd still like to figure out a better way for hydrotik example
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.