Welcome, Guest
  • Author Topic: load different swf in one loader component  (Read 10985 times)

    shahzeb

    • Jr. Programmer
    • **
    • Posts: 77
      • View Profile
      • Email
    load different swf in one loader component
    « on: 05/09/06, 07:44 »
    I have one loader component name "myloadder" and my main file name load_swf
    and two swf  one is " swffile.swf " and second one is " second.swf "   

    one button load swffile.swf into myloadder component and another button load second.swf into myloadder component. problem is only swffile.swf load into component other not. i dont know why.

    here is my both button code

    it doesn't work

    on(release)
    {
       _root.myloadder.contentPath="second.swf";
       _root.myloadder.content._lockroot = true;
    }


    its work

    on(release)
    {
       _root.myloadder.contentPath="swffile.swf";
       _root.myloadder.content._lockroot = true;
    }

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: load different swf in one loader component
    « Reply #1 on: 05/09/06, 07:52 »
    Use loaderInstance.load([path]) instead of contentPath

    Jorge

    shahzeb

    • Jr. Programmer
    • **
    • Posts: 77
      • View Profile
      • Email
    Re: load different swf in one loader component
    « Reply #2 on: 05/09/06, 09:15 »
    try it yourself it do not display in proper manner.. then let me know

    thanks

    nothingGrinder

    • Mods
    • Systems Administrator
    • *****
    • Posts: 823
    • Automatic websites with social media distribution
      • View Profile
      • nothingGrinder
    Re: load different swf in one loader component
    « Reply #3 on: 05/09/06, 09:53 »
    should be

    myLoadder.load("myswf.swf");

    im not sure what you mean by it doesnt display right? could you provide some detail.

    shahzeb

    • Jr. Programmer
    • **
    • Posts: 77
      • View Profile
      • Email
    Re: load different swf in one loader component
    « Reply #4 on: 05/09/06, 10:10 »
    I mean to say that it load the swf but it doesn't load in the specific location it load in the bottom of the movie. you would easily understand when u try it urself.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: load different swf in one loader component
    « Reply #5 on: 05/09/06, 10:48 »
    I don't like this component, but it works. In fact, this tutorial (the picture on the upper corner) use a Loader component, check it: http://www.flash-db.com/Tutorials/databind/CatalogTutorial.php?page=7

    Jorge

    shahzeb

    • Jr. Programmer
    • **
    • Posts: 77
      • View Profile
      • Email
    Re: load different swf in one loader component
    « Reply #6 on: 05/10/06, 01:17 »
    Its seems to me that there is a bug in a loader component. its load swf but not in the same place and same font. if anyone got an answer of this. let me know.

    why macromedia has provided this on the help panel.

    loaderinstancename.load([path]);           Fail

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: load different swf in one loader component
    « Reply #7 on: 05/10/06, 01:50 »
    I'm skeptical, but if you really think is a bug, report to Adobe explaining your problem, but be carefull: usually the first way of solving the problems is saying that's a soft bug.

    Jorge

    shahzeb

    • Jr. Programmer
    • **
    • Posts: 77
      • View Profile
      • Email
    Re: load different swf in one loader component
    « Reply #8 on: 05/10/06, 03:23 »
    so what about u people how do u load external swf file in flash using movieclip or loader component.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: load different swf in one loader component
    « Reply #9 on: 05/10/06, 03:58 »
    I use loadMovie and my own preload

    Jorge

    shahzeb

    • Jr. Programmer
    • **
    • Posts: 77
      • View Profile
      • Email
    Re: load different swf in one loader component
    « Reply #10 on: 05/10/06, 05:42 »
    Dont mind just for the knowledge I am asking u  why dont u use loader component Macromedia provided this component to load external swf??

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: load different swf in one loader component
    « Reply #11 on: 05/10/06, 05:45 »
    Problems on resizing, more weigth, less control

    Jorge