Put PHP Content into Dynamic Text Field
How do I put the contents of a php document into a dynamic
text field in a Flash document? Thanks.
G
Do you mean an html document generated from a PHP script?
Do you mean the source of a PHP script?
Probably you mean you want to format a page such as a PHP
script would do.
That is done either manually inside a Flash movie or
dynamically via
Actionscripting. Then you only send data back and forth
between PHP and
Flash using either the LoadVars or the XML Actionscript
classes. You can use
HTML inside of Flash TextField objects but again that will be
data sent from
the PHP server script.
Here are some basic examples I use in Flash seminars you can
look at:
http://www.hosfordusa.com/ClickSystems/courses/flash/examples/LoadVars/LoadVarsEx01.php
http://www.hosfordusa.com/ClickSystems/courses/flash/examples/LoadVars/Ex02/LoadVarsEx02.p hp
http://www.hosfordusa.com/ClickSystems/courses/flash/examples/GenerateFlashObjectsFromPHP/ Ex01/GenerateFlashObjectsFromPHPEx01_Doc.php
http://www.hosfordusa.com/ClickSystems/courses/flash/examples/XMLPHP/EX01/XMLPHPEchoEx01_D oc.php
You also want to look at the docs for LoadVars and XML
sendAndLoad methods:
XML
http://livedocs.macromedia.com/flash/8/main/00002879.html
LoadVars
http://livedocs.macromedia.com/flash/8/main/00002336.html
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
"gena.wenli" <[email protected]> wrote in
message
news:e5g6av$lpv$[email protected]..
How do I put the contents of a php document into a dynamic
text field in a
Flash document? Thanks.
G
Similar Messages
-
Putting variable text into dynamic text field
How can I make var text input into a dynamic text field that
appears within another timeline (movieclip) on a different
frame?How can I make var text input into a dynamic text field that
appears within another timeline (movieclip) on a different
frame? -
How do I put a hyperlink into a text field?
Hi,
I am using flash for the first time and I need some help. I
created a button called Contact and when the user scrolls over text
appears with contact details. I have an email address in there and
would like to make it into a hyperlink. I tried putting <a
href='mailto: into the URL Links box but it doesn't work.
Can anyone help me do this? Any help would be really
appreciated!
Thanks,
GillHi,
Thanks so much for helping. Unfortunately the link still
doesn't work
I have it as dynamic text, does that make any
difference?
Thanks again,
Gill -
Asfunction/Hypertext/Dynamic Text Fields
I have the following code to create a hypertext link to
another frame label w/in a dynamic text field. I'm pretty sure it
will work, but I don't know where to implement the code. If I put
it in the dynamic text field's actions layer it wipes out my other
text in the field but gives me a working hyperlink. Any advice?
Beat_Poets.htmlText = "<a
href=\"asfunction:gotoAndPlayF,Howl\">Howl</a><br>";
function gotoAndPlayF(fLabel) {
_root.gotoAndPlay(fLabel);
}Beat_Poets.htmlText = "<a
href=\"asfunction:gotoAndPlayF,Howl\">Howl</a><br>";
is htmlText assignment. if you have other text that you want
to appear before this use: -
Load multiple parts of an XML file into one dynamic Text Field
Hi I am trying to load text from an external XML file into a dynamic text box. I have so far managed to load single parts of the XML file into a dynamic text field. I now want to be able to load different parts of the XML file (something similar to a string with appendText) into the same text Field.
I have so far managed to achive this using the String and append text properties, but would like to use XML file to do it instead.
Any tips please?
ThanksIn essence you can just do:
TextField.text = XML.node1 + XML.node2; -
Dynamic text field, content and alpha
Hi.
I have a MovieClip (mcContainer) that contains a dynamic text
field (txt1), that was created directly on the Stage. Then I added
text to the text field with:
this.mcContainer.txt1.text = "my wonderful text";
When I change the mcContainer's alpha, the text's alpha
doesn't change. So, what am I doing wrong?
Thank you in advance.Look up TextField._alpha in the help files. The same rules
apply if you
manipulate the _alpha property of a MovieClip containing the
TextField. -
Linking a class to a dynamic text field to load XML data.
Hi,
I'm quite new to ActionScript and would be grateful for any help here.
I want to load text into a dynamic text field (called 'about_tab') using a class depending on the language selected (by clicking on a flag icon) by the user.
I managed to get this to work when the ActionScript was written directly in the timeline, but am having problems with doing the same thing via a class.
This is my class file:
package
import flash.display.SimpleButton;
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.events.Event;
public class ChangeLang extends SimpleButton
public function ChangeLang()
addEventListener(MouseEvent.CLICK, switchLang);
trace("ChangeLang class working");
public function switchLang(event:MouseEvent):void
var lang = event.target.name;
var req:URLRequest = new URLRequest("languages/"+lang+".xml");
var loader:URLLoader = new URLLoader();
var substance:XML;
function xmlLoaded(event:Event):void
trace("function xmlLoaded is running");
substance = new XML(loader.data);
about_tab.text = substance.about_lbl;
loader.addEventListener(Event.COMPLETE, xmlLoaded);
loader.load(req);
Here's one of my XML files (the other is the same except "About" is written in German):
<substance>
<about_lbl>About</about_lbl>
</substance>
When I run it, it returns my trace statements that the class ChangeLang and the function xmlLoaded are running, but no text appears in the dynamic text field (I should/want to see the word 'About'). I get this error message:
1120: Access of undefined property about_tab
The problem, I'm guessing, is in the part in red in my code. I think I need to target the text field in the display list by creating a reference to it. If so, could someonw point out how I do this, or perhaps a tutorial that would help. I've tried adding the word stage (i.e.,stage.about_tab.text = substance.about_lbl; ) but it still doesn't connect. I guess there's something really simple I'm missing, so I apologize if this comes across as a stupid question
Thanks for any help.Hello flashrocket!
I'm also new to AS3 and I've just started using external classes and I think I know what you should do to put your code to work.
Instead of using the text field you created inside your flash file, why don't you use the "TextField" class to create an instance of this object? It's the exact same thing as when you create and instantiate a new text field inside Flash.
First, import flash.text.*; (includes classes like TextField, TextFieldAutoSize, TextFormat, TextFormatAlign, etc)
Than you just have to create a var like
public var about_tab : TextField;
or
public var about_tab : TextField = new TextField();
then, to adjust the properties of this tab you use dotsyntax as if it where on your stage like:
about_tab.x = 50; about_tab.alpha = .5; etc...
you can even create a function to "config your textField"
private function createAndConfigTextField() : void {
about_tab = new TextField(); //you only need this line if you
// only typed something like "public var about_tab:TextField;
// if instead you used "public var about_tab:TextField = new TextField(); outside
// this function, just skip this first line because you already have an instance of
// text field named "about_tab"...
about_tab.autoSize = TextFieldAutoSize.CENTER;
about_tab.background = true;
about_tab.border = true;
var aboutTextFormat : TextFormat = new TextFormat();
format.font = "Arial";
format.color = 0x000000;
format.size = 11;
format.bold = true;
format.align = TextFormatAlign.CENTER;
about_tab.defaultTextFormat = aboutTextFormat;
addChild(about_tab);
This is just an example of what you can do... I hope you get it... let me know if you have any doubt... -
Auto scrolling dynamic text field(news ticker)
> This message is in MIME format. Since your mail reader
does not understand
this format, some or all of this message may not be legible.
--B_3272625483_2679871
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit
Does anyone know how to make a scrollable dynamic text field
scroll on its
own and also with user interaction?
Thanks in advance for your help.
Bill
--B_3272625483_2679871
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Auto scrolling dynamic text field(news
ticker)</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN
STYLE=3D'font-size:12.0px'>Does =
anyone know how to make a scrollable dynamic text field
scroll on its own an=
d also with user interaction?<BR>
<BR>
Thanks in advance for your help.<BR>
<BR>
Bill</SPAN></FONT>
</BODY>
</HTML>
--B_3272625483_2679871--I found this:
http://www.kirupa.com/developer/mx/dynamic_scroller.htm
I copied the actual scroller and put it in my .fla and it
worked! Now if I can only figure out links in XML... -
I've created a dynamic text field where I've insert into a lot of HTML code.
Since it's too much long I've used a default scrollbar and simply dropped it onto the field so that It's linked to that.
When I try it the bar is there but I can just see the upper arrow and the bottom one; the middle part isn't visible and I can't scroll down the HTML content.
Any idea?It's possible it will work in AS3 since I just tried it 1) didn't kick up an error, and 2) worked (using your code, so I don't know what your problem really is).
That's the trouble with having languages that allow similar things to be coded differently... it can sometimes be hard to tell. It's bad enough there are usually numerous ways to approach a design.
If I were setting an autoSize I would be using (based on the help docs)...
links.autoSize = TextFieldAutoSize.LEFT; -
ok i am at the last part of my project. it worked all well and reads all text fields from a text file as seen on :
http://www.myblueranch.com/index2.html
now i am trying to get the same thing working from MYSQL.
Notice that the text file i used for index2.html is called
www.myblueranch.com/trees1.txt
and it was a direct copy/paste from the php page that gave the results from the MYSQL query. (the php query page is:)
www.myblueranch.com/flash_names.php
The problem is i am getting an error in
www.myblueranch.com/index.html
which uses the php to get the text for the dynamic fields.
I get the following error:
TypeError: Error #2007: Parameter text must be non-null.
at flash.text::TextField/set text()
at final_fla::MainTimeline/onDataLoad()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
my flash movie has 113 buttons called button_1 --> button_113 and 113 dynamic text fields tcname_1-->tcname_113
my AC3 code is the following:
// button links: to all buttons to open in iframe 'tdes'
// link corrosponds to button number
// i have 113 buttons.
for(var i:int=1;i<=130;i++){
if(this["button_"+i]){
this["button_"+i].addEventListener(MouseEvent.CLICK,f);
function f(e:MouseEvent):void{
var n:String=e.currentTarget.name.split("_")[1];
navigateToURL(new URLRequest("ranch.php?id="+n),"tdes");
// end of button links
//Create the URLLOader instance
var myLoader:URLLoader = new URLLoader()
//the data will come as URL-encoded variables
myLoader.dataFormat = URLLoaderDataFormat.VARIABLES
//Load using an URLRequest, even beeing local
myLoader.load(new URLRequest("flash_names.php"))
//onLoad handler listener
myLoader.addEventListener(Event.COMPLETE, onDataLoad)
//Error handling
myLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOError)
myLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError)
//Could be an error or just a message
myLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus)
//add a listener for the complete event
function onDataLoad(evt:Event){
trace(evt.target.data.cant);
for(var i:uint=1; i<evt.target.data.cant; i++){
this["tcname_"+i].text = evt.target.data["tcname_"+i]
this["tcname_"+i].autoSize="left"
this["tcname_"+i].multiline = true;
this["tcname_"+i].wordWrap = true;
this["tcname_"+i].width = 70;http://forums.adobe.com/post!input.jspa?container=2066&containerType=14
this["tcname_"+i].visible = false;
this["button_"+i].addEventListener(MouseEvent.ROLL_OVER, buttonover);
this["button_"+i].addEventListener(MouseEvent.ROLL_OUT, buttonout);
trace(i);
// ON ROLLOVER make text field visible and change color
function buttonover(e:Event){
var tf:TextField=TextField(this["tcname_"+e.currentTarget.name.split("_") [1]]);
trace (tf.name);
tf.visible = true;
tf.textColor=0xff0000;
// ON ROLLOVER make change color and make invisible
function buttonout(e:Event){
var tf:TextField=TextField(this["tcname_"+e.currentTarget.name.split("_") [1]]);
tf.textColor=0x000000;
tf.visible = false;
//error callbacks
function onIOError(evt:IOErrorEvent){
trace("IOError: "+evt.text)
function onHTTPStatus(evt:HTTPStatusEvent){
trace("HTTPStatus: "+evt.status)
function onSecurityError(evt:SecurityErrorEvent){
trace("SecurityError: "+evt.text)Kenneth this created another problem:
1- i changed the code of the php to make it look like:
&tcname_1=Cherokee SweetGum&tcname_2=cedar&tcname_3=cedar&cant=3
and now i get this error:
Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
at Error$/throwError()
at flash.net::URLVariables/decode()
at flash.net::URLVariables()
at flash.net::URLLoader/onComplete()
Also when i do that even when i load from a textfile (i.e. not from MYSQL through php) i see no text at all!!
2- Where did you want me to put these trace lines? if i put them in the end of my ac3 script i get this compile error:
Scene 1, Layer 'Layer 1', Frame 1, Line 97
1120: Access of undefined property evt.
did i do something wrong? -
Adding a progress loader to a dynamic text field / scrollPane
I have a dynamic text field which is loading images from an external html. This text is named scrollPaneImage and is a child of a movieClip called scrollPaneContent. I then load scrollPaneContent into a scroll pane named scrollPane
When the user interacts with my swf different images are loaded into scrollPaneImage. Since some of the images take a few seconds to load, I'd like there to be a progress loader displayed in the scrollpane.
I have tried adding the progress event listner to the dynamic text, the movie clip and the scrollpane and cannot get it to respond or track the loading.
scrollPaneContent.addEventListener(ProgressEvent.PROGRESS,reportProgress);
function reportProgress(e:ProgressEvent):void {
trace(e.bytesLoaded + " loaded out of " + e.bytesTotal);
trace("LOADED");
Can anyone suggest what I might be doing wrong or of another approach?
thanks in advance,
JoshHi KGLAD. Thanks for the response. Yes my code is a little messy. Here I have included everything and tried to do a little cleaning. Is there enough code here for you to get an idea of how/when things are firing?
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.distriqt.gmaps.kml.utils.*;
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.TweenLite;
import flash.geom.Point;
import com.greensock.plugins.*;
TweenPlugin.activate([AutoAlphaPlugin]);
import com.google.maps.controls.NavigationControl;
import com.google.maps.controls.MapTypeControl;
import com.google.maps.controls.OverviewMapControl;
import com.google.maps.overlays.GroundOverlay;
import com.google.maps.overlays.GroundOverlayOptions;
import com.google.maps.LatLng;
import com.google.maps.LatLngBounds;
import com.google.maps.MapMouseEvent;
import com.google.maps.controls.*;
import com.google.maps.overlays.Marker;
import com.google.maps.InfoWindowOptions;
import com.google.maps.overlays.MarkerOptions;
import com.anttikupila.utils.JPGSizeExtractor;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.net.URLLoader;
import fl.controls.UIScrollBar;
import flash.events.Event;
import fl.events.ScrollEvent;
import flash.sampler.NewObjectSample;
[Embed(source="ICONS/PHOTO_BLACK.png")]var photoIcon:Class;
[Embed(source="ICONS/BLOG_BLACK.png")]var blogIcon:Class;
scrollPane
// GMAP PARAMETERS
var map:Map = new Map();
map.key = "map key";
//map.key = "api key";
//define the size of the map extent....
map.sensor = "false";
map.setSize(new Point(stage.stageWidth, stage.stageHeight));
map.addEventListener(MapEvent.MAP_READY, onMapReady);
map.addEventListener(MapEvent.MAP_READY, createmarkers);
map.addEventListener(MapEvent.MAP_READY, createMarkerArrays);
map.addEventListener(MapEvent.MAP_READY, createPhotoPingers);
this.addChild(map);
map.setSize(new Point(stage.stageWidth, stage.stageHeight));
//on map ready params
function onMapReady(event:Event):void
map.setCenter(new LatLng(48,-113.5), 8, MapType.PHYSICAL_MAP_TYPE);
map.enableScrollWheelZoom();
map.disableContinuousZoom();
//Marker options for a photo piece
var photoMarkerOptions:MarkerOptions = new MarkerOptions();
photoMarkerOptions.icon = new photoIcon();
photoMarkerOptions.hasShadow=false;
//Marker options for a blog piece
var blogMarkerOptions:MarkerOptions = new MarkerOptions();
blogMarkerOptions.icon = new photoIcon();
blogMarkerOptions.hasShadow=false;
//load xml tester
var pntloader:URLLoader = new URLLoader();
var pntxml:XML = new XML();
pntloader.addEventListener(Event.COMPLETE, loadpntXML);
pntloader.load(new URLRequest("map_feed.xml"));
// create an array of jpgs to index
var JPGIndexArray:Array = new Array();
//Create array that will be populated with points
var pointsArray:Array = new Array();
//Load the XML
function loadpntXML(e:Event):void {
pntxml=new XML(e.target.data);
pntxml.ignoreWhite = true;
for (var i:int = 0; i< pntxml.row.length(); i++){
pointsArray[i]="mrk"+i;
JPGIndexArray[i]="JPG"+i;
//trace(pntxml);
//Create the markers and add them to the map
function createmarkers(event:Event):void
for (var i:Number = 0; i < pntxml.row.length(); i++) {
var markerOptions:MarkerOptions = new MarkerOptions();
if (pntxml.row[i].TYPE=="PHOTO")
markerOptions.icon = new photoIcon();
markerOptions.tooltip = "Photo";
markerOptions.hasShadow=false;
else if(pntxml.row[i].TYPE=="BLOG")
markerOptions.icon = new blogIcon();
markerOptions.tooltip = "Blog Entry";
markerOptions.hasShadow=false;
else
null
pointsArray[i] = new Marker(new LatLng(pntxml.row[i].LAT,pntxml.row[i].LONG),markerOptions);
markerA.push(pointsArray[i]);
map.addOverlay(pointsArray[i]);
pointsArray[i].addEventListener(MapMouseEvent.CLICK,indexCalledMarkerRecord);
pointsArray[i].addEventListener(MapMouseEvent.CLICK,scrollPanePopulate);
// PING PHOTO DIMENSIONS BEFORE LOADING //
var je : JPGSizeExtractor = new JPGSizeExtractor( );
je.addEventListener( JPGSizeExtractor.PARSE_COMPLETE, jeLoadHandler );
je.addEventListener( JPGSizeExtractor.PARSE_FAILED, jeParseFailed );
function createPhotoPingers(event:Event):void{
for (var k:Number=0; k <pntxml.row.length(); k++){
JPGIndexArray[k]=new JPGSizeExtractor();
JPGIndexArray[k].debug = false;
JPGIndexArray[k].addEventListener(JPGSizeExtractor.PARSE_COMPLETE, jeLoadHandler );
trace("madeit");
pingPhotoUrls();
function pingPhotoUrls():void
for (var i:Number = 0; i < pntxml.row.length(); i++) {
var calledMarkerUrl=pntxml.row[i].URL_OF_CONTENT;
JPGIndexArray[i].extractSize(calledMarkerUrl);
var JPG1=null;
function jeLoadHandler(e:Event) : void {
trace(e.currentTarget.width + "x" + e.currentTarget.height );
imageWidths.push(e.currentTarget.width);
function jeParseFailed( event : Event ) : void {
trace( "Parse failed" );
var imageWidths = new Array;
// FUNCTIONS FOR INDEXING CALLED MARKERS//
//Create blank array for use in indexing
var markerA:Array=[];
//VAR FOR USE IN INDEXING CALLED MARKER
var pointindex=null;
//INDEX CALLED MARKER POINT XML RECORD
function indexCalledMarkerRecord(e:MapMouseEvent):void{
pointindex=genIndexPos(markerA,Marker(e.currentTarget));
//trace(pntxml.row[pointindex].DESC);
//FUNCTION FOR INDEXING CALLED MARKER
function genIndexPos(a:Array,e:Marker):uint{
for(var i:uint=0;i<a.length;i++){
if(a[i]==e){
return i;
return null;
// SCROLLPANE FUNCTIONS //
this.addChild(scrollPane);
scrollPane.setSize(255,300);
scrollPane.x=-200;
scrollPane.y=-200;
scrollPane.alpha=0;
scrollPaneContent.mouseEnabled=false;
spHeader.closeBox.addEventListener(MouseEvent.CLICK, function(eMouseEvent):void
TweenLite.to(scrollPane, .5,{autoAlpha:0,overwrite:true});
spHeader.forDrag.addEventListener(MouseEvent.MOUSE_DOWN, function (e:MouseEvent):void
scrollPane.startDrag();
spHeader.forDrag.addEventListener(MouseEvent.MOUSE_UP, function (e:MouseEvent):void
scrollPane.stopDrag();
spHeader.forDrag.buttonMode=true;
spHeader.forDrag.useHandCursor=true;
spHeader.width=300;
scrollPane.source = scrollPaneContent;
scrollPaneContent.scrollPaneText.autoSize='left';
scrollPaneContent.scrollPaneImage.autoSize='center';
scrollPaneContent.scrollPaneImage.autoSize=TextFieldAutoSize.CENTER;
scrollPaneContent.mouseEnabled=false;
scrollPaneContent.scrollPaneText.condenseWhite = true;
// Add listener.
scrollPane.addEventListener(Event.COMPLETE, completeListener);
scrollPaneContent.addEventListener(ProgressEvent.PROGRESS,reportProgress);
function completeListener(event:Event):void {
trace('Scrollpane content loaded');
function reportProgress(e:ProgressEvent):void {
trace(e.bytesLoaded + " loaded out of " + e.bytesTotal);
trace("LOADED");
function scrollPanePopulate(event:Event){
//show scroll pane
scrollPane.x=33;
scrollPane.y=33;
TweenLite.to(scrollPane, .5,{autoAlpha:1,overwrite:true});
TweenLite.to(spHeader, .5,{autoAlpha:1,overwrite:true});
//create the temp variables
var calledMarkerIndex=pntxml.row[pointindex].ID;
var calledMarkerDate=pntxml.row[pointindex].DATE;
var calledMarkerDescription=pntxml.row[pointindex].DESC;
var calledMarkerContent=pntxml.row[pointindex].URL_OF_CONTENT;
var imgWidth=JPGIndexArray[pointindex].width;
var imgHeight=JPGIndexArray[pointindex].height;
scrollPaneContent.scrollPaneText.htmlText="<font size='12' color='#000000'>"+calledMarkerDescription;
var imgBoxHeight=scrollPaneContent.scrollPaneImage.height;
var txtHeight=scrollPaneContent.scrollPaneText.height;
var contentHeight=(imgBoxHeight+txtHeight);
scrollPane.setSize(300,(contentHeight+15));
//size the text box
scrollPaneContent.scrollPaneText.width=270;
//if image is wide or tall, scale accordingly and create a string that will be used
if(imgWidth>=imgHeight){
var imgSource:String = "<img src="+"'"+calledMarkerContent+"'"+"width='"+250+"'"+"height='"+150+"'"+"/>";
var calledImgHgh=160;
else
var imgSource:String = "<img src="+"'"+calledMarkerContent+"'"+"width='"+110+"'"+"height='"+167+"'"+"/>";
var calledImgHgh=177;
//fill in the text
scrollPaneContent.scrollPaneImage.htmlText=imgSource;
//scrollPaneContent.scrollPaneText.htmlText="<font size='12' color='#000000'>"+calledMarkerDescription;
//pan the map to the called position
map.panTo(pointsArray[calledMarkerIndex-1].getLatLng())
//add the header to the SP and scale accordingly
scrollPane.addChild(spHeader);
spHeader.x=-1;
spHeader.y=1;
spHeader.width=299;
if (txtHeight>=250){
scrollPane.setSize(300,275);
scrollPaneContent.scrollPaneText.htmlText="<font size='12' color='#000000'>"+calledMarkerDescription+"<br><br>";
if (txtHeight<=5){
scrollPane.setSize(300,200);
scrollPaneContent.scrollPaneText.htmlText="<font size='12' color='#000000'>"+calledMarkerDescription;
if (txtHeight>=5){
scrollPane.setSize(300,275);
scrollPaneContent.scrollPaneText.htmlText="<font size='12' color='#000000'>"+calledMarkerDescription+"<br><br>";
// CREATE TEMP VARIABLES FOR POSITIONING AND PLACE DYNAMIC TEXT
var scTextY=scrollPaneContent.scrollPaneText.y;
var scImageY=scrollPaneContent.scrollPaneImage.y;
var scTextHeight=scrollPaneContent.scrollPaneText.height;
scrollPaneContent.scrollPaneText.y=scImageY+calledImgHgh;
//update the scrollpane and reset the scrollbar
scrollPane.update();
scrollPane.verticalScrollPosition=(0);
scrollPane.verticalScrollBar.height=270;
scrollPane.verticalScrollBar.x=281;
scrollPane.verticalScrollBar.y=3;
spHeader.alpha=0;
this.addChild(spHeader);
var photoMarkersArray=new Array();
var photoMarkersIndexArray=new Array();
//CREATE ARRAY OF PHOTO MARKERS
function createMarkerArrays(e:Event):void{
for (var j:int=0; j<pntxml.row.(TYPE=="PHOTO").ID.length(); j++){
var tempMarkerIndex=pntxml.row.(TYPE=="PHOTO").ID[j];
var tempMarkerRef="mrk"+tempMarkerIndex;
photoMarkersArray.push(tempMarkerRef);
photoMarkersIndexArray.push(tempMarkerIndex); -
Printing - With Dynamic Text Fields
Hello,
i wonder if anyone can help me........i know there are a lot
of posts already on how to print out dynamic text but all of them
seem to be using scrolling text fields.
However my problem isn't even as complex as this but i still
can't work it out.
At the moment i have a form of text boxes which the user
inputs text.............from here there is a print
button.........in order to compile all of the answers together i
have created a movie clip.........with the layout of the printed
page on it, and placed this on the main timeline. Inside this movie
clip to be printed i have dynamic text fields...which link to the
text fields which the users inputted data in, therefore both sets
of text fields contain the same data, when you change one the other
should change.
I have set up a very simple printJob command to print out the
movie clip named print_mc and it prints the page even the outline
of the text boxes but it doesn't print out the content which
appears on the screen. my code is attached below.......please if
anyone could help i would be very grateful :)
print_btn.onRelease = function() {
_global.aOneVar =oneAPone.text;
_global.aTwoVar =oneAPtwo.text;
print_mc.gotoAndStop("2");
var myPrintJob:PrintJob = new PrintJob();
var result:Boolean = myPrintJob.start();
if (result) {
myPrintJob.addPage("print_mc", null, {printAsBitmap:false},
2);
myPrintJob.send();
delete myPrintJob;
} else {
thankserictomlinson,
> So, if I turn off the xml/css and use htmlText to create
> content for the text field, the text uses the embedded
> font and is anti-aliased.
I'm with ya. Presumably, then there's a font symbol in your
Library,
right? And its Linkage identifier is "arial_font"?
> If I keep the xml/css but comment out embedFonts, then
> the content works but is not anti-aliased.
That's because your CSS calls for Franklin Gothic Book,
which hasn't
been imported into your Library as a font symbol (at least,
you haven't said
it has).
> I need both of these to work at the same time.
Give Franklin Gothic Book a Linkage identifier, and use that
name in
your CSS.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design." -
External Embedded Fonts, Dynamic Text Fields, Latest?
Hi all,
I'm stuck in Flash8 land. Mostly because I use mProjector and
MDM Zinc to extend flash projectors and neither support AS3
correctly to date. That said..
Is a Flash8 SWF capable of using fonts embedded in "other"
SWFs? I realize this is an ongoing difficulty and a well known area
of confusion and well, I'm confused. All the attempts I've made so
far in linking have succeeded or failed in various ways, but never
fully work.
What I'd love to do is use dynamic text fields populated by
data from a database (or XML file), with CSS styling, using fonts
that are embedded in a 'master font SWF'. (and I'd like ice cream
with that too!)
I import fonts into, say, 'shared.fla'. I set them all up for
exporting via linkage (to shared.swf). I open up my other FLAs
(say, main.fla) and I drag the fonts from the shared.fla library
into main.fla's library. In looking at the linkage, I see it
properly set it to Import for Runtime Sharing (shared.swf). I can
see the font available in the main.fla font list and can select it
and use it just fine. I have to set the dynamic text field to embed
fonts to actually see them (and also
myTextField.setStyle("embedFonts",true)).
Now all that works well and fine, but the kicker is when I
want CSS to style my text. If I specify a embedded font linkage
identifyer in CSS, the text disappears. i.e. I load 'style.css' and
I have h1 { font-family: someEmbeddedFont; }, the <h1> text
will now disappear.
Any clues in how I can specify a font to use in CSS that's
embedded so it'll work, WITHOUT This font needed to be embedded in
the actual library (as in, not a linked asset)? Because it works
fine if I embed the font into every single SWF. But when I try to
use it as a shared asset, this doesn't work.
Any ideas on how someone can achieve this?
This is so I can changed my shared.swf and supply all new
fonts with the same linkage identifiers and change the font in a
whole project without re-exporting any other SWFs.
Thanks for any info!I guess it's amazing but I honestly, wholly cannot get this
to work.
I made a new AS2 Flash 8 FLA (Forte.fla) with only the Forte
font with a size of 22 in the library. The name of the library
element was Forte. The linkage was set to "Export for Actionscript"
and "Export in first frame".
I made another FLA (main.fla) Flash8 AS2. In actionscript I
created an empty movie clip named "Asset_Forte" at the next highest
depth and Asset_Forte.loadMovie("Forte.swf"). I also made a dynamic
text field on the stage of this main.fla document and set it to
Arial 22pt (no bold or italics, etc). I did not embed anything into
it.
I made a TextTormat object (my_fmt) and set my_fmt.font =
"Forte";. I put some text in the dynamic text field to start so I
just applied the formatting (status_text.setTextFormat(my_fmt);).
This did not work. I started adjusting random things like
naming the font in the Forte.swf library to Forte22 and tried
my_fmt.font = "Forte22";. That didn't work.
I adjusted the linkage to "Export for runtime sharing" and
specified Forte.swf as the SWF to share from. This did not work.
I then dragged the font from the Forte.fla's library (while
"Export for runtime sharing" was enabled) into the library of
main.fla. I checked the link and it was proper, "Import for runtime
sharing, Forte.swf". I used both linkage attempts again (Forte and
Forte22) with my_fmt.font and neither worked.
Would it be possible at all to get a couple FLAs from you
that examplifies how you do this particular trick? I can't seem to
get the settings right. I would be indebted to you! -
How do I embed multiple font outlines in dynamic text field
Can anyone tell me how I can embed multiple font outlines in
Flash MX so I can get smooth text in a dynamic
text frame? I want to use Regular, bold and italic in various
parts of the text.
I was using the Character button in the properties manager
and tried to include all Characters. That does not work.
In the Properties manager I can choose Bold and/or Italic.
But it becomes a universal setting that overrides my HTML tags in
my external txt file that I am importing. I dont want all my text
to be bold.
If I dont select them in the properties, however, Flash will
not embed the font that it needs.
Is there a different way to embed fonts other than under the
Character Tab?
I tried to import fonts to the library, but can not select
them.
Your help would really be appreciated.
Sincerely,
ggaardeggaarde wrote:
> Thanks Urami
> Tried your method and it does not work for me.
> I put 3 dynamic text fields in the first frame of the
movie. Set them up to
> where one is regular, one is bold and one is italic
Helvetica.
Weird, it works for me on first go, always had in fact :)
Show you an example, try to compare to your file see if you
missed anything accidentally.
http://flashfugitive.com/stuff/font/text.swf
text file
http://flashfugitive.com/stuff/font/text.txt
fla
http://flashfugitive.com/stuff/font/text.fla
Best Regards
Urami
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Script needed to print complete contents in scrolling text field Acrobat Pro 9 (MAC)
I've seen this question several times in my search but no real solution. My client wants a form with text fields that only show 1-2 lines when viewed on-screen but are scrollable so that the user can input a lot of text. I had no problem creating that. The problem occurs when I try to print the form. Only the visible lines of text print and not the entire contents of the field.
Is there a Javascript that I can assign to a Print button in my form that can be assigned to the Mouse Down action that will make the entire field contents print? I even recreated the form in WORD so that when the user inputs text into the field, the contents of the form move down the page. My client didn't like that approach. I'm not a programmer and so I haven't been able to write my own script to handle the printing issue. I'm MAC based so using Livecycle isn't an option for me. Thanks!I'm using Acrobat Professional 9. I used to use Livecycle which was more flexible, but I no longer have a PC, only MAC and Adobe doesn't make Livecycle for the MAC.
The client doesn't want larger fields unfortunately. They have questions that require 2 or 3 pages of information to be entered into a small text field but they don't want large fields. If they're reviewing the answers online, it's fine - they can just scroll through the text fields and read the answers but they don't want the completed text fields to expand unless the form is printed.
I've already set up my text fields to be multi-line and scrollable so that the client can review all of the text in the field if they are looking at the saved PDF online. The problem I'm having is that I need the entire contents of the text field to be visible ONLY when printed out. They don't want larger fields to show in the form. The client was quite specific about it. The form is also going to be used infrequently, so collecting the data and storing it on a server isn't something they're particularly interested in. The information is also confidential, so they do not want me to be collecting and storing the data and sending it back to them in another format. The easiest option I could see was to create a script tied to a PRINT button that printed out the complete text field.
Thanks!
Maybe you are looking for
-
I keep getting emails for another user; can't seem to contact Apple support about this
Hi there, I keep receiving emails for someone called Amanda to my email address. These are not spam emails; it seems like someone called Amanda is signing up to reputable websites using my email address. So far, Pinterest, Educreations and a women'
-
How do I programmatically populate the right side of a shuttle?
Greetings, < on Application Express 4.0.2.00.07 > Background - I have an Image Map on a page and I need to put code in each cell hotspot href which will end up adding a value to the right side of a shuttle. I guess I will do it via a function call in
-
Switching your Primary Monitor - SOLVED
EDIT : Of course, I solved this right after I posted the question. In the System Preferences > Displays > Arrangement panel, you can drag the menu bar to the second monitor. Hello all, I was wondering if there is a way to switch which monitor Tiger u
-
My iTunes video rental audio isn't in sync with the video
Anyone have any ideas? It's a solid 10-20 seconds behind, fromt what I can tell.
-
Ok guys need some help here please - with the idea of not creating duplicates & blocking some very necessary space...i added the songs to the media folder and unchecked the box - that said create a copy in the I tunes folder....now if i want to add m