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








Load Text In Nested Swf Problem


I have a problem with nested swf files. I have main.swf loading separate sections (section1.swf, section2.swf, etc.)
I placed on the main timeline of section1.swf the following:

text_area = new LoadVars();
text_area.onLoad = function(success) {
if (success) {
content.htmlText = this.content;
}
};
text_area.load("welcome.txt");

It works fine when I test section1.swf by itself, but when I load section1.swf into main.swf the text no longer loads.

What am I doing wrong?




KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 12-25-2004, 12:34 AM


View Complete Forum Thread with Replies

Sponsored Links:

Load Text In Nested Swf Problem
I have a problem with nested swf files. I have main.swf loading separate sections (section1.swf, section2.swf, etc.)
I placed on the main timeline of section1.swf the following:

text_area = new LoadVars();
text_area.onLoad = function(success) {
if (success) {
content.htmlText = this.content;
}
};
text_area.load("welcome.txt");

It works fine when I test section1.swf by itself, but when I load section1.swf into main.swf the text no longer loads.

What am I doing wrong?

View Replies !    View Related
Load Swf From A Nested Button, Help
Heres the scoop....I have my main movie going, and I have a mc "frame" loaded onto the maintimeline.

Now, this mc, frame, is made up of buttons...I want to click on one of the buttons in frame and have it load the external movie into the target "mcholder", a blank mc on the maintimeline....I have no trouble making a button loadmovie from the maintimeline, but I cant get it to work from inside the clip, I keep searching my pile of manuals hoping to figure it out, I have tried everything I can think of, I am considering bluffing it by loading the buttons over the top of the mc on the root, but I think there must be a way to do this correctly, if you can help it would be greatly appreciated, if not I will understand and just keep pluggin, seems to be the name of the game with flash! Smile! P.S. running flash 5......thank you for your time,

View Replies !    View Related
Load URL Nested Inside MC
This is probably going to seem a really dumb post but I have a file which displays three images which are all movieclips. On mouse over the clips they animate to show three options for downloading wallpapers which all should have a URL link. The animation works fine but the buttons with the getURL commands do not have focus because there is an active event on the top rollover/rollout movieclip. I have attached a link to the fla file for help.

http://www.proton.com.au/new_site/jumbuck_wallpaper_new.fla

