Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Unique Problem With AutoSizing Textfield



I am trying to create a single instance of a tooltip that dynamically updates depending on what movieclip I rollover. Everything is working great except for one small issue...the autosizing does not work as I expected it to.

I made an actionscript class, set autosize to true in the constructor, and set the visibility to false. The first time I rollover a movieclip the autosize works perfectly its every time after the initial rollover that the problems begin. If the text that I am trying to display is smaller/fewer lines than the text I was displaying in the initial rollover then everything works fine. If it is longer/more lines than the initial text then it cuts off all of the text that is longer/more lines. It only shows the amount of text that fit in the initial rollover! Isn't that the point of autosizing?! This is driving me insane!! I have tried to size it automatically using the width and height variables of both the textfield class and textformat class but they act the same way.

Does anyone no what is going on or how I can fix it?

My current solution (which I hate!!) is in the constructor. I fill the text with spaces and duplicate it a few lines, set the visibility to true, autosize to true, and the alpha to 0. This works unless of course I need to add a tooltip that is bigger than the size I created in the constructor. Plus it is redrawing the entire textfield (granted most of it is invisible) if the text is less than what I defined in the constructor...and in my case I need to save as many CPU cycles as I can.

Heres the code (The commented out code is my current sucky solution):

Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.filters.DropShadowFilter;
import mx.managers.DepthManager;

class Tooltip{

var tooltipFormat:TextFormat;
var tooltip:TextField;
var tooltip_mc:MovieClip;
var filter:DropShadowFilter;
var ttAlphaTween:Tween;
var mouseOver:Boolean = false;
function Tooltip(){
tooltipFormat = new TextFormat();
tooltipFormat.font = "Arial";
tooltipFormat.size = 11;
tooltip_mc = _root.createEmptyMovieClip("tooltip_mc", _root.getNextHighestDepth())
tooltip = tooltip_mc.createTextField("tooltip_txt", tooltip_mc.getNextHighestDepth(), -1000, -100, 0, 0);
tooltip.background = true;
tooltip.backgroundColor = 0xFFFFE1;
tooltip.border = true;
tooltip.borderColor = 0x000000;
tooltip.selectable = false;
tooltip.autoSize = true;
//for(var i = 0; i<5; i++){
//tooltip.text += " ";
//}
//tooltip._alpha = 0;
//tooltip._visible = true;
tooltip._visible = false;

filter = new DropShadowFilter(3, 45, 0x000000, .5, 3, 3, 1, 3, false, false, false);
var filterArray:Array = new Array();
filterArray.push(filter);
tooltip.filters = filterArray;
}

function inOnRollover(mc, ttText, highestDepth){
mouseOver = true;
tooltip.text = ttText;
tooltip.setTextFormat(tooltipFormat);
tooltip._visible = true;
ttAlphaTween = new Tween(tooltip, "_alpha", Strong.easeOut, 0, 100, 1, true);
}

function inOnRollout(){
tooltip._visible = false;
mouseOver = false;
}
function inOnEnterFrame(){
if(mouseOver){
tooltip._x = _root._xmouse;
tooltip._y = _root._ymouse + 20;
}
}
}

Flash is like a child. You love it but sometimes you just want to strangle it.

Thanks in advance for any help!

Scott



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 11-04-2006, 06:00 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Textfield Autosizing Glitch
I noticed something that SUCKS when resizing textfields.

I am dynamically putting text into a textfield. Then I simply use

textInstanceName.autosize = "left";

the textfield is set to multiline (WITH WRAP!)

It works totally fine... except for ONE annoying glitch. if the user puts their mouse over that text field and uses the mousewheel it scrolls the text one line up, and the top line is then hidden.

The only thing that seems to fix it is to make the text not selectable... but the problem is that i WANT this field to be selectable.

are there any solutions for this?

F8/AS2: AutoSizing A TextField With A DropShadow Filter
Hi!

I have an input Text Field with the autoSize property set to true, a DropShadow filter, and with a default text value of "Your text here".

When the user enters text in the Text Field, and if their entry exceeds the length of the default text, everything typed after that length is reached APPEARS to have been truncated.

However, when I turn the DropShadow off, the TextField expands to the requirements of the newly entered text. This proves that the TextField actually autosized, but just didn't show the additional characters when the DropShadow was applied. I can then turn the DropShadow back on, showing all of the text in the Text Field.

Does anyone know how to autoSize a textfield(so that the user can actually see the expanded TextField) when a DropShadow filter has been applied?

AutoSizing
Just a quick question:

When Using Dynamic Text how can I Autosize the Text box in length? not using the multiline function. so autosize it on a single length wise.

Frank van der Linden

Autosizing A NS FLV
Hey Everyone,
How do I autosize a loaded FLV? I'm loading the video through a netconnection and a netstream.
Code:

private function videoSetUp(str:String):void {
         var blNC:NetConnection = new NetConnection();         
         blNC.connect(null);
         
         var ns:NetStream = new NetStream(blNC);
         ns.play("flv/Driving.flv");
         
         var vid:Video = new Video();
         vid.attachNetStream(ns);
         
         vid.addEventListener(
         
         ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
         function asyncErrorHandler(event:AsyncErrorEvent):void
         {
             // ignore error
         }
         
         addChild(vid);
      }
Also, what event do I use to tell when the FLV has started playing?

= TK

Autosizing Buttons
function main_loadbuttons() {
//trace(spacing)
for (i=0; i<mainNames.length; i++) {
spacing = button._height+5;
name = "mainBtn"+i;
button.duplicateMovieClip(name, i);
set("mainBtn"+i+".BtnName.text", mainNames[i]);
set("mainBtn"+i+".swf_file", mainSwf[i]);
setProperty("mainBtn"+i, _x, 23);
setProperty("mainBtn"+i, _y, 167+(i*spacing));
}
}

ok, within this fuction how would I set the textField to autosize to fit a name lie "Cayo Adventures"? I know it has something to do with the autoSize property. Just can't get the syntax right. I also need to then resize the height of the button underneeth called "Btn" to match the text. Any help is much appreciated as always

Autosizing Images
I just got through using one of the tutuorials to make a photo gallery. It was the XML/Flash one and I was just wondering if there was a way to make the images automatically resize to fit in the window. like any XML codes I can put in. I am the president/webmaster for my car club and that would make it alot easier to put the pics of my members cars up. If there isn't I can always just use photoshop to resize them.

Autosizing SWF In HTML
It's come down to the wire with a very particular client, who basically says this is my last straw. I could use some help please.

Apparently the site,

www.evanimal.com/JJ/JamesJeans.html


is coming up on some of the clients' monitors with scrollbars, so you cant see it all at one time. I need to fix this asap!! Can anyone tell me how to make the .swf always fit the size of the html page in its entirety?

Thank you so much

Evan

Autosizing Images
I just got through using one of the tutuorials to make a photo gallery. It was the XML/Flash one and I was just wondering if there was a way to make the images automatically resize to fit in the window. like any XML codes I can put in. I am the president/webmaster for my car club and that would make it alot easier to put the pics of my members cars up. If there isn't I can always just use photoshop to resize them.

Autosizing Window To Image?
I'm working on a project that involves a bunch of photo galleries. I've made thumbnails into buttons that when clicked on will pop-up javascript windows containing a larger version of the picture. My question is what is the script (if there is one) for auto-sizing the window so that it fits to the exact size of the image? I didnt take these pictures and the client doesnt want them cropped in any way. But they are all different sizes, and it would be ridiculous to try to size the window manually within the code for every pic. please help!

Images In Textfields And Autosizing In MX 04
ello

just got mx 04 pro so I'm playing around with some of the new features and seeing what can be done.

Anyway I'm checking out the support of <img> tags in html enabled textfields and I've found that if I make the textfield autosize it doesn't load my image.

here's what I mean:


PHP Code:



Caption = "test <img src="Bug.jpg">";




works fine, loads my bug image but when I do


PHP Code:



Caption = "test <img src="Bug.jpg">";
CaptionField.autoSize = true;




fails to load the image

anyone know why this is and if there's a workaround? its pretty important that I can have dynamically sized textfields with images in them for a project I'm working on

cheers all

Photo Autosizing And Player
Need ability to autosize photos of different dimensions for placement in photo gallery player. I have been told that Flash MX allows for placing your photos in a folder and having MX read that folder. Right now, placing pictures in the program requires too many steps.

Images In Textfields And Autosizing
ello

just got mx 04 pro so I'm playing around with some of the new features and seeing what can be done.

Anyway I'm checking out the support of <img> tags in html enabled textfields and I've found that if I make the textfield autosize it doesn't load my image.

here's what I mean:


ActionScript Code:
Caption = "test <br><img src="Bug.jpg">";


works fine, loads my bug image


ActionScript Code:
Caption = "test <br><img src="Bug.jpg">";CaptionField.autoSize = true;


fails to load the image

anyone know why this is and if there's a workaround? its pretty important that I can have dynamically sized textfields with images in them for a project I'm working on

cheers all

Images In Textfields And Autosizing
ello

just got mx 04 pro so I'm playing around with some of the new features and seeing what can be done.

Anyway I'm checking out the support of <img> tags in html enabled textfields and I've found that if I make the textfield autosize it doesn't load my image.

here's what I mean:


ActionScript Code:
Caption = "test <br><img src="Bug.jpg">";


works fine, loads my bug image


ActionScript Code:
Caption = "test <br><img src="Bug.jpg">";CaptionField.autoSize = true;


fails to load the image

anyone know why this is and if there's a workaround? its pretty important that I can have dynamically sized textfields with images in them for a project I'm working on

cheers all

Autosizing TextFields--height, But Not Width
I've got a dynamic text field; I'm loading its text from an outside source, so I don't really know what the text is going to be, or how many characters it will have. I would like the text field to automatically resize itself to show all of its text. However, I don't want the width to change.

In other words, I want a text field that works the same way they do inside the Flash authoring environment. After you set the width of a text field with the little square in the corner of the bounding box, the width won't change regardless of how much text you put in. Instead, the text wraps around to the next line, and the height of the field is automatically adjusted.

Is there any way to do this?

[F8] Autosizing Dynamic Textbox Issue..
Hi there,

I have a dynamic textbox in which I am externally loading html text. However, the textbox does not autosize in height to accommodate the text imported and I have to manually increase the dimension of the textbox.

I have tried using


Code:
myText.autoSize = true;
and the text would not show at all then. I have my dynamic textbox contained within a movieclip. Could that be contributing to why its not resizing?

I would appreciate some assistance in this regard.

Thanks

Autosizing Dynamic Text Within Symbol?
I'm working with a horizontal variation on this menu:

http://www.kirupa.com/developer/acti...pdown_menu.htm

Is there a way to make the individual menu buttons scale according to content?

Dynamic Text Field, Autosizing
hi,

if i create a textfield using the dynamic text field tool and not by actionscript (.createTextField), how can i autosize the text field that was created by using the text tool??

Autosizing A Flash Movie In HTML Shouldn't Be This Hard
I think I am missing something. can someone give me a simple example of how I one might have a flashmovie play both fullscreen while remaining autosized per browser resolution...?
Thanks,
AmbientDin

Unique XML Help
I found a tutorial on XML and flash. However it only deals with dropping a bunch on nodes in a combo box or list. I need help figureing out how to do the following:

Lets say that I have an XML that looks like this,

<table>
<item id="4" email="email@blank.com" />
<item id="5" email="email2@blank.com" />
<item id="6" email="email3@blank.com" />
</table>

Now, what I want to be able to do is put a dynamic text field on the stage and say, give me the email address for the id=4. Then in a totally different dynamic text box, give me the email for id=5, and so on. These dynamix text fields will all me in the same frame, so I am wantign to use actionscript on the frame, but need the script that can put a certain attribute in an instance of a text box according to an id that I specify in the code. Can anybody help on this?

-Yours truly Ricky Bobby

How Do I Get A Unique ID With AS3 For AIR
I'm developing an AIR app and I need a way to get a unique ID from the computer running the app. Is there a way to either get the computer's name or mac address?

Unique Number
Can anyone point me in the right direction in creating a unique random number in the following series of 3 numbers.
I've tried various if and if else combinations but can't get it to work.
Thanks all.

on (press) {
a = Math.round(Math.random()*10)+1;
b = Math.round(Math.random()*10)+1;
c = Math.round(Math.random()*10)+1;
}

Unique Numbers
hi,
I'm doing a thing with randomized numbers. But I want each number only to appear once. I have a solution for it for numbers from 0-9 but then I don't know how to fix it.

This is the code I'm using to check up to nine... anybody know what changes I have to make to be abel to check for larger numbers?

i = Number(i)+1;
if (i<=antaltermer) {
do {
rnd = random(antaltermer);
x = 1;
while (Number(x)<>Number((Number(length(Temp))+1))) {
if substring(Temp, x, 1) eq rnd) {
rnd = "";
}
x = Number(x)+1;
}
if (rnd ne "") {
Temp = Temp add rnd;
}
} while (rnd=="");
gotoAndPlay (4);
} else {
gotoAndPlay (6);
}

