Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #51  
Old 01-13-2009, 07:19 PM
Trausti Hraunfjord's Avatar
Trausti Hraunfjord Trausti Hraunfjord is offline
Administrator
 
Join Date: Dec 2007
Location: Icelander in Peru(dise)
Posts: 1,563
Downloads: 1
Uploads: 0
Send a message via Skype™ to Trausti Hraunfjord
Default

I guess we Icelanders come in all sizes and distances

It would be good if one could easily add properties of own choice as needed... but that will probably have to wait until the world freezes over.
__________________
Trausti Hraunfjord
Flashificator, the GUI for FPP.
Win-Mac compatible.
Reply With Quote
  #52  
Old 01-14-2009, 04:26 AM
chadu chadu is offline
Junior Member
 
Join Date: Jan 2009
Posts: 29
Downloads: 0
Uploads: 0
Default Thanks, Tommy.

Yeah, I was able to replicate that text disappearing bug... very odd indeed.

I have no idea what that could be.

A font problem? How about invalidating the display list? Forcing a stage redraw,etc?
Reply With Quote
  #53  
Old 01-14-2009, 08:47 PM
chadu chadu is offline
Junior Member
 
Join Date: Jan 2009
Posts: 29
Downloads: 0
Uploads: 0
Default

Tommy,
I have tracked the text disappearring bug down...

It appears that the width setting function is not resetting properly upon a revisit...
Code:
if (hotspot.getParam("width")) {
		t.width = hotspot.getParam("width");
	}
	if (hotspot.getParam("height")) {
		t.height = hotspot.getParam("height");
		if (hotspot.getParam("width")) {
			t.autoSize = TextFieldAutoSize.NONE;
		}
simply commenting that out allows me to roam throughout a tour and revisti nodes with hotspots that contain text.
Reply With Quote
  #54  
Old 01-15-2009, 07:18 PM
allSaints's Avatar
allSaints allSaints is offline
Senior Member
 
Join Date: Aug 2008
Location: Stockholm, Sweden
Posts: 945
Downloads: 0
Uploads: 0
Default

Thanks chadu - great work!

Unfortunately you lose the ability to manually set the size of the box, but I'm not sure that worked correctly anyway.

Here is an updated zip file with all three plugins.

Regards,
Tommy
Reply With Quote
  #55  
Old 01-15-2009, 07:30 PM
chadu chadu is offline
Junior Member
 
Join Date: Jan 2009
Posts: 29
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by allSaints View Post
Thanks chadu - great work!

Unfortunately you lose the ability to manually set the size of the box, but I'm not sure that worked correctly anyway.

Here is an updated zip file with all three plugins.

Regards,
Tommy
No problem... the real power would be to have the hotspots be able to detect the text box's width and resize themselves to fit the text box.

I have something like that working, but when I do that, the alignment of the hotspot shifts... ideas on how to fix that?
Reply With Quote
  #56  
Old 01-16-2009, 02:07 PM
allSaints's Avatar
allSaints allSaints is offline
Senior Member
 
Join Date: Aug 2008
Location: Stockholm, Sweden
Posts: 945
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by chadu View Post
No problem... the real power would be to have the hotspots be able to detect the text box's width and resize themselves to fit the text box.
I'm not sure what you mean by that, but what I meant, is that maybe you want the box to be for example wider than your text is. Then you can't let the textField component use autoSize, and you have to supply the width as a parameter.

Regarding the alignment of the spot - what kind of alignment do you use? align="CM" (center-middle of the hotspot) is default. I always use TL for my text boxes.


Tommy
Reply With Quote
  #57  
Old 01-16-2009, 06:27 PM
chadu chadu is offline
Junior Member
 
Join Date: Jan 2009
Posts: 29
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by allSaints View Post
I'm not sure what you mean by that, but what I meant, is that maybe you want the box to be for example wider than your text is. Then you can't let the textField component use autoSize, and you have to supply the width as a parameter.

Regarding the alignment of the spot - what kind of alignment do you use? align="CM" (center-middle of the hotspot) is default. I always use TL for my text boxes.


Tommy
I have a textfield on stage in the hotspot file and a designed piece of art I am using as a background for the textfield. The art is named as an instance on the stage for the hotspots file in the layer directly below the hotspot... I'm attempting to do something like this:

Code:
// Timer event: look for numbered text string or new text in text attribute
function lookForNumberedText(event:Event) {
	panoText = hotspot.getParam("text");

	// do we have a numbered text string?
	if (panoText.charAt(0) == '#') {
		// yes - ask "texts.swf" to send it
		timer1.stop();
		switch (panoText.substr(1)) {
			case "V":		// show version
				hotspots.execute(id+".text="+version);
				break;
			default:			// get numbered text
				hotspots.execute("external.texts.query="+id+"|"+panoText.substr(1));
				break;
		}
		timer2.start();
	}
	else {
		bg.width =  hotspot.getParam("artwidth");
		if (panoText != saveText) {
			saveText = panoText;
			panoText = saveText.replace("%2C",",");
			panoText = panoText.replace("%3B",";");
			t.text = panoText;
			//trace("----------- "+id+": setting new text");
		}
	}
}
My edits ---- bg.width = hotspot.getParam("artwidth");

bg is the name of the movieclip behind the text box. artwidth is a prop I set in the xml so that I may scale the width o the scalenine grid enabled button.

When I use this, it pushes the bg to the left, and the text to the right, moving the copy of the art's bg.

Thoughts?
Reply With Quote
  #58  
Old 01-16-2009, 07:10 PM
allSaints's Avatar
allSaints allSaints is offline
Senior Member
 
Join Date: Aug 2008
Location: Stockholm, Sweden
Posts: 945
Downloads: 0
Uploads: 0
Default

chadu,

I'm not an AS3 guru - I've only been doing this for a couple of months in my sparetime. Maybe it has something to do with the registration point of bg...?

Tommy
Reply With Quote
  #59  
Old 01-16-2009, 07:19 PM
allSaints's Avatar
allSaints allSaints is offline
Senior Member
 
Join Date: Aug 2008
Location: Stockholm, Sweden
Posts: 945
Downloads: 0
Uploads: 0
Default

Hi,

After a request from nikopol, I have complimented the textbox plugin with the possibility to get the text in the textbox from an attribute of another hotspot.

So, in your textbox plugin you write:

text="*spotID.attr"

The important thing to remember is to start with an asterisk (*) to make the plugin understand that it is a reference to another attribute.
If you change the reference to another attribute or change the text in the attribute itself, the text in the textbox will be dynamically updated.

You can download the updated plugin here:


Regards,
Tommy
Reply With Quote
  #60  
Old 01-19-2009, 10:22 PM
chadu chadu is offline
Junior Member
 
Join Date: Jan 2009
Posts: 29
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by allSaints View Post
chadu,

I'm not an AS3 guru - I've only been doing this for a couple of months in my sparetime. Maybe it has something to do with the registration point of bg...?

Tommy
Nope, not quite. Not sure where it's coming from, but altering hte ergistration only made it worse, really.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:25 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.