Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Using TellTarget In An Externally Loaded .swf File ...



Well, here's the thing ...

I've loaded a movie (Mov A) into the main movie (MainMov) using loadMovie. However, when I use tellTarget within that loaded movie, it doesn't work. For example, I have 2 movie clips (MC.A and MC.B) in the externally-loaded movie. MC.A has a button that tells MC.B to do something.

Now, when I load Mov A into MainMov, the button in MC.A does not work. That is, the action that's supposed to take place in MC.B doesn't happen. As a matter of fact, none of the tellTarget functions seem to work in Mov A when it's loaded into MainMov. HOWEVER, when playing Mov A by itself, everything works just fine (the button in MC.A works fine .. everything happens the way it's supposed to). What's up with that?



I've searched the tutorials for "loadMovie," but strangely, I get no results. Thanks in advance for any help you can give.



FlashKit > Flash Help > Flash Newbies
Posted on: 01-20-2002, 02:42 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Using An Externally Loaded CSS File
I'm trying to use an external CSS file. It's loading fine, but the text shows no signs of being styled.

I read somewhere that if the text is loaded before the CSS file then the CSS file won't affect the text. Is that true? If so, how can I guarantee the CSS file will load before I load the text?

Externally Loaded File
hi everyone! i am having a problem in loading externally loaded text files to a movie.

first of all i have a main movie and on one of the buttons i assigned the following actions to it:
b1.onRelease=function(){
if (_root.section !="new.swf"){
_root.section="new.swf";
_root.transition=gotoAndPlay=("closing");}


so once this button is pressed a new movie is lauched within this main movie.This new movie is called new.swf. This contains only an empty dynamic text box a scroller and the following actions:

loadText=loadVars();
loadText.load=("new.txt");
loadText.onload=function(){
new.text=this.new;};

when tested, only the scrollbar is there. text file not.. any help would be very appreciatedl!!!!!!! ;-) jon

Linkage Name To Externally Loaded File ?
Hi !
Is it possible to assign the linkage name to externally loaded sound file ? So that I can play it later by creating sound object.

TIA
Mahesh K.

[F8] How Can I Remove An Externally Loaded Swf File?
Hi,

I've got a file that contains a button that loads [on(press)] an external swf file perfectly.

The problem I'm having is that I don't know how to make this swf file go away onRollout.

You see, I want it to go away, so that I can load 5 other swf files in the same exact spot on 5 other similar buttons.

Here's the rookie actionscript I'm working with:
-----------------------------------------------------------

on(press){
_root.menu.gotoAndPlay("quotes");
loadMovie("links/quotes/ideas.swf", 50);
}
on(rollOut){
_root.menu.gotoAndStop("quotes");
unloadMovie.target("links/quotes/ideas.swf");
}

------------------------------------------------------------

Any advice or suggestions would be much appreciated.

Controlling Externally Loaded SWF File
Hello to all!

I apologize if this question has already been asked.

I'm trying to figure out how to control a SWF that I'm loading into my main timeline. The SWF has been created in Captivate and already has controls, I just don't want the movie to play as soon as I preload it.

I'm loading the SWF into a blank_mc. How do I get this SWF to not play, or put an action within the blank_mc that will start the playback of the SWF when the end user desires.

Is this possible?

Thank you any and all who can help me out.
Chris

Problem With Externally Loaded SWF File
Hi there,

This is what I'm trying to do (in Flash 8):

My container.swf loads a film.swf which plays lala.flv. In film.swf I use the following script to play the FLV-video and determine when it finished playing:

var duration:Number = 0;
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
videoPlayer.attachVideo(ns);
ns.play("lala.flv");

ns.onMetaData = function(evt:Object):Void {
duration = evt.duration;
};
ns.onStatus = function(evt:Object):Void {
if (this.time > 0 && this.time >= duration) {
_root.gotoAndStop("Scene2", 1);
delete this.onStatus;
}
}

As you can see, I'm trying to get the container.swf to jump to "Scene2" after the FLV is finished. The following script is used in the container.swf to load film.swf:

stop();
loadMovie("film.swf", 1);