Unique Problem? Please Help
Hello

I have designed a page that has a flash navigation

with this flash nav, it introduces itself with animation onto the html
page

now

for the buttons will link to other html pages on the website

but I want to keep this flash nav on each page

but I don't want the intro to start each time it goes to a new page

I just want it to go to the point where everything has stopped moving
and just the buttons and nav are static

I understand that in flash you put an action to a button to go to an html page but, how do you ALSO get it to go to a certain point in the movie as well as the html location

this is the address I have the flash nav for testing at

http://homepages.slingshot.co.nz/~mj77/cyl/index.htm

If anyone can please help, I hope I have explained to you can understand what I am trying to do

if I put an alternative .swf nav file the is still onto the other pages although this will solve the problem of skipping the animation part, a new .swf file will have to load

so I do not want this, or it will take too long for another downloaod
which is not user friendly

Unique Names
Okay I'll try and make this easy to understand.
the easiest way to explain is image your a director
about to make a movie you have:

100 diffrent names(50 guys 50 girls)
50 roles(non gender based)

I want to randomly grab 50 diffrent names and assign them
to the diffrent roles(randomly).
Thats easy enough using arrays and the Math.random assignment.
the code looks something like this.

guys =["Mike","Dave","luke","Raul","Steve","Tyron","Malco lm","Bobby","Ben","Johnny"];
girls =["Sandy","Holly","Mish","Liz","Samatha","Charlez"," Lucy","Rebbeca","Cassie","Monica"];
allNames =[guys,girls];
role = Array();
index = Math.round(Math.random()*(allNames.length-1));
player = allNames[index]
if(player == guys){
count = Math.round(Math.random()*(guys.length-1));
players =guys[count];
role.push(players);
}
if(player == girls){
count = Math.round(Math.random()*(girls.length-1));
players = girls[count];
role.push(players);
}

