![]() |
|
||||||||||
|
|||||
|
Регистрация: Oct 2005
Сообщений: 4
|
Собственно сабж: при подгрузке внешнего файла (изображение) в ScrollPane тот не показывется в scrollpane, а ложится поверх. Глюк замечен только в IE и подобных браузерах (коих, согласитесь, большинство у пользователей). При обновлении страницы во 2-ой и последующие разы - все ок. В огненном лисе (fiefox), такой проблемы не возникает в принципе... И тут возникает вопрос: кто виноват и что с этим делать....
![]() |
|
|||||
|
Регистрация: Oct 2005
Сообщений: 4
|
ну есть же проблема, господа, вот что я еще нарыл по этой теме:
Flash TechNote A JPEG loaded into a ScrollPane component displays incorrectly and may generate error Issue When loading a JPEG directly into the ScrollPane component, certain images may display incorrectly (for example, the JPEG may display outside of the component borders) or may result in an error. The error indicates a “*** Security Sandbox Violation *** SecurityDomain” error even though cross domain security is not enforced in the authoring environment. The images affected tend to be those which are large in size, those which take some time to load, or a file in which the images switch rapidly. Solution To correct the render problem and update the ScrollBars of the ScrollPane, call the setSize method of the ScrollPane component after the image has been loaded. Load a movieClip from the library that will, in turn, load your JPEG image to be able to detect when the image had loaded completely, triggering the setSize method. To workaround these issues do the following: 1. Insert a new MovieClip with a Linkage ID in the library 2. Put a Loader component in this movieClip and assign an instance to it 3. Create an event listener for the Loader Component or use an onEvent Handler to detect the load "complete" event 4. When the event is triggered, target the Parent ScrollPane component, calling the setSize method Note: You don't actually have to change the dimensions of the ScrollPane, and you can specify the existing width and height values as parameters in the method. Consider the following example: On the timeline with ScrollPane instance name “myScrollPane” var myScrollPane:mx.containers.ScrollPane; myScrollPane.contentPath = 'Holder_mc'; myScrollPane.content.myLoader.contentPath = "http://<path to your JPEG>"; In the Holder_mc movieClip in the library with Loader instance name “myLoader” var myLoader:mx.controls.Loader; var myObj:Object = new Object(); myObj.complete = function(obj) { obj.target._parent._parent.setSize(obj.target._parent._parent.width, obj.target._parent._parent.height); }; myLoader.addEventListener("complete", myObj); |
![]() |
![]() |
Часовой пояс GMT +4, время: 17:42. |
|
|
« Предыдущая тема | Следующая тема » |
|
|