Actionscript 3 :: Dynamically Expanding Shapes?

Jul 17, 2011

I made a rounded rectangle in as3 and would like to expand it on click. This is the code I use:

var lesBg:Sprite = new Sprite();
with (lesBg.graphics) {
lineStyle(3, 0x61b157);[code].....

When I click on it I would like it to expand to twice its size. I'm doing this with TweenLite but when I expand it I get ugly pixelated images and the borders expand too.

Tweenlite.to(lesBg, 1,{width: 380});

Is it possible to expand the image so it stays clean and the borders stay intact?

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Dynamically Expanding Text Feild Populated By Array?

Oct 4, 2010

Just as the title says. Specifically Im trying to make good use of some error messages by populating them to a TextField.What I've done is to collect all the error messages in an array. I've been working on this for the better part of a day but I can't seem to get it to post as I'd like it. Im seeing the results but each result is in its own TextField. I really want them in one TextField that expands as they get added, each line being separated by a return '

ActionScript Code:
var errorHolder:Sprite;
var errorArray:Array = ["Errors: "];

[code].....

View 3 Replies

ActionScript 3.0 :: Dynamically Drawn Shapes As Masks?

Apr 2, 2011

Is it possible to use a dynamically drawn line as a mask? (graphics.lineTo...) . Is there a way to cast this as a movieClip? I tried adding it to the movieClip, but that did not work.

View 4 Replies

ActionScript 3.0 :: Shapes Drawn Dynamically Treated Differently

Sep 15, 2009

I was just conducting a little experiment, basically trying to come up with a stage resizing handler that would position everything on the stage with its x and y proportionate to its original position. That's when I discovered a very interesting thing.

Shapes that you draw using flash's drawing tools are treated completely differently than dynamically drawn shapes. Basically shapes you draw on the stage in the authoring tool would seem to have no x and y of their own, and also no matter how many different shapes you draw, to the compiler it's all one "child" object because it's all just one big shape.

To illustrate this difference, I created two separate files, but they both (seemingly) do essentially the same thing. In the first file, I drew a red circle shape dynamically with code, and set its x and y with code:

ActionScript Code:
var circle:Shape = new Shape();
var g:Graphics = circle.graphics;
g.beginFill(0xFF0000);

[code]...

In a second file, I manually drew a similar red circle shape, made it 100 pixels wide and tall, and positioned it at 100, 100 using the properties panel. This time, I took away the code that creates the circle dynamically and just kept the for loop:

ActionScript Code:
for(var i:int = 0; i < this.numChildren; i++) {
var item:DisplayObject = this.getChildAt(i) as DisplayObject;
trace(item);   //[object Shape]
trace(item.x); //0
trace(item.y); //0
}

In this second example, no matter how many and what kinds of shapes you draw, there will only ever be one display child and the x and y is always 0,0.

I for one kind of wish there were more of a one-to-one correspondence between the Flash IDE and the code window. Like, if we can create Shapes and name them dynamically, why can't we create Shapes and name them at authoring time? Or why isn't this now the role of the good ol' Graphics symbol? It's kind of like Flash and Actionscript have outgrown the authoring environment.

This would seem to have the effect of further widening the gap between design and development. Just thought I'd throw all this out there and see what kind of comments I get.

View 2 Replies

Actionscript 3 :: Create Multiple Shapes And Store Them In An Array To Dynamically Move And Change Them?

Mar 31, 2012

i want to be able to create multiple shapes and store them perhaps in an array to be able to dynamically move them and change them.is there a way to have a shape object and store it an array?so that i can do something like shapeArray[0].x =100 current code

for(var i=0; i<10; i++){
var sprite:Sprite=new Sprite();
sprite.graphics.lineStyle(1)

[code]...

View 1 Replies

ActionScript 3.0 :: Import Shapes Directly From The Library As Shapes And Not As Sprites / MovieClips?

Feb 17, 2009

I have a question about shapes (i mean the flash.display.Shape class). Is it possible to import Shapes directly from the library as Shapes and not as Sprites/MovieClips? Shapes are supposed to be faster than MovieClips/Sprites, right? So why is it only possible to import MCs/Sprites from the library? I understand that generally shapes could be created solely by actionscript, but in my case the shape comprises of many points and is curved - so it's quite infeasible.

Is there maybe some sort of plugin to generate code that would draw the desired shape from a drawn shape in CS4? And a last one: Are there any benchmarks out there for performance comparison between sprites/mcs/shapes? How much performance do i loose by using a sprite instead of a shape?

View 2 Replies

Combo Box Not Expanding?

Apr 20, 2006

I have a combo box in swf B which I load in swf A.1: If I test swf B the combo box fills ok and expands ok. If I test swf A which loads swf B the combo box appears with data in it. But it does not expand.

View 2 Replies

ActionScript 3.0 :: Creating An Expanding Bar?

Jun 28, 2010

I try to do a gallery(not important right now) bar that expand when the mouse over it, and back to normal when the mouse get out. I used AS3. There is frame 1, 5 and 10, when 1 and 10 is the normal/small sized bar, and 5 is the big one. As you guessed, 1->5 and 5->10 connected in motion tween, and the layer goes as a loop. The problem is AS:Frame 1:

Actionscript Code:
stop();var up = false;rollingBack.addEventListener(MouseEvent.MOUSE_OVER,function(){  up = true;});rollingBack.addEventListener(MouseEvent.MOUSE_OUT,function(){  up =

[code]....

View 6 Replies

ActionScript 2.0 :: Expanding Xml Gallery?

Feb 19, 2006

I'm using one of the resizeable image gallery's found on this site.It works great for me, but i have one problem.. I can't really expand it now.I use a frame where i load all the thumbnails for the images. 12 thumbnails will fit in that frame, not more. I want to create it like this: if i load more then 12 thumbnails, a link(a nr) will come automatically at the bottom of that frame. If i will click that link i will see the other thumbnails... In case there are more then 24 thumbnails a third link (nr 3) will come... and so on.the problem is that i havent got the slightest idea how to achieve this

View 14 Replies

IDE :: Expanding Mouse Over Rectangle?

Feb 22, 2009

I know how to do general mosueover which cause cause new objects to load, or display a different frame in the timeline. What I wanted to know is how does one get it to do what looks like to be a motion tween when object is rolled over.

View 1 Replies

ActionScript 3.0 :: Expanding/resizing Swf On The Website?

Nov 4, 2009

allright,i have this flash intro/main page for my website. and it suppose to play animation as an intro/main page and wait for user to click on any of the icons displayed. once user clicks , i want the window(size of 700*900) to resize or cut off the bottom part of the page to form it as a header. so that i can display it as a header without uploading another swf file.

View 9 Replies

Make Expanding Image Gallery?

Jun 1, 2009

I'd like to know how to create an image gallery of thumbnails where an image expands to full size when you roll over it.[code]...

View 2 Replies

Expanding The Work Area Outside The Stage?

Nov 25, 2009

I currently have an small animation job that involves an enormous zoom out. To do this I need to scale the symbol containing all the animation out in the main timeline, from extremely close to quite far away.
 
I have two problems that are preventing me from doing this satisfactorily.
 
Firstly, the transform panel doesn't work. Specifically, entering scale values only seems to work beween 0 and 100%, anything larger gives unpredictable results.
 
Second, the symbol has become too large for the work area (I have zoomed out as far as I can go) - how can this area to spread out to the whole of the graphic editing area, instead of the third of it that is on the left side?
 
For example, I have used the Free Transform tool and scaled the item up 2500%, and now it's too big for the limited work area. To scale it further, or scale it back, I need to enter scale amounts into the Transform panel. After doing this, the figures I enter turn into arbitrary other values and my symbol either warps or disappears entirely.
 
Ideally, I should be able to look at the stage itself, click on the symbol, scale it in the Transform panel to 3000% and be done with it.

View 2 Replies

Professional :: Prevent AS Window From Expanding?

Feb 22, 2010

I often have the problem that after shifting my AS windows around some times the window becomes highter than my screenheight. The window can only be resized in height when dragging the bottom of the window. But as it is offscreen I can't resitze it. I have to load a new workspace or dock it on some small window group and then drag it away (works only with some windows).

View 4 Replies

ActionScript 3.0 :: Variables Expanding When Not Supposed To

Jun 13, 2011

I am trying to get input from my Arduino to Flash, Flash gets signals like this: [where each number seperated by a - at the end, stands for the input of a sensor]
mux0array: 0-0-0-0-0-400-0-0-0-20-0-0-0-0-0-65-
mux1array: 0-0-800-0-0-0-0-0-0-0-0-0-0-0-0-0-
mux2array: 0-0-0-0-0-0-0-0-10-0-0-0-0-0-50-0-

Code to convert this text to values in an array, using regular expressions [totally new for me] that would convert the data to:
0: 0,0,0,0,0,400,0,0,0,20,0,0,0,0,0,65
1: 0,0,800,0,0,0,0,0,0,0,0,0,0,0,0,0
2: 0,0,0,0,0,0,0,0,100,0,0,0,0,50,0
which is traced by this line: trace(dataId + ': ' + dataArray);
So dataId can change from 0 to 2, and dataArray contains multiple (integer) values

Friday, this worked perfect. But for some weird reason, it stopped working properly: it looks like it merges lines when it shouldn't:
1: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,02: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,01: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,1,0,1,0,1,0,21: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
As you can see, the first line, is working fine: 16 values
the 2nd line contains 33 values: the 16 values supposed to come after the 2:, but after that 16th value, a linebreak is missing, and the 0: is displayed as a 0, and adding his 16 values behind it. The same goes for line 3: 1: 16 values,2,16 values,0,16 values
the next line only merges 1: and 2:

This is the used script:
// accumulates data coming from arduinovar sensorData:String = "";
// connects to arduino boardvar arduino:SerialPort = new SerialPort();
arduino.addEventListener(DataEvent.DATA, onArduinoData );
arduino.connect( "127.0.0.1", 5331 );
function onArduinoData( event:DataEvent ):void{
[Code] .....

View 4 Replies

Flash Element Expanding Thumbnails

Jun 22, 2010

I was creating a flash element where I have thumbnails and text on my first frame and then a larger version of the thumbs on later frames. I was able to code the thumbs to write the code so that when the thumbs are rolled over they go to the large image, but I want it also to be when you roll out the large image it goes back to the first frame. [code]...

View 5 Replies

Creating A Rollover With Image Expanding?

May 28, 2010

am trying to find a way to display an image (a shelf with various pieces of art.) I want each piece to be a link where the user can click on it, and it will pop up in a new window, or an area below the main image where it will show a larger, up-close view, with details, such as price, meanings, ect.

View 3 Replies

ActionScript 2.0 :: Menu - Expanding / Collapsing?

Jun 5, 2004

I have created this site with a expanding / collapsin menu. When a user selects a menu e.g. "hammers" then the menu is loaded and show the submenues. When the users closes the menu by moving the mouse away from the area the menu collapses. If the user expands the menu again the menu should have remember the last visit menu and show the menu.

View 3 Replies

ActionScript 2.0 :: Sequence Of Expanding Circles?

Nov 17, 2006

I've been messing with some code from lionbichstudios.com. I'm looking for a way to have 5 circles appear in succession and expand and fade away. Works fine for one circle but I haven't found a good way to create a sequence of circles. The one hitch: the code needs to appear all in one frame. (I'm using Flash MX 2004)

Here's the basic code:

[Code]...

View 3 Replies

Flash :: Make An Expanding Banner?

Aug 27, 2008

I know that people don't generally like expanding flash banners, but my motive is simply to provide additional details for the sponsors of my forum[url]...

As you can see, in the upper right hand corner, I have a very simple rotating flash banner that shows the local companies that keep it going. I'd like to provide an additional service for people that are interested in using them, where each sponsor gets a drop-down menu that has a map, address, directions and contact information IF the user clicks on it, and wants to see the information for that sponsor.

Now I know enough about flash on how to create the actual banner itself, but for the life of me, I simply cannot make it extend over the rest of the page. It always ends up displaying the entire .swf file, no mater whether I make half of it transparent or not.

I've tried using several banners, including the Double-Click Ad Kit and some other expample flashes, but for the life of me, and through very extensive googl searching I can't find any clear cut instructions on how to make it extend OVER the rest of the body. I've found some pages that sorta mention how to do it, but I really have had no luck in duplicating it.

View 2 Replies

ActionScript 3.0 :: Expanding Shape When Moused Over Or Clicked On Downwards

Jan 15, 2011

A rectangle which expands downwards when moused over or clicked on, and returns to normal when mouse is not over. I'm trying to make a menu and fill it with comboboxes and such. This fla shows what I mean (I dont know who made it, written in AS2 I believe): [URL] I managed to make this code, but what i'd like it for the combobox to only appear when the shape is fully expanded. Does anyone know how to pull this off ? Here's the code:

[Code]...

View 4 Replies

Data Integration :: Expanding Dynamic Text Box

Apr 12, 2007

I have a scroll pane that is linked to a movie clip with a dynamic text field. The scroll pane expands automatically based on the length of the dynamic text field. I would also like to have the dynamic text field expand automatically to fit the dynamic content from an external .txt file if there is too much text to fit in the default text field length.

Here is the code I am using to get the .txt files:

myLoadVars = new LoadVars();
myLoadVars.onLoad = function() {
// the data is loaded in the myLoadVars object as a property

[Code]....

View 3 Replies

Professional :: Text Expanding And Information Gallery?

Dec 30, 2009

I have a question and would like some help with creating a flash gallery but for showing information rather than pictures. I will try to make this as clear as possible but if its confusing please let me know and I will give more details.

Basically I trying to make a vertical timeline on the lefthand side with years (in text) which expand slightly on mousover and when clicked show the relavent information on the righthand side for that year.I can't seem to get the text to expand on mouseover?

View 2 Replies

Professional :: How To Keep SWF File From Expanding To Fill Whole Screen

Sep 30, 2010

I'm trying to sell this metronome: [URL]. I've submitted it to activeDen.com and it has been rejected for 'aesthetic reasons' I noticed when I double click the swf file it opens up in my web browser and it is enlarged to fill the screen. This is bad since I use jpeg images instead of vector art and I do not like the Allow Smoothing option in flash since it blurs the image a little. So is there a way to make my swf file show up correctly?

View 5 Replies

Professional :: Control The Direction Of Expanding Flash Ads?

Oct 9, 2010

what is the way to control the direction of expanding flash ads

View 3 Replies

ActionScript 1/2 :: Making An Expanding Menu System?

Feb 13, 2011

I'm wondering if anyone would be able to point me in the direction of a tutorial using action script 2 on making an expanding menu system. [URL] This one is a tutorial but I could do with one from the start step by step!

View 1 Replies

Actionscript 3 :: Expanding The Root Node Of My AdvancedDataGrid

Feb 27, 2012

I'm having troubles expanding the root node of my AdvancedDataGrid. Simplified code below:

adg.addEventListener(FlexEvent.CREATION_COMPLETE, adgCreationHandler);
private function adgCreationHandler(event.FlexEvent): void {
adg.expandItem(groupCol.getRoot(), true)
}

Does anyone have any thoughts on why this approach won't expand my root node, or another easy way of expanding the root node by default when the AdvancedDataGrid is loaded?

View 1 Replies

Flash 9 :: Tools On Toolbar Not Expanding Properly?

Nov 29, 2008

I am useing Flash CS3. For some reason, I will click on the little arrow on a tool like "free transform" to get to the "Gradient Tool" but it refuses to expand so that i can select the "gradient tool". I am having the same problem with other expandable items as well like the "rectangle tool" which by clicking the little arro in the lower right should expand a menu to select other tools like the "Oval Tool" etc. Does anyone know what this could be?

View 3 Replies

Actionscript 2.0 :: Expanding A Photo In Server But Not In Localhost?

Apr 25, 2011

Iīve a problem with a website that when I see in local mode everything is ok but when upload it to the server something is wrong , if you go to [URL] in the Menus section if press the photo and then try to expand it, not expand properly, so you have to press again to view it correctly.

What I donīt understand is why I see the web correctly in local and not in when itīs in the server.

View 1 Replies

ActionScript 2.0 :: Expanding Sbeener's Gallery Code?

Jun 15, 2004

I've been attempting (unsucessfully) to expand on sbeeners code for the photo gallery (on this site).sbeener sets up an array with the photos in it and uses functions to load one photo from the array's position.I'm trying to add some AS in there that sets up an additional array (of text strings/captions) and then sets the index of that additional array to match the array of photos and loads the value from that array into a dynamic text box.So far I'm a little stumped on how to execute this.Maybe if we get it working we can update the tute on kirupa!

Code:
//Code written by sbeener (suprabeener)
/*

[code].....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved