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




Can Flash Do This (selectable... Grid...)



Just a few "can this be done using flash" questions. The idea here is to create a flash movie that lets the user select - via dragging - a rectangle/square on a grid... Question 1:
Can flash be used to draw a grid of squares which can be selected in this manner; the colour or these selected squares would need to be coloured in.
After drawing thier rectangle/square on the grid two input boxes will be displayed half way down each side (left and bottom).

The user will then be prompted to enter the dimention of each side into the box provided - this will the be used to calculate the area of this shape.

After this more rectangles/sqaues should be able to be drawn on the grid each adding its area to the total area of the shape.

At this point i would like to be able to deselect a selected part of the grid in the same manner as it was drawn, returning the block to its original colour. Question 2:
Possable or not?
The user will the be prompted for the dimentions of this desepected rectangle/square. Consiquenty this area will be subtracted from the total area. making sence i hope .

Thanks in advance for any help on this matter guys,

Mark.



DevShed > Flash Help
Posted on: May 22nd, 2004, 10:07 AM


View Complete Forum Thread with Replies

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

Selectable Text --> POOR Flash Performance?
Has anyone experienced poor Flash performance when using SELECTABLE text fields containing several paragraphs of text? I am rotating a dynamic text field w/ selectable text enabled. The tween lagged fairly bad. I disabled seletectable text and it SEEMS to tween more fluidly.

Any experience with this? Any tips? Should I NOT make text fields that contain a lot of text unselectable? Your help is much appreciated.

B

Creating A Grid Of Movieclips And Adjusting The Grid Based On Stage Width And Height
can anyone help me in creating a class or pointing me to a tutorial that shows how to create a grid of movieclips in as3 and also allows the grid to change column num and row num based upon the stage width and height?

Good Way To Dragdrop Mc To A Sticky Grid With Grid Cells That Animate.
Is there a way to get mc._dropTarget to recognize a hidden MC it drops on?

I have am trying to drag drop a movie clip item onto a 9 by 6 grid. The user should not see the grid. Each grid cell has a number of properties, including an animation that plays in it depending on what is dropped in it. What is the best way to do this. I came up with two ways:

A. Do the math:
1. Figure out what the drop point x and y values would convert to in the grid to find the grid cell it applies to.
2. Attach a new movie clip animation to that cell's centered x,y point to show something happened there.


B. Fill the grid with Movie Clips:
Use the mc._droptarget to see what grid cell movie clip was dropped on and then change its animated state to show something happened there.

The problem with A is that it is a little slow and cumbersome.

The problem with B is that I can't let the user see the cell movieclips. mc._droptarget only works to detect if a mc was dropped on visible graphic area of another mc as far as I can tell.

I could sure use some help on this. Is there a better way?
- Wade

How To Show One Pdf File In One Column Of Grid Using <mx:grid> Tag
hi frnds,
can anybody tell me how to display a pdf file in one coulmn of grid as one griditem. tell me me the cod eto do that in mxml tag with attribute form . if not possible then in actionscript form.

reagrds-
ankit

Grid Thumbnail With Dynamic Grid Lists
After 3 days of browsing and searching any sollution for my problem I decided to ask you directly here. I really like the thumbnail gallery for its simplicity and beauty. But I would like to ad or vertical scroller (I'm unable to find it here too, maybe I'm blind, just I'm more at the end of my seeking options) or a make a grid thumbnails, that will show 2 columns of thumbs and 5 pictures in each columns, then under the 2 columns i would like to ad a sort of arrow or button that if my gallery have more then 10 pictures it will go on the next thumbnail list. I'm not looking for any extra fading effects or special movements. Just would love to have a single thumbnail grid on side, with option to have lists of thumbnails by 10 if there is more then 10 pictures or so. If somebody can please redirect me or help me I would be very happy, also other ppl here that are seeking for the similar. thank you

Help With Accessing Grid Spaces In A Grid
Hi Guys

I need a bit of help with my coding. I'm building a small editor that allows users to place electrical components onto a grid so that they can see how electricity works. I have built a grid using an array and for loops and attach movieclips dynamically to that grid. What I want the moviclips to do is to look in the four spaces either side of itself i.e. up, down, left and right. I have managed to pull the grid coordinates out of the grid which enables me to tell the clip which grid space to look at but have been unable to successfully get the code to work.

Here is my code:

myGrid = [[1,1,1,1,1,1,1,1],
[1,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,1],
[1,1,1,1,1,1,1,1]];

var board:Object=new Object();
board.tileWidth = 30;
board.tileHeight = 30;
board.depth = 1;
board.path = this.grid;


function buildGrid(map){
var mapWidth = map[0].length;
var mapHeight = map.length;
for (var j:Number = 0; j<mapHeight; ++j){
for (var i:Number = 0; i<mapWidth; ++i){
var Tilename:String = "cell"+j+"_"+i;
var x:Number = i*board.tileWidth;
var y:Number = j*board.tileHeight;
var type:Number = map[j][i];

board.path.attachMovie("tile", Tilename, ++board.depth);

switch(type){
case 0:
board.path[Tilename].dropable = true;
break;
case 1:
board.path[Tilename].dropable = false;
break;
}
board.path[Tilename]._x = x;
board.path[Tilename]._y = y;
board.path[Tilename].gotoAndStop((type+1));
//trace(board.path);
//trace (i);

var depth:Number = 2001;
power.onPress = function(){
this.startDrag();
}
power.onRelease = function(){
this.stopDrag();
trace("drop - "+this._droptarget);
var drop_target = eval(this._droptarget);

if (drop_target != null){
if (drop_target.dropable ==true){
//drop_target.gotoAndStop("topsource");
trace("drop on tiles");
trace("we are dropped!");
this._x = 250;
this._y = 60;
_root.board.path.attachMovie("powersource2_mc", "powersource", depth);
_root.board.path.powersource._x = drop_target._x;
_root.board.path.powersource._y = drop_target._y;
_root.board.path.powersource.onPress = function(){
_root.board.path.powersource.startDrag();
_root.board.path.powersource.swapDepths (2001);

}

_root.board.path.powersource.onRelease = function(){
//this code gets the grid/cell/i_j reference and converts it to numbers that
//gives the x and y position within the array
var gridPos = this._droptarget;
var xcellRef = gridPos.substring (12);
var ycellRef = gridPos.substring (10, 11);
//these variables turn the string values into numbers
var Gridx:Number = xcellRef - 0;
var Gridy:Number = ycellRef - 0;
trace ("current x position is::" +Gridx);
//trace ("curent y position is ::" +Gridy);
//var gridCheck:Number = Gridx+1;//check to the right
//trace ("the square on my right is::" +gridCheck);
if (Gridx+1 == _root.board.path.brightlamp){
trace ("something is there!");
}else{
trace ("nope nothing here!");
}
snapto=30;
_root.board.path.powersource._rotation += 90;
Newx = Math.round(_root.board.path.powersource._x/snapto)*snapto;
Newy = Math.round(_root.board.path.powersource._y/snapto)*snapto;
_root.board.path.powersource._x = Newx;
_root.board.path.powersource._y = Newy;
stopDrag();
}
}else{
this._x = 250;
this._y=60;
}
}

}
}
}


}
buildGrid(myGrid);

sorry about the long post but any help will be greatly appreciated!

Tegalad

Grid Marker Not Data-grid
Hi Geeks!

Curious to know if its possible to created grid like marker over an image within Flash?

Have a look at attached image

Selectable Map Help
I need to create a zoomable map (ie: you can drag a box around a certain region of the map and zoom), but I need the zip codes associated with the box the user draws to be accessable. I imagine I would set that up in a database, but I'm not sure how to go about grabbing the zip codes from the database, since the position of the box is relative to the picture. I thought I could enter in x&y positions into the database for each zip code, but that is a seriously LOOOONG list to do.... Any suggestions on how to set up this sort of project would be greatly appreciated. I'm not looking for any code at all, just thoughts on how to complete this project. Thanks.

Help With This Flash Grid Please
Hi! I'm a newbie to almost everything Flash, but for a while now i have been wanting to recreate this fun flash program that Gaia Online(another forum-type place) uses.



Here are some screenshots:




The program uses a type of grid pattern to move the items around, and when certain items are clicked on(like a lamp) they will switch on/off.


What i want to do is to be able to have a database of each item and be able to put them in individually into the program and move them about....does this make any sense? >.< It will be put on a website that everyone can access (with the sites admin approval ofcourse) and people could be able to preview what they want their House on Gaia to look like without having to buy each item first and guessing if it will all go well.


I isolated the script and loaded it to an old geocities account so you can use it live(no furniture though XP)

What i want to do is somehow get all of the items onto a different server(so as not to crash Gaia's) and let the people choose what they want in their house. I dont want the little background image, just the inside where you can actually put in/take away items.

http://www.geocities.com/fairyangel863/gaiahouse.html

Does anyone know how I could do this?

Selectable Text
can someone please explain:

under what circumstances would one choose selectable text in a text field?

and does specifying selectable text increase the chances of the text being picked up by a search engine?

tia

Selectable Music
I want to make a way to make selectable tracks as someone views my site. (Such as http://www.trapt.com/) Can anyone point me in the right direction?

Thanks

AS2: Problem With Tf.selectable
Hey Flashkit,

I made a component tooltip. The textfield is created dynamically, too.

To display the tooltip, I put actions on the rollOver and rollOut of the button/mc. The problem comes in somewhere there: if you move the cursor around, sometimes, the cursor becomes a text tool icon, as if the textfield were selectable. When the text icon appears, the tooltip thinks that the user has called rollOut, and the tooltip disappears.

I already set the textfield.selectable = false.

To test other cases, I created a dynamic textfield using the text tool on the stage and set selectable to false (in the properties panel). When I tested the movie, the text icon did not appear when I hovered over the dynamic tf. It's strange that it still appears when you dynamically create the textfield.

Need your help.

Thank you

Selectable Buttons.
Does anyone have a simple method for the following:

I have a series of buttons next to each other, on rollover buttons must highlight, on roll out highlight goes away.
On click highlight stays, and you can still roll over the other buttons.
On click on another button previous highlight goes away and currently selected button highlights.

Selectable Text
Here is a chunk of code that I am using to dynamically create some textFields on the fly. I would like to know how to make the text contained in the text field not selectable. Meaning, I want to display the text only and not allow the user to use the mouse to highlight the text, copy and paste it. Is there a property I can set to accomplish this task?

objTarget.createTextField(txtName, currentDepth++, txtX,txtY,txtWidth,txtHeight);
objTarget[txtName].multiline = false;
objTarget[txtName].wordWrap = false;
objTarget[txtName].border = false;
objTarget[txtName].text = "unknown";
objTarget[txtName].setTextFormat(textFormat);

Selectable Text
When using selectable text flash does not recognize characters, why?

I'm using folowing text:

PROMOÇÃO

Análise, desenvolvimento e operacionalização de ações específicas para atuação junto ao ponto-de-venda.

• lançamento de produto
• sample
• criação de material para ponto-de-venda

and when defining text as selecable it appears so:

PROMOÇÃO

leeeellleeeee
eeelelel
elelel
elele

elelle

flash just shows BOLD words and the letters E and L, but if you copy & paste the text is normal

does anybody know the solution?

thanks,
peter

Selectable Text
anyone know how to make a text box that people can select and copy from instead of being embedded? probly a daft easy question but i'm a newbie!

Selectable Objects HELP PLEASE
Ive figured out how to make an object selectable with this code:

onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentFrame == 1) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
}

Now that ive done that i want to know how to change the color of a selected object when i click a certain button ??
Can anyone help please thanks Jimmy.

Why Is This Text Selectable?
why are the dynamic textfields selectable? The textfield is inside a movieclip. Once the clips are attached, why can they not act like buttons?

Thanks for the help. Second post in one day. I promise it won't become a habit.



ActionScript Code:
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("text.xml");

function loadXML(loaded){
if(loaded){
root = this.firstChild.childNodes;
for(var i = 0; i < root.length; i++){
var textMC:MovieClip = nav.attachMovie("text_mc", "text" + i, i);
textMC.txt.text = root[i].attributes.title;
textMC._x = i * (48);
id = this.textMC[i];
textMC[i].onPress = function(){
trace(id);
}
}
//trace(root);
//trace("loaded");
}
else{
trace("failed");
}
}

Creating A Grid In Flash MX
I would like the user to create a grid,i have created two text fields, one called "WIDTH" and the other called "HIGHT". I have also created a button called "Create Grid"

I would like the user to for example, type in let say "10" in the WIDTH textfield and let say "15" in the HEIGHT textfield, and then when he clicks on the "Create Grid" button it creates the Grid with lines.

I would like the Grid to be also controlled, for example to be placed in anohter textfield or something, so if the user were to type in "100" for WIDTH and "150" for HEIGHT the grid doesnt go off the screen or mess my layout but for it to just go smaller into that textfield i.e.scales down. So in affect draw a tiny grid within those dimensions.

Later on i would like to place objects in the grid.

i dont no much about doing movie clips "mc" so please explain step by step on how to do this. PLEEEEEEEEEEEEEEEEESE can you give me a working example of this and step by step tutorial on how you did it in Action Script.

I would be sooooooooooooo greatful if anyone can help me with this crises!
thanks.

Working With Grid In Flash
Loads of times i end up with having a dynamic set of controls or items that i'd like to put in a vertical line. To do this i have to get the height and y position of the item above and then calculate the position of the current item. I been hoping that MM would release some type of grid container (like Flex have). Does anyone know if there are any solutions out there that could help me setting up some sort of container or grid? A class or component that would do the job. I know I have read about it …

Richard

Selectable Dynamic Text Box
I wanted to check whether the selctable property of the dynamic text box can be used in for further processing.
i.e If the movie is playing , and I click on the text box to select it ... is it possible to identify this selection
How can we store this state?

I want to perform certain formatting of the text if the text is selected.

Is it possible to do something like this???..

OnClipEvent Not Selectable If MC Has Frames?
If my movieclip has more than one frame I am unable to add an OnClipEvent(enterframe) action to the instance of my movieclip. Is this correct? Might I be doing something wrong? It is definately a movieclip.

Thanks in advance for the help.

Charlie

Selectable Scene Playing
I've got to set up a movie where the user chooses what scenes will play (via a check box probably). There may be 4 or 5 choices, maybe only one or two will be picked,
added to a "play list" then played once a play button is pushed.

Any suggestions or comments on how to set this up?

thanks in advance... daveb

Selectable Text... An Justification Too?
I would like to justify text and STILL have it be selectable.... seems like I can choose one or the other, but can't have it all. It this REALLY the case?

Please say it ain't so!

Tim

Selectable Text Field
hi?
I have 3 selectable text boxes A, B, C.
Only one of them will have the check mark "x" when you click.
If you want to mark on C, the check mark on A or B should be gone.

Anyone knows what should I have in action script...?
I thought it's simple like this...

on (press){
if(B == null || _root.B =="")
{ _root.A = "x"
}
}

Selectable *justified* Text
Hi there!

I tried to make a selectable justified text in Flash MX. On the Flash screen it seems OK, but when I publish it the text is not justified anymore. If I make the text non-selectable, it becomes justified again.

Is this a bug? Is it supposed to be like this? And, most important: is there a way to bypass this and make a selectable justified text?

Thanx,

Hitarea And Selectable Text...
i want to make a button that activates to reveal a piece of selectable text, but when the cursor goes over the selectable text the button deactivates... i think it's a bit of a flash problem and not coding...

attached is my file... see if you can figure it out.

er... i've posed this question in the general forum but it seems to have stumped ppl... so...

Creating Non-Selectable Text
I have buttons that call upon text to come up for various sections. However, everytime the text pops up the cursor turns into that selectable text cursor (the one where you right click and can see Copy, Paste, Delete)

How can I make text in flash that's not selectable?

Thanks

TextFormat.selectable = (not So) False
Hi all,

When using the "textFormat.selectable = false", the text which I send to the freshly generated text field still is selectable...

How to turn the selectivity of a dynamic generated link?

note:
.selectable is not documented in the property summary for the TextFormat object. But does turn blue in the editor

Any help is appreciated.

TEXT Selectable Question
When you make a block of text selectable on a static text block and then when you publish the movie and test it. You can hughlight the text using the mouse crusor but i have noticed that when you move your crusor outside of the text block on the published movie don't forget!!! you still have the highlight crusor you know not the hand instead a little character dash. So how do i have it where when user scroll any point of the text block the crusor turns in a hand!

Like when you type a message in this block. Try it go to new post and in the message block the crusor turns to a character dash when you scroll out of the text block/field the crusor changes to the normal arrow. even ifyou scroll onto the scrollbar.

Why dosn't it work like that on the flash movie when published i would really like it to work like that

If you want some ecaomples of what i mean just say so.

Thanks

Why Is My Text Field Still Selectable?
I have used Flash's textfield component.
I want it not to be selectable.
I've tried naming my text field testString and have tried using the following code:

testString.selectable = false;
testString.text.selectable = false;

Neither of the above work.

See the following links for the fla and swf:

http://www.filmcharts.com/testString/testString.fla
http://www.filmcharts.com/testString/testString.swf
(The FLA was slighyly too big to upload to Flashkit.)

Any help would be appreciated.

Thanks.


OM

How To Set Not-selectable With Apply Format?
i use this code:
code: var format = new TextFormat();
format.align = "left";
format.selectable = false;
format.color = 0x999999;
format.font = "verdana";
format.size = 10;
format.bold = true;
_root["toplaag"+i]["buttontext"+i].setTextFormat(format);


to apply the format to a textfield. Everything works, but the textfield is still selectable . How can this be??

TextArea Component Selectable
Hi there...

I have used a textArea component to import data from an xml file, and am wondering if there is any way to make the text in the textArea NOT selectable?
I would just put a blank, invisible button over top of it with a handcursor=false command, but the data being imported may or may not contain hyperlinks and if I cover it with an invisible button, the link won't work.
If anyone knows of any solution or work-around, I would really appreciate any pointers...

Cheers
G

Creating A Selectable Object In MX
I wasn't sure how to search for this, although I'm sure threads are available... I am wondering how to create an object that can be selected, and then changed - specifically, I'm creating a message board and am wondering how to make it so that different replies can be selected by a user and edited by the same user who originally wrote the comments. In other words, you would click on a textbox containing the reply (and the user name, post date, etc.) and it would gain focus, and then when an "edit reply" button was clicked, a screen would come up - just like on this board - that would allow the user to edit the comment. Any help is greatly appreciated - thank you!

Selectable Text Problem
Hello,

I have managed to stumble upon a very annoying problem which I can’t seem to find a solution to. I want to make the following text selectable:


Address line 1
Address line 2
Address line 3
Postcode
< --- Blank line
Tel:
Fax:
< --- Blank line
E-mail:


This works fine. But, if I then make the text bold then the blank lines are removed and it looks like below.

Address line 1
Address line 2
Address line 3
Postcode
Tel:
Fax:
E-mail:


I know I could just choose not to embolden the font or I could add dashes the same colour as the background on each blank line but this seems a tad naff to me.

Address line 1
Address line 2
Address line 3
Postcode
-
Tel:
Fax:
-
E-mail:


Has anyone experienced a similar problem? I wonder if anyone could shed some light on this for me?

Thanks for your help,

Ed.

Selectable Input Field
I have a small quiz with a seires of text input fields. Each question is on a different frame. Inside the input field is "type answer here". Users can select the text and overwrite it or delete it. For some reason after a few frames users can no longer select this text, either by clicking and dragging or by double clicking. The cursor jumps straight to the start of the input field and they have to delete letter by letter.

Anyone seen this before?

How Is This Done? Clear, Selectable Text.
I'm putting together a Flash site (using a template and Flash 8) and I'd like to know how to make text like in this site: http://georgefontenette.com (go to "biography"). It looks like either Verdana or Arial, and it's totally legible and clear - and selectable - unlike most of the text you see in scrolling text boxes (small, anti-aliased and fuzzy).

In other words, that part of the site looks like regular xhtml (I had to right-click on it to make sure it was Flash).

I like the fact that the text is selectable, which allows people to cut/paste it into a link or an email program. I'd like to display my bio in the same way.

How do I do this?

Selectable Pop-up Windows - Part 2
Thanks again for all of your help on my first problem. Now I have a continuation of the same issue.

In this instance, I want the pop-up window to slowly appear. But when I use the code that was suggested, the movieclip won't play. It stops on frame 1. If I add a gotoAndPlay(2) code on frame 1, it goes to frame 2 but doesn't play.

Is there a way around this one?

New file attached.

Thanks,

Scott

Making Text Not Selectable
hello.

what's the easiest way to stop the pointer changing to a text selection thing when it hovers over a dynamically created text field? i.e. i dont want the user to be able to highlight the text etc.

thanks for any help.

Selectable Item Function?
I want to make a “selectable item” function…

i.e. – the user can click on an image and that equips that particular ‘item’ to be in use.

Very much like a weapons selection system in most FPS games, if you get what I mean…

How do I go about creating this? Where do I start?

Selectable Background Interface?
i need a tutorial or some actionscript for creating an interface w/ an interchangable background . . . ASAP

Selectable Custom Text
Hello everyone,

My question is simple:

How do you make a page using a font other than the usual (arial verdana etc)
in body text and still have it be selectable:

Check out this link and you'll see what I mean.

http://www.d-kitchen.com/ then click on "about" at the top.

You'll see a few paragraphs of text, and its selectable. This font is not one of
the common 6 or so.

Any help would be great

Create Selectable Alphabet?
Hi i want to create an alphabet in as3 and i want to display it at the bottom of the stage, now i know how to create textfields and how to populate them, but wat i need to do is create the alphabet so that when it is displayed all the characters are shown seperatly with thier own borders and such, i also want to make it so when the user clicks on one of these letters it is then stored in a varible for a comparison against another string i have. I also know all about event listeners and arrays i just need to know how i would go about this to make it easier on myself. thanks and im sorry if this is confusing and i can provide more info if needed.

Selectable Module Presentation
Hi,

EDIT

I´ll make this less confusing:

I need to make a SLIDESHOW that the user can select which slides to show, before starting it.

Any advice in how to approach this?

-----------

I need to make a presentation whith diverse modules, where the "Presenter" can
preselect from a list with select boxes, which modules he/she wishes to use for the presentation.
Then when PLAY is pressed the presentation will start playing the selected modules.

I´m wondering if anyone can point me in the right direction as to how start this, as it´s a large project, and I don´t want to start on the wrong path.

Thanx

Selectable Words Or Phrases
In Flash 7 or Flash 8 is there a way to make individual words or phrases selectable within a text object?

SELECTABLE TEXT PROBLEM
Hi, all!

First of all, I'm brazilian, so please, try writing easy english answers, heheh

I make a static text in Flash 8, and make it alligned as "Justify". It justifies OK, insite flash, but when I press ctrl+Enter or publish it, the text shows aligned left!!
If the text is not selectable, it apears OK at the end! But I need it slectable!

How do I make a selectable text do justify properly??

THANKS IN ADVANCE!!!

Dynamic Textbox Selectable?
Hey people,

I have a pretty simple (and stupid) question. I have a dynamic textbox, but it is selectable in my movie. How do I disable that? You can select that option in the properties bar in flash MX. But I can't find it in MX 2004...

Making A Text MC Non-selectable?
I've got a piece of text that I am using as movieclip to add some onRollOver states to it...but I need to make the text non-selectable...so when a user passes their mouse over it...the cursor does not change to the text bar...as when this happens I loose the RollOver state...

How can this be done.

Much thanks...

Fed

A Selectable Program Using Array?
Hello everybody ...i can't work out with my program....so,i wish to hear from you all who know my problem....
My program is enable user to choose movie with click on any radio button. Then the movie will store in the array. then the contain in the array will be loaded.
Now i would like save the choice of user in a array and after that the program will trace the arrayand load the swf files that choose by user.User can choose as many choice as they want.
My problem is
1. when click, how the swf files save in array
2. there are the "next" button to let user click and proceed to view their next choice.The "nexScene" and "nextFrame' is not i want.I m seeking any opinion.

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