Dynamic Text in Child SWF
I created a tool tip symbol and corresponding class that
follows the mouse cursor. The tool tip works fine when the swf that
it lives in is run by itself. When I load that swf as a child, the
dynamic text won't work. The tool tip clip appears and follows the
mouse but the text doesn't show. The tool tip class extends movie
clip and accesses the dynamic text as follows.
import flash.display.*;
import flash.text.TextField;
public class tooltip extends MovieClip{
public var dynTextInstance:TextField;
public function setTipText(textPassedToFunction:String):void
this.dynTextInstance.htmlText = textPassedToFunction;
Any help will be greatly appreciated...
Thanks
Could you please post entire class or, at least, the full
code for how you create the textfield instance and set its
parameters?
Similar Messages
-
Dynamic Text in Externally Loaded swf
hi. i have a dynamic text field in an externally loaded swf. Its a digital clock so i want the numbers to update in the dynamic text field.
this is not my exact code but it is very similar. i show below that i add the loader.swf, and once its loading is complete, i can work on its movieclips and add event listeners to its buttons, etc. but i cannot change the dynamic text field (its "classic text" set to "dynamic text"). after running this, the text just stays empty as it is in the external swf).
here is the sample code:
var loader:Loader = new Loader();
loader.load(new URLRequest("loader.swf"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
function loaded(event:Event):void{
addChild(loader);
var loader_mc:MovieClip = (loader.content as MovieClip)
loader_mc.myMovieClip.gotoAndStop(2);//***this works
loader_mc.myButton_btn.addEventListener(MouseEvent.CLICK, clickMe);//***this works
loader_mc.myText_txt.text = "12";//***this doesn't work******
please help. thanks!Did you embed the font in the textfield--it needs to be done in the loaded swf when you create it? One other thing to check is that the color for the textfield is not the same as the background it sits on.
-
How to use an dynamic text from Flash in FlashBuilder with swf ?
Hello,
i'm trying to develop a game in flex builder and i got a problem with the dymanic text i've imported from flash. I want to insert a scoreboard in my application and for doing that i should use dynamic text in flash. I create a dynamic text in flash and then a import it to Flash Builder in a movie clip, and i called the dynamic text "Score". Now i've tried to use the "Score" variable to change the value of the dynamic text box un my flash builder application, but it doesn't change anything.
I read somewhere that i've got to use the score.text value to change the number of my score but that doesn't works because Flash Builder tells me that this sort of variable don't contain the .text value.
Thank you for trying to help me.
bye.Thanks Ned,
I always welcome learning something new.
I did not know creating a new keyframe,
creates a new instance.
Yes, I had used the same dynamic text field instance name in
numerous, new layers (great observation).
With the objective to display the User's name throughout
the timeline (on and off)...
I'll attempt to paraphrase your solution;
Use a single layer to display the dynamic text field.
Extend this layer's timeline throughout the movie, or end use of the dynamic text field.
Help with this one ??
Set the visible properties to true or false as need through out the timeline.
( Does require an AS3 ? )
I'll give that a try.....
~~
Side of effect of using the above solution;
The SWF in it's attempted state, uses the dynamic text field instance, in
different places, different text sizes, on the stage, throughout the Movie.
(i.e. the User's first name appears in different sentences...)
Per the solution above,
I believe I will be limited to One location, one format setting.
Is this assumption correct?
I can make this work from a display / Movie point of view.
However, your first VAR concept, noted above, might be
worth exploring should more flexibility be required.
Thanks for making the time to coach...
D- -
Loading swf file with dynamic text
For a website I'm creating I'm going to have a main swf file
that loads individual swf files for each page. Each page's swf file
loads in external text files through dynamic text boxes so i can
edit the website easily. To load the swf files into the main swf
file I'm using the loader component. Everything works fine except
thedynamic text boxes of the swf files that are nestled in the main
one do not load properly. Instead, in each text box i get a message
similar to this:
_level0.NewsLoader.contentHolder.News1
NewsLoader is the instance of the loader component, and News1
is a variable called in through a dynamic text field from the html
document entitled News1.html. The individual news swf file loads
the text properly, but when the news swf file is loaded into the
main swf file the text is replaced with the message above.
Any suggestions?the problem might be due to the changed references if you
load the movie into another one.
is NewsLoader a MovieClip instance inside the main movie or
inside the mc that is loaded into the main movie?
If it resides inside the exteranly loaded movie, you will
either need to use the lockroot attribute or use a relative
reference to the News1 variable.
Since the _level0 always points to the _root timeline (the
one of the outer most movieclip) _level0 used in the external mc is
different once the external movieclip is loaded into another movie.
I suggest only using relative references, makes live much
easier. -
Hi all,
I'm getting myself a little confused. I think this is so easy
I am missing it.
My Flash file contains some dynamic text fields. When I
publish the Flash file I get the swf, great.
But, how do I publish the file that contains the dynamic text
changes?
THX.A couple of guesses are:
1. If the HTML document you got with the purchased template
was the same
name as the movie, then by republishing the Flash movie you
could have
overwritten the HTML doc that contains the Javascript. If
this is the case,
then you needed to turn of publishing the html
File->Publish Settings and
hopefully you have the original copy.
2. You may not be using the correct HTML file. How are you
testing? If you
are using File->Publish Preview as mentioned above Flash
may be generating
an HTML document for the testing convenience and you may not
be using the
correct HTML with the Javascript in it.
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
"DesignBetty" <[email protected]> wrote in
message
news:e269d1$pp5$[email protected]..
Thanks for responding. Please excuse my "neophytness" about
this. Javascript
and php seems so easy right now.
Let me explain a bit clearer.
I am updating an old template that was purchased (groan).
The fla file has
dymanic text boxes. I also have the swf file. And then I have
another html
doc
that stands alone. This html doc allows me to changes the
variables in the
swf
doc.
Sounds great, huh?
But I have made a few simple changes in the FLA doc (font,
position, etc).
Now
when I republish it I get a SWF doc that doesn't reference
the html doc that
lets me change those variables.
Am I missing a step?
thx! -
Dynamic text not appears on swf export
This was posted in the 'Getting Started' Forum, but no
repsponses, so I am trying my luck here =)
I am new to Captivate, so bear with me.
I have created a Flash file that calls externally text to be
loaded into a scrolling text field. This works fine as a standalone
swf. When I import the swf into Captivate, I can see the dynamic
text appear in the small preview pane of the import window, but NOT
when I publish the Captivate movie. I have made sure to include the
external txt files in the same directory.
Any ideas on what I could be doing wrong?
TIA,
DebHi Deb
I'm going to reply where your question was initially asked,
so we can keep the forums a bit tidier. I'm also inserting a link
here that will lead others to the initial post.
Click
here to view the thread where the question was initially asked.
Cheers... Rick -
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); -
I am currently producing e-learning content with our custom AS3-Framework.
We normally create content files in Flash CS5.5 with dynamic text fields, which are set at runtime from our Framework (AS3 framework in FB4.6).
Now we are in the progress of language versioning, and since one of the languages is Arabic we are changing the dynamic text fields to TLF fields.
Then all my problems started.
In Flash I have chosen to include the TLF engine and to export in frame 2.
(see to: http://helpx.adobe.com/flash/kb/loading-child-swfs-tlf-content.html )
I get this error:
VerifyError: Error #1053: Illegal override of getEventMirror in flashx.textLayout.elements.FlowLeafElement.
at flash.display::MovieClip/gotoAndPlay()
I guess it is because our framework wants to gotoAndPlay before the TLF engine has been loaded.
Can this be it?
Any good suggestions on how to handle loading child SWFs with TLF content.Please refere to the following articles .. you may find some help.
http://www.stevensacks.net/2010/05/28/flash-cs5-tlf-engine-causes-errors-with-loaded-swfs/
http://www.adobe.com/devnet/flash/articles/preloading-tlf-rsl.html
I also faced similar problem and posted a question at the following link, but, I still couldn't find the solution.
http://forums.adobe.com/message/4367968#4367968 -
How to use same dynamic text, multiple times in a Movie
FLASH CS5.5
How can a dynamic text field be used multiple times, on any
frame, in any new layer during a Movie?
~~
A number of unique dynamic text fields are being used.
The intent is to use them each, many times during a Movie.
(i.e. a users first name)
They are successfully being "ExternalInterfaced" from a PDF form field.
(the SWF is displayed within the PDF as a RMA)
This all works well, IF I only use one instance of the dynamic text field.
(one use of each unique text field)
If I try and use that same dynamic text field, again, in a new layer, later in the SWF,
all of that said, duplicate dynamic text fields do not display.
~~
Stumped!!!
Thanks in advance for your advice / comments!
D-Thanks Ned,
I always welcome learning something new.
I did not know creating a new keyframe,
creates a new instance.
Yes, I had used the same dynamic text field instance name in
numerous, new layers (great observation).
With the objective to display the User's name throughout
the timeline (on and off)...
I'll attempt to paraphrase your solution;
Use a single layer to display the dynamic text field.
Extend this layer's timeline throughout the movie, or end use of the dynamic text field.
Help with this one ??
Set the visible properties to true or false as need through out the timeline.
( Does require an AS3 ? )
I'll give that a try.....
~~
Side of effect of using the above solution;
The SWF in it's attempted state, uses the dynamic text field instance, in
different places, different text sizes, on the stage, throughout the Movie.
(i.e. the User's first name appears in different sentences...)
Per the solution above,
I believe I will be limited to One location, one format setting.
Is this assumption correct?
I can make this work from a display / Movie point of view.
However, your first VAR concept, noted above, might be
worth exploring should more flexibility be required.
Thanks for making the time to coach...
D- -
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> -
Issue with visibiliy of dynamic text and hyperlinks
Hi everyone,
It's been a while since I've build a Flash site and a I'm finding a out a lot has changed.
I'm building a simple site with some pictures, text and the 5 last posts from Twitter.
This last one is not working out that well.
First of all:
The outputed data from Twitter is displayed into a dynamic text field which is working fine when I test the movie in Flash, but as soon as I upload it to my server the text is not visible.
Flash already told me that I need to enclose my font in the movie (that's new for me) and I did that using the button in the properties windows.
But it still won't work.
I recreated the Twitter reader in a empty document to isolate it from my website during the troubleshooting.
Here's the AS I'm using:
var loadXML:XML = new XML();
loadXML.ignoreWhite = true;
loadXML.onLoad = processXML;
loadXML.load("twitter.php"); //used when swf in placed on server
loadXML.load("");
function processXML(loaded:Boolean)
if(loaded)
var node = this.firstChild;
tweet_1.text = node.childNodes[0].childNodes[2].firstChild;
tweet_2.text = node.childNodes[1].childNodes[2].firstChild;
tweet_3.text = node.childNodes[2].childNodes[2].firstChild;
tweet_4.text = node.childNodes[3].childNodes[2].firstChild;
var follower_count = node.childNodes[9].childNodes[11].childNodes[9].firstChild;// Creates variable
trace(follower_count); //loads variable into output
follower_count_txt.text = follower_count;// show follower count in text box
else
error_txt.text = "Error loading XML file";
for (i=0; i<follower_count; i++)
_root.attachMovie("tweep_mc", "tweep"+i+"_mc", i);
_root["tweep"+i+"_mc"]._x = 150 + random(500);
_root["tweep"+i+"_mc"]._y = 150 + random(500);
trace(i);
trace(i);
follow_btn.onRelease = function()
getURL("");
facebook_btn.onRelease = function()
getURL("");
stop();
Right here you can see the output of it on the server.
The second issue:
The items posted to Twitter will simply always contain pictures which Twitter posts as hyperlinks.
Is there a way to make those hyperlinks function in my dynamic text field?
Hope you guys can help me out!
Thanks in advance!!
KarimOk.. After some resarch I find out the guy who created this made use of the Twitter API.. Since I don't know how to do that and
can't find straight answers that's not an option for me...
Althought...
What I forgot to mention in the first post:
This is what the beginning of actionscript is actually looking like right now and why it is working offline:
var loadXML:XML = new XML();
loadXML.ignoreWhite = true;
loadXML.onLoad = processXML;
loadXML.load("http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=karimbizid2");
I'm getting the data direct from the Twitter server.
This procedure does'nt neceserly need a PHP file to store the XML, right?
I'm guessing it's just a visual issue why the text isn't showing.
Karim -
Can I put Chinese and English characters in the same dynamic text box?
I'm translating a game into several different languages, one of which is Chinese. I've noticed that in a dynamic text box where English characters are included also, they aren't displayed when the .swf is exported. The font is embedded in the document with all characters selected. It seems like whatever language-character is first displayed in the text box, the other language cannot be. For instance, if there are Chinese characters first, then English, the English will not display, and vice-versa. Any work around on this? I am using Flash CS5 and Actionscript 2.0. Thanks!
Kglad - I'm not sure I follow your instructions for the fix. I assume you want me to set the _visible property to false via Actionscript ( textInvisible._visible = false; ). What is the purpose of this second text field - does it need any specific content in it to function? It doesn't seem to work to fix the problem but maybe I'm misunderstanding.
-
Help with delivering dynamic text through an external file, through XML?
I'm struggling to find the best way to deliver dynamic text
from an external file, through XML, to a Flash file.
I use small Flash pieces to deliver multiple sets of content
through a single .swf file. An example is here:
http://www.esi-intl.com/public/government/federal.asp
In the .swf file at the bottom, I'm using a three-scene .fla
file. I'm putting the actionScript in the Actions layer atop each
frame. Example:
stop ();
loadVarsText = new LoadVars();
loadVarsText.load("fedNews.txt");
//assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name "scroller" equal to the
//contents of the variable
scroller.html=true;
scroller.htmlText = this.var1;
} else {
trace("not loaded");
In that .txt file, I'm putting the information like this:
var1=<font face="tahoma,verdana,sans-serif" size="11px"
color="#000000"><b><a href='
http://www.esi-intl.com/public/classroomtraining/dau.asp'>DAU
Grants ESI Course CON353
Equivalency</a></b><br>Advanced Business Solution
in Contracting (CON 353) is an equivalency for DAU's CON 3535
course, Advanced Business Solutions for Mission Support. <a
href='
http://www.esi-intl.com/public/classroomtraining/dau.asp'><U><font
color="#996633">Continue</font></U></a></font>
So much of this is pick-ups from what I've researched in
Google. I'm looking for a way I can feel more confident in my code,
and also have that code follow CSS.
Lastly, I recognize the problems in XML with using single
quotes / double quotes, and the & symbol. This is one of my
largest time sucks, and I'd like to find a better way to do this.
Thank youHi,
Did you ever find a resolution to this? I'm having a similar
issue that I can't seem to get multiline dynamic text working in
CS3.
The font is embedded but it just displays the first line, and
then a blank. I'm sure this worked fine in Flash MX.
Cheers, Ant -
Flash dynamic text in captivate errors
Hello all,
Has anyone experienced any issues when using a dynamic text
field in flash, then importing the swf file into captivate? I am
using actionscript to populate a few dynamic text fields in flash.
I am then publishing the swf and importing the swf into captivate.
Once I do this, none of my text appears! When I launch the swf in
explorer and the flash authoring environment, it works fine. I have
tried turning off the 508 compliance, eliminated all captivate
animations/transitions, made sure that the frame rates are matched
between flash / captivate (although not likely the prob), using a
basic arial font Nothing works!!! anyone have any possible
solutions? Here is a link to the swf that I am working with (tried
other flash files with 'dynamic' text, none of them work).
http://kplearning.com/project_testing/flashTesting/table1_wCanvas.swf
(swf file)
http://kplearning.com/project_testing/flashTesting/table1_wCanvas.zip
(working file)
Thanks in advance for any help!
MikeHi Deb
This falls into that "odd" or "grey area" category and is
likely the reason you haven't seen anyone reply. I say "odd" or
"grey area", because you are now beyond the realm of pure Captivate
behavior and have entered the realm of where you are now blending
Captivate with other Flash output in an effort to try and achieve
something unique. And there is absolutely nothing wrong with this.
Personally, I would encourage it, as you never know what you will
discover to create a neat effect.
However, having said that, you are now dabbling in something
that perhaps nobody else has yet tried. I'm no Flash expert just
yet, but I'm beginning to work on those skills. From what I DO
understand about blending Captivate with Flash, I believe Captivate
only likes and easily works with
Flash 6 output and
Actionscript 1. Anything newer and it likely won't work. I'm
unsure if Flash 6 output is even possible to create, where you can
call an external text file. For all I know at this stage, it could
be a Flash 7 or Flash 8 only feature.
Assuming this was something that was part of the feature set
for Flash 6, if you are using Flash 7 or 8 to create the Flash
file, perhaps try publishing in the earlier format?
Hopefully this helps... Rick -
Can't get dynamic text in Flash 8 pro to work
Hi,
This is driving me nuts. I am using SWObject to send a
variable to my Flash 8 swf. The swf is basically a header that
plays a video and I want to put the name of the web page
dynamically on top of it. Sounds simple right. Well I can not get
it to work. In the past I have done dynamic text boxes without any
problem.
I have uploaded all the files to my clients server (
including the fla and the HTML page that accesses the swobject code
I have also tried other more conventional means to load the
Variables ( in the URL address and using Flashvars with a normal
object and embed tag ) Nothing seems to work.
Is there a problem with dynamic text and Flash 8?
I'm pulling my hair out any help would greatly be
appreciated, Thanks in advance.
Zip file on the
server with all the filesHi jimWPX, I have no problems with dynamic text in Flash 8,
and I see no problems in your file.
Could it be that the js doesn't parse for Flash 8 correctly?
A quick check for version seems to suggest that it's embedding with
tags for v 6 Flash. Might be problematic.
An alternative is FlashTag.js,
http://www.macromedia.com/go/flashjavascript/
which works fine for me also. Hope it helps
Maybe you are looking for
-
How can I correct background color and graphics in Firefox?
For some reason some background color images and fonts do not appear in Firefox. Other browsers are mostly fine. I've tried most common fixes to no avail. I'm running Windows 7 Ultimate. I've attached two screenshots. One is Firefox viewing Google. T
-
MCEKPO-MENGE issue through 2LIS_02_ITM for Statistical Purchase Order Items
Hello Everyone, I have come across this strange scenario where a given Purchase Order Item in the Source system - SAP R/3 has been changed in the following sequence, 1. First the PO Item was marked as a Deleted PO - LOEKZ = L which set the STAPO = X
-
Camera Raw Files Not in Results
Spotlight seems to ignore my Canon EOS 1DMKII Raw files in it's search results. Are camera raw files supported in Spotlight? Thanks, Scott
-
Patch 142437 (Sendmail 8.14.4) broken?
After installation of Patch 142437-05 (and newer) and therefore upgrading to sendmail 8.14.4, I cant get sendmail to bind on all interfaces. Removing the patch and downgrading to 8.13.8 resolves the issue. Normally, you specify where to bind to with
-
:20 spinning beach ball after importing a clip
I have an annoying problem that I hope someone can help me with. This has never happened with any of the 8-10 iMovie projects I have done since I started using the program a couple of years ago. When I find a piece of footage I want to capture, I go