PDA

View Full Version : Problem Loading external swf in a scrollpane


alvin009
04-28-2008, 03:48 PM
Hello everyone.

I have an issue that I am hoping someone can help me with.

I am displaying an external diagram picture (swf) in a main scroll pan using AS2.0. I want to load some external objects (swf) on top of the diagram from another object scroll pan.

My problem is when I am drag & drop the object from object scroll pan to main scroll pan the diagram picture get disappears. Please check following code.

When I am loading the external swf object then the scroll pan is just loading 1 object at a time and not allowing to move the object.

The external objects are not working so I have also tried with internal library, So when I am loading the objects from internal library then also it is removing the diagram.

On Button click load the diagram image
main_scrollPane.contentPath = "clips.swf"; // (code is working)
// main_scrollPane.contentPath = SwfDiagramPath;

To load the internal object from library

var mcMain:MovieClip;
main_scrollPane.contentPath = "Container";
mcMain = main_scrollPane.content;

var Controls:MovieClip = mcMain.attachMovie("mc_Label","Lbl"+lbl_count, mcMain.getNextHighestDepth(),position)

To load the external movie object I have used following code
var moviefile:Array = new Array;
moviefile ['name'] = "floor";
moviefile ['path'] = "floors/First.swf";

//. . . . some code

moviename = moviefile ['name'];
objectDepth = objectDepth+1;

var clip:MovieClip = main_scrollPane.content.pane_mc.createEmptyMovieCl ip(moviename objectDepth);
// // pane_mc is the name of the name of the movie clip which is in the “clips.swf”
clip.loadMovie(moviefile['path']);
clip._x = 50;
clip._y = 50;


I appreciate any help.

Thanks!
Alvin

asf8
04-29-2008, 02:48 PM
I have an issue that I am hoping someone can help me with.

Please keep your questions in the forums, and not by PMing people. Thanks.

ASWC
04-29-2008, 02:51 PM
You already PM me twice, please stop. I assume that you are doing that for a lot of people, please stop that as well. People read the forums and if they can/want to help you, they will. If you keep PM people they might not help you at all and you might even get banned.

atomic
04-29-2008, 02:51 PM
Attach your .fla to the forum...

alvin009
04-29-2008, 03:43 PM
Thanks for your reply

The zip file is big so I can’t attach it. Please download the Zip file from this URL
http://www.4shared.com/file/45785385/27d6e8bd/workFlows.html

Regards.
Alvin

atomic
04-29-2008, 10:24 PM
No diagram in your zip?

20 Ton Squirrel
04-30-2008, 03:47 PM
I, too, recieved desperate missive... drawing a Dark and Hungry squirrel from hibernation. I realize your deadline makes you desperate, but posting AND PM'ing people is considered bad form.

That being said, your issue is likely either depth-collision or pathing. I strongly recommend you bring up the debugger on a test-publish and see what is going on with your clips as they are loading.

At the moment of error-impact, is your clip being overwritten? Is it being dropped below depth of another clip?

I'm just shooting in the dark here since I don't have the project in front of me. I'm also not awake yet. Anyone have some caffeine? Cashews?

/yawn

alvin009
05-01-2008, 11:50 AM
Hi atomic

I have uploaded the new zip file on following URL please check the code

http://www.4shared.com/file/46010693/c7460644/Scrolpan_sample.html

Regards