Now what happens is that at the end of the FLV it just stops at the last frame and nothing happens. I also read about lookroot which I think isn't really necessary in my case, because I always want to refer to the container.swf timeline. The part of the script which determines when the FLV has ended seems to work, because I tried it with getURL for example.

Does anyone have an idea where my the problem is? I'm pretty new to ActionScript so I might have overlooked something obvious

Thanks

Center An Externally Loaded Swf File.
is there a way to center an external swf file inside a movieclip. I have created a text animation, that i would like centered inside on the stage. Is there a way to do this with actionScript?

any help would be greatly appreciated.


thank you.

Problem With Externally Loaded SWF File.
Hi frnds...seeking some help...i have a website and on clicking dropdown menu options different swf files are loaded according to option...this works fine but when any external swf loaded completely...buttons inside that swf stops working...please provide some guidance...Thanks in advace.

Adding A Preloader To An Externally Loaded File
I have several external swf files that are loaded into my movie when the user presses a button. some of them may end up being big files, so how can i add a preloader to these for confirmation the file is being loaded.
PLease help!!!!!

Create Hyperlink From Externally Loaded .txt File?
how can i hyperlink a word in a sentance that is loaded from an external html-formatted text file. i can get the text to load fine, but without any hyperlinks!

Can Externally Loaded JPG File Appear Under One Of The Main Movie MCs ?
Hello people !

My externally loaded movie is always placed above the other stuff inside my main movie. I guess that's normal and that's how it should be, right ?

I load external JPG files using this:

Code:
on (press) {
my_mc.loadClip("Images/1.jpg", "container");
}
I'm wondering is there any way to set some MC inside my main movie, so it can appear over, not under the externally loaded movie.

Thanks in advance !
Sasha

Button To Download Pdf With In An Externally Loaded Txt File
I cant seem to find a tutorial on this one:

I have a text field that loads an external txt file. I would like to have a link within that text field that when clicked on downloads or opens a pdf.

Does anyone have any tips for me?

Masking Externally Loaded CSS Text (from.txt File)
Well, I know how to do it when using dynamic text and using setmask and embedding your fonts, but how do you do it when you are using a CSS font class with 3 diff. fonts and maybe even more?

There is no mention of how to use a mask over a dynamic textfield in the MX 2004 tutorial with externally loaded CSS .txt file, so hopefully someone knows how to do this? I am getting a blank text field, but it works when I delete the mask layer.

thx.

Using HTML Tags In Externally Loaded .txt File
Hey there,
This is an amazing site! I just registered so I could post my first question...

I am working in Flash MX2004 on a Mac running OS 10.3.9:

So I am loading an external .txt file into a Scrollable Dynamic Text Field, but I would like to include some HTML formatted text in the .txt file (for example, links, font colors, etc.).
I tried selecting the "Render text as HTML" button in the property manager in my main file, but this doesn't seem to be working. When the text file loads, I can see all the HTML code and no formatting is taking place.

Can anyone help a newbie Flash programmer?? I would very much appreciate it.

Thanks!!!

-Dig

Scrolling An Externally Loaded Txt File With CSS Load
I have followed three of the scripts in the tutes section, but cannot get this to scroll:

1. First followed THIS TUTE
2. Then THIS TUTE
3. Then tried to add THIS TUTE to get it to scroll.

The css loads fine, however I cannot get this thing to scroll the text. Can anyone help me.

This is what is in my first keyframe. Where SCROLLER is the instance name of my text box.

Code:
var format = new TextField.StyleSheet();
var path = "http://www.amyhedrick.com/css/flash.css";
format.load(path);
format.onLoad = function(loaded) {
if (loaded) {
scroller.styleSheet = format;
myLoadVar = new LoadVars ();
myLoadVar.load("tv.txt")
myLoadVar.onLoad = function (success){
if (success == true) {
scroller.variable = "tvtext"
scroller.htmlText=myLoadVar.tvtext;
}
}
} else {
scroller.text = "Error loading CSS file!";
}
};
//creating the loadVarsText function
myLoadVar.onLoad = function() {
scroller.text = this.tvtext;
};
Thanks.

How To Give Link Within The Externally Loaded Xml File
hi all

I am in the process of making the flash news file
in which im calling the text from external xml file