trace(players);
trace(cast);

mind you thats only retriving one name at the momment add a loop and I can make the amount required.

as you can see their is an array called role
which will also be parsed randomly to the 50 diffrent parts in the movie.
LOST YET I am just writting this.
I understand how to do all of this.
So to make a long question short ( I KNOW TO LATE);
I want to be able to keep the value of wither it was a guys name or a girls name. This part is needed later in order to determine the interaction between the user and the role.

The reason for this all is so that user's expericenes will change everytime they play (or appear to change);
that's what the 100 names and 50 roles is for.
I'm sorry if this makes no sense to you carry on and enjoy the rest of the board.
But for those who even get the faintest idea of what I'm trying to do your help would be immensely appreciated.
Thanks Fox.

Unique Problem...i Think...
I have a site built in flash. (One base .swf that loads other .swf's on top as "sections")
On my base .swf I have some text boxes with scrollers. (about 4 different ones in different scenes)
When I load a particular movie and then unload it, returning to the base, the scrollers on my base .swf dont work! Why??!!
I can load and unload other movies and this doesnt happen..
Any help would be appreciated.

A Unique Preloader
Hello,

On my site, i am trying to make a preloader. The preloader I am attempting to make involves a picture, which I attached to this thread. I want it to fill up from the bottom with red as the load progresses. I tried, since it is a transparent gif, to make it a mask over a vertical load bar. This did not work. Any help would be appreciated. The background of my site is also plain white.

Thanks

Unique Scroller
Hi..This is my first post on flash kit so I hope I dont sound stupid :-)..

I am making a site at the moment for a product design company called 257 and they have specifically requested a certain type of layout and scroll bar function, which I am very unsure how to do.

I have attached an image of the layout they want. The purple bar on the right side is draggable up and down like a normal scroller, however when it matches up with one of the corresponding page titles listed on the side it automatically scrolls the central content movie to that location on the page.. The central movie is just a long thin page with all the content for the site on it, it will all load dynamically or course..

But I just cant figure out how to make the scroll bar scroll to a certain position on the content movie. Is there a "play to frame 10 and stop" type action scrip I could use or does anyone know of a better way to do this. I really really need some help here.

Thanks guys

Jamie

Unique Identifier
Hi,

I'm just keeping track of some variable in flash. I write them to a text file.

