Tree view not displaying labels

FLASH

    Next

  • 1. Liquid Layouts - Weird Effects??
    I am a beginner in AS3. I am looking to have a liquid layout in my flash. I have the AS already written now and it is working however I am getting some very weird effects so I must have something done incorrectly. The effect that I am going for is If someone resizes the browser window, I want all of the instances on the flash to resize properly as well. When different resolutions look at the flash header everything increases or decreases as necessary so that the header looks good and goes all the way across the screen. Can someone help me with what I am doing wrong? I believe the following two lines are incorrect. call_mc.scaleX = stage.width * .5; call_mc.scaleY = stage.height * .5; [code] public class NoScale extends MovieClip { public function NoScale() { stage.addEventListener(Event.RESIZE,onResize); stage.align = "TL"; // Top left align the stage stage.scaleMode = "noScale"; // items do not stretch to fit } public function onResize(event:Event) { // In the event call a method to move the items // or, call each item here to be sized //call_mc.x = stage.width/2; //call_mc.y = stage.height/2; call_mc.scaleX = stage.width * .5; call_mc.scaleY = stage.height * .5; //call_mc is just 1 movie instance on I have the stage. There are around 20 more. // ... etc } } } [/code] Thanks, Wayne
  • 2. enter text in field causes movieclip to change size can it be done?
    I have 3 textfields called A, B, and C. If the user places text in one of the textfields I want movieclip Z to be at about size 160. If they place type in 2 of the textfields I want movieclip Z to be at 130, and if they put text in all three textfields I want movieclip Z to be at 100. Is there anyway to do that?
  • 3. Trouble submitting contact form data
    I am having trouble getting the data in my contact form to submit to the formmail.php script on my server. I made an HTML version of the form and it works fine. But the data is not sending from the Flash site. The form has the following fields: FirstName LastName Phone email Subject MessageArea mySubmit (button) I have scavenged the web for help and pieced together the following code which I placed in the actions frame of the contact form. ____________________________________________ stop() mySubmit.onRelease = function() { infoToSend = new LoadVars(); serverResponse = new LoadVars(); infoToSend.FirstName = FirstName.text; infoToSend.LastName = LastName.text; infoToSend.Phone = Phone.text; infoToSend.email = email.text; infoToSend.subject = Subject.text; infoToSend.MessageArea = MessageArea.text; serverResponse.onLoad = function(success:Boolean) { if(success) { gotoAndStop(2); } else { // do something else } } infoToSend.sendAndLoad("formmail.php",serverResponse,"POST"); } --------------------------------------------------------------------------------
  • 4. Grabbing iP address
    Hello Usually to grab an IP address from a normal Web page, something like the following is used: <% "strIP = request.servervariables("REMOTE_ADDR")" %> But how would that be done in Flash? Many thanks. Steve
  • 5. ComboBox - text field / metrics problem
    When I create text on the fly it works fine, until I import comboBox controls: [i]//import mx.controls.ComboBox;[/i] This is true ONLY when using textMetrics to get the textFieldHeight. Has anyone else seen this, is there a work arounf or have I missed something? ------------------ CODE EXAMPLE - comment and change to test -------------------------------------- // combo box breaks --- comment to test import mx.controls.ComboBox; theString = "FlashType is a new text rendering engine introduced by Flash 8, that provides..." var theMenuItemMC:MovieClip = _root.createEmptyMovieClip("theMenuItemMC"+thenumber, _root.getNextHighestDepth()); // text formatting var my_fmt:TextFormat = new TextFormat(); // set attributes my_fmt.color = 0x000000; my_fmt.font = "Arial"; // text Metrics breaks --- comment to test var metrics:Object = my_fmt.getTextExtent(theString, 210); // create textfield using Metrics breaks --- comment to test theMenuItemMC.createTextField("my_txt", 1, 0, 5, 210, metrics.textFieldHeight); // normal text field for testing --- comment to test //theMenuItemMC.createTextField("my_txt", 1, 0, 5, 210, 200); theMenuItemMC.my_txt.multiline = true; theMenuItemMC.my_txt.wordWrap = true; theMenuItemMC.my_txt.text = theString; // apply the formatting theMenuItemMC.my_txt.setTextFormat(my_fmt);

Tree view not displaying labels

Postby blueprnt » Fri, 26 May 2006 14:47:24 GMT

Hi, 
 I am trying to use the Tree component, the tree view part is fine I can click 
on a folder and it expands click on the icon and it runs the preloader 
(component) and displays to pic fine. What it doesn?t do is display the text 
next to the folder or icon it is just blank. I have even tried copying the 
gallery_tree.fla (from \Flash 8\Samples and 
Tutorials\Samples\ActionScript\Galleries) and putting it in to my project with 
the same problem. So below are the xml file and the action script.

 Any help is appreciated
 BP :)

 <b>Note:</b> I am trying to use this in  _root.blank_mc.menu3 (which is a 
movie clip)

 XML file

 <?xml version="1.0"?> 

 <tree>
 	<node label='Gallery 1'>
 		<node label='DCP_0730' src="images/DCP_0730.jpg" />
 		<node label='DCP_0731' src="images/DCP_0731.jpg" />
 		<node label="DCP_0732" src="images/DCP_0732.jpg" />
 		<node label="DCP_0733" src="images/DCP_0733.jpg" />
 		<node label="DCP_0734" src="images/DCP_0734.jpg" />
 		<node label="DCP_0735" src="images/DCP_0735.jpg" />
 		<node label="DCP_0736" src="images/DCP_0736.jpg" />
 		<node label="DCP_0737" src="images/DCP_0737.jpg" />
 		<node label="DCP_0738" src="images/DCP_0738.jpg" />
 		<node label="DCP_0739" src="images/DCP_0739.jpg" />
 		<node label="DCP_0740" src="images/DCP_0740.jpg" />
 		<node label="DCP_0741" src="images/DCP_0741.jpg" />
 		<node label="DCP_0742" src="images/DCP_0742.jpg" />
 		<node label="DCP_0743" src="images/DCP_0743.jpg" />
 		<node label="DCP_0744" src="images/DCP_0744.jpg" />
 		<node label="DCP_0745" src="images/DCP_0745.jpg" />
 		<node label="DCP_0746" src="images/DCP_0746.jpg" />
 		<node label="DCP_0747" src="images/DCP_0747.jpg" />
 	</node>
 </tree>

 <b>Action script</b>



 var my_pb:mx.controls.ProgressBar;
 var my_ldr:mx.controls.Loader;
 var my_tree:mx.controls.Tree;
 my_pb._visible = false;
 my_pb.indeterminate = true;
 my_pb.setSize(160, 30);
 my_pb.source = my_ldr;
 my_pb.mode = "polled";
 var pbListener:Object = new Object();
 pbListener.complete = function(evt:Object) {
 	evt.target._visible = false;
 };
 my_pb.addEventListener("complete", pbListener);
 var treeDP_xml:XML = new XML();
 treeDP_xml.ignoreWhite = true;
 treeDP_xml.onLoad = function(success:Boolean) {
 	if (success) {
 		my_tree.dataProvider = this.firstChild;
 	}
 };
 treeDP_xml.load("gallery_tree.xml");
 var treeListener:Object = new Object();
 treeListener.change = function(evt:Object) {
 	var treeNode:XMLNode = evt.target.selectedItem;
 	if (treeNode.attributes.src != undefined) {
 		my_pb._visible = true;
 		my_ldr.load(treeNode.attributes.src);
 	}
 };
 my_tree.addEventListener("change",treeListener);

 stop();


Re: Tree view not displaying labels

Postby blueprnt » Mon, 29 May 2006 13:45:36 GMT

Ok must harder than I thought.
Using the flash sample gallery_tree I can get it to work on the mail timeline but not when I put it in _root.blank_mc.menu3 movie clip 
Any help out there??
BP

Re: Tree view not displaying labels

Postby blueprnt » Mon, 05 Jun 2006 13:20:27 GMT

anyone out there with any sugestions? the problem is in the action script 
because it works on the mail time line but not in _root.blank_mc.menu3 which is 
were I need it.

 Action script below

 var my_pb:mx.controls.ProgressBar;
 var my_ldr:mx.controls.Loader;
 var my_tree:mx.controls.Tree;
 my_pb._visible = false;
 my_pb.indeterminate = true;
 my_pb.setSize(160, 30);
 my_pb.source = my_ldr;
 my_pb.mode = "polled";
 var pbListener:Object = new Object();
 pbListener.complete = function(evt:Object) {
 	evt.target._visible = false;
 };
 my_pb.addEventListener("complete", pbListener);
 var treeDP_xml:XML = new XML();
 treeDP_xml.ignoreWhite = true;
 treeDP_xml.onLoad = function(success:Boolean) {
 	if (success) {
 		my_tree.dataProvider = this.firstChild;
 	}
 };
 treeDP_xml.load("gallery_tree.xml");
 var treeListener:Object = new Object();
 treeListener.change = function(evt:Object) {
 	var treeNode:XMLNode = evt.target.selectedItem;
 	if (treeNode.attributes.src != undefined) {
 		my_pb._visible = true;
 		my_ldr.load(treeNode.attributes.src);
 	}
 };
 my_tree.addEventListener("change",treeListener);

 stop();


Re: Tree view not displaying labels

Postby juankpro » Tue, 06 Jun 2006 01:37:07 GMT

I think the other member don't answer you not becuase it is a problem hard to 
solve, but becuase nobody can get your code to fail. I am testing your code on 
many places, main time line, a movie clip and a movie clip inside a movieclip 
but it works.


Re: Tree view not displaying labels

Postby blueprnt » Tue, 06 Jun 2006 10:23:06 GMT

thanks juankpro that was a big help it let me know where to start looking, 
first I started deleating all the different scripts on the main timeline (it is 
compleate flash website) and found that it wasn't any of the action scrits 
causing it not to display. So the only thing left was the fact that it was in a 
mask. Once I moved it out of the mask it worked fine!!.  But the thing is now 
how do I get it to work in a mask???? You can test this for yourself by opening 
the gallery_tree.fla in \Flash 8\Samples and adding a layer making it a mask 
(and making a box around the whole thing).  So now I know what is causing the 
problem how can I fix it?
 BP


Similar Threads:

1.Tree view not displaying labels

Hi, 
 I am trying to use the Tree component, the tree view part is fine I can click 
on a folder and it expands click on the icon and it runs the preloader 
(component) and displays to pic fine. What it doesn?t do is display the text 
next to the folder or icon it is just blank. I have even tried copying the 
gallery_tree.fla (from \Flash 8\Samples and 
Tutorials\Samples\ActionScript\Galleries) and putting it in to my project with 
the same problem. So below are the xml file and the action script.

 Any help is appreciated
 BP :)

 <b>Note:</b> I am trying to use this in  _root.blank_mc.menu3 (which is a 
movie clip)

 XML file

 <?xml version="1.0"?> 

 <tree>
 	<node label='Gallery 1'>
 		<node label='DCP_0730' src="images/DCP_0730.jpg" />
 		<node label='DCP_0731' src="images/DCP_0731.jpg" />
 		<node label="DCP_0732" src="images/DCP_0732.jpg" />
 		<node label="DCP_0733" src="images/DCP_0733.jpg" />
 		<node label="DCP_0734" src="images/DCP_0734.jpg" />
 		<node label="DCP_0735" src="images/DCP_0735.jpg" />
 		<node label="DCP_0736" src="images/DCP_0736.jpg" />
 		<node label="DCP_0737" src="images/DCP_0737.jpg" />
 		<node label="DCP_0738" src="images/DCP_0738.jpg" />
 		<node label="DCP_0739" src="images/DCP_0739.jpg" />
 		<node label="DCP_0740" src="images/DCP_0740.jpg" />
 		<node label="DCP_0741" src="images/DCP_0741.jpg" />
 		<node label="DCP_0742" src="images/DCP_0742.jpg" />
 		<node label="DCP_0743" src="images/DCP_0743.jpg" />
 		<node label="DCP_0744" src="images/DCP_0744.jpg" />
 		<node label="DCP_0745" src="images/DCP_0745.jpg" />
 		<node label="DCP_0746" src="images/DCP_0746.jpg" />
 		<node label="DCP_0747" src="images/DCP_0747.jpg" />
 	</node>
 </tree>

 <b>Action script</b>



 var my_pb:mx.controls.ProgressBar;
 var my_ldr:mx.controls.Loader;
 var my_tree:mx.controls.Tree;
 my_pb._visible = false;
 my_pb.indeterminate = true;
 my_pb.setSize(160, 30);
 my_pb.source = my_ldr;
 my_pb.mode = "polled";
 var pbListener:Object = new Object();
 pbListener.complete = function(evt:Object) {
 	evt.target._visible = false;
 };
 my_pb.addEventListener("complete", pbListener);
 var treeDP_xml:XML = new XML();
 treeDP_xml.ignoreWhite = true;
 treeDP_xml.onLoad = function(success:Boolean) {
 	if (success) {
 		my_tree.dataProvider = this.firstChild;
 	}
 };
 treeDP_xml.load("gallery_tree.xml");
 var treeListener:Object = new Object();
 treeListener.change = function(evt:Object) {
 	var treeNode:XMLNode = evt.target.selectedItem;
 	if (treeNode.attributes.src != undefined) {
 		my_pb._visible = true;
 		my_ldr.load(treeNode.attributes.src);
 	}
 };
 my_tree.addEventListener("change",treeListener);

 stop();

2.Filter Tree-view display source xml

I have a treeview that displays an xml structure.

 I converted the xml to an XMLListCollection, and ran a filter but this only 
filters the parent node, I need to filter children from the treeview display.

 I can make a new xml from the original only containing the data I need, 
however I need the xml data information for another display window when 
selected. I just don't want it as a tree node.

 any ideas

 Thanks



3.Flash Tree Component Does Not Display on All Machines

All-  If anyone could help me with this, I would greatly appreciate it.  I am 
currently designing an application that utilizes the Tree component.  I am 
developing with Macromedia MX Professional 2004.   Currently the tree component 
reads an XML file to populate its branches.  The tree works as expected on most 
machines, but I have seen that on certain laptops from IBM that we use, most of 
my Flash displays on other portions of the application, but where the tree 
component should display I see only a black box with a green border.  I have 
run out of ideas on what may be causing this.  The machines that view the Tree 
component, and those which do not are running the same OS, same browser 
version, and what strikes me as weird is that it is only the Tree components 
not displaying from Flash.  If anyone has any ideas on why the component would 
not be viewable, I would greatly appreciate it.  Take care  Christopher R. 
Patrick  XXXX@XXXXX.COM 

4.Report will not "view" on screen, flashes back to design view

I have created a report in design view.  When I click on view, the screen 
flashes, but the report does not appear.  It stays in design view.

If I try to run the report from the reports menu, screen flashes and report 
menu re-appears.  

Other reports in this database run fine.

Using Access 2000 with Windows XP

Thanks for any help.

5.Can tree component's label be editable?

Hi guys!

 I would like to create a tree that has the ability to be editable.
 I would be more than glad if someone of you could tell me how can I do that.

 I'd have two more questions:
 - I would like to create nodes and delete nodes in an xml. I tried to use the 
addTreeNodeAt() method, but it is not good if you want to create a node in 
nested nodes. After that I tried to add a node directly to the xml, but if I 
close the branch and open it again, the next branch' s childnode has the part 
of this node. it is very strange. Maybe I should operate with the setIsBranch() 
function that I really don't understand the usage of it.

 If you were succesfull in creating nodes in the selected nodes, please post 
here how you did.

 Thank you very much

6. mx.controls.Tree shows no labels in _level1

7. Tree component labels

8. Tree component : node label



Return to FLASH

 

Who is online

Users browsing this forum: No registered users and 64 guest