A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Alternative to URL request Method

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    8

    Alternative to URL request Method

    Ok i feel really dumb asking this question because it seems like basic actionscript3, i;ve been searching stuff (maybe over complicating it a bit) but i can't figure it out.

    Oh kay here it goes, i want to load this swf from the library in the flash movie not from the URL but i can't figure out how to do it via linkage and such....any help is much appreciated. hopefully you guys actually give me answers unlike actionscript.org >.>

    Please and thank you


    Code:
    var skrolDefaultPath:URLRequest = new URLRequest("skrol_basic.swf");
    
    
    
    
    var skrolLoad3:Loader = new Loader();
    var mySkrol3:MovieClip;
    var myContent3:skrolContent3 = new skrolContent3();
    skrolLoad3.load(skrolDefaultPath);

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Import your swf into a MC...in the library go into that MC's properties and check 'export for actionscript'. You'll see the 'Class:' field automatically fill in, whatever is in there is the class name that you'll need (let say Skrol).

    In your code now, you can make a new copy of that MC just like any other object:

    PHP Code:
    var mySkrol3:MovieClip = new Skrol();
    addChild(mySkrol3); 

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Posts
    8
    I think your gonna have to have my children now....


    Thanks alot man, so far on three forums nobody has answered me and it seemed simple. Again thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center