Link In Dynamically Loaded Text File
the news on my site is a dynamically loaded text file using the loadVars object. Is it possible to have a link in the text file?
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 10-29-2003, 09:16 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Hot Link Text In Dynamically Loaded Txt Fields
I have text being loaded into a text field from a .txt file outside the movie..... Everything is working well.... however, I cannot seem to formate the text in any usefull fashion nor create hot link text .... can anyone help with this?
thanks in advance.
Turning Dynamically Loaded XML Text String Into A Link
Thanks for your answer in advance.
I have completed a recent reconstruct of my website. http://www.harvestcry.org but have reached a stopping point and am in need of advice.
I am able to load movies and text from an external XML file. I use MX2004 and pretty standard XML file using SE/PY editor. I would like to change a portion of the text string read from my "content" childnode in my external XML file, to a simple link to an external URL or SWF file opening in its own window. What asfunction do I use and how should I insert it into the XML text string? Does XML use a standard HTML tag? Or is it modified
Here's my code:
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 75;
var centerX:Number = Stage.width / 2 - 50;
var centerY:Number = Stage.height / 2 + 75;
var speed:Number = 0.02;
var perspective:Number = 50;
var home:MovieClip = this;
theText._alpha = 0;
var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
t.icon1.inner1.loadMovie(nodes[i].attributes.image1);
t.icon2.inner2.loadMovie(nodes[i].attributes.image2);
t.icon1.onRollOver = over;
t.icon1.onRollOut = out;
t.icon1.onRelease = released;
}
}
function over()
{
home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
home.tooltip._alpha = 100;
}
function out()
{
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
}
function released()
{
home.tooltip._alpha = 0;
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.xPos = t._x;
t.yPos = t._y;
t.theScale = t._xscale;
delete t.icon1.onRollOver;
delete t.icon1.onRollOut;
delete t.icon1.onRelease;
delete t.onEnterFrame;
if(t != this._parent)
{
var twTween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,tru e);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,tru e);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
}
else
{
var twTween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,t rue);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,t rue);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,125,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,350,1,true);
var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true );
theText.text = t.content;
var s:Object = this;
twTween.onMotionStopped = function()
{
s.onRelease = unReleased;
}
}
}
}
function unReleased()
{
delete this.onRelease;
var twTween = new Tween(theText,"_alpha",Strong.easeOut,100,0,.5,tru e);
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
if(t != this._parent)
{
var twTween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,tr ue);
var tw:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,tr ue);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
}
else
{
var twTween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1, true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1, true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
var tw4 = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
twTween.onMotionStopped = function()
{
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.icon1.onRollOver = Delegate.create(t.icon1,over);
t.icon1.onRollOut = Delegate.create(t.icon1,out);
t.icon1.onRelease = Delegate.create(t.icon1,released);
t.onEnterFrame = mover;
}
}
}
}
}
function moveTip()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
}
xml.load("icons.xml");
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = (this._y - perspective)/ (centerY+radiusY-perspective);
this._xscale = this._yscale = s * 100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}
this.onMouseMove = function ()
{
speed = (this._xmouse-centerX)/9000;
}
Scrolling Dynamically Loaded Text From A Txt File?
i have read jesse's tutorial on how to scroll dynamic text / static text ... from a text box, but what i dont know how to do is how to load the EXTERNAL txt file into the dynamic text box...
i have the text box with the variable = TEXT
and i done all the codeing for the buttons n all the tutorial says to
and the buttons work fine, the scrolling works fine, but the only problem is loading in the text into the dynamic text box ?
what am i doin wrong ?
please help me
if u need more knoladge of my problem please let me know.
Using Dynamically Loaded Text To Load An XML File
Hi, I would like to use the text loaded into a dynamic text field to act as the filename of a XML file I'd like to load. If someone could point me in the right direction here that would be great.
Cheers,
Jonahholliday
Using £ Hex Symbol From Dynamically Loaded Text File
Hi,
Having problems getting the £ sign to show up with a dynamically loaded text file. Am using %25 for % sign - works fine. Tried using %A3, but doesn't work.
Text file saved as Unicode UTF-8.
Flash script:
onClipEvent (load) {
_root.txt.holder.main.t6.main.htmlText = unescape(this.content);
}
Any help would be appreciated...
Cheers.
Dynamically Loaded Text File + Actionscript?
Hey guys is there any way to place actionscript in a dynamically loaded text file? I've been playing round for a while and i cant seem to get it. I saw this on actionscripts.org http://www.actionscript.org/tutorials/intermediate/Invoking_Actions_From_HTML_Textfields/index.shtml
so i t might be possible?
Anyone with any ideas thanks heaps.
Dynamically Loaded Text File Doesn't Display In Text Box?
Hello People,
This is the scenario, hope you can help
I have a main mc, that loads into it an mc with a dynamically loaded external text file(" text mc")inside a text box(normal stuff). When the main mc load the text mc the external text file doesn't appear in the text box? When I execute the text mc by itself, it works sweet, text displays. I just need some help of getting the text to appear when it's loaded inside the main mc?
I've attached the text mc file so you can find the problem(note it will work fine, it's just when it's loaded inside the main mc the text doesn't display?)
thanks people
Hide/show Scrollbar With Dynamically Loaded Text From A .txt File.
hi,
i've been trying to figure out how to hide and show the scrollbar component with dynamically loaded text depending on whether the text overflows or not.
the problem i am having is that TextField.maxscroll keeps returning 1 because it is being performed before the text is loaded into the textfield. here is the code i am working with:
loadVariables("copy.txt", this);
scrollbar._visible = (text.maxscroll > 1);
how can i solve this?
Link Within Dynamic Scrollbar Text Loaded From External .txt File
Dear all,
can anyone help me?
I have a scrollbar dynamic text field wich loads a text from external text file which is formated as HTML. I enabled "render as html" button and everything works well exept that after I inserted a link into text, wich also works, THE REST OF THE TEXT DOESN'T APPEAR. While researching on the internet I saw that some other had the same problem and they didn't get the help.
I was also wondering what is an adventage of placing a text field by scripting which I'm not very good yet. I'm working in a graphically intensive site which tends to be rather big. Would using a script let me reduce the size? If so, could you give me some tipt how to procede with it.
A thank you tons in advance. It would be a greate help for me as I'm running out of time trying to finish a site for an independant documentary.
Link Within Dynamic Scrollbar Text Loaded From External .txt File
Dear all,
can anyone help me?
I have a scrollbar dynamic text field wich loads a text from external text file which is formated as HTML. I enabled "render as html" button and everything works well exept that after I inserted a link into text, wich also works, THE REST OF THE TEXT DOESN'T APPEAR. While researching on the internet I saw that some other had the same problem and they didn't get the help.
I was also wondering what is an adventage of placing a text field by scripting which I'm not very good yet. I'm working in a graphically intensive site which tends to be rather big. Would using a script let me reduce the size? If so, could you give me some tipt how to procede with it.
A thank you tons in advance. It would be a greate help for me as I'm running out of time trying to finish a site for an independant documentary.
Open Email Client Through Link In Text-file Loaded In Flash?
Hi,
My flash document contain a few buttons which open some movieclips and also a txt-file with an an address and an emailaddress.
The code that triggers the movieclips and the variables looks like this:
Code:
menu.btn1.onRelease = function() {
_root.container.unloadMovie();
loadMovie("textField.swf", _root.container);
loadVariables("geschiedenis.txt", "_root.container");
loadMovie("scrollerWat.swf", _root.lijn1.scroll_mc);
this._parent.activateItem (this);
};
Everything works like a charm but the thing is I want users to be able to click on the email address so they can sent me a mail.
Normally this isn't a problem in flash typing in the URL "mailto:" option but since I dynamicaly load a text into flash I don't know how to add this "mailto" function.
My text-file contains the following:
Code:
&content=
A de Busstop
P.O.box 3385
Westvilles
E info@westvilles.com
Does anyone know is this possible how to do this?
thank you for helping me out
Open Email Client Through Link In Text-file Dynamicaly Loaded In Flash?
Hi,
My flash document contain a few buttons which open some movieclips and also a txt-file with an an address and an emailaddress.
The code that triggers the movieclips and the variables looks like this:
Code:
menu.btn1.onRelease = function() {
_root.container.unloadMovie();
loadMovie("textField.swf", _root.container);
loadVariables("geschiedenis.txt", "_root.container");
loadMovie("scrollerWat.swf", _root.lijn1.scroll_mc);
this._parent.activateItem (this);
};
Everything works like a charm but the thing is I want users to be able to click on the email address so they can sent me a mail.
Normally this isn't a problem in flash typing in the URL "mailto:" option but since I dynamicaly load a text into flash I don't know how to add this "mailto" function.
My text-file contains the following:
Code:
&content=
A de Busstop
P.O.box 3385
Westvilles
E info@westvilles.com
Does anyone know is this possible how to do this?
thank you for helping
Dynamically Loading Link Text And Link
I need some code or reference for Dynamically Loading Link Text and Link from an external .txt file. The number of links could be any depending upon the changes made in the text file.
How do I go about it???????
[MX] Dynamically Loaded Text Linking To Another Dynamically Loaded Text
i want to do the following:
in dynamic text field 1
- i have a dynamically loading text file, with a few links
adjacent to text field 1 in a new text field 2
- i would like to have these links, load a specific paragraph from another dynamically loaded text file.
any thoughts on this?
Buttonless Scroller - How Do I Link Buttons Inside Mc To Dynamically Loaded Images?
Hi, I've made this scroller, http://www.flashkit.com/tutorials/In...-909/index.php and it works fine. One thing though is, it leaves out how to link the contents of the scroller to that dynamic field. In my case, I'd like to link the thumbnails to an image. I guess I'd make each image an swf with preloader? Since I need to add captions too...? Right?? Can someone help! I'm lost!! And, what is the code that I put on each button?
THANKS!
Buttonless Scroller - How Do I Link Buttons Inside Mc To Dynamically Loaded Images?
Hi, I've made this scroller, http://www.flashkit.com/tutorials/In...-909/index.php and it works fine. One thing though is, it leaves out how to link the contents of the scroller to that dynamic field. In my case, I'd like to link the thumbnails to an image. I guess I'd make each image an swf with preloader? Since I need to add captions too...? Right?? Can someone help! I'm lost!! And, what is the code that I put on each button?
THANKS!
Dynamically Link Youtube Video In Flash File
Hi,
Basically what I want to do is embedding Youtube video into flash file. The user will click on a button, and that button will open up a Youtube video to the left (still in the flash file). I am just wondering if this is possible and if possible, would this violate Youtube's TOS. Thanks for any inputs!
Can I Put ActionScript In A Txt-file That Is Dynamically Loaded Into An Swf?
I have a textBox inside a swf that loads an external txt-file with html code...
In the html code that I use in the txt-file I have used the <a href=""> tag, now what I want to know is if I can use ActionScript here, like for instance '_level2.gotoAndPlay(4);'
I can't seem to get it to work... What's the proper syntax if this is possible at all?
???
Cheerz...
/A.
Search Dynamically Loaded Csv File
Greetings!
I'm trying to figure something out and am not sure how to go about it. Currently, I have a .fla that dynamically loads a four column .csv file. I would like the user of this this to be able enter a search term that relates to the first column of the .csv file, which is always going to be five digit number.
Is there a way to script this search from the .csv file and have it display the other three fields that are related to the search term?
I'm using MX 2004 pro by the way.
Thanks in advance for any assistance you can provide.
- - Jeff
Play Dynamically Loaded SWF File
I am working on a Mad-Libs type application. When all the words are loaded, I want to be able to press play, and have audio read the words. So, I have external SWFs with the words recorded. My question is, how can I reference those dynamically loaded SWFs to play when I am not sure what the first one will be? Can anyone help? I can supply what I've done so far if that will help.
Scrolling A Dynamically Loaded Txt File
^how do you do it?^
I have a file thats loaded but it will only display on one line as opposed to filling out the text box. the text box is set to multi line and scrolling is on. What do I need to do?
Preloading A Txt File - Loaded Dynamically
I have a project where I have a (ultimately) a bunch of buttons on a map that when you click on it, a txt file is dynamically loaded into a text field with a scrollbar component. The problem I have is the script to load the txt file loads faster than the txt file and the line of script that makes the scrollbar work checks the textfield length after the field is populated. What I want to do is have all the txt documents preload into the browsers cache and when the buttons are pressed everything loads like it is supposed too. As it is now, if you click a link, the textfield populates and you have to click it again to get the scrollbar to work.
http://www.woodardway.com/school/ here is an example. The two buttons are in the middle of the graphic (you have to scroll down).
So you know, the textbox isn't inside its own movie clip, its just sitting in its own layer in the root. For whatever reason, I cannot get the text to load if the textfield is inside its own movie clip.
Width Of Dynamically Loaded Swf-file?
Hi,
How do I get the width of a swf-file that has been loaded into a MC?
I use the MovieClipLoader to trace the load and in onLoadComplete I thought i could catch the width of the swf-file that was loaded.
But I only get 0 in return?!??!
I've added a testbutton to trace the width when the swf-files shows up on stage and then it shows the correct values.
Thanks!
Control A Dynamically Loaded FLV File
Hey guys,
I really hate asking questions in this section for obvious reasons....
<-------
but i'm kinda stuck on this problem. I'm loading an FLV file into a video object on the stage using the following code.
ActionScript Code:
netConn = new NetConnection();
netConn.connect(null);
netStream = new NetStream(netConn);
netStream.setBufferTime(3);
this.videoclip.my_video.attachVideo(netStream);
netStream.play("test.flv");
I can play, and pause the video, and the loading is working fine. My problem is that the seek() method isn't working unless the value is set to 0 and i can't figure out how to get the total duration. So i would really appreciate if anyone can help me on this one asap.
Thanks in advanced.
Resizing Container To Fit A Dynamically Loaded File
what's up? is there any way to have a container resize itself to the size of an externally loaded file such as a jpg?
right now i'm making a portfolio with many different pics, animations etc. to keep the file size down i'm storing all of my main files in an array and loading them via the loadMovie(); function. here is the problem:
there is a square on the screen in which is an empty movieclip that i'm using to load the file into. laying on top of this empty movieclip in a layer on top of it, i have a white outline that acts as a frame. i'd like the CONTAINER to scale itself to match that of the loaded file and also would like to have the FRAME layer to scale itself accordingly.
please help
thanks
itriix
Dynamically Loaded Jpgs: Swf File Size
If you dynamically load jpgs, the .swf file size report, only reports what is in the .swf
Doesn't this render my preloding useless?
If a user clicks onto a page that contains several jpgs which have been loaded through actionScript, will that page be without the needed jpgs until all are loaded, just like a regular html page?
Is there a way for flash to measure the amount of kilobytes for those files which are not inside the .swf or is it even necessary?
Should I just put those jpgs inside the .swf in order to use my preloader?
Thank you whomever answers
Indin
How To Give Link Within The Externally Loaded Xml File
hi all
I am in the process of making the flash news file
in which im calling the text from external xml file
there are max 4 news which are going to display one under other
also there will be a link to all these items
Had anybody tried to make the same before
it will be a great help for me
thanks
Using Actionscript To Position A Dynamically Loaded Swf File Behind An Exsisting Mc O
Hi all,
I'm trying to get a dynamically loaded swf to load into an empty mc behind a particular mc on the stage. I used actionscript to create an empty movie clip using the createEmptyMovieClip command. But, how can i get it to create it, then load the external .swf into it behind a exsisting mc on the stage? Is this possible?
thank you,
Aaron
Using Actionscript To Position A Dynamically Loaded Swf File Behind An Exsisting Mc
Hi all,
I'm trying to get a dynamically loaded swf to load into an empty mc behind a particular mc on the stage. I used actionscript to create an empty movie clip using the createEmptyMovieClip command. But, how can i get it to create it, then load the external .swf into it behind a exsisting mc on the stage? Is this possible?
thank you,
Aaron
Using Actionscript To Position A Dynamically Loaded Swf File Behind An Exsisting Mc O
Hi all,
I'm trying to get a dynamically loaded swf to load into an empty mc behind a particular mc on the stage. I used actionscript to create an empty movie clip using the createEmptyMovieClip command. But, how can i get it to create it, then load the external .swf into it behind a exsisting mc on the stage? Is this possible?
thank you,
Aaron
Using Actionscript To Position A Dynamically Loaded Swf File Behind An Exsisting Mc O
Hi all,
I'm trying to get a dynamically loaded swf to load into an empty mc behind a particular mc on the stage. I used actionscript to create an empty movie clip using the createEmptyMovieClip command. But, how can i get it to create it, then load the external .swf into it behind a exsisting mc on the stage? Is this possible?
thank you,
Aaron
Using Actionscript To Position A Dynamically Loaded Swf File Behind An Exsisting Mc
Hi all,
I'm trying to get a dynamically loaded swf to load into an empty mc behind a particular mc on the stage. I used actionscript to create an empty movie clip using the createEmptyMovieClip command. But, how can i get it to create it, then load the external .swf into it behind a exsisting mc on the stage? Is this possible?
thank you,
Aaron
HTML Link In Dynamically Imported Text?
I can't seem to get a URL link in my dynamicallyt, imported text to work...
Is it not possible?
I checked the Flash Help documents and they offered very little specific information eluding to what the problem might be. Just a bunch of vauge information about enabling the text box with ActionScript but no info on where the script should go.
Every time I run the page I've created, the <a> tag shows up in the text box instead of making a link.
The "Render Text as HTML" button is on... The fonts are not embeded (if that matters)... Any ideas?
Centering A Dynamically Loaded Image File In A Movie Clip
Hi all,
I followed a tutorial on kirupa.com (this is the link to the tutorial http://www.kirupa.com/developer/mx2004/thumbnails.htm)
I've learned from that and created my own image gallery, the only problem is that when the image loads, it loads to the top left, so my image hangs off the side of the page.
All my images are different sizes, so i firstly need the thumbnail pannel to recognise the size of each thumbnail and bunch them up centre aligned (on the horizontal axis) so that there are no massive black gaps in between.
Second, i need the image in the main 'picture' movie clip to aligne to the centre registration point instead of its top left corner aligning to the reg point.
This is the code that I am using at the moment
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
picname = [];
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
picname [i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
//
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
//
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
name_txt.text = picname [p];
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
name_txt.text = picname [p];
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
name_txt.text = picname [0];
}
}
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 5;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._heig ht)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
I understand that this is all about timing or somethign as the image has to load before it can be centered. But this is starting to annoy me now.
I've seen some topics on this on other pages, but they make no sense... i need to know where the code goes and how it works etc... i'm not a total actionscript wizz (as you might have noticed).
This is the rough layout of the scene if you need it.
On the left is two dynamic text boxes which load with the information for the image, then all the way along the bottom is the thumbnail slider with the image box beign at the right of the stage.
In time i'd like to put effects and more animated things on the gallery, but right now i just need to get this sorted before it drives me totally mad.
thanks
Desperately needing help
CI
CreateTextField, Dynamically Loaded Text, And Setting Text Format..
I'm trying to format some text that i'm loading into a text box, that's inside a movie clip, that's created at load time. It seems that I have everything but the snippet of code that will apply the text formatting. I just don't know where to get it from, or rather, what to point it at.
my code is
Code:
//creates empty movie clip
this.createEmptyMovieClip("enter_mc", 10);
//creates text field inside movie clip
this.enter_mc.createTextField("welcome_txt", this.getNextHighestDepth(), 0, 0, 100, 300);
//sets text formatting
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = true;
my_fmt.size = 20;
//
LV = new LoadVars();
// declare a new LoadVars object
LV.load("enterTxt.txt");
// load content in it
LV.onLoad = function(success) {
if (success) {
// when the file is loaded...
_root.enter_mc.welcome_txt.text = this.enterTxt;
// load the value of the variable "enterTxt" in the
// file into the text field "named" welcome_txt
}
};
and that works to create the movie clip, the text box, and load the text.
this
Code:
_root.enter_mc.welcome_txt.setTextFormat(my_fmt);
would make sense for formatting the text but it doesn't format the loaded text. there's nothing special about the text that's being loaded.
I'm at a loss, any help would be greatly appreciated.
Dynamically Loading Url Text Into Textbox And Creating A Link From It
Dear all, I am trying to program in flash and as a bit of an amateur I have little idea of how to achieve my goal.
I want to load text into a textfield in flash, break it into substrings separated by white spaces and then retrieve substrings which have the character ~ in front if them to create links with. Any idea how i can achieve this?
thanx
Controlling/Transofmring Dynamically Loaded Pics(jpegs) - File Attached
Hey all,
I'm trying to create this polaroid development effect, which has been tweened, problem is I would kie the pics to load dynamically into a placeholder MC. This is fine, but the JPG loads, flashes upa nd then disappears, meaning the effect is rendered useless.
File can be got here:
http://www.thoughtography.net.au/temp/polaroid.fla
Please help :S
cheers.
Controlling/Transofmring Dynamically Loaded Pics(jpegs) - File Attached
Hey all,
I'm trying to create this polaroid development effect, which has been tweened, problem is I would kie the pics to load dynamically into a placeholder MC. This is fine, but the JPG loads, flashes upa nd then disappears, meaning the effect is rendered useless.
File can be got here:
http://www.thoughtography.net.au/temp/polaroid.fla
Please help :S
cheers.
Fx On Dynamically Loaded Text .
Can an effect like the typewriter tutorial be put on all text loaded dynamically in flash. Via actionscript.
Or do you need something like jgenerator to do this ?
Anyone Know,
Dynamically Loaded Text?
I've done this before, a very LONG time ago - and i'm kind of fuzzy of how to do this...
On my dynamic text box, called myText with a variable of newsText - I am trying to load in this url: gg_news.txt
The text file looks like this:
Code:
&newsText=news this is the news etc etc etc etc.
(am I supposed to use quotes and semi colons to end it?)
and this is my script:
Code:
_root.loadVariables ("../gg_news.txt",0);
What do you think is the problem?
I've done this in Flash 5, and now i'm with MX and i'm doing quite well, but my client wants to use a dynamic update system - and I can't for the life of me figure out what i'm doing wrong...
Thanks if you can help!
Dynamically Loaded Text
Hello.
I am trying to load some text dynamically into my movie from a .txt files saved within the same folder (news.txt).
So far, I have created my dynamic text box, given it a variable name (news). I then go to the frame where I want my text to load, and I have added the following action: loadVariablesNum("news.txt", 0);
Finally, on the first line of my news.txt file, I have added: news=
Now, this all works fine when my text box is on frame number one of the timeline, and the text displays correctly, however, I now want to do the same thing but with a text box that is held within frame number 15 of a movie clip.
I have tried doing this a couple of times and it doesn't work for me, so am I doing something wrong and do I have do something else in order to have the text display correctly?
Thanks for you time
IGD
Dynamically Loaded Text
Hi there,
Quick question re loading text from an external text file into a dynamic text box .
On the main timeline I've used the following code and it works fine.
myLoadVars = new LoadVars();
myLoadVars.onLoad = function() {
news_txt.htmlText = myLoadVars.myHTMLdata;
}
myLoadVars.load("news_1.txt");
news_txt is my text box and news_1.txt is the external text file.
Now I want to incorporate this text box into a movieclip. I've tried it and the text isn't loading. I think I need to adjust the code to reference the path to the text file. Not sure. Any help very gratefully received.
Many thanks
Q.
Dynamically Loaded Text
Hey guys I'm populating a dynamic text field from a text file.. but having troubles with line spacing...
http://www.actionscript.org/forums/a...3/t-36615.html
The above post describes the problems flash/windows/mac has interpreting line spacing..
What I'm trying to accomplish is just a little 'latest news' section, so the client can go into the text file, type in the date and a message under the date.
Would anyone have a suggested work around for this or maybe a different way completely.. as the line spacing isnt working properly.. and using <br> constantly wouldn't really be user friendly.
EDIT: Might as well ask this while I have this post; would there be any reason why the UIScrollBar component is making my loaded text dissapear?.. Without it the multi-line text is there.. as soon as I drag the scrollbar to the text field the text dissapears when testing movie.
URL In Dynamically Loaded Text?
'ello 'urus. I'm trying to find out if there is a semi-painless way to create urls within Dynamically Loaded Text....ie, how do i format my .txt file to display urls? or does that exist?
bow
Dynamically Loaded Text
I am trying to load text from an external .txt file but I keep geting an error message.
This is my code:
Code:
loadText = new loadVars();
loadText.load("bio.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.biotext;
};
This is the error I keep getting:
Quote:
The identifier 'loadVars' will not resolve to built-in object 'LoadVars' at runtime.
loadText = new loadVars();
Thanks alot.
|