at first I thought on using the ip and the variable, but ip's arent' that unique.

Does anyone have a script that will generate a unique identifier inside flash? that I can pass to my script.

Thanks

A Unique Search Bar
what i want to do is pretty specific. i want to have someone be able to type in a dorm name at my college, and after they hit a Submit button, i want the text they typed to match up with a picture of the dorm. for example, if someone types in South House, and then hits submit, i want an .swf with a picture of South House to load. can anyone help me out? i have no idea how to code it.

A Unique Forum
Dear braders and sisters,

I am planning to open a dicussion forum. But I do know from where I should begin. I had visited a couple of webhosting sites, but it was difficult to make a choice.
maybe you can give me general and reliable information about how to open/create a dicussion forum. Step by step, plz.
I just want to open a unique dicussion forum, with good look and high quality!

I am looking forward to hearing something from you very soon.

Thanks in advance,

superior

Generate Unique Id
i am trying to create some user
colour background preferences in a flash file,
and store them on a server.
so everytime they come back to the flash site
on their initial set up,
flash reads the settings from the server and
sets the flash colour background according to
the preferences.
quite like a cookie in html.

so somehow i need to create a unique id on every set up.
the easiest would be to get people to register and send
them an id back from php.
but i don't want them to have to register.

so i wondered, is there a way to create a unique id
from whithin flash, based on the system id, os or similar?

i had a lood at 'System.capabilities.version' etc,
but none of those options seem to return a unique id.

anyone any ideas?

Help With A Unique Problem.
I am building business card maker, and basically have it all finished, but I noticed one small problem. Basically, the user plugs in all their information into input text boxes, and then can 'proof' their business card by generating it into a PDF. I then have a gotoandplay function goto a new frame, where the user plugs in their Email address, name, how they found the website, blah blah blah. Well then, I want them to submit the business card again, and the variables will be pulled from the old input text boxes from the previous frame. So in order to do this, I have only found its possible by 'hiding' the old input text boxes frame with a large box with new input text boxes for the 'questions' part of the process. However, if the user tabs through the text boxes, they will be able to hit the OLD input text boxes, and can potentially screw up their business card. Now, if I run them on completley different frames, and I try to submit the business card, I get the error
Code:
Error #1009: Cannot access a property or method of a null object reference.
since it cannot call the text input boxes from the old frames.

I hope this doesn't sound incredibly confusing, I just need either a NEW way to handle the calling of the variables, OR a way to make it so they cant tab onto text fields that aren't like visible.

Unique Numbers
I am a newbie to actionscript (programming in general) and I am trying to accomplish the following but don't know how to do it.

I have an array which starts out with 3 unique numbers between 1 and 30.

For example :

myArray = new Array();
myArray[0] = 13;
myArray[1] = 22;
myArray[2] = 29;

OK, a bit further down on my movie timeline, I will need to add 3 additional unique numbers to this array which are also between 1 and 30, but cannot be duplicates of the first three. In other words, when all is said and done, the total 6 numbers have to be unique numbers between 1 and 30.

A Unique Hit Test
Can I use shapeflag in a creative method to track hittests of multiple stragely-shaped movie clips? My case is a simple one; one movie clip is a line, and the other can be any of a wide variety of shapes. Now I'd say it's unreasonable to check every single pixel on one shape with each pixel one the other.

Just for the purpose of typing forum code, let's say that the shape MC needs to use removeMovieClip(); when touching the line.

My backup plan is to insert into the line movie clip a single blank mc, which moves itself up the line and checks for a hittest with the shape MC each time. Seems okay, but I'd probably sacrifice a little speed that way.

Note that this line rotates regularly in its environment. A 'hotspot' hittest won't do it . . . until someone else figures it out, I'm going to have to wing it on this project (I have other things to do with it).

Thanks in advance, even though I'll thank you again later.

[FMX] Unique Identifier On .txt?
Hi kirupa folks. first post!

i have an externally loaded .swf file i'm loading into a container mc with a unique identifier. that .swf file itself is dynamically loading a .txt file into a text box.

how do you script the .txt file to have a random identifier? a code on the actual .txt file or actionscript on the buttons that call the .txt file?

i have a few buttons that when pressed load a new .txt file into the text box called newsBox. the buttons have this code:

on (release) {
loadText = new loadVars();
loadText.load("newsitem1.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.content;
}
};
}