View Replies !    View Related
Flash MX - Load A Jpg Into A Nested MC
Ok then, I'm gonna try to explain this ...
main time line: button (MC actualy with on(release)
now .. on release it would create an empty MC(mcTemp), which loads an external swf(mcJpeg) with a close button on it, that loads a jpg.

Code:

Code:


on(release)
{
this.createEmptyMovieClip("mcTemp", this.mcTemp.getNextHighestDepth());
mcTemp.loadMovie("mcJpeg.swf", this.mcJpeg.getNextHighestDepth());
mcTemp.mcJpeg.loadMovie(1.jpg);
}



I can get the mcJpeg to load properly .. but it doesn't look like the 1.jpg is loading at all.

Anyone got any ideas?

View Replies !    View Related
Can't Load Onto Levels With Nested Button?
just ignore this - i figured it out.

thanks for looking

jen

View Replies !    View Related
Load External Swf From Nested Timeline
I'm having a problem getting an external swf to load from a button within a nested timeline. I've used a trace statement to see if the mouse event is executing. It is executing, and I'm not receiving any errors. Still, I can't get the image load request to execute. I'm attaching two files. The main file and a blank that is supposed to represent the swf that is intended to load. I've removed all the images and content out of respect for my client, basically all that is visible is the framework, which is a mouse over menu at the bottom of the stage. The only active roll over button, is the PORTRAIT button for testing. I'd appreciate any direction or thoughts on resolving my problem. Thank you.

View Replies !    View Related
URL Load Error In Nested Swf's...argh
Last edited by gLrOaScTe : 2004-04-15 at 05:56.
























i have built a flash file that loads other swf's when the appropriate navigation button is pressed. for most of the categories this works great. however, i am having problems loading child swf's that use the loadMovie action in themselves. i think maybe the actionscript has faulty targeting...but i've messed with it every which way i know how.

lemme see if i can explain this plainly on 3 hours of sleep...

the navigation and main swf is naturally on the root timeline. the navigation buttons and an empty movie clip place holder live happily on the root, too. one of the categories is "kits" and the button loads this external swf into the root. "kits.swf" gets to the root but not all the info contained in "kits" makes it. in the "kits.swf" movie, three pieces of info are dynamically loaded in an array. the array contains a title of the kit, a jpg of the kit, and a url for another swf containing a description of the kit.

on it's own, this little jobbie previews just fine. when it is called into the root timeline of the main movie, the only item that makes it is the title of the kit. with the following code samples, i get URL load errors. the output window says "Error opening URL" followed by the path to the jpg and swf.

so here is the heirarchy:
root ---> kits.swf ---> jpg & swf

whenever i try to reference anything beyond a second level (past kits.swf) it get lost like a single sock in the dryer. anything that lives at the same level as kits.swf works like a champ. for example the info for the array for the titles is at that level, contained in the kits.swf movie, and it works just fine

i've tried different targeting methods such as changing the following from this:
loadMovie (slides[number][1], "placeholder")

to this:
loadMovie (slides[number][1], "this.placeholder");

and also:
loadMovie (slides[number][1], "_root.main_mc.placeholder");

in the two previous cases, the kits.swf movie doens't preview correctly...the external jpg and swf do not show up. it also fails when run through the main root movie.


here's the site:
theminordetails.com


ActionScript Code:
slides = new Array(["Kit 1", "kits/kit1.jpg", "kits/kit1.swf"],
["Kit 2", "kits/kit2.jpg", "kits/kit2.swf"],
["Kit 3", "kits/kit3.jpg", "kits/kit3.swf"],
["Kit 4", "kits/kit4.jpg", "kits/kit4.swf"],
["Kit 5", "kits/kit5.jpg", "kits/kit5.swf"],
["Kit 6", "kits/kit6.jpg", "kits/kit6.swf"]);
 
//
 
function changeSlide(number){
    if (number >= 0 && number < slides.length){
        currentSlide = number;
        title.text = slides[number][0];
        loadMovie (slides[number][1], "placeholder");
        loadMovie (slides[number][2], "des");
        }
}


any help would be appreciated...
thanks in advance!

View Replies !    View Related
Load Order Of Nested Movie Clips
I find it disturbing that load clip events for child MCs occur after the load event for parent MCs. I would expect that when a parent load event is fired, you would be guaranteed that all contained children are also loaded. Unless I am mistaken, this is not the case.

The inner/child MC is just a couple of items such as a text box and such. The load on the inner child works fine. This is where I define my properties, functions and events. The wrapper MC just encapsulates all of this and allows me to stick it all in the library. When I drop (reuse) an instance of the wrapper MC onto the stage and try to hook up to MY event handlers in the wrapper MC's load clip event, I find that the properties, functions and event definitions on the innter MC have not yet ben set up.

Anyways, I have a work around which seems a little cludgy to me. The enterFrame event DOES seem to wait until all child MCs are loaded. As such, initialization can be done the first time that event is entered as such:

onClipEvent(enterFrame){
if (this._initialized == undefined){
this._initialized = true;
obj.setOnChangeValue(_root.HandleIt);
}
}

Note that obj is the instance of the inner MC. setOnChangeValue sets my event handler (which is defined in the wrapper MC).

Does this seem like a strange approach to you? I don't really like the enterFrame approach, but I don't see another way due to the load order.

Thanks,

View Replies !    View Related
Problem With Load Variable And Nested MovieClips
Greetings!

Probably just a total newbie question, but I would appreciate any help on this problem I am having with dynamic text/Load Variable and nested Movie Clips.

I have three movie clips welcomeText.mc, overlay.mc and welcome.mc. welcomeText.mc is nested in overlay.mc and then overlay is nested in welcome.mc.

The text from the text file loads properly when previewed using test scene in overlay.mc, but is non existent in welcome.mc.

I am pretty sure I am not addressing the right clip with my nested movieclips.

In the welcomeText.mc I have the following action script

loadVariables("welcome.txt", this);

Like I said it works just fine in the overlay.mc, but not in the welcome.mc. Any ideas?

Thanks again!

Cheers,

MJ

View Replies !    View Related
Hiya, Am Desperate For External/nested Load Info
Hello!

Firslty I have been trying to work through this for ages!

I have an idex movie, with nav buttons etc.
Each nav button loads an external swf.
Within the external swf, I have a few buttons, to change images etc.
This works in the external, (when I test) but when I access the external through the index, the buttons within the external dont work, and I get a message saying the action cant be found?

Any ideas>?....I can offer the url if anyone needs it?

(this is the error I get)
Target not found: Target="/content3" Base="_level0.contents"

Thanks so much,
scotia

View Replies !    View Related
Hiya, Am Desperate For External/nested Load Info
Hello!

Firslty I have been trying to work through this for ages!

I have an idex movie, with nav buttons etc.
Each nav button loads an external swf.
Within the external swf, I have a few buttons, to change images etc.
This works in the external, (when I test) but when I access the external through the index, the buttons within the external dont work, and I get a message saying the action cant be found?

Any ideas>?....I can offer the url if anyone needs it?

(this is the error I get)
Target not found: Target="/content3" Base="_level0.contents"

Thanks so much,
scotia

View Replies !    View Related
Nested Loops, Attaching Movies And Load Order
i'm attaching mc's using a nested loop. The mc's which are being attached reference each others position, so that once one mc is attached it looks up the chain to see where the mc attached previously is and moves accordingly. (The master mc is created in the outside loop below.)

When using nested loops like this when is each mc actually put on stage?

i suspect it is a load order thing, because the nested loop mc's do not seem to recognise the master mc when attached this way, although if i place the mc's created in the outside loop onto the stage in the authoring envir. the nested loop works fine.

this is a bit difficult to explain. but if you have understood this and can lend some assistance it'd be cool.

cheers


//---
gSections = ["Hotels", "Reception", "Wedding Party"];
_global.gDepths = 0;

for (var j = 0; j<gSections.length; j++) {
//attach 'leader' mc
_root.attachMovie("heart", _root.gSections[j], gDepths);
_root[gSections[j]]._x = Stage.width/2;
_root[gSections[j]]._y = Stage.height;
gDepths++;
for (var i = 0; i<gSections[j].length; i++) {
//attach 'trails'
tempTrailName = gSections[j]+"_";
_root.attachMovie("trail", tempTrailName+(i+1), gDepths);
currLetter = gSections[j].substr(i, 1);
_root[tempTrailName+(i+1)]._x = _root[tempTrailName+i]._x;
_root[tempTrailName+(i+1)]._y = _root[tempTrailName+i]._y;
_root[tempTrailName+(i+1)].letter.text = currLetter;
gDepths++;
}
}

View Replies !    View Related
Show Text In Dynamic Text Box (nested Movie Clip)
can someone please help me look in my file.. i stuck here 1 day already..
i wan the dynamic text box fill in the number when i click on the button. And the value is keep increasing by 1 once i click the button.

the nested movie clip is as folo,

mc_A-->mc_B-->txtnumber

the button is in the mc_B..


please help me... thanks..

View Replies !    View Related
Inserting Xml Text Into A Nested Text Instance
Hi,

I am trying to get some text from an xml file into an instance of a text area named "link1Text" which is nested in a button instance named "link1".

When link1Text was on the stage, not in the button instance, what I have worked fine, but I can't seem to get the code right to have the text show up when it's nested.

here's the code I have for the un-nested instance of link1Text and it works:


HTML Code:
//init link text
link1Text.html = true;
link1Text.wordWrap = true;
link1Text.multiline = false;
link1Text.label.condenseWhite=true;

//load css
myStyle = new TextField.StyleSheet();
myStyle.load("ebook.css");
link1Text.styleSheet = myStyle;

//load in XML
pageContent = new XML();
pageContent.ignoreWhite = true;
pageContent.load("tcm.xml");
pageContent.onLoad = function(success)
{
if(success)
{

link1_Text = this.childNodes[0].childNodes[6].childNodes[1].childNodes[7];
link1Text.text = link1_Text;

}
}
Can anyone tell me how to update my code so it works when link1Text is nested in link1? I know it must be a simple path issue, but my lack of experience is keeping me from figuring this out...

Thanks in advance for any help!

View Replies !    View Related
Nested Text Field
Hi,

I'm trying to nest an input text field withing a movie clip. Normally it works fine, but when i define and sort of mouse events for the parent movie clip, the text field no longer recieves mouse events, it doesn't even get a cursor anymore.

can anyone help?

View Replies !    View Related
Nested Dynamic Text
Hey everyone!

I have a problem (as if you haven't heard that before).

Basically I have a dynamic text field inside a movie clip called
mcAboutText, which itself
is nested inside a movieclip called mcAboutPage which itself is nested
inside a movieclip called mcMain.

Assigning text to mcAboutText from mcMain has no effect on displaying
the text. here is a sample..

****mcMain MovieClip****

_root.mcMain.mcAboutPage.mcAboutText.text = 'The Text To Be Displayed' ;

I've even tried LoadVariables with an external txt file and
that doesn't work either.

Any help or advise would be much appricated

View Replies !    View Related
Why Do My Text Fields Not Appear If They're Nested?
Code:
///////////CREATE CLIENT LIST DAMMIT//////////////////


//createEmptyMovieClip("top_menu",this.getNextHighestDepth())

function readSingleDatabaseV(var1, var2, var3, var4, var5) {
var result_l:LoadVars = new LoadVars();
var cI:Number = 1;
result_l.onLoad = function(success:Boolean) {
if (success) {
var txtFormat:TextFormat = new TextFormat()
txtFormat.font = "Tahoma";
txtFormat.color=0x000000
txtFormat.letterSpacing = 1;
txtFormat.size = 10;

top_menu.onEnterFrame = function () {
top_menu.createTextField("prj" + cI,top_menu.getNextHighestDepth(),-2,cI * 19,200,20)
with(eval("top_menu.prj" + cI)){
html =true;
text = (eval("result_l.dbVar"+cI))
//selectable=false;
setTextFormat(txtFormat);
}

cI++;
break;
if (eval("result_l.dbVar"+cI) == undefined) {
delete top_menu.onEnterFrame;
}
};
} else {
trace('got ****ed');
}
};
var send_l:LoadVars = new LoadVars();
send_l.var2 = var2;
send_l.var1 = var1;
send_l.var3 = var3;
send_l.var4 = var4;
send_l.var5 = var5;
send_l.sendAndLoad("http://localhost/tvg/readDB.php", result_l, "POST");
}
readSingleDatabaseV("*","projects ORDER BY prjName ASC","0","0","1");




////////END CLIENT LIST DAMMIT/////////////////////


If top_menu. is gone, they appear fine.. but if nest it... they're invisible... but you can click and copy the text.. just cant see it....

wtf?

View Replies !    View Related
[F8] Changing Text In Nested Mc
I think this might be a stupid question and there is probably any easy way to do this but I can't work it out for the life of me.

Ok I have a Mc that has about 3 levels so mc nested inside mc's inside another mc. I need to copy the the main mc and use it a number of times. My problem is that I need to alter the text which is deeply nested in the clip.

I don't know if that makes any sense at all? I basically need to a MC repeated but with different text contained within it. can anyone think of a way of doing this? Thanks for any help

View Replies !    View Related
Nested Dynamic Text
Hey everyone!

I have a problem (as if you haven't heard that before).

Basically I have a dynamic text field inside a movie clip called
mcAboutText, which itself
is nested inside a movieclip called mcAboutPage which itself is nested
inside a movieclip called mcMain.

Assigning text to mcAboutText from mcMain has no effect on displaying
the text. here is a sample..

****mcMain MovieClip****

_root.mcMain.mcAboutPage.mcAboutText.myTextField.t ext = 'The Text To Be Displayed' ;

I've even tried LoadVariables with an external txt file and
that doesn't work either.

Any help or advise would be much appricated

View Replies !    View Related
Nested Component Text Not Appearing
Hello all,
I am creating a module for e-learning. I have the content of the lesson as my main timeline with a quiz at the end as an external swf (that has been placed in a blank movie clip). When testing the file, I can progress through the lesson, and get to the quiz, however, when looking at the quiz items, the text for the individual component items is not appearing. The various button states and graphics are visible, just the text associated with multiple choice, fill in the blank, etc is not showing up. Can anyone tell me where I should look to be able to fix this? Thanks in advance for any help that can be given.

View Replies !    View Related
Nested Text Field Alpha
My problem at the moment is as follow. I have a button, which inside has a textfield containing simple labels. My problem is that when I command the button to have an alpha of 0, the text remains. Here is an example of what the text is put into and what I call to tell it to "disappear."

Code that makes button disappear:

Code:
public function removeMenu()
{
menuHolder.alpha = 0;

}//end removeMenu

Code that makes button with text inside:


Code:
private function makeMenu():void
{
var yPos:Number = 0;//y position of next button
addChild(menuHolder);// put holder on stage



menuHolder.alpha = 1; //makes sure the holder is visible
//makes sure text box is visible

//all text formatting IMPORTANT!!
var format:TextFormat = new TextFormat();
format.font = "Verdana";
format.color = 0x000000;
format.size = 12;

var count:int = 0;//counter var
var p:XML; //XML variable to be used in loop
//loop to create each section button
for each (p in menuList) {

// Create the button.
var section:Sprite = new Sprite();
section.name = "section"+count;

//all other mouse events turned off
section.mouseChildren = false;

//makes image behave as a button
section.buttonMode = true;


// creates text field in button
var insideText:TextField = new TextField();
insideText.autoSize = TextFieldAutoSize.LEFT;
insideText.selectable = false;
insideText.defaultTextFormat = format;
insideText.text = menuList[count].text(); //finds section name and prints on button



var down:Sprite = new Sprite();
var up:Sprite = new Sprite();
var over:Sprite = new Sprite();


// button with no mouse over it
up.graphics.lineStyle(1, 0x000000); //rim color
up.graphics.beginFill(0x999999); //rect inside color
up.graphics.drawRect(0, 0, 200, 20);//draws rect
up.alpha = .75;
up.name = "up";//names button state

// mouse is over the button
over.graphics.lineStyle(1, 0x000000);//rim color
over.graphics.beginFill(0x333333);//rect inside color
over.graphics.drawRect(0, 0, 200, 20);//draws rect
over.name = "over";//names button state

// clicked button state
down.graphics.lineStyle(1, 0x000000);//rim color
down.graphics.beginFill(0xCCCCCC);//rect inside color
down.graphics.drawRect(0, 0, 200, 20);//draws rect
down.name = "down";//names button state

// adds the made up, down, and over states (and text label)
section.addChild(up);
section.addChild(over);
section.addChild(down);
section.addChild(insideText);

// Position the text in the center of the button.
insideText.x = (section.width/2) - (insideText.width/2);
insideText.y = (section.height/2) - (insideText.height/2);

// Add mouse events to the button.
section.addEventListener(MouseEvent.MOUSE_OVER, overState); //adds listener for when mouse is over
section.addEventListener(MouseEvent.MOUSE_OUT, noState); //adds listener for when mouse is not over
section.addEventListener(MouseEvent.CLICK, goToLink);//adds listener for when button is clicked

menuHolder.addChild(section);//adds the button to stage

section.y = yPos;//places button's x coordinate
yPos += section.height + 2;//puts next button 2 pixels below current


over.alpha = 0; //hide over state
down.alpha = 0;//hide down state
count++;//add one to count

} //end loop and button creation

menuHolder.x = 15; //place menu location
menuHolder.y = 55; //place menu location


}//end makeMenu()

View Replies !    View Related
Accessing A Nested Text Box W/ A For Loop
Hi,

I have four Movie Clips with the following instance names: "A", "B", "C", "D". Each Movie Clip has a nested Dynamic Text box with an instance name of "txt".

I am aware that I can change the dynamic text inside these clips like so:

A.txt.text = "some new text for A";
B.txt.text = "some new text for B";

My problem is that I'm trying to do this using a loop and I can't seem to make it work. Here's what I have:

var mcArray:Array = new Array("A","B","C","D");
for(i:uint = 0; i < mcArray.length; i++)
{
mcArray[i].txt.text = "some new text";
}

What am I missing here to make this work?
Any help is appreciated, thanks!

View Replies !    View Related
Dynamic Text Field In Nested Mc
I'm having problems with a dynamic text field not displaying its text. It's nested several clips deep, but if I check the "display variables" debug option, it's receiving the text from the variable; if just doesn't show.

After searching around a bit, I've tried the following things:

* Setting the mask through ActionScript, rather than through the GUI
* Making the dynamic text field its own movie clip
* Embedding the font for the dynamic text field

None of these, either individually or in any combination with the other methods, have shown the text in the text field. Anyone have any other ideas?

Rys

View Replies !    View Related
Invisible Text In Nested Movieclip
Hi every one!

Is it somehow possible to display dynamic text that is first loaded into a container (movieclip) in one .swf which is then loaded into a container i another .swf? I've tried to do this but without any luck so far. Ive embedded both the font (Arial) and characters used, which did not do the trick...

Can someone please help me?

View Replies !    View Related
Nested Dynamic Text Won't Display
Everything works correctly below. The new button displays on stage, but the nested dynamic text (instance name "campText") will not display.

1119: Access of possibly undefined property campText through a reference with static type flash.display:SimpleButton.


Here's the short code:

import flash.display.SimpleButton;
import flash.display.*;
import flash.text.TextField;

var myButton:SimpleButton = new camp();
myButton.x = 350;
myButton.y = 100;
myButton.campText.text = "CAMP";
addChild(myButton);

View Replies !    View Related
Targeting A Nested Input Text Box
I have a movie clip which contains an input text box. This movie clip resides on my main stage, and is masked using a mask layer which is also on the main stage. I am unable to select or enter information into the input text box. Is there a way to target the input text box within the masked movie clip?

View Replies !    View Related
Nested Dynamic Text Won't Display
Everything works correctly below. The new button displays on stage, but the nested dynamic text (instance name "campText") will not display.

1119: Access of possibly undefined property campText through a reference with static type flash.display:SimpleButton.


Here's the short code:

import flash.display.SimpleButton;
import flash.display.*;
import flash.text.TextField;

var myButton:SimpleButton = new camp();
myButton.x = 350;
myButton.y = 100;
myButton.campText.text = "CAMP";
addChild(myButton);

View Replies !    View Related
Loading Text In Nested Clip
i got and modified the following code for my movie. But it seems not to load the text from the external .txt file. the code resides in vita_group.swf and i'm loading the vita_group.swf into an empty movie clip (contents) which is located in my main movie. I think the targeting may be off but i'm not sure. I tried changing this.loadVariables ("filename.txt") to _root.contents.loadVariables("filename.txt") but it didn't work
any ideas?

onClipEvent (load){
this.loadVariables("http://www.tonyoursler.com/tonyourslerv2/vita/collections.txt");
loadText.onLoad = function() {
daTextBox.html = true
daTextBox.htmlText = this.daTextBox;
}
scrolling = 0;
frameCounter = 1;
speedFactor = 2;
numLines = 7;

origHeight = scrollbar._height;
origX = scrollbar._x;
needInit = false;

function initScrollbar(){

var totalLines = numLines + daTextBox.maxscroll - 1;
scrollbar._yscale = 100*(numLines)/totalLines;
deltaHeight = origHeight - scrollbar._height;
lineHeight = deltaHeight/(daTextBox.maxScroll - 1);
}
function updateScrollBarPos(){

scrollbar._y = lineHeight*(daTextBox.scroll - 1);
}
}

onClipEvent (enterFrame){

if( needInit ){
if(daTextBox.maxscroll > 1){
initScrollbar();
needInit = false;
}
}
if( frameCounter % speedFactor == 0){

if( scrolling == "up" && daTextBox.scroll > 1){
daTextBox.scroll--;
updateScrollBarPos();
}
else if( scrolling == "down" && daTextBox.scroll < daTextBox.maxscroll){
daTextBox.scroll++;
updateScrollBarPos();
}
frameCounter = 0;
}
frameCounter++;
}

onClipEvent (mouseDown){

if(up.hitTest(_root._xmouse,_root._ymouse)){
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if(down.hitTest(_root._xmouse,_root._ymouse)){
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
if(scrollbar.hitTest(_root._xmouse,_root._ymouse)) {
scrollbar.startDrag(0,origX,deltaHeight,origX);
scrolling = "scrollbar";
}
updateAfterEvent();
}

onClipEvent (mouseUp){

scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
stopDrag();

updateAfterEvent();
}

onClipEvent (mouseMove){
if(scrolling == "scrollbar"){
daTextBox.scroll = Math.round((scrollbar._y)/lineHeight + 1);
}
updateAfterEvent();
}

onClipEvent (data){
needInit = true;
}

View Replies !    View Related
Text From .txt Not Loading Into Nested Clip
my .txt file is not loading into my nested movie clip for some reason. I think I have directed it correctly (a section of the code is below which I think is the problematic part)

onClipEvent (load){
_parent.contents.vitaHolder.loadVariables("http://www.tonyoursler.com/tonyourslerv2/vita/solo.txt");
_parent.contents.vitaHolder.loadText.onLoad = function() {
_parent.contents.vitaHolder.daTextBox.html = true
_parent.contents.vitaHolder.daTextBox.htmlText = this.daTextBox;
}

I have always had problems with loading outside text into nested mcs. Hoping to understand once and for all!!!!

mista

View Replies !    View Related
Dynamic Text Field In Nested Mc
I'm having problems with a dynamic text field not displaying its text. It's nested several clips deep, but if I check the "display variables" debug option, it's receiving the text from the variable; if just doesn't show.

After searching around a bit, I've tried the following things:

* Setting the mask through ActionScript, rather than through the GUI
* Making the dynamic text field its own movie clip
* Embedding the font for the dynamic text field

None of these, either individually or in any combination with the other methods, have shown the text in the text field. Anyone have any other ideas?

Rys

View Replies !    View Related
Dynamic Text Variable In Nested MC
Good day,

I am working on passing variables from dynamic text boxes to a PHP script. Most of the dynamic text boxes are located on the main timeline, and the values get passed without a problem. However, I have two dynamic text fields in separate nested movie clips that when passed show up as 'undefined'.
I am pretty sure that the path I am using is wrong (although I am using every combination that I can think of). I am still a bit of a newbie, so it could be anything. I have spent the last two days googling, checking out forums and reading the books I have without any luck.

Does anyone have any ideas as to what I can try?

The code I am using is;


Code:
var name = this.nested_movie_mc.text_variable
I have also tried


Code:
var name = _root.nested_movie_mc.text_variable.text

Code:
var name = _parent.nested_movie_mc.text_variable
and every other combination I could think of.

Just to make sure everything is clear; 'name' is the variable I want to send to the PHP script, 'nested_movie_mc' is the name of the movie clip in which the dynamic text box resides and 'text_variable' is the variable name of the dynamic text box.

Any help would be greatly appreciated.

Thanks and have a good day.

View Replies !    View Related
Nested Dynamic Text Box Problem.
I'm setting up a drop down menu that will contain dynamic text boxes that allow me to change the names of the various menu items from a text file. Anyways, I can't seem to get the text box in the slide out movie to use the variable data in the text file. Here's the code in the main scene --

loadVariablesNum("names.txt", 0);
_root.dropdownmov.item1.text = dropdownmov.var4;

"dropdownmov" is the name of the first drop down movie that contains the first set of menu items and is called via telltarget when I roll over a button in the main scene.

"item1" is the instance name for the first menu item button.

"var4" is the variable associated with the item1 button.

The text file contains this line:

&var4=page_info&

I want the first menu item to get the name "page info" from the text file. Any help would be appreciated, beause I'm banging my head against the wall at this point.

View Replies !    View Related
Loading Text In Nested Clip
i got and modified the following code for my movie. But it seems not to load the text from the external .txt file. the code resides in vita_group.swf and i'm loading the vita_group.swf into an empty movie clip (contents) which is located in my main movie. I think the targeting may be off but i'm not sure. I tried changing this.loadVariables ("filename.txt") to _root.contents.loadVariables("filename.txt") but it didn't work
any ideas?

onClipEvent (load){
this.loadVariables("http://www.tonyoursler.com/tonyourslerv2/vita/collections.txt");
loadText.onLoad = function() {
daTextBox.html = true
daTextBox.htmlText = this.daTextBox;
}
scrolling = 0;
frameCounter = 1;
speedFactor = 2;
numLines = 7;

origHeight = scrollbar._height;
origX = scrollbar._x;
needInit = false;

function initScrollbar(){

var totalLines = numLines + daTextBox.maxscroll - 1;
scrollbar._yscale = 100*(numLines)/totalLines;
deltaHeight = origHeight - scrollbar._height;
lineHeight = deltaHeight/(daTextBox.maxScroll - 1);
}
function updateScrollBarPos(){

scrollbar._y = lineHeight*(daTextBox.scroll - 1);
}
}

onClipEvent (enterFrame){

if( needInit ){
if(daTextBox.maxscroll > 1){
initScrollbar();
needInit = false;
}
}
if( frameCounter % speedFactor == 0){

if( scrolling == "up" && daTextBox.scroll > 1){
daTextBox.scroll--;
updateScrollBarPos();
}
else if( scrolling == "down" && daTextBox.scroll < daTextBox.maxscroll){
daTextBox.scroll++;
updateScrollBarPos();
}
frameCounter = 0;
}
frameCounter++;
}

onClipEvent (mouseDown){

if(up.hitTest(_root._xmouse,_root._ymouse)){
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if(down.hitTest(_root._xmouse,_root._ymouse)){
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
if(scrollbar.hitTest(_root._xmouse,_root._ymouse)) {
scrollbar.startDrag(0,origX,deltaHeight,origX);
scrolling = "scrollbar";
}
updateAfterEvent();
}

onClipEvent (mouseUp){

scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
stopDrag();

updateAfterEvent();
}

onClipEvent (mouseMove){
if(scrolling == "scrollbar"){
daTextBox.scroll = Math.round((scrollbar._y)/lineHeight + 1);
}
updateAfterEvent();
}

onClipEvent (data){
needInit = true;
}

View Replies !    View Related
Text From .txt Not Loading Into Nested Clip
my .txt file is not loading into my nested movie clip for some reason. I think I have directed it correctly (a section of the code is below which I think is the problematic part)

onClipEvent (load){
_parent.contents.vitaHolder.loadVariables("http://www.tonyoursler.com/tonyourslerv2/vita/solo.txt");
_parent.contents.vitaHolder.loadText.onLoad = function() {
_parent.contents.vitaHolder.daTextBox.html = true
_parent.contents.vitaHolder.daTextBox.htmlText = this.daTextBox;
}

I have always had problems with loading outside text into nested mcs. Hoping to understand once and for all!!!!

mista

View Replies !    View Related
Text Rendering Problem In Nested MC's
I'm having one of those "Why the *&#$& isn't this working" problems, and am about to chuck my Apple 23" HD display out the window... hope someone can help.

I have three SWF files, we'll call them clipA, clipB, and clipC. clipA is basically the core of the site, and provides navigation, sound, etc. Within cliipA is a blank MC where clipB is loaded when the user makes a selection from the navigation. Within clipB I have another blank MC where I load clipC. Again, the user makes a choice from the submenu in clipB, therby loading the appropriate clipC.

My dilemma: clipC contains htmlText which is drawn from a MySQL database via PHP. The text renders properly, and the scrollbar moves the text up and down within the box when clipC.swf is run.

The same goes for clipB. When I run clipB.swf and trigger an event which causes clipC to load into the MC, again the text in clipC renders correctly (using CSS) the scrollbar works, blah blah blah...

But alas, when I try it from the main clip, in this case clipA the textbox is empty. The scrollbar appears as if there is text in the box, and I can drag it up and down just like I could in the previous 2 examples. But no text is visible.

I can't figure it out. For the life of me, I can't figure it out -- and a deadline is fast approaching.

Any ideas???

View Replies !    View Related
Setting Text In Nested Movieclips?
setting text in nested movieclips?

I want to create movieclips depending on the amount of letters in a string and next I'd like to embed textfields inside these clips (works fine). Now I'd like to set the text in those textfields. But it seems to be that it's impossible to address these created fields.

What am I doing wrong over here guys and girls ;-)



Code:
createField = function(nr) {
this["clip" + nr].createTextField("fld" + nr, 100+nr,20*nr,0,20,20);
// the code below doesn't work
// I'd like to fill the fields with some text
// how should I address the fields
with(this["clip" + nr]) {
this["fld" + nr].text = nr;
}
}

createClip = function() {
for (j=0; j<10; j++) {
createEmptyMovieClip("clip" + j, 200+j);
with(this["clip" + j]) {
createField(j);
}
}
}


createClip();

View Replies !    View Related
Dynamic Text Nested In Movieclips
Hello, I am new to this forum. I joined because I need some help with dynamic text.
I have a movieclip resting on the main timeline that contains a dynamic text field. I would like to be able to edit the text outside of Flash. Currently I can get this to work if the dynamic field is on the main timeline. Inside a movieclip is another story.
The script calling the external text is on an actions layer within the movieclip
loadVariablesNum("prime.txt", 0);
The var name set on the dynamic field is
vp01
The variable set up in prime.txt is
vp01=Hello

Does anyone know how to do this so that the text shows up?

View Replies !    View Related
Nested Dynamic Text Problem
Okay, I've seen this listed before, but I am having a lot of problems with this issue and I can't resolve it. So, here goes:

I have a main timeline with a mc holder. I am loading a swf into that mc holder. In that swf I have another mc holder that is loading yet another swf. I have a scrolling, dynamic text field in a third move that is being loaded into that movie. It is dynamically loading a txt file.

(envision - main menu loading a section page loading a subsection page loading a txt file)

It works when I export the movie it lives in.
It works when I export the movie it is nested in.
It does not work when I export the main movie.

What gives?
thanks
laura

View Replies !    View Related
Nested Movie Clips, Dynamic Text, Help
I am developing a little site, and I have a menu on the root level of the movie, when you roll over a button, there is an action script to start up a movie clip called "menu_clips" , menu clips has a text box that tweens into place and a dynamic text box that changes for each menu item. the root level is all in frame 1 and I have menu_clips in its own layer with instance name "menu_clips" , it works fine with a dynamic text box in the clip "menu_clips" however I want to place the dynamic text box into a container movie clip called "text_box" or something like that, so I can move it around within "menu_clips" more easily. I am having some trouble getting this to work. With "menu clips" I placed an intance of "text_box" (which contains my dynamic text box, variable "menuTextBox") and named the instance "text_box", on the root level, I originally had an actionscript like this:

on (rollOver) {
if (menu_clips.menuTextBox==_root.about) {
stop ();
}else {
setProperty ("menu_clips", _visible, 1);
setProperty ("about_matt", _visible, 1);
about_matt.gotoAndPlay(1);
menu_clips.gotoAndPlay(12);
menu_clips.menuTextBox = _root.about;
}
}
this worked fine, however I can't really do much with a dynamic text box on its own, the new script which does not work looks like this:

on (rollOver) {
if (menu_clips.text_box.menuTextBox==_root.about) {
stop ();
}else {

setProperty ("menu_clips", _visible, 1);
setProperty ("about_matt", _visible, 1);
about_matt.gotoAndPlay(1);
menu_clips.text_box.menuTextBox = _root.about;
menu_clips.gotoAndPlay(12);
}
}

I have also tried just
"text_box.menuTextBox = _root.about;"

but I am having no luck with this one

Please help if you can, any suggestions would be very much appreciated. Thank you.

If you'd like to see the movie, you can check it out here
http://www.roznet.com/ and click on the new roznet preview link, keep in mind it's just a preview and will eventually be full of nice effects and content, but for now it's very basic

View Replies !    View Related
Problem With Nested Components And Displaying Text.
Help!

I have a strange problem, which i'm not sure why is happening.

Here is my scenario. I have a component that i have created. It is basically a dynamic text box with HTML rendering enabled. It has a variable name associated with it so that when i type in my HTML code in the external component definition it shows up as one would expect displayed in the text box. I have a couple of other variables that i pass it as well so i can do things when the user clicks on the "link", so in total i have like 3 variables i pass in.

This component works like a charm and i have used in the past for alot of things, BUT last night i encountered a problem with it. It seems that for some reason when i take this component and put it inside a another symbol (like a movieclip or something) the text no longer shows up. The variable is being passed properly as i have tested it using Actionscript traces, the text just plain and simple doesn't show up. The link is even there since when i do a mouse over it turns to the little hand and you can click on it and it does what you asked it to do.

So I found this guys blog entry that talks about problems with fonts not embedding properly in flash http://www.scottmanning.com/archives/000400.php and so i tried embedding the font in all my movies and doing what he said but it still didn't work. Does anyone have any idea why this is doing this? I may have missed something with embedding the font or something (it was late) but i can't figure out why it's doing this.

Any help would be MUCHO appreciated.


Thanks

Brent.

View Replies !    View Related
Dynamic Text Problem With Nested Movies
i have a dynamic textfield using just the 'Arial' font, populated by an xml file.
without embedding the font, the text field appears correctly when tested on the server....
however, this movie (that contains this textfield) when loaded into another swf does not display the dynamic text at all!!

this is not an issue with flash not reading the xml file, because it still correctly passes images into the nested swf correctly....

do i need to embed the font into either of these movies? but it's not like i'm trying to use some exotic font...

i'm stumped!

thanks!

View Replies !    View Related
Dynamic Text Field Not Displaying In Nested MC...
Now I have a dynamic text field that loads and displays fine when I play the movie it is in from _root. But... I have that movie nested in another which is nested in another. When I play them nested together the dynamic text field will not display. There is an apparent area where the mouse changes to a cursor like a text field should be there, but nothing...

Anyone know how to fix this?

Here is the code where I create the text field...


ActionScript Code:
var news_var:String = "";
var xmlNews:XML = new XML();
xmlNews.ignoreWhite;
xmlNews.load("../news.xml");

xmlNews.onLoad = function(bSuccess:Boolean):Void {
if (bSuccess){
var xnRootNode:XMLNode = this.firstChild;
var aNewsItems:Array = xnRootNode.childNodes;
for(var i:Number = 0; i < 3; i++){
var aNewsItem:Array = aNewsItems[i].childNodes;
for(var j:Number = 0; j < aNewsItem.length; j++){
news_var += aNewsItem[j].firstChild.nodeValue + "
";
}
news_var += "
";
}
}
else{
news_var = "Document failed to load or parse. Error code: " + xmlNews.status;
}

_root.createTextField("newsText",5,251.9,7.8,348,197);
newsText.multiline = true;
newsText.wordWrap = true;
newsText.border = false;
newsText.html = true;
newsText.selectable = true;
newsText.embedFonts = true;

newsFormat = new TextFormat();
newsFormat.color = 0xffffff;
newsFormat.bullet = false;
newsFormat.underline = false;
newsFormat.size = 12;
newsFormat.font = "fontNews";

newsText.text = news_var;
newsText.setTextFormat(newsFormat);
};

View Replies !    View Related
Dynamic Text Field Not Showing In Nested MC...
Now I have a dynamic text field that loads and displays fine when I play the movie it is in from _root. But... I have that movie nested in another which is nested in another. When I play them nested together the dynamic text field will not display. There is an apparent area where the mouse changes to a cursor like a text field should be there, but nothing...

Anyone know how to fix this?

Here is the code where I create the text field...

var news_var:String = "";
var xmlNews:XML = new XML();
xmlNews.ignoreWhite;
xmlNews.load("../news.xml");

xmlNews.onLoad = function(bSuccess:Boolean):Void {
if (bSuccess){
var xnRootNode:XMLNode = this.firstChild;
var aNewsItems:Array = xnRootNode.childNodes;
for(var i:Number = 0; i < 3; i++){
var aNewsItem:Array = aNewsItems[i].childNodes;
for(var j:Number = 0; j < aNewsItem.length; j++){
news_var += aNewsItem[j].firstChild.nodeValue + "
";
}
news_var += "
";
}
}
else{
news_var = "Document failed to load or parse. Error code: " + xmlNews.status;
}

_root.createTextField("newsText",5,251.9,7.8,348,1 97);
newsText.multiline = true;
newsText.wordWrap = true;
newsText.border = false;
newsText.html = true;
newsText.selectable = true;
newsText.embedFonts = true;

newsFormat = new TextFormat();
newsFormat.color = 0xffffff;
newsFormat.bullet = false;
newsFormat.underline = false;
newsFormat.size = 12;
newsFormat.font = "fontNews";

newsText.text = news_var;
newsText.setTextFormat(newsFormat);
};

View Replies !    View Related
Dynamic Text In Nested Movie Clip
i have a dynamic text box in nested movie clip.. there are..

A_mc--->B_mc-->txtnumber

txtnumber is in B_mc, B_mc is in A_mc..

the txtnumber is blank. i wan to fill in number when i press on the button. and keep increasing if i continue press the button..
my code is like follow,


Code:
on(release){

Number(_root.A_mc.B_mc.txtnumber.text)=Number(_root.A_mc.B_mc.txtnumber.text)+1;

}
but the number has not show in the txtnumber....could someone please help me?? thanks a lot..

View Replies !    View Related
Nested Dynamic Textbox Will Not Display Text
Hi All,

Having a weird problem with my flash file (MX 2004).
I am loading an XML file in, and have no problems parsing the data into arrays etc.

I have 2 textboxes. 1 textbox is for debugging, it is in the root timeline (_root.testfield_txt). 1 more is inside a movie clip. 2 movie clips deep to be exact (_root.map_mc.infobox_mc.info_txt).

Note:
both testfield and infobox are dynamic textboxes, html enabled, font is arial, and i have embedded NO characters.

I have setup a rollover handler to display the text i loaded from my XML, which is a mix of english and korean text. I set it up to display in both the testfield and also the info field by using a simple textbox.htmlText = mytext.

Problem:
testfield: the text will ALWAYS display correcty, both english and korean.
infobox: NO text appears. Only if i embed the characters (Uppercase and Lowercase) will the english text display. Korean text still comes out as blank or squares.

I am also tracing the output, and both show the same output text. I just can't see anything in the infobox if i don't embed anything.

Why will I only see the infobox if i embed characters when it obviously works without even needing to embed any? (ie. testfield works fine, english and korean)

Is it because it's nested too deep?

Any and all help will be much appreciated
My apologies for the long post. Have spent half a day with this already


Thanks

irot

View Replies !    View Related
Text Field Nested In Movie Clip
in this code here, i create a movie clip, which will be used as a button, and then a text field inside of it. everything works when i don't specify width and height properties to menu.home. but when i do put width and height, as is shown in the code below, the text doesnt show up.

i need to have a button, and then be able to move the text inside the button wherever i want without actually moving the position of the button.


Code:


menu_buttons();
function menu_buttons() {
var textformat1=new TextFormat();
textformat1.font="arial";
textformat1.size=16;
textformat1.color=0x000000;
menu.createEmptyMovieClip("home",201);
menu.home._height=50;
menu.home._width=150;
menu.home.createTextField("menuText",202,20,60,100,40);
menu.home.menuText.setNewTextFormat(textformat1);
menu.home.menuText.text="Home";
var inX=menu.home.menuText._x;
var outX=inX+50;
menu.home.onRollOver=function() {
menu.home.onEnterFrame=function() {
this.menuText._x+=(outX-this.menuText._x)*.15;
}
position*=-1;
}
menu.home.onRollOut=function() {
menu.home.onEnterFrame=function() {
this.menuText._x+=(inX-this.menuText._x)*.15;
}
}
}

View Replies !    View Related
[F8] External Text Nested In A Movie Clip Problem
Hi Guys,

I'm having a real problem with getting my external dynamic text to load in a nested movie clip my flash movie, i've attached the .fla file and .txt file and would be grateful of any assistance. I'm a complete noob and know i've gone wrong somewhere down the line.


Lewn

View Replies !    View Related
Nested Dynamic Text Variable (is Testing My Patience)
Greetings =

spent about 4 hours staring at this thing now... tried all manner of variations - my patience is running out ;(

VERY SIMPLE SITUATION:

i have a dynamic text field (name:dynTxt1_txt, var:dyntext1), held in a movieclip (textholder1_mc.) on an animated timeline, held in another movieclip on the _root (text_link_mc). I can not seem to target this variable. ugh.


Code:
_root.text_link_mc.textholder1_mc.dynTxt1_txt.dyntext1 = "this is dynamic text";
I've tried "this", "_root", "_level0"
I've tried targeting just the variable and not the textfield
I've tried setting the variable up as a _global

I do have the font embedded.


Such a sophmoric situation has left me very frustrated....


Any help on this subject would be greatly appreciated.

b{[]}x

View Replies !    View Related
Loading Dynamic Text At Runtime In Nested Movies
Okay, here's the deal. HOW DO YOU LOAD DYNAMIC TEXT FROM AN ALTERNATIVE FILE SUCH AS TEXT.TXT INTO A NESTED MOVE FROM THE MAIN MOVIE!!! Also, how do you do the same with Dynamic Text under a mask. Somtimes my dear flash can be a pain.

View Replies !    View Related
Dynamic Text Inside Nested Movie Clip
hi everyone.please help me!!

basically i am trying to load text from a .txt file into a dynamic text box that is placed in a movie clip that is nested on the main root timeline. I have been trying to adapt this original code but without any luck:

stop();

loadVariables("mytext.txt", this);


i changed this to this:

stop();

loadVariables("mytext.txt","_root.note3_mc");

where mytext.txt is the name of the text file and note3_mc is the name of the movie clip.
the variable is called textField and my txt file reads as:

textField= testing!testing! lawrence your text goes here!!

when i test the movie i just get a blank text box.

any ideas people. thanks in advance.

View Replies !    View Related
Dynamic Text Not Working In Nested Movie Clips
Hello,

I am trying to load text dynamically in a movie clip and I'm stumped as to why it won't work. I can get it to work just fine on the root level but not in my movie clip, where I need it to be. I've creatd a video player and I have a movie clip that holds a scrollable row of thumbnails, so I need the text fields in this movie clip so they'll scroll with the thumbnails. I've tried every tutorial, every example of code online. Any suggestions would be greatly appreciated.

Thank you,

Candace

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved