PhotoDune

Flash newbie help - preloader to load external swf

23 posts
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
booger57 says

Just a quickie (easy one) for a newbie…...my preloader has this as:


onClipEvent (load)
{
    tl = _root.getBytesTotal();
}
onClipEvent (enterFrame)
{
        pt = int(ld/ tl* 100);
    ld = _root.getBytesLoaded();
    gotoAndStop(pt);
    if (ld == tl)
    {
     _root.pre.gotoAndPlay(2);
    } 
}

What do I change in the above as to load an external swf (e.g. main.swf) in the same root folder?

Thanks

730 posts
  • Bought between 1 and 9 items
  • China
  • Elite Author
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 10 and 49 users
  • Sold between 100 000 and 250 000 dollars
wangruyi says

this is flash 5 actionscript. why not buy a new version with load external swf on FD?

23 posts
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
booger57 says

I actually have Flash CS3 and am learning from the beginning, starting with preloaders, ones I got from here to learn from – the AS above was from a file I bought here.

23 posts
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
booger57 says

I actually have Flash CS3 and am learning from the beginning, starting with preloaders, ones I got from here to learn from – the AS above was from a file I bought here.

27 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Sold between 5 000 and 10 000 dollars
  • United States
sparias says

Hi bogger, when loading an external file you can do this:

1 – Insert a preloader on the loaded movie, and change the ‘_root’, to ‘_level1’ or the level that you are loading the movie into.

607 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • India
  • Referred between 1 and 9 users
sanju1979 says

hi booger…sparia told u the expert way! do it exactly..u would get the right results…but but but…this thing only work if u loading it on a level…

if u loading inside a movieclip of level 0 means your parent movie..then just giv ethe complete path…

suppose u loading grandson.swf in father movieclip inside grandfather father.swf

then in preloader of grandson.swf you would give path like

_root.father where in _root will be your grandfather swf and father is your movieclip inside grandfather swf and grandson.swf is your external swf

if u need some more assitance…

cost: usd 15

paypal link: http://www.sanjeevverma.in/paytosanju.html

time: 1 hour

discuss: sanjeev_verma_79@yahoo.com

thanks

23 posts
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
booger57 says

@ sparias Thanks. I was playing with the idea of loading the content into frame 2 of the preloader file (as suggested by the developer of the file I’m using) but your way sounds more practical.

@ sanju1979 Why do you always offer to help people for $15? Every question I ask, you offer to assist for $15

I thought the object of a community forum was to offer help and advice to each other? If someone posted for advice or help on a web design issue that I knew something about, I would help. As it happens, I am not a Flash developer, so I ask for simple help with Flash so I can learn, and I ask here because a lot of the files I am learning from come from here.

by
by
by
by
by