what i want to make sure is that when called upon, the new .txt file is loaded and not the one on the user's cache.

any help or clarification on this would be GREATLY appreciated!

Unique Menu Bar
Hi everyone,

I would say I'm fairly proficient in AS 2.0, but I can't seem to achieve the effect provided as "goal."

The CD's that came with the Flash CS3 software, only showed how it was integrated with all the other adobe software and seldom touched tutorials on how to achieve certain effects such as this:

Goal:
I'm trying to mimic a certain menu bar found here: http://www.duo.co.kr/html/main_img_08/menu.swf

My Current Bar:
I've tried to mimic it...
http://img219.imageshack.us/my.php?image=navbarkd6.swf

I would love to make each sub-drop down menus as buttons and the highlight of each link colored to red by A.S. if possible.

For my code I have used what I found in kirupa's tutorials, all the comments have been preserved,


PHP Code:



//all this code is inside the complex button so you can stick as many as you want //on the stage and all will work.. they all will have this code in it..stop(); // stop the movie clip from playing (stop button from growing, we want that when the mouse rolls over only                                             this.onEnterFrame = function(){    if(rewind == true){   //if rewind switch is set to true play backwards        prevFrame();        // play backwards    }}this.onRollOver = function(){    rewind = false; //set variable (or switch) that decides wether ot not to play backwards...    play();    // play this movie clip.. (grow the button(tween));}this.onRollOut = function(){    rewind = true;    //set or rewind switch to true so it will play backwards...}this.onRelease = function(){    //getURL("http://www.kirupa.com","_blank");} 





If I can be offered some sort of direction on how to achieve such effect I'd appreciate it.
Most searches from google "flash drop down", "menu drop down" etc...
Gave me: flash link generators, purchasable flash links, etc...

p.s. I'm using Flash CS3, but I've saved the attachment with a Flash 8 setting.

Random Unique
Hi
I am looking for help in develping my new project which involves selecting numbers, both randomly and uniqely. I have on stage 128 dynamic text boxes named myTextField1, myTextField2 etc etc up to 128, and I want to fill each box with a unique number from 1-128
I would like to use a button to run this code and if possible to fill each box individually that is box1 then box2 etc.
This is the code I am trying run but I cannot get it to give me 128 different numbers, it fills the fields ok but there are duplicates.


Code:
for (i=1; i<129; i++) {
var temp:TextField = _root["myTextField" + i];
temp.text = randFun();
}
function randFun() {
var randomPick:Number = Math.ceil(Math.random()*128);
return randomPick;
}
Any help please
Bern

Unique Identifier
Can someone please explain how to apply this script to my movie...Kirupa says it makes sure your visitir doesn't load a cached version of your movie. Where does it go? What is the math method for?

[as]
myIdentifier=Math.round(Math.random()*10000);
loadMovie("myAnim.swf?uniq="+myIdentifier,1);
[as]

A Unique Hit Test
Can I use shapeflag in a creative method to track hittests of multiple stragely-shaped movie clips? My case is a simple one; one movie clip is a line, and the other can be any of a wide variety of shapes. Now I'd say it's unreasonable to check every single pixel on one shape with each pixel one the other.

Just for the purpose of typing forum code, let's say that the shape MC needs to use removeMovieClip(); when touching the line.

My backup plan is to insert into the line movie clip a single blank mc, which moves itself up the line and checks for a hittest with the shape MC each time. Seems okay, but I'd probably sacrifice a little speed that way.

Note that this line rotates regularly in its environment. A 'hotspot' hittest won't do it . . . until someone else figures it out, I'm going to have to wing it on this project (I have other things to do with it).

Thanks in advance, even though I'll thank you again later.

[FMX] Unique Identifier On .txt?
Hi kirupa folks. first post!

i have an externally loaded .swf file i'm loading into a container mc with a unique identifier. that .swf file itself is dynamically loading a .txt file into a text box.

how do you script the .txt file to have a random identifier? a code on the actual .txt file or actionscript on the buttons that call the .txt file?

i have a few buttons that when pressed load a new .txt file into the text box called newsBox. the buttons have this code:

on (release) {
loadText = new loadVars();
loadText.load("newsitem1.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.content;
}
};
}

what i want to make sure is that when called upon, the new .txt file is loaded and not the one on the user's cache.

any help or clarification on this would be GREATLY appreciated!

Unique Visitors Using PHP
Hi,

Can someone please tell me how to find unique visitors to my Flash site

I am already using PHP to have a hit counter, but I want to also record unique users, so I guess I need to also record some information from the users machine (?) when they visit. I suspect I can also use PHP to do this, the only problem is I cannot store info in database, as I cannot use mySQL with my hosting company.

Is there a way I can store user information in a text file, and just append a record each time a new unique visitors comes to my site?

(there are not going to be large numbers of visitors to my site at launch (and when there is and a txt file becomes unmanageable, I will switch hosting companies so I can do it with a database).

Any help VERY much appreciated. I am a complete novice to Flash and PHP etc.
RM

Unique URL For Flv's In Xml List
What I'm trying to do is send someone a link to a specfic video in a xml play list (similar to Lee's xml video playlist). If the video is not the first in a list, how can I create a unique link without creating a new flash movie or a new playlist? Any ideas. Thanks,
~K

Unique Id For A Button
Hello,

At the moment I need to past a lot of codes in my php files to get the unique id to work, if it doesnt people would get logged out every time they press a link.

I made the button kinda simple and its driven from the xml, heres what I used:
Code:

var links:Array = new Array();
links.push(photos[i].attributes.link);
button.onRelease = function() {
getURL(links[whoIsOn],"_blank");
}

There is of course more code but Thats everything from the button.
Anyways, how do you make the button check for the users id?

Concatenate Two Vars To Get A Unique Name
Hi I need to concatenate a variable onto a variable name to produce unique names.

for example
if I have this

onClipEvent (load) {
bubbleNum = 1;
}

and then lots of code with lines like

setProperty (this, _x, this._x+( _root.returnx - this._x)/_root.move);

I want to be able to join bubbleNum to the name of _root.returnx to get _root.returnx1

so that I can just change bubbleNum to generate unique var names each time I re-use my code.

thanks
mark

Unique Coupon Printout
I am thinking about the following problem / solution:

A client of me wants to give away a unique coupon for his customers. With that coupon the customer goes to one of the shops where he can get the promised product for free.

Until now my company prints out the coupon and sends it to the customers via normal mail.

This is because you could print out the coupon for several times and could get the promised product more than once.

I am looking for a solution that the web surfer can print out directly his coupon so that the company donīt have to send them via mail. But the web surfer should only be able to print it out once.

My idea is to realize a special print out version in flash which gets the personal data of the customer and a unique number. Security mechanisms could be:

- Printing a page hidden in Flash, the print button disappears after first printout.
- blocking the referring IP-Address for a second request.


My question to you: is this idea and the security mechanism enough? What else can I do to protect my client?

Thanks to all
Christian

Unique Multiple Instances From One MC
I hope someone out there can help me out with this problem, because it is currently beyond my newbie capabilities. I have a title identifer movie clip I created to identify 10 thumbnails upon mouse rollovers. When you rollover thumbnail "1" the following text appears below it: "Title: Photo 1".

My problem occurs when I try to setup thumbnail "2" using an instance of this title identifier MC. When I change the text inside this second instance to show "Title: Photo 2" what ends up happening is that the first instance that originally showed "Title: Photo 1" also changes to show "Title: Photo 2".

Is there anyway to create 10 instances of one MC and yet still have the ability to alter the text within each individual instance so each one can be unique?

I guess this can be done using some sort of Actionscript but I'm still too new to know how to make this happen. There has got to be an easy way to make this happen.

Something I tried was making 10 duplicates of the instance and renaming each one individually. This did not work. I also tried assinging instance names inside of the instance dialog box and this did not help. If someone can provide me with some help I would greatly appreciate it.

Unique Mask Shape
I have a close up picture of a tropcal plant, focused on a few leaves. I want to make a mask that exactly replicates the shape of one of the leaves.

How do I do this?

Thanks,

Random 3 Unique Numbers
need some help.
How to random 3 unique numbers to be put in three different variables. They can not be the same

Making Instances Unique
Hey there,

I have a movieclip that has many layers and I would like
to copy this clip and change one part of the new symbol without changing the original clip. Is there any way I can do this without breaking my entire duplicate clip apart? In 3d I am used to making a duplicate reference unique by the click of a button, does flash have a similar function? Thanks for all your help, it will save me a lot of work.

Thanks!

Bas

Copyright Đ 2005-08 www.BigResource.com, All rights reserved