ActionScript 2.0 :: Targeting Swf Loaded With LoadClip()

Feb 21, 2010

I'm having a really weird problem with loadClip(), using Actionscript 2.0. Basically, I have a main .swf, into which I am loading another .swf using loadClip(), on the click of a button. It loads into an empty movie clip on the timeline of the main .swf called container_mc. So far so good, this works.

The problem comes when I am trying to control a movie clip instance that lives on the timeline of the external .swf. This clip has the instance name test_mc, and I'm trying to control it using the reference _level0.container_mc.test_mc. I have also tried just plain old container_mc.test_mc.

Neither of these work, though when I apply a trace to test_mc on the timeline of the external swf (test_mc.onRelease = function () { trace(this); }), it returns the path _level0.container_mc.test_mc (when clicked on after being loaded into the main movie, obviously).

I've attached a couple of files demonstrating the problem I'm having. It seems to me that the problem is probably something a little amiss with my code, as in theory I'm pretty sure what I'm trying to do is perfectly possible.

View 1 Replies


Similar Posts:


ActionScript 1/2 :: Targeting Swf Loaded With LoadClip()?

Feb 7, 2010

Basically, I have a main .swf, into which I am loading another .swf using loadClip(), on the click of a button. It loads into an empty movie clip on the timeline of the main .swf called container_mc. So far so good, this works.
 
The problem comes when I am trying to control a movie clip that lives on the timeline of the external .swf. This clip has the instance name test_mc, and I'm trying to control it using the reference _level0.container_mc.test_mc. I have also tried just plain old container_mc.test_mc.
 
Neither of these work, though when I apply a trace to test_mc with Actionscript on the timeline of the external swf (test_mc.onRelease = function () { trace(this); }), it returns the path _level0.container_mc.test_mc (when clicked on after being loaded into the main movie, obviously).

View 5 Replies

ActionScript 2.0 :: Targeting Swf Loaded With LoadClip()?

Feb 21, 2010

I have a main .swf, into which I am loading another .swf using loadClip(), on the click of a button. It loads into an empty movie clip on the timeline of the main .swf called container_mc. So far so good, this works.The problem comes when I am trying to control a movie clip instance that lives on the timeline of the external .swf. This clip has the instance name test_mc, and I'm trying to control it using the reference _level0.container_mc.test_mc. I have also tried just plain old container_mc.test_mc.

Neither of these work, though when I apply a trace to test_mc on the timeline of the external swf (test_mc.onRelease = function () { trace(this); }), it returns the path _level0.container_mc.test_mc (when clicked on after being loaded into the main movie, obviously). I've attached a couple of files demonstrating the problem I'm having. It seems to me that the problem is probably something a little amiss with my code,

View 1 Replies

ActionScript 2.0 :: Duplicate Loaded Movieclip Using LoadClip?

Aug 14, 2009

I am trying to dublicate a loaded movie clip multiple time. Below is the code. I am wondering if someone can advice on how to dublicate it using loadClip method.

[Code]...

View 2 Replies

ActionScript 2.0 :: Flash8 Control A Mc Within A SWF Loaded With Loadclip?

Nov 21, 2009

I have the following code:

Code:
_root.TemplateListener = new Object();
_root.TemplateListener.onLoadComplete = function(target_mc:MovieClip):Void
{
trace (_root.mcBalloonBase.mcTemplate); // undefined[code]........

The loaded SWF 'bt_latex10.swf' have an instance named 'mcTemplate' in its stage. Since it is being loaded into a new empty movieclip called 'mcBalloonBase' that is at the stage of main movie, why it is returning undefined? How can I access the 'mcTemplate' after it be loaded?

View 2 Replies

ActionScript 2.0 :: Transparent PNG Image Loaded With LoadClip

Feb 11, 2009

I want to load a PNG image using loadClip() and place it into a movieclip. After the image is loaded I set an event handler, in this case onPress. Now my problem is that the onPress event activates whereever I click on this loaded PNG image. All I want it to do is to only fire the event if I press on a non-transparent area of the PNG image. In the end, I want to load a background image and put this PNG image over it. The PNG image shall act like a mask which tells the background image where I can click and where I'm not supposed to. But before I can do that I need to recognize transparent areas of an imported PNG image.

View 1 Replies

ActionScript 2.0 :: Detecting When LoadClip Has Loaded Its Image?

Aug 24, 2009

I'm working on an image pre-loader where i get the images i want from their respective url's, and once finished, proceeding to the next page. I have gotten it to load the images as i want/need, through lines of code similar to this:

Code:
var loader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip("imgcont",1);
loader.loadClip("*url to img goes here*",imgcont);

All i'm looking to find is how many of my images have loaded completely. At first, i thought that getBytesLoaded() and getBytesTotal() would have been able to help me, but it seems that the images brought in through loadClip has no weight on how much has been loaded.

Is there any way of determining how much of those images has been loaded?

View 5 Replies

ActionScript 2.0 :: LoadClip Loaded Swf Movies Need To Control Each Other

Oct 24, 2009

I have a main Movie that I'm using loadClip into empty HolderMc's. I am using listener inits and they are loading and working fine independently. the main movie loads swf A and B. I have a button in swf A needs to tell swf B (headHolderMc) to change:[code]I've tried _root.headHolderMc._alpha = 100; but nothing works.[code]

View 7 Replies

ActionScript 2.0 :: Dublicate Loaded Movieclip Using LoadClip?

Aug 16, 2009

I am trying to dublicate a loaded movie clip multiple time. Below is the code.how to dublicate it using loadClip method.[code]...

View 1 Replies

ActionScript 3.0 :: Targeting A Loaded Swf

Nov 11, 2009

1. I'm loading an external swf onto my main swf.
2. Then I'm tweening an object which is separate to the loaded swf.
3. When the tween has completed I'm calling a function to make the loaded swf gotoAndPlay(2);

[Code]....

View 8 Replies

ActionScript 2.0 :: Targeting Loaded .swf?

May 1, 2003

this code is working to load and position the external swf, but it won't gotoAndPlay to the frame inside the external swf--what am doing wrong here?

PHP Code:

bio.onPress=function()[code]......

View 3 Replies

ActionScript 1/2 :: Targeting The Timeline Of A Loaded Swf - AS2

Feb 9, 2010

I'm loading an external swf into a project and I want to be able to start and stop the loaded swfs timeline at will.... I'm loading swf into an MC: loadMovie("myFile.swf", swfHolder_mc);

View 1 Replies

ActionScript 3.0 :: Targeting Mc's Within Externally Loaded .swf?

May 26, 2009

I have an .swf which I call into a loader identified as "level_". I want to do a hitTest between a MovieClip in the main file and a MovieClip on level_'s Stage. In AS 2.0, the path would've been: this.level_.wall0

I get this error: 1119: Access of possibly undefined property wall through a reference with static type flash.display:Loader.

Tracing the .numChildren of the loaded .swf reveals that it has zero children. Within that .swf wall0 and the other MovieClips are instances dragged from the Library and given names. So what am I missing? Is the problem that wall0 hasn't been properly added as a child in the externally loaded .swf? Or is it something I need to resolve in the main .fla?

View 2 Replies

ActionScript 3.0 :: Problems Targeting A Loaded Swf

Apr 18, 2010

When you click the about button on my site, I am using this function to load in an external swf, about.swf. When I click on another nav button, I want to communicate with the about.swf and call a function within that swf called bailout(). But how do I target it? Nothing I try works. I've messed with getChildAt but don't know how it works.
Would it be ..... theholder.aboutLoad.bailout()??? That doesn't work. How do i target the function within the about.swf file?

[Code]...

View 3 Replies

ActionScript 2.0 :: Absolute Targeting In A Loaded Swf?

Sep 15, 2004

i'm in the process of building a movie that is to be loaded and played into another main swf. the targeting (which is multi-level) works fine when the movie is played by itself but when it's loaded and played in the main swf some of the targeting doesn't work. i've tried using _parent. and stuff like that but it's not working. any ideas? can someone point me in the right direction? the frustrating thing is that some of the targeting does work.

View 1 Replies

ActionScript 2.0 :: Resize LoadClip Image - Return 0 When The Image Loaded Is Obviously Much Larger Then 0 Pixels

Dec 13, 2007

Some images I load dynamically are too big so I would like to scale them to fit the stage.

[Code]...

this returns 0. Why does it return 0 when the image loaded is obviously much larger then 0 pixels. How do I change the width and height of imgCont to a specified dimension.

View 1 Replies

ActionScript 2.0 :: Targeting Dynamically Loaded Swfs?

Mar 21, 2006

Having trouble targeting movieclips in a dynamically loaded swf. (Flash 8, Actionscript 2).I have a swf file, which contains a set of duplicated movieclips, that I am loading into another swf file (using the movieClipLoader() class), basically like this: "swfA" is loading into "swfB", and I have clips 1, 2, and 3, inside "swfA."I don't seem to be able to mouseover and click clips 1, 2, and 3, when "swfA" is loaded into "swfB". But when I run "swfA" on it's own, the clips are active and clickable.I've tried setting "this._lockroot = true;" at the top of "swfA", and tha in the duplicating script, but still no luck targeting the clips.I usually execute the duplicating script on the main swf (swfB), but I wanted to contain everything in a swf, thinking it might be simpler. But the targeting problem has me scratching my head.

View 1 Replies

ActionScript 2.0 :: Targeting Loaded Object / Movie

Jun 29, 2007

I am doing a dynamically loading gallery by way of xml, now, i have the loading of the images going to where flash sizes them and puts them down as thumbs, all i want to do is when the user clicks on the thumb that already loaded image gets duplicated into the main area full size.... for the life of me i can't figure it out, it seems like it would be simple enough but i have been pulling my hair out for the longest..... by the way the publish settings are actionscript 2.0 with fp8.

View 5 Replies

ActionScript 3.0 :: Targeting A Button Inside Dynamically Loaded SWF

Jun 4, 2010

I have a main.swf which loads a sub.swf. Inside the sub.swf is a button instance (myBtn). How do I access myBtn from main.swf timeline?

View 7 Replies

Actionscript 3.0 :: Targeting A Movie Clip Inside A Loaded Swf?

Jun 10, 2009

I loaded this "slider" swf into a "sliderHolder" on my index swf file. inside that loaded swf there's a movice clip called icon_mc. I'm trying to target it and make it go to a specific y position within that loaded swf on a MouseEvent inside the index.swf. I can't seem to make it work.I triedI have traced sliderHolder and it says it's empty.I have traced sliderLoader and it gives a Loader.So how do I access the movieClip if I just have those two as references?Here's what I have and want to do in code:

Code: Select all
var sliderLoader:Loader = new Loader();
sliderLoader.load( new URLRequest("sliding/ImageBar.swf"));

[code].....

View 1 Replies

ActionScript 2.0 :: Targeting A Timeline In An Loaded Movie Clip?

May 27, 2005

The swf successfully loads where I want it to, but I'm having trouble moving the new movie clip to a specific keyframe in the timeline.

Code:
on (release) {
_parent.productImage.loadMovie("./flash/BT_Closeup.swf");
_parent.productImage.gotoAndStop("set2");
}

View 1 Replies

ActionScript 2.0 :: CreateEmptyMovieClip() With LoadClip()?

Feb 2, 2007

I'm making a simple photo gallery, and I'm having trouble loading the thumbnail images. I use the same method (loadClip()) to load the fully sized pictures, and there's no problem there. Even with the thumbnails, I could get the images to load properly when I hard coded each individual thumbnail. The problem is when I try to createEmptyMovieClip() and then loadClip() into these movieclips dynamically, if you will, so it can adjust itself to the number of images in the gallery. I get nothing. No images. Nothing shows up.This is my first time using the createEmptyMovieClip and loadClip methods,

Basically, the code is just creating a new movieclip (mc_thumbnails) to contain all the thumbnails. Then, it should create a new movieclip (inside mc_thumbnails) for each image available. Inside each of these clips (mc_thumbnail1, mc_thumbnail2, etc), the appropriate image should be loaded...

Code:
thumbnailMCLoader = new MovieClipLoader();
thumbnailPreloadObj = new Object();
thumbnailMCLoader.addListener(thumbnailPreloadObj);[code]...

View 5 Replies

ActionScript 2.0 :: External SWF - LoadClip()?

Apr 16, 2007

I have used loadClip, and loadMovie a ton of times and have never ran into this problem, so I am hoping someone here can provide me some insight on how to fix this.

I am using loadClip() to load up external SWF's for a portfolio, everything is functioning perfectly, it preloads, it gets all the values from the clips properly, but when the movie loads up the animations from the SWF exceed (or go outside of, and are still visible) the published size. So instead of seeing what I normally see when I publish the SWF, I see everything that happens, even stuff that is meant to appear "off screen", or in the case of the SWF, outside the published size. As far as how I am going about loading up the SWF's, I am just using an empty movieclip and loading them into there.

View 6 Replies

ActionScript 2.0 :: Loading .swf Using LoadClip?

Jul 30, 2007

I'm trying to load a .swf from a sub directory, and I've read that doesn't work. Why will Images load from a subdirectory using the loadClip method then?

View 12 Replies

IDE :: Using AttachMovie To Put Something Above A LoadClip Movie

Jun 15, 2009

I've loaded a swf into my project by using loadClip, and now need to put some movieclips over the top of it using attachMovie. All the new movieclips appear behind the loaded movieclip. Is this normal?The movie I have loaded is inside an empty movieclip I've created called "container". Eg:[code]The "sparkle" movie clips are attached much later, on a keypress.

View 1 Replies

ActionScript 2.0 :: Searchable XML And LoadClip?

Aug 26, 2011

The gist of my problem is that currently i have a searchable XML database which contains projects that when clicked on, link to a new tab or window (depending on your browser) of that specific project. see and then click "WORK" on the left side, to see it in action... type CHICAGO or something like that to see how it works...Basically, in my quest to eliminate all pop ups and additional HTML pages, id like to click on the project name and have it execute my existing loadClip preloading function. I can not seem to figure out how to do this...

View 1 Replies

ActionScript 2.0 :: LoadClip Won't Load Picture?

Sep 21, 2009

I have a nested blank clip (_root.banner.holder.picture) and want to load a picture into it, using the following code in the _root.No matter what I do, I can't get it to work

Code:
_root.myobject = "picture1";
loadpic = _root.myobject+".jpg";

[code].....

View 1 Replies

ActionScript 1/2 :: Cannot Attach After Failed LoadClip (Bug)

Feb 9, 2010

If you attempt to load an image into a movie clip and the load fails, you are unable to attach a library movie clip to it. The code below is from the fla file i attached herewith. All you need is a movieclip in your library with linkage name "Attach_MC" and this script in a 1-frame fla file. Or just download the fla file. What i am trying to do is attach a movieclip with a graphic that says "loading failed" if the load fails, so that it won't be blank but i can't do it unless perhaps by a workaround by placing a reserve clip in the same place (i.e. under a mask).

import mx.utils.Delegate;
var mcGlobal:MovieClip = this.createEmptyMovieClip("Stage_MC", 0);
var cLoader:MovieClipLoader = new MovieClipLoader();
var oListener:Object = new Object();
oListener.onLoadInit = Delgate.create(this, onLoadSuccess);
[Code] .....
Attachments: Bug.fla.zip (5.3 K)

View 5 Replies

ActionScript 2.0 :: LoadClip Not Working In Browser?

Nov 19, 2009

I got the code below, reading a picture from an array.While in testmode or directly opening the .swf it works fine, but in a browser the picture is not loaded.

var listener:Object = new Object();
var mcl:MovieClipLoader = new MovieClipLoader();
var holder:MovieClip = item_mc_set.createEmptyMovieClip("holder",_root.ge

[code]......

View 1 Replies

ActionScript 2.0 :: Software Simulation LoadClip?

Dec 28, 2011

trying to load a new image and still making the previous_node on the background without any blink, most seamless possible, where I�m making the mistake...?

ActionScript Code:
previous_node = current_index-1;[code].....

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved