A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: loading on a container clip problem

  1. #1
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389

    loading on a container clip problem

    Hello,

    I'm very confused here.

    I had this fla where I was loading several clips onto the main timeline but I am now trying to load them into a programatically created container and I don't know where to place the function I was using to trace out if each of these was loading.

    I need to do it this way in order to be able to attach a mask to this container once I understand what I'm doing wrong.

    On each of these attached clips there is a function call to the main timeline where the code to load the images will exist but I am only getting the trace of one of them since the others are loaded at runtime.


    I am attaching the fla

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi Cap,

    In this case, you will be better off using _root.loading_function(this.id); inside of your box clip
    you can also use _parent._parent.loading_function(this.id);, but that will not work for the single big clip outside of your container.

    Have you also tried changing your while statement on the timeline to this, as it's cleaner and easier to read, does the same thing though.
    PHP Code:
    for (var d:Number c<= bd++)
    {
        var 
    box:MovieClip container_mc.attachMovie("picHolder""box" dd);
        
    box._alpha 65;
        
    box._xscale thumbScale;
        
    box._yscale thumbScale;
        
    box._x shiftX;
        
    box._y thumbY;
        
    box.id d;
        
    //trace(d)
        
    shiftX += thumbSpacing;

    Last edited by fruitbeard; 09-30-2014 at 08:01 AM.

  3. #3
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389
    I don't get it. I want to load my images into each one of the boxes, but before that I need to know how to communicate with them.

    Thanks for the reply, but it confuses me even more. I don't mind about that particular function now.

    I know it's a container_mc loading the boxes now, but when each of these loads it calls the main timeline. I obviously get: This box 1 has started loading...

    How can I get the rest of them to show they're loading?

    I tried your _parent._parent but I get no trace

  4. #4
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

  5. #5
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi Cap,

    It would help a lot if we could see the other fla files that you use.

    I said use _root. and not _parent._parent., if you read the post previous
    Last edited by fruitbeard; 09-30-2014 at 09:56 AM.

  6. #6
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389
    Hi, Fruit.

    I can't post my other two files for this, but they're very simple. One is for the picture and the other one loads the gallery from the slate in the picture. That's why I don't use _root.

    But, I'm almost there. The only problem I have is that I can't move the pictures. I thought I had fixed it since it does trace a clip with its id when clicking the button. Mind taking a quick look at it?

  7. #7
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi Cap,

    I think you might have some problems or need to rewrite the code for what you wish to now achieve, basically a movieclip can not have 2 parents
    and you are trying to swap the ids and positioniong of things not of the same clip and using the mask, good luck.

    Wish I could help more

  8. #8
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi Cap,

    I have it working where the big clip is also iniside container_mc and the mask moving it also.

    you can try to solve it from there on if you wish

  9. #9
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389
    I will,

    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