Dynamic Text Restrictions
I have a dynamic text box the the user inputs a single letter into. I want to retrict the dynamic text field to letters ONLY can I do that? I know restrict does but that only seems to work on INPUT text fields.
Adobe > ActionScript 1 and 2
Posted on: 06/28/2007 12:10:09 PM
View Complete Forum Thread with Replies
Sponsored Links:
Text Field Character Restrictions
I have a text field that needs to only accept integers (0-9, no decimals), but since I have other text fields that accept letters, this one does, too.
Is there a way to restrict the character set for a particular text field?
Thanks,
Mark W
View Replies !
View Related
If And 2 Restrictions
very very easy, but can't get it working
_root.onEnterFrame = function () {
if (var1>50 && var2=23) {doSomething();};
}
if 2 variables are at a certain number do something?
thanx in advance
View Replies !
View Related
Adding _y Restrictions
Iv got this object that follows the mouse and slows down.
this is the script..
onClipEvent (enterFrame) {
trgt_x = _root._xmouse - _x;
_x = _x + (trgt_x/5);
}
whats the easiest way to add _y restrictions so the slider only moves in a given place.
View Replies !
View Related
Drag Restrictions
i have a box inside of a frame. when the user starts dragging the box, i would like it to go no higher than the top of the frame, and no lower than the bottom, also, it needs to be restricted to the y axis. i have accomplished the latter, but i can't figure out how to keep the box inside of the frame, thanks!
View Replies !
View Related
Load Restrictions?
Hello,
i've posted a threat some time ago in the 'beginners forum', but after some experimenting i've realised that the problem that i'm having maybe isn't really a beginners problem, so i'm going to rephrase it here :
I'm trying to siply load an xml file, stored on a server somewhere.
I originally thought that i had a syntax error, because it always said "unable to open url".
But now i've uploaded the swf to the same folder as the xml file (on that server) and then it works fine.
I've done some researching and appearantly this has something to do with security issues. In flash versions 6 and higher, you can't load xml anymore. Unless you use the method System.security.allowDomain() in the remote flash file. But the problem i have is that the xml file is actually a php file, that echoes an xml, so i can't use this method of course.
So i could work around this problem if i publish and upload the whole swf for every test, but debugging is really hard that way because i can't trace then.
I can imagine that a lot of you already had that problem so there must be someone who can help me with this!!
Thanks!
M
View Replies !
View Related
DuplicateMovieClip Restrictions?
Is there any reason why I can only duplicate one MC per on (press) ?
I have perfectly working (though ugly) code that duplicates a box_mc X number of times.
If I want to duplicate another object the same number of times then only either or works, not both. I have put the other box code in various locations and only one will work.
Both work fine (individually) when the other code is commented out.
I'm losing my hair on this.
Thanks
View Replies !
View Related
Instance Name Restrictions
i searched in forum but didnt get any result.. sorry if i missed.
i wanna learn something? why instance names cant start with a number?
is there a restriction for instance names? if there is.. what are these restrictions all about?
View Replies !
View Related
Draggable Object Restrictions
I trying to drag an object within flash. The dragging bit is easy, but I do not want the user to be able to drag the object off the screen. Do I have to set some kind of restrictions on where the user can move the object to?
View Replies !
View Related
Instace Names - Restrictions From MX 2 V5
Can anyone tell me what the restrictions are on instance name in MX when exporting to Flash 5?
I am getting the following error when using 'inputText' as an instance name. I am also getting other errors for button instances etc. Is there a max length?
---------------------------------------------------------
Scene=Scene 1, Layer=Input Text, Frame=79: Flash MX Text Field Instance Name
---------------------------------------------------------
View Replies !
View Related
Player7 Security Restrictions
You must have seen those alerts on websites already, when attempting to load from another domain or subdomain.
More info from Macromedia:
http://www.macromedia.com/devnet/mx/...curity_03.html
While there, you can read the whole article.
Also from Colin Moock:
http://www.moock.org/asdg/technotes/...inPolicyFiles/
gparis
View Replies !
View Related
Key Press Event Restrictions?
I have a movie that i want people to be able to get rid of whenever they click on the movie or press a key but when i use the Keypress event, i am restricted to one key, no option for any button being pressed - is there any way around this or will i have to put up with only one key being active?
Thanks
View Replies !
View Related
XML.load And Security Restrictions
Hi,
I have read the below blurb from macromedia:
http://www.macromedia.com/devnet/mx/..._security.html
- but I thought Id come here to confirm I can do or not do exactly what Im thinking.
I want to give the client a CD with a flash exe made in MX 2004 that uses the XML.load stuff. It needs to load in data from some domain:www.somedomain.com, but the client ought to be able to put in their CD anywhere in the world and it will go get the data. Is this possible?
Im confused because the macromedia article talks about the flash player not being able to load data from anywhere but the domain that the calling movie is in. But my CD isnt in a domain - its just on someones PC.
I hope someone can help.
Thanks,
Tim.
View Replies !
View Related
Preloading Images And Restrictions?
Is there some sort of size limits placed on files loaded into flash?
I am preloading images and if I specify an image over 25K, the preloading just hangs. If the files are under 25K, everything works great.
This is really driving me crazy. ANY help would be greatly appreciated!!!
Here is the code I am using:
Frame 1
================================================== ==============
this.onLoad = onThisMovieLoaded;
// first thing to do
function onThisMovieLoaded() {
// get that xml
loadPhotoXML();
}
// load up that xml
function loadPhotoXML() {
photosXML = new XML();
photosXML.ignoreWhite = true;
photosXML.onLoad = onPhotosXMLLoaded;
photosXML.load("thumbnails.xml");
}
// once your XML is loaded, load up the images
function onPhotosXMLLoaded() {
imageNodes = this.firstChild.childNodes;
loadInSeq(0);
}
// loading images
function loadInSeq(i) {
// create an empty movie clip and set it's depth to i
var slide = this.createEmptyMovieClip("slide"+i, i);
// hide all slides loading on top of first one
if (i>0) {
slide._alpha = 0;
}
// load the image into the empty movie clip
slide.loadMovie(imageNodes[i].attributes.path);
checkLoadedID = setInterval(CheckSlideGetsLoaded, 1000/fps, i, this);
}
// call this function that recursively calls itself
// which will keep refreshing itself until the movie clip
// has a width and then it will re-exec the load in seq function
function CheckSlideGetsLoaded(i, mc) {
// if the movie is loaded (and has a width)
if (mc["slide"+i]._width > 0) {
// make sure it is visible
mc["slide"+i]._visible = true;
// call clear interval to break us out of this current loop
clearInterval(checkLoadedID);
trace(i);
// but first start loading the next pic
if (i < mc.imageNodes.length-1) {
mc.loadInSeq(i+1);
// unless all photos are loaded
} else {
// start displaying new photos
trace("done");
}
}
}
thumbnails.xml (where 4th & 5th images [450day11_photos.jpg & 450day16_rainbow.jpg] should cause the process to hang because they are like 33K...if removed, everything works).
================================================== =================
<images>
<image path="http://seattlepi.nwsource.com/dayart/20040927/65day.jpg"/>
<image path="http://seattlepi.nwsource.com/dayart/20040927/65fashion.jpg"/>
<image path="http://seattlepi.nwsource.com/dayart/20021108/150clo08_puddleleaves.jpg"/>
<image path="http://seattlepi.nwsource.com/dayart/20040927/450day11_photos.jpg"/>
<image path="http://seattlepi.nwsource.com/dayart/20040927/450day16_rainbow.jpg"/>
</images>
View Replies !
View Related
Height And Width Restrictions
Hi
quick question. is there a height and width restriction in flash.
the actually main page i mean, are there restrictions.
reason i ask is i created the page 500 by 2100...now it's gonna be a pop up...which is 500 by 300 with a scrollbar. now for some reason it only displays most of the text..the rest does not show up...any idea why.
View Replies !
View Related
Randomize Array (with Restrictions)
hey all. i have a prototype function that randomizes the sequence of any array:
Array.prototype.randomizeArray = function () {
return this.sort(function(a,b) {return (Math.floor(Math.random()*2) == 0) ? 1 : -1;});
};
however, i would like to modify it so that the randomization guarantees that the no element in the new sequence is in the same position as it was in the original sequence.
in other words, if i have animalArray=new Array("cat","dog","bunny") and i call animalArray.randomizeArray(); ... then i want to make sure that the new animalArray never has "cat" in position 0, nor "dog" in position 1, nor "bunny" in position 2. what would be the best way to go about doing this? any help would be greatly appreciated.
cheers
j
View Replies !
View Related
[MX04] Following Curser Restrictions
Hello everyone,
Hope everythings going well.
I have a basic question, i have got an image following the curser but i want to restrict it from going below half way of the document.
i have a clear example here
www.viviensmodels.com.au
Click woman then melbourne.
The circle on the site follows the curser but doesnt go past the grey box.
i would like a direction on how to do this please.
im sure its a 1 liner code too.
thanks in advanced
Peter
View Replies !
View Related
Flash Intranet Restrictions
I am currently working on my company Intranet and there are areas where I would like to use Flash (primarily for video clips). However, there are several client machines that do not have Internet access. As such, I am unable to access http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0 in the Javascript function AC_FL_RunContent which is generated automatically when inserting the .swf or .flv file.
Does anyone know if there is a way to install the required download on the internal servers and redirect there instead?
Thanks for any assistance.
Edited: 08/15/2007 at 12:44:20 PM by hebert_tsrhc
View Replies !
View Related
Restrictions Of HTML Inside SWF
A client wants to show complete html-pages inside a Flash movie. I've seen somewhere that this is possible through an IFrame, but then you can just rightclick the frame to view the source, and that's not what the client's looking for.
Ik know it's possible to parse simple html tags in Flash in a TextField, such as <b></b> <a href=""></a> etc etc, but what are the restrictions? For example, all css should work, even flash movies inside the html page should work. I think they're asking too much, so what exactly is possible and what's not?
View Replies !
View Related
Game Help - Restrictions And Jumping.
http://www.prophecydesigns.com/game/roughgame.swf
http://www.prophecydesigns.com/game/roughgame.fla
This is a new game I am working on. It is eventually going to be a fully graphical 2D Fighter (like Mortal Kombat or Street Fighter) but right now I am working on the engine for the game (Thus the Tylonel bottle character )
Implementing moves and stuff like that isn't a worry for me right now. I am pretty much getting the basics down. With that said I need help implementing a couple features.
I need suggestions/help on the best way to restrict a player from leaving the stage sides (they shouldnt be able to go off screen) and to restrict players from being able to go 'through' each other.
Now I've played around a bit with giving the character a walk speed variable and when he hit tests say 'player 2 - kevin' it turns that speed to zero but I have been having a hard time finding the best place to reinstate the value, so they can move again.
So can anyone give me a hand on the best way to implement these restrictions.
Also with jumping, I need to obviously make a hit test on the ground (since its 2D, left and right only) and then implement a gravity and jump speed. What would be the best way to do this?
Thanks for any tips. This project will probably take me until Summer to complete, but I'll gladly show improvements (my artist is currently drawing/animating, what you see now is temporary - lol)
Again, thanks in advance.
View Replies !
View Related
Generating A Random Number With Restrictions.
yea what's up dudes?
im learning actionscript as we speak.
i have "actionscripting in flash" by phil kerman
im on chapter 6 now.
right now i would like to generate a random number between 84 and 375.
the formula im using is this:
min=84
max=375
Math.floor(Math.random()*((max-min)+1))+min
ok, so is there an easier way?
there must be an easier way.
and with regards to my current formula,
what do i do after that...
like after it calculates the random number does Math.floor= the random number?
so then i would say, ("the random number is " Math.floor)
???
im a severe newbie, so
any help would be appreciated ten fold.
View Replies !
View Related
Random Movieclip Placement...BUT With Restrictions
Hiya, I've read quite a few of the existing posts but nothing seems to match my problem so this a last resort....
I'm creating a basic drag and drop exercise so basically i have lots of different movieclips which need to be placed in the correct spot, however, to make this less predictable I'd like to postion the movieclips in a new spot everytime the exercise is loaded.
This seems pretty easy enough using Math.random and size limitations according to size of my movie BUT i have the actual workspace onto which these movieclips have to be dragged is smack bang in the middle of the stage. SO my question is.... how can i place the movieclips on the stage randomnly each time the exercise is started up BUT not be positioned on the actual workspace??
I hope that makes sense
View Replies !
View Related
MouseMove Restrictions For Background Image
Hello,
I'm attempting to create a website with a background image that pans when the mouse moves around. The image is enclosed by a border to hide where the image ends. I have worked a script that links the image to the mouse movement but have been unable to stop the movement continuing past the edges of the image. This means that the user can move the mouse to an extreme so that the edge and past is shown in the visible area. Here is the script for the mouse action so far:
var midX = 520;
var midY = 350;
var scaleX = -0.2;
var scaleY = -0.2;
onMouseMove = function(){
bg_mc._x = midX + (_xmouse-midX)*scaleX;
bg_mc._y = midY + (_ymouse-midY)*scaleY;
}
I would be very grateful if anyone can guide me to the actions needed to stop the mouseMove action from continuing to move the image when it reaches it's edge. Also, the registration point is currently in the immediate centre of the image.
Thank you.
View Replies !
View Related
Setting Input Field Restrictions.
without using a text box component, is it possible to add restrictions to a basic input field?
Basically I have this input field and I would like to restrict the value to be >= 1000. So when a user enters a number, it must be between 1000-100,000.
Also how do I set a minimum and maximum number of characters for the field?
Any help would be greatly appreciated.
Thanks in advance.
View Replies !
View Related
Setting Input Field Restrictions.
without using a text box component, is it possible to add restrictions to a basic input field?
Basically I have this input field and I would like to restrict the value to be >= 1000. So when a user enters a number, it must be between 1000-100,000.
Also how do I set a minimum and maximum number of characters for the field?
Any help would be greatly appreciated.
Thanks in advance.
View Replies !
View Related
Drag Movement Restrictions And Mc Timeline Control
Hey guys.
I was wondering cause i have a movie clip called leftleaver_mc and ive made it dragable with the following codes.
this.leftswitch_mc.onPress = function() {
leftswitch_mc.startDrag()
}
this.leftswitch_mc.onRelease = function() {
leftswitch_mc.stopDrag()
}
that code obviously works but i what i want to do is make it so they can only drag up and down between the y coordinates of 990.1 and 793.8 on the stage and also not beable to move from the x coordinates of 276.4 while there dragging up and down.
================================================== ====
also another thing is when there moving the the leftswitch_mc up and down between them coordinates i want it to control an animation ive made in another mc called testcylinder_mc like the frame lable i want it to control in the cylinder mc is around 30 frames long starting at frame 6 of the mc's timeline and if they movie the leftswitch_mc up i want it to play that frame forward at normal speed and if they move leftswitch_mc down i want it to play that frame in reverse at normal speed and also if leftswitch_mc is at its original starting point i want the cylinder mc to return to frame 1.
thanks for reading i hope ive exsplained it easy for u guys to understand and to beable to help.
thanks in advanced
View Replies !
View Related
HELP With Opening New Browswer Window With Size Restrictions
HELP! I have a button which I want to open a new browser window to play a swf file. The code i used was
on(release){
getURL("cwismer.swf","_blank");
}
that works, but i want to limit the dimensions of the browswer window it opens to 800 pixels by 600 pixels. right now it opens in to a giant screen. to get a better idea, please go to www.codiwismer.com, click enter, click portfolio, and then click on number 17. you will see that the dimensions of the window it opens show objects that are moved off the stage that i want to stay hidden. please help me!!!
View Replies !
View Related
Help: Drag Movement Restrictions And Mc Timeline Control
Hey guys.
I was wondering cause i have a movie clip called leftleaver_mc and ive made it dragable with the following codes.
this.leftswitch_mc.onPress = function() {
leftswitch_mc.startDrag()
}
this.leftswitch_mc.onRelease = function() {
leftswitch_mc.stopDrag()
}
that code obviously works but i what i want to do is make it so they can only drag up and down between the y coordinates of 990.1 and 793.8 on the stage and also not beable to move from the x coordinates of 276.4 while there dragging up and down.
================================================== ====
also another thing is when there moving the the leftswitch_mc up and down between them coordinates i want it to control an animation ive made in another mc called testcylinder_mc like the frame lable i want it to control in the cylinder mc is around 30 frames long starting at frame 6 of the mc's timeline and if they movie the leftswitch_mc up i want it to play that frame forward at normal speed and if they move leftswitch_mc down i want it to play that frame in reverse at normal speed and also if leftswitch_mc is at its original starting point i want the cylinder mc to return to frame 1.
thanks for reading i hope ive exsplained it easy for u guys to understand and to beable to help.
thanks in advanced
View Replies !
View Related
Restrictions On Calling Functions Defined In Symbols?
I'm calling a function from the _root timeline which is defined within a child symbol. However the function does not execute either as an absolute call to the local function, or if the function is defined as a global.
What are the restrictions on the visibility / access to functions within symbols in Flash, and can a symbol's functions & data be accessible from a parent?
My specific problem is that I'm trying to set the attributes of dynamic text fields from the _root timeline, e.g.
_root.main.content_boxes.page_number.text = page_number;
However this does not work, and the attribute can only be set from the content_boxes symbol itself or from a child. However I can read attributes of _root.main.content_boxes.page_number from the _root timeline; just not set them.
Therefore I'm trying to define a SetPageContent(); function within the content_boxes symbol to set the attributes based on a global variable, e.g. page_number.
However this function will not execute from the _root timeline, either as an absolute call to _root.main.content_boxes.SetPageContent(); or if the SetPageContent function is defined as a global function. The function does run if it is called locally, or a from a child symbol.
View Replies !
View Related
MovieClip Movement With Irregular Shaped Boundary Restrictions
Hi,
I'm just wondering how to allow a user to move an object around the screen with the keyboard but only within a certain boundary which is not just a basic square or circle. The boundary needs to be some kind of irregular shape or polygon. I'm thinking this sounds like advanced hit testing?
Let me know if there are any good tutorials on this or if you are uber good at this yourself, feel free to speil about it!
icekube12jr
View Replies !
View Related
Eliminating Security Restrictions In Internet Explorer When Viewing Flash Movies?
Hello everyone,
I'm looking for a bit of advice concerning my flash animation....
I am very new to using Flash, but have managed to make an animation, and I'm using Macromedia Dreamweaver to make my website.
I have tried the "Insert>Media>Flash" and "Insert>Media>Shockwave" in Dreamweaver to get my flash animation into my website.
However, when I try to preview my .htm file, Internet Explorer v6 brings up a message below the Navigation bar saying: "to help protect your security, Internet Explorer has restricted this file..."
I can click this prompt and allow the animation to be shown, but IE does not do this with other websites' flash animations, and I would prefer if people looking at my website did not see this message, as they might think im trying to send them a virus.
How do I go about by-passing this problem? There must be a way round it as I have seen loads of flash animations without this prompt showing. I am too inexperienced to know where to start though.
Any input would be greatfully appreciated,
Thanks in advance,
Stew
View Replies !
View Related
Jumping To Areas Of Dynamic Text, Printing Dynamic Text
hello,
I have a movie clip that loads a .txt file into a dynamic text field. Due to the amount of content in the file a scroller bar is needed in order to view all of it. I want to create buttons that jump to different areas of the dynamic text for easier navigation so the user can go directly to various sections instead of having to use the scroller all the time. What kind of coding would I need to put on the buttons and within the .txt file at the areas I want to jump to?
Also, I would like to give the user the option to print everything within the dynamic text field only, not the surrounding elements in my movie clip. Is that possible?
thanks!
View Replies !
View Related
Dynamic Text Not Loading On Server . . . Other Dynamic Text Issues
ok - here's the url
http://www.rongilcreast.com/Test_Site/main.html
when I 'test movie' in Flash, the text comes in. But not now that it's online . . .
2nd problem. I want to add a scrollbar to the textbox, but when I drag the scrollbar onto the textbox, it doesn't snap-to the text box and resize itself.
all the files are here:
http://www.rongilcreast.com/Test_Site/main.fla
http://www.rongilcreast.com/Test_Site/main.swf
http://www.rongilcreast.com/Test_Site/Index.txt
whatamIdoin'wrong?
tia . . .
View Replies !
View Related
[AS2] Changing Text In Dynamic Text Field With Dynamic Instance Name
I dont know what I am missing here but what I want to do is change the text inside a dynamic text field via actionscript. the code I am using runs in a loop within a function. Trace is outputting the correct values.
PHP Code:
for(i=0; i<=4; i++) {
if(_root["order_"+ q][i] == 0) {
["order_"+ i]text = "First";
trace("first");
} else if (_root["order_"+ q][i] == 1) {
["order_"+ i]text = "Second";
trace("Second");
} else if (_root["order_"+ q][i] == 2) {
["order_"+ i]text = "Third";
trace("Third");
} else if (_root["order_"+ q][i] == 3) {
["order_"+ i]text = "Fourth";
trace("Fourth");
} else if (_root["order_"+ q][i] == 4) {
["order_"+ i]text = "Fifth";
trace("Fifth");
}
}
basically I want to do this -
PHP Code:
order_0.text = "First";
So how can I change this line to work as expected?
PHP Code:
["order_"+ i]text = "First";
EDIT- The instance names for the dynamic text fields are set
Thanks
View Replies !
View Related
Asfunction - How To Load Dynamic Text With Dynamic Text? [F8]
Hello dear helpers !!!
I'm trying to get external, dynamically loaded text to load different text files into a text box. I've figured out that I need asfunction to do it through calling a function in the movie and passing it variables, although i haven't been able to write this function at all... would anyone mind giving me a hand???
thanks sooo much!!
p.s. I've managed to get this working by creating a toggle function, so at the moment I have 25 text boxes and a show/ hide function, but that's very buggy.
View Replies !
View Related
Loaded Text File Wont Show All Of The Text In Dynamic Text Field
When I load an external text file into flash and display the string in a dynamic text box, not all of the text will show in the text box; and using scroll button to scroll the text doesnt help.
The text that is in the text file is as follows, and as far as I can see there is no reason why all this text shouldnt show in the dynamic text field; by the way all my targets are correct, I know that for fact.
message=Code: Cheat:
BEEPSAGONER Deactivate the censor beeps
DRACULASTEABAGS 50 lives
DUTCHOVENS Frying pan mode
XFYHIJERPWAL IELWZS Debug mode
BOVRILBULLETHOLE Shoot all objects
EASY Easy mode
VERYEASY Very easy mode
SPUNKJOCKEY New death animation
SEXYMANN Birdy & Squirrel scene
Code: Unlock chapter:
PRINCEALBERT Barn Boys
CLAMPIRATE Bats Tower
ANCHOVYBAY Slopranos
MONKEYSCHIN Uga Buga
SPANIELSEARS Spooky
BEELZEBUBSBUM It's War
CHOCOLATESTARFISH The Heist
WELDERSBENCH All chapters and scenes
Code: Unlock Multiplayer character:
WELLYTOP Conker
EASTEREGGSRUS Neo Conker
BILLYMILLROUNDABOUT Gregg the Grim Reaper
CHINDITVICTORY Weasel Henchmen
EATBOX Cavemen
RUSTYSHERIFFSBADGE Sergeant and Tediz Leader
BEEFCURTAINS Zombies and Villagers
View Replies !
View Related
Trasfering Text From One Dynamic Text Box To A Input Text Box On A Differnt Page?
Ok so I have a text box set up which receives the date on a callendar which you click on. On another page (a seperate html file) I have an input text box for receiveing this text.
I've been trying to do this using various methods using getURL, but, I can't get it to work. This is becoming tedious especially as I'm not able to test it without having to reupload the files.
If someone could please inform me on how I should do this I'd be vary greatful.
If you need any further information I'll reply as soon as possible.
View Replies !
View Related
Load Text From A Text File Into A Dynamic Text Field
I'm trying to load text from a text file into a dynamic text field. The text field is on the "blog" page of the website. When I test my movie, the first time I go to the blog page, the text from the external text file (AND the CSS styles) show up fine. But when I click from the blog page to go to the "profit calculator" or "contact" pages and THEN click to go BACK to the blog page, the blog page animates back in, and right as the animation ends, the text on the blog page suddenly disappears and won't come back. PLEASE help me figure this out!
View Replies !
View Related
Dynamic Text Box / Xml Content - Text Is Too Close To Border Of Text Box
Hi,
If you take a look at my flash movie you will see that I have draggable movie clips, which contain dynamic text fields. These text fields contain text drawn in from a simple xml document.
The problem I have is that the text in the text fields is hedged right next to the border of the autosized text box. This makes them look untidy and in the worst case difficult to read. I wonder how I can add some margin to the left and right of the text to fill in some space.
http://www.nottingham.ac.uk/home/ccz...AndDrop3.1.swf
http://www.nottingham.ac.uk/home/ccz...AndDrop3.1.fla
(you also need the xml doc at : http://www.nottingham.ac.uk/home/ccz...scriptions.xml )
The code which formats the text boxes is:
with (main["dragAct"+i].dragActText) {
text = actText[i+1];
background = true;
backgroundColor = "0xe2e2e2";
setTextFormat(myFormat);
autoSize = "center";
border = true;
borderColor = "0x666699";
}
my text formatting looks like this, and you can see that I have tried to use leftMargin / rightMargin but these properties don't seem to work:
var myFormat:TextFormat = new TextFormat("Tahoma", 12);
myFormat.leftMargin = 20;
myFormat.rightMargin = 20;
myFormat.bold = true;
Any suggestions most welcome.
Thanks
View Replies !
View Related
Dynamic Vars, Dynamic Paths Using Variables And External Text Files
Hi there,
first off, apologies for the long post, but its a tricky problem to explain... and on my first post too! (sorry )
Im have a bit of bother with flash calling variables from a text file, and using them to make paths to other variables, and to control the amount of time a duplicate clip occurs. The first of these 2 problems is this:
Im loading a text file "content.txt" into _root. (this works fine)
it contains the variables:
webclipcount=2
&webhenry=hello hello
&webbutton01=henry
on the main timeline I have this button
on(press){
sectiontitle="web"
clipcount=webclipcount
}
there is a text box on the main timeline with variable name of bodycopy.
on a clip on the main timeline I have this;
onClipEvent (enterFrame) {
if (num< _parent.clipcount) {
duplicateMovieClip(thebutton, "button"+depth, depth);
this["button"+depth].name = _parent[_parent.sectiontitle+"button"+num];
this gives button01 the name henry- this works.
on the duplicated clip I have these actions:
on(mouseDown){
_parent._parent.bodycopy=_parent._parent[_parent._parent.sectiontitle+this.name]
}
so we end up with a path like:
_parent._parent.bodycopy=_parent._parent.webhenry
and it in turn should make the textbox on the main timeline contain "hello hello"
but it doesnt.
also for the duplicating clip, unless i use:
onClipEvent (enterFrame) {
if (num< 2) {.....
<snip>
it wont work either. it seems neither can be dynamic/ pulled from the text file. (well, i can get them to work!)
If I use direct paths like:
on(mouseDown){
_parent._parent.bodycopy="bloody hell it works!"
}
and
onClipEvent (enterFrame) {
if (num< 2) {.....
<snip>
it works, but not if they are dynamicly set from the txt file...
Anyone care to shed some light onto this? its doing my head in!
thanks in advance or the help.
cheers,
chris
View Replies !
View Related
Mouseless, Autoscrolling, Dynamic Tweening, Dynamic Text...
I am having the darndest time finding help on this even though it seems like a common task (ok done venting)
What I need is this:
A dynamic text field (from txt file) that will autoscroll vertically. I know that I can do this by motion tweening a movie clip containing my dynamic text, but heres the thing: this source txt file will be updated daily (daily events). Some days it will be a few lines of txt (no scrolling necessary). Some days it may be 500 or more lines of text. So simply motion tweening my movie clip a fixed speed and distance will not work. I need the scroll speed, text box size, and scroll distance to be dynamic.
Please help us. The hack that made our kiosk made it almost impossible to open, so it takes me forever to open it and i don't want to do that every day... oh, you didn't need to know that, sorry.
An .fla or a tutorial would be a huge help as I am not action script savy, yet.
Thanks in advance!
View Replies !
View Related
|