there are max 4 news which are going to display one under other
also there will be a link to all these items

Had anybody tried to make the same before
it will be a great help for me

thanks

How Do I Assign A Class To Externally Loaded Swf File?
basically i want to be able to load different button.swf files, like button1.swf button2.swf etc
and assign them a class so the class handles all the default behaviour of the button. This is for skinning purposes. I want to be able to load a button.swf file into my main movie ( the button.swf has no actionscript in it at all, just the graphics ) and then make it an instance of a existing class like for example button.as . the clips are not in the library so i can not specify the class in the linkage properties. It has to be loaded externally.

how do i do this or is this at all possible?

thx for any replies

Setting The Position Of An Externally Loaded SWF File?
Ok so I’m making some progress in my Actionscript (well more like I’m finding code snippits) but I’m a little short on the mark.

I have a main SWF movie file that is loading in a child movie at various points on the timeline. When I push a button my movie jumps to a key frame and the file is loaded and plays. The code is blow:

Code:

stop ();

homeBttn.addEventListener(MouseEvent.CLICK, toFrame("home"));
sermonBttn.addEventListener(MouseEvent.CLICK, toFrame("sermon"));
pastorBttn.addEventListener(MouseEvent.CLICK, toFrame("pastor"));
historyBttn.addEventListener(MouseEvent.CLICK, toFrame("history"));
bibleBttn.addEventListener(MouseEvent.CLICK, toFrame("bible"));
calBttn.addEventListener(MouseEvent.CLICK, toFrame("cal"));
contactBttn.addEventListener(MouseEvent.CLICK, toFrame("contact"));

//Function to handle jumping to frame by frame lable
function toFrame(frameLable : String ) : Function{
    var handler : Function = function( event : MouseEvent ) : void{
      gotoAndPlay(frameLable);
    }
    return handler;
}

var myLoader:Loader = new Loader(); addChild(myLoader); var url:URLRequest = new URLRequest("doorsopen.swf");


Then at the key frames that I jump to I call:

Code:

myLoader.load(url);

My only problem is I can’t position the loaded movie in x, y, or z positioning I like. I want to make sure that it’s loaded above some elements of my movie and blow others.

Any assistance?

Thank,
Steven

Help With Custom Scroller With Externally Loaded Text File
Basically, my problem is that the dragger will not scroll all the way down and I have no clue how to fix it. It works well when there is a lot of text in the text file but when there isn't, the dragger does not behave as it should.

Here is my file so hopefully someone can help me out here.

Thanks a lot,
Prich...

Its done with mx 2004 btw

Target Path Not Working In My Externally Loaded SWF File
Alright, so I've tried quite a few things with no luck. I have a scrollbar that works in the swf fine, but when loaded into my mainmovie container I get this error...
Target not found: Target = "/scrolling text " Base = "_levelO.swf container"

Basically I understand this to mean that the externally loaded movie cannot find the instance name /scrolling text. The code is as follows that I have set to the scrollbar button in the externally loaded swf....

on (rollOver) {
tellTarget ("/scrollingtext") {
nextFrame();
}
gotoAndStop("down1");
}

Any suggestions? I tried changing the target to _root.scrollingtext with no luck. Also tried _parent. So I'm sure I'm just not thinking about it right but Any help would be greatly appreciated. Thank you ahead of time.

Trying To Get Externally Loaded SWF To Act As Movieclip From External Class (.as File
Right I have a problem - when I load a swf and I want to be able to add event listeners to propertys on it I use the code


ActionScript Code:
var headerMovie = MovieClip(loader.content);

Which works fine but what I've have created now is a class to load external SWF's and add them saving me to repeat that code, which works fine for loading the swf but as for the part where I get it to convert to MovieClip (which is what I assume that bit of code does) I'm out of Idea's.

here is the class so far - the error it gives is that it cannot acces the property mloader, I've even declared it outside of the function but to no avail.


ActionScript Code:
package {

    public class PreLoaderSwf3 extends MovieClip  {

        var myTween:Tween;
       


        public var loaderSpin:MovieClip = new Loading_MOV();

        public function PreLoaderSwf3() {
            //stuff for preloader spinner

                        loaderSpin.x = 500;
            loaderSpin.y = 80;
            loaderSpin.alpha = .5;
           
        }
       
       
        public function startLoad(swfAddress) {
            var mLoader:Loader = new Loader();
            var mRequest:URLRequest = new URLRequest(swfAddress);
            mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
            mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
            mLoader.load(mRequest);
            mLoader.x = -400;
            addChild(mLoader);
            //loadEvent.currentTarget.content = MovieClip(mloader.content);
            //mLoader.alpha = .5;
           
        //return convertName;
        }
        function onCompleteHandler(loadEvent:Event) {
            loadEvent.currentTarget.content = MovieClip(mloader.content); //The code giving me trouble
            addChild(loadEvent.currentTarget.content);
            loadEvent.currentTarget.content.alpha = 0;
            this["myTween"] = new Tween(loadEvent.currentTarget.content, "alpha", None.easeInOut, 0, 1, 8, false);
           
       
            removeChild(loaderSpin);
           
            }

       
//stuff for adding spinner loaders and shit all works grand

function onProgressHandler(mProgress:ProgressEvent) {
            var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
            trace(percent);
            addChild(loaderSpin);

        }
    }

}

Externally Loaded Text File With Html Tags
I was having a good amount of trouble getting externally loaded text (txt) to display properly when I used HTML tags (bold, italic, etc.), regardless of what other solutions I used in this forum. So when I found this information, I thought it might be useful to others searching the forum.

Problem:
HTML enabled text fields fail to display formatted text.

Reason:
When embedding a font, Flash does not include the entire font family automatically. Only the plain font is embedded without the bold and italic variants. Because of this, HTML formatting that uses bold or italic formatting may not display.

Solution:
If an HTML formatted text field uses a font that is not resident on the viewer's machine, then that font must be embedded in the SWF to properly display the text. If multiple styles of the font are used in the HTML formatting, then it's necessary to add a dynamic text field to "manage" the embedding of the entire font family. As long as the font is embedded in one text field, the rest of the movie can use it.

Quick Code Fix For Externally Loaded Flash File
hi there, i know that someone out there can easily take a look at my problem and know immediately what i did wrong. but that's not me!

i have a test website here which has externally loaded files coming into the container on the main index page. the code on the buttons at the top right hand corner have this code on each of them for the externally loaded .swf files to come in:

on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "contact";
container.loadMovie("contact.swf");
} else if (_root.currMovie != "contact") {
if (container._currentframe>= container.midframe) {
_root.currMovie = "contact";
container.play();
}
}
}

and that all works perfectly fine. what my problem is is when i click on the "contact" button and i'm on that page. on the left hand side column towards the bottom, i have a block of text with one red word. i want that word to bring in the f.a.q. page (and replace the contact page i'm currently looking at) which can also be accessed from the top nav. just a little thing, but i wanted to learn how to do it.

i've put the same code into the invisible button that says "faq" which is identical to the code listed above except i changed all instances of "_root" to "_parent" but that didn't do it. i think it's something like that that would have to do with the problem. any help is appreciated!

thanks,
denise

UT-8 Encoded File (foreign Characters) Externally Loaded Problem
Bacially im loading in text from a file that is rendered as html in a dynamic text box. It is encoded as UT-8 for the foreign characters and they come out ok - but there is a little box appearing before the first letter..................

any ideas?

[F8] Mysterious Unwanted Text Added To Externally Loaded File
I'm using load vars to load text from an external file and have it appear in a dynamic, scrolling text box on stage. It works great, but at the end of my block of text, flash adds " &=onLoad=[type Function]". This is not part of my text, and I don't know how to get rid of it! I haven't added any special characters to the text in the file-- orginally i had "escaped" the text (which i though you had to do), but all those extra characters just showed up in the text in the movie, so I typed my text out as I wanted it to appear, and it works fine, except for this last line...

Any ideas?

Thanks

z

Drag/Drop MovieClip With Externally Loaded Image File
Hola people,
I'm trying to load an image into a movie clip and then be able to drag the image/movie clip. So far the image loads into the mc very well independantly and with the drag drop function. However.. the drag and drop function works ONLY independantly and not in conjuntion with the loaded mc image.
I've placed the code below into an actions layer(first layer):first frame.

Please help ......what am I missing or done incorrectly?

//////////////
// this part works alone and with the proceding drag/drop function
/////////////

//get the image url/filename (image.jpg) from the text file (image_URL.txt)

loadVariablesNum("image_URL.txt", 0);

//when the movie receives the url/filename (image.jpg) data
//the url/filename(image.jpg) is placed into the image1_mc movie clip

onData = function() {
image1_mc.loadMovie (image1_URL.text);
};


//////////////
// this part works alone but not along with the preceding image load
/////////////

// this function sets up a movie clip drag drop and target function

function dragSetup(clip, targ) {
clip.onPress = function() {
startDrag(this);
this.beingDragged=true;
};

clip.onRelease = clip.onReleaseOutside=function () {
stopDrag();
this.beingDragged=false;
if (eval(this._droptarget) == targ) {
this.onTarget = true;
_root.targ.gotoAndStop(2);
} else {
this.onTarget = false;
_root.targ.gotoAndStop(1);
}
};
//the variables below store the clips starting position
clip.myHomeX = clip._x;
clip.myHomeY = clip._y;

//the variables below store the clips end position
clip.myFinalX = targ._x;
clip.myFinalY = targ._y;

//"if the mouse is up(in other words - the clip is not being dragged)
//then move the MC back to its original starting point (with a smooth motion)"

clip.onEnterFrame = function() {
if (!this.beingDragged && !this.onTarget) {
this._x -= (this._x-this.myHomeX)/5;
this._y -= (this._y-this.myHomeY)/5;
}
};
}

//this is SUPPOSED to implement the drag drop function to the image1_mc being [image1.jpg]
dragSetup(image1_mc,target_1);

Applying CSS To Externally Loaded Text - Multiple Fields, One .txt File?
Ok, first of all, let me say that THANK YOU KIRUPA for a great site with great tutorials...

Here's my question-

I used the tutorial Applying CSS to Externally Loaded Text and it worked like a charm... I've attached the full source so everyone can see how it works... My question is-

How do I follow the same principle and use multiple text boxes in a .swf that pull the content from the one text.txt file?

In the attached fla, the 1st frame has the text box that works great and a button that goes to frame 2. Frame 2 has the same text box from frame 1 and an additional one "kirupa2."

In the text.txt file, there is the standard "kirupa" that loads flawlessly, as well as a "kirupa2" that does not load.

Any ideas, help?

Thanks!

Joe

Actionscript To Track Play Progress Of An Externally Loaded SWF File
I'm working through the tutorials in Flash Professional 8: Beyond the Basics to teach myself the skills I need to build a project for my day job.

The project is basically a slideshow presentation. I have controls loading into one level, an animated background into another, and then swf files loading into _level5 that the controls can pause, rewind, fast forward, and so forth. All that is in place. I have built a preloader, so I understand that part. What I am unable to figure out is how to track the totalframes and frames played on an existing level so that I can update a scrubber bar with percent played.

So, here's a snip of code:


Code:
function loadSlide() {
this.myMCL.loadClip("slide" + curSlideNum + ".swf", 5);
}
I run loadSlide() whenever I want to progress to the next portion of the presentation. What I would like to know, again, is how can I track the play progress of slidex.swf in _level5 so that I can present this information visually.

Thanks in advance for any help. I hope that I can become a productive member of this community over time. I hate feeling like an idiot like I do right now. I'm not much of a programmer, more of a designer, but I am enjoying actionscript so far.

Externally Loaded Text Prob In Externally Loaded Swf
hi.
so i have a swf that has externally loaded text in it that is being loaded into another swf. the text loads properly when the swf is opened by itself but when the swf is loaded into my main movie the text ceases to appear

my code to load the text is
loadText = new LoadVars();
loadText.load("dates.txt");
loadText.onLoad = function() {
event1.text = this.event1;
date1.text = this.date1;
location1.text = this.location1;
address1.text = this.address1;
cost1.text = this.cost1;

event2.text = this.event2;
date2.text = this.date2;
location2.text = this.location2;
address2.text = this.address2;
cost2.text = this.cost2;

event3.text = this.event3;
date3.text = this.date3;
location3.text = this.location3;
address3.text = this.address3;
cost3.text = this.cost3;
};




any help would be much appreciated

Externally Loaded Text Prob In Externally Loaded Swf
hi.
so i have a swf that has externally loaded text in it that is being loaded into another swf. the text loads properly when the swf is opened by itself but when the swf is loaded into my main movie the text ceases to appear

my code to load the text is
loadText = new LoadVars();
loadText.load("dates.txt");
loadText.onLoad = function() {
event1.text = this.event1;
date1.text = this.date1;
location1.text = this.location1;
address1.text = this.address1;
cost1.text = this.cost1;

event2.text = this.event2;
date2.text = this.date2;
location2.text = this.location2;
address2.text = this.address2;
cost2.text = this.cost2;

event3.text = this.event3;
date3.text = this.date3;
location3.text = this.location3;
address3.text = this.address3;
cost3.text = this.cost3;
};




any help would be much appreciated

Externally Loading Swf Inside An Externally Loaded Swf
Hey,

So basically, I have a main movie, with buttons for each section (such as home, portfolio and so on). Each button externally loads each section swf into a container. That works fine, all the sections load in and out perfectly.

Now, I want to load some more swfs (like projects in the portfolio section) into the swf thats been loaded from the main movie. Becuase I put my buttons inside movie clips (so that when you roll over the button, the animation finishes if you roll over another half way through), I had to use the tellTarget("/") script to bring it back, but it dosent work, it seems to load the movie into the main movie!

How can I fix this? Iv tried loading it into a different container symbol in the main movie but its still dosent work

Thanks alot.

Externally Loading Swf Inside An Externally Loaded Swf
Hey,

So basically, I have a main movie, with buttons for each section (such as home, portfolio and so on). Each button externally loads each section swf into a container. That works fine, all the sections load in and out perfectly.

Now, I want to load some more swfs (like projects in the portfolio section) into the swf thats been loaded from the main movie. Becuase I put my buttons inside movie clips (so that when you roll over the button, the animation finishes if you roll over another half way through), I had to use the tellTarget("/") script to bring it back, but it dosent work, it seems to load the movie into the main movie!

How can I fix this? Iv tried loading it into a different container symbol in the main movie but its still dosent work

Thanks alot.

Text Cut Off Randomly Externally Loaded Quotes From Text File.
Here is the issue, I through some ingenious coding produced a way how to create dynamically loaded random quotes onto hover captions, I know alot of you helped out and I thank you, the problem is now that it will load all that info but many times almost 90% of the time the caption will be too small to show the text, or too large and the text pops up all the way to the left of the site.

I posted you an image it is supposed to say We design websites, from full Flash sites to small HTML ones, however the excess is cut off, you can see the site at www.qualitytechnologies.net if you need clarity on the issue, I believe I also have a fla example file but I may be wrong, here is parts of the code:

The code for the hover caption on frame xx

ActionScript Code:
hover_mc.b1.onRollOver = function() { captionFN(true, this); this.onRollOut = function() {  captionFN(false); };};hover_mc.b2.onRollOver = function() { captionFN(true, this); this.onRollOut = function() {  captionFN(false); };};...captionFN = function (showCaption, bName) { if (showCaption) {  _root.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());  //cap.desc.text = captionText;  cap._width = 7*cap.fill_text.text.length;  cap._alpha = 75;  //   if ((bName._width+bName._x+cap._width)>Stage.width) {   xo = -2-cap._width;   yo = -17;  } else {   xo = 2+cap._width;   yo = -17;  }  hoverCaption.onEnterFrame = function() {   cap._x = _root._xmouse-xo;   cap._y = _root._ymouse+yo;   cap._visible = true;  }; } else {  delete hoverCaption.onEnterFrame;  cap._visible = false; }};


The random loading code, on frame 1-6 on the hover_mc clip, there are 6 buttons there from b1 to b6 of course.

ActionScript Code:
/**************************************** **Random Quotes Script******************* ****************************************/ ranQuote = new LoadVars(); ranQuote.onLoad = function(success) { if (success) { RanNum = Math.ceil(Math.random()*5); ran = this["filltext"+RanNum]; _root.cap.fill_text.text = ran;} else { _root.cap.fill_text.text = "The text failed to load due to an error";}} ranQuote.load("comprepair.txt"); stop();


And each button uses a type of this to start the random code:

ActionScript Code:
on (rollOver) { gotoAndStop("1");}


That should be enough to start off at least, I do see what the problem is, the hover caption code will continue to play regardless of the random code, I need a stop/reset code somewhere but can't figure out where.

Someone please help me I have been working on this thing for about a month now, and now it is getting really fun. Thank you.

Preloader In Externally Loaded Swf Stops Working (loaded Into An Empty Movie Clip)
SEE BOTTOM OF THREAD FOR CURRENT PROBLEM

1. I have my navigation buttons in level0

2. When a button is pressed it loads an external .swf into the highest empty level

3. There is an MC in this loaded .swf called loadmovie and inside that another MC called empty.

4. Inside the 'loadmovie' MC, there is a frame action that loads another external .swf file into the 'empty' MC.

The problem I am having is that the preloader that is on the external .swf that is loaded into the 'empty' MC does not work.

It works fine if you test it on its own. But not when loaded into a Movie Clip.

MY SCRIPT:
iBytesTotal = _root.getBytesTotal();
iBytesLoaded = _root.getBytesLoaded();
iBytes = (iBytesLoaded/iBytesTotal)*100;
percentageNumber = Math.round(iBytes)+"%";
setProperty("progressBar", _xscale, iBytes);

Do I have to refrence it differently? Because of where it is situated?

e.g
iBytesTotal = _level32._root.loadmovie.empty.getBytesTotal();

confesed!

Looping A Loaded An Externally Loaded Mp3
I was trying to loop an externally loaded mp3 and suceeded on my machine, but when I upload the swf and mp3, the function will not work in my browser (IE). I tried a relative path, as well as the absolute URL and neither worked. Here is the code I used to loop the externally loaded mp3:

loopSound = function () {
my_sound.loadSound("whisper.mp3", true);
};
my_sound = new Sound();
my_sound.loadSound("whisper.mp3", true);
my_sound.onSoundComplete = loopSound;
my_sound.setVolume(45);

Any help would be most appreciated, I have wasted a lot of time on this already.

Externally Loaded Swf Does Not Stay Loaded
Hello,

I am loading an externally loaded swf that uses a mask to transition in. When the user clicks a different button I am doing a gotoAndPlay that goes to a mask that "unloads" the content (it doesnt actually unload the info is just outside of the mask area. As soon As I jump to that section the movie is no longer loaded and just shows the container clip that I had created for it. The Container Clip is never changed and is the same throughout the whole process. The only thing that changes is the mask animation.

Any input onto why this would happen would be greatly appreciated.

I have tried both loadClip and loadMovie but no luck on keeping the clip loaded.

EDIT
- I have narrowed it down. When I change the mask movieclip the movie unloads for some reason. Is there a way I can keep it loaded?

I Can't Use TellTarget At As File
//_root
Obj1 = new Class1 (this);
Obj1.fn1();

//Class1.as
class Class1 {
var path:MovieClip;

function Class1 (tpath) {
path = tpath;
}

function fn1 () {
tellTarget (path) {
a = 100;
}
}
}

but _root.a is undefined at last...

Pop Up From Externally Loaded Swf
I have the main index .swf and inside that .swf I have another externally loaded .swf. In that swf though I have a link to a 3rd party website that I need to load in a new window. The standard code that i have been using is:
btn_Up.onRelease = function() {
getURL("javascript:Launch('http://www.somewepsite.com, 600,600)");
};

Where btn_Up is the button. But for some reason because the swf is embedded into another swf it doesnt work. Please help!

Externally Loaded FLV
In my SWF fie, I have an externally loaded FLV file.

I now want to add another FLV that will load and play automatically when the first one is finished.
I actually want the SWF to jump to a new scene when the first movie is done.
How can I do that/ what the actionscript?
Steven

Pop Up From Externally Loaded .swf
I have a flash movie, that has a external .swf getting loaded into it, from that .swf I have a button, on that button I would like a script that will have a pop-up without toolbars, and at a certain size. What is the script added to the button for this? Thanks.

Externally Loaded Swf
Hello all,

I just made a flash site with buttons on top and I put a empty movie clip called "container" in the middlle of the site. All animation and buttons will animate and appear and "flash" around until frame 90. The site ends at frame 100. I then included the following code in frame 100:

_root.currMovie = "PEhome";
container.loadMovie(_root.currMovie + ".swf" );
stop();

How come it won't load the external .swf into the container?
Can anyone tell me what am I not doing right and what should be done to fix this problem. Thank you very much.

Ryan

HELP Mii With Externally Loaded SWF
hi there peps i jus need a tiny help with my externally loaded swf file and this so far is the AS am using loadMovieNum("<A href="http://www.geocities.com/krizinxgren/7UP.swf",0">http://www.geocities.com/krizinxgren/7UP.swf",0); please ignore the geocities address OK the code works well well but the situation is that instead of the loaded swf to play/run inside my main movie some how my main movie does not show instead all i can see is the loaded swf only still i learnt that i have to create a container or somthing but i still dono how the container function works please peps any help is a blessing to my work our works everybody

thanks all

K

HELP Mii With Externally Loaded SWF
hi there peps i jus need a tiny help with my externally loaded swf file and this so far is the AS am using loadMovieNum(http://www.geocities.com/krizinxgren/7UP.swf,0); please ignore the geocities address, the code works well well but the situation is that instead of the loaded swf to play/run inside my main movie some how my main movie does not show instead all i can see is the loaded swf only still i learnt that i have to create a container or somthing but i still dono how the container function works please peps any help is a blessing to my work our works everybody

thanks all

K

Pop Up From Externally Loaded .swf
I have a flash movie, that has a external .swf getting loaded into it, from that .swf I have a button, on that button I would like a script that will have a pop-up without toolbars, and at a certain size. What is the script added to the button for this? Thanks.

Externally Loaded Swf
Hello all,

I just made a flash site with buttons on top and I put a empty movie clip called "container" in the middlle of the site. All animation and buttons will animate and appear and "flash" around until frame 90. The site ends at frame 100. I then included the following code in frame 100:

_root.currMovie = "PEhome";
container.loadMovie(_root.currMovie + ".swf" );
stop();

How come it won't load the external .swf into the container?
Can anyone tell me what am I not doing right and what should be done to fix this problem. Thank you very much.

Ryan

Externally Loaded Swf
This is probably covered somewhere, but I am loading an external .swf into my main movie and i am just wondering if the actionscript works in the external swf. I see what i am assuming are pages with an external load and most have a preloader. How does this work.

Using PHP In An Externally Loaded SWF
:?

I've constructed a site in Flash, using an external loader. The tutorials on this site are great, thanks. I've made a contact page that uses php script, which has full functionality when previewed OR viewed as an independent HTMP page. However, when I submit contact info from the live site, I never receive any email. Can anyone tell me why this is??

I've tried everything I can think of, and have allowed every file in site folder access through the Flash Player Control Panel. I followed Lee's tutorials for both external loaders and the php contact page extactly.

Thanks in advance for any help!

http://www.simplypilatesnashville.com

//targeting.from.externally.loaded .swf >[.x.]<
I have a movie called --frame.swf
in it i have a mc that loads external .swf's into it. called holder mc instance name "holder"
--
a button on the _root timeline of frame.swf tells the movie clip to play the timeline of the ext .swf after it has been rested on a stop action
--
on the end of the time line of the ext loaded .swf there is a line of code that basically asks if the variable
profile = 1 if it does it says load profile.swf into the mc called "holder" of the movie frame .swf
---
now heres where I have a peoblem how do i target the main timeline of frame to target the mc w/ the instance name of holder?

i tried
if (portfolio=1) {
_root.holder.loadMovie("portfolio.swf", "holder");
} else if (vision = 1) {
_root.holder.loadMovie("vision.swf", "holder");
}

if you can be of any help ...thanx!

Copyright © 2005-08 www.BigResource.com, All rights reserved