actionscript 3 - AS3 Flex dynamically loading images does not allow images' id -


I need to load some images dynamically (4-6) so that special image by clicking on the special action user Will. Embedding images solves the problem but at the cost of the file size. If I load them dynamically, they lose their ID.

  & lt; Comps: exercise slurl id = "scroller" x = "300" y = "100" ex1 = "@ embed (source = 'property / excars_1.png')" x2 = "@ embed (source = 'assets / excis_2. Png ') "/>  

And further it works, but it does not work immediately in CDATA:

  import components. Exercise Exercise; Private Wire custScroller: Exercisecroller; Private Function Init (): Zero {custScroller = New Exercise (); This.addElement (custScroller); CustScroller.ex1 = "@mubbed (source = 'Assets / Exce 1') ';}  

I thought it should be a trivial task, but so far I have not solved it

You can not use @band like that in your init () < The last line in the / code> function should be something like this:

  custScroller.ex1.source = "http://my.server.com/images/theRealImage.png";  

Some adjustments may be required for this, because I do not know For example, you may have to take the URL as string property, and the code inside the component is applied to the changes in the internal image.

By the way, by the way, I'm confused about why your code is not using a URL to refer to the replacement image, a relative path, J. That you show, believe that the files are already local, but you have said that you do not want to download them to the end user's machine, unless you make sure that the user gives them the URL they want As you wish, the result is obtained: The image is not downloaded unless you change the image of the source property.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -