ActionScript 2.0 :: Map Pan, Setting Limits To Image?

Dec 3, 2006

hey I have a large map in an mc and navigation buttons to control the map.

2 questions:

1.Does anyone know how to set limits on this? my image is w2200 h2980? stage is 1000w x 740h I am using code like this? Th buttons are either 1 or a 0 so i think the limit function needs to be in this section.

2. does anyone know how to adjust the script for zoom so that the image will zoom in n out without refocusing on a specific point. my large map move to a specific location as it zooms. it would be cooler if the the map zoomed in and out based on current location.

[Code]...

View 2 Replies


Similar Posts:


Media Server :: Setting Connection Limits?

Aug 14, 2009

I have multiple applications, and need to set different connection limits for each of them - e.g., 10, 35, etc.I'm only concerned with limiting RTMP connections, and not using Apache or http streaming.

View 3 Replies

ActionScript 3.0 :: Dynamically Setting Limits For Random # Gen?

Sep 22, 2009

I need to set limits when generating a random number and this (code below) is just a temporary fix until I can set this limit dynamically.

The number is set to be between (0-4) by running an IF statement which sets a fixed upper limit. This works but I need the limit to update dynamically. My main goal is to use the numChildren property of an XMLList object (passed as argument) to set the maximum limit since the random number will be used by a loader when loading an image from this same XMLList.

Currently there are only 5 images in the XML file so this IF statement works. I would like to have the maximum limit update dynamically when the XML file has images added or subtracted to/from it.

[Code]...

View 3 Replies

ActionScript 2.0 :: Setting Limits For Arrows In Row Of Thumbnails

Apr 25, 2005

I have a row of thumbnails (populated from an XML list). If you press the arrow, the thumbnails will scroll from the right or left. What I can't figure out is how to set a limit because right now if you continue to press the right or left arrow, the thumbnails will scroll off the stage.

View 11 Replies

ActionScript 3.0 :: Setting Limits On And Resetting A Counting System?

Mar 12, 2012

So I'm making a simple counter to be used to keep a tally of 10 different categories, plus a total tally of all 10 categories combined. there are 10 buttons and 11 dynamic text fields. When each button is clicked, it will add to the text field that relates to it, plus add to the "total score" tally. I've got all of the buttons working correctly as of now.

However, I would like to set a limit on the total tally at 100 and am unsure how to do so right now.

I also have not been able to program a reset button correctly. I can make the text boxes revert back to 0, but it seems flash is still keeping the total tally because when I start counting again, the scores start where they left off.

[Code]...

View 5 Replies

Flash :: Professional - Setting A Background Image

Feb 25, 2010

Is there a way to set up a background image (repeating or non-repeating) that the stage area floats over. When I use file > publish settings > HTML > publish - It creates the HTML document but any area outside the stage is colored with the default stage color- Can this be set up in Flash or changed in HTML?

[Code]...

View 2 Replies

IDE :: Setting Up An Image Array From An External Source?

Apr 23, 2009

I have a question about setting up an image array from an external source. I have the following action script and would like to edit it so that it reads from an external file. Either TXT or XML. how to edit the array action.

CODE:

spacing = 10;
image_array = ["image01.jpg", "image02.jpg", "image03.jpg", "image04.jpg", "image05.jpg", "image06.jpg", "image07.jpg", "image08.jpg", "image09.jpg", "image10.jpg", "image11.jpg", "image12.jpg", "image13.jpg", "image14.jpg",

[Code]......

View 3 Replies

Professional :: Setting Image Size In Dynamic Text Box?

Apr 5, 2011

I have a dynamic text box in which I am embedding an image.  Here is the code that fills in the text box
 
infoBox.informationText.htmlText=
"<font size='16' color='#FFFAF0'>"+calledMarkerIndex+
"
<font size='14' color='#FFFAF0'>"+calledMarkerDate+

[Code]....

How can a set the image size in the above code.  I've tried inserting width and height parameters just after the image's path but an error is thrown.  I would like for the image's width to be as wide as the dynmic text infoBox.informationText
  
Also the path to each image equals a variable called calledMarkerContent  How could I set the img src equal to the variable called calledMarkerContent?

View 6 Replies

Flex :: Setting MX Image As Mask On Graphic Object?

Feb 22, 2011

I'm having trouble setting up a Graphic object (a solid filled rectangle) to be masked with an image that gets loaded at runtime. I've managed to get it to work with the following code:

<?xml version="1.0"?>
<s:Application xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="init()"
[Code] .....

Setting the PNG inside the <s:mask> makes the stage render nothing, while adding the mask programmatically in the init() method causes correct behaviour. It took me quite a while to figure this out and I'd like to understand what it is that I'm doing incorrectly in the MXML approach, as that seems to be what is being done in the Cookbook (other than me using an Image and the example using a Group wrapped BitmapImage).

View 1 Replies

Flash :: Setting Width For Sprite's Child Image?

Aug 9, 2011

I've a slider class (SliderUI) and I'm passing slider and track images to that class as sprites.

What I'm trying to do is, passing one more image as sprite and changing its width for doing masking in slider. (It will expand or collapse as you move volume slider)

When I try to change width of sprite, it doesn't show up and I guess sprite is just container and resizing it makes it disappeared.

So how can I resize sprite with its child image (it's loaded by a Loader object by the way)?

View 1 Replies

Actionscript 3 :: Setting Source Of An Image Component Not Working?

Dec 10, 2011

I'm pulling in a xml-file with just one result in it. One of the nodes is picture, which contains a link to a picture. This is the xml-file:

<artist>
<id>502</id>
<name>Bad Religion</name>

[Code]....

I've tested the url, and it's correct. This is how I try to bind the url to the image instance (artistPic), but it's not working. Displaying the artist name does work.

var artist:XMLList = new XMLList(event.result);
artistPic.source = artist.picture;
lblArtistName.text = artist.name;

View 1 Replies

ActionScript 3.0 :: Loading Image From ByteArray And Setting Dimension?

Feb 13, 2009

I want to load an image from a ByteArray and then set the dimension of the image. I'm doing it in the following way.

var img:Image = new Image()
img.load(byteArray);
img.width = 200;
img.height = 200;

The problem is that if my original image is for example 90x100, I would get displayed an image of 180x200. It seems it cannot modify the proportion of the image! How can I instead obtain a 200x200 image?

View 0 Replies

ActionScript 2.0 :: Setting Default Alpha For Image During Loop

Sep 6, 2010

I have a script which dictates alpha on rollout and onroll but I want to set a default alpha setting for images which are loaded via xml. Here's a tidbit:

[Code]...

I've tried combinations of tn_group["tn"+i].tn_button.tn_pic._alpha = 85; and such but I'm still a big newbie

View 2 Replies

ActionScript 2.0 :: Image Slideshow - Setting Preloader XScale Properties?

Jul 7, 2010

I've got an image slideshow, and a preloader for each individual image. I want the preloader BAR to be dynamically assigned the width of the banner, which is defined in a variable. Here are my preloader settings and function call:

ActionScript Code:
/****PRELOADER SETTINGS****/
progressBar._width = myVars["BANNER_WIDTH"];
progressBar._height = 2;
progressBar._visible = false;
progressBar._xscale = 0;
[Code] .....

Basically, what is happening is. The "progressBar" width is being defined as the variable BANNER_WIDTH, but when the _xscale property is run in my preloading function, it doesn't care what the banner width is. So what I want to say is. I want you to _xscale according to what is being loaded, but I don't want your _xscale to exceed BANNER_WIDTH's width. I don't know how to do this and keep the preloader accurate. I can only save as CS4, CS5.

View 5 Replies

Pasteboard Expansion Has Limits In CS3?

May 28, 2007

I'm using a very wide object in Flash CS3, and I didn't have a problem with the pasteboard automatically expanding to contain it in Flash 8 Pro, but apparently CS3 has limits as to how far it'll let the pasteboard expand, -2880 px to 3620 px or thereabouts. This means I have to move my object off of x:0 y:0 to work with it. This won't kill me, but it does seem to be a step down from Flash 8. Anyone have any news on why this change was made, and if there's any way to correct it?

View 4 Replies

Mc Following Mouse But Within Limits And Smoothly

Nov 30, 2009

I am doing an animation with a movie clip that needs to follow the mouse on the Y axis only smoothly and needs to stay inside a fixed dimension. (e.g. the mc could moves 200px left or 200px right maximum) And I want it to stop smoothly too when it reach the limits.

View 1 Replies

ActionScript 3.0 :: How To Make Limits

Jul 21, 2010

1)i dont know how to make limits! ... and what i mean by that ... for example ... how to make a car unable to move on the buildings ?or how to make the a car dont fall out of the screen ?

2) i also need something ? .. what is the function that could make the screen Zoom In , or Zoom out ??

3) also i wants to know ... how to make the screen Move like to make a car in the middle of the screen and moves as it moves ?

View 5 Replies

ActionScript 2.0 :: Stretching Outside The Limits

Sep 30, 2004

ive seen in a few places were pressing a button drops down a menu, which extends outside the size of the flash movie. So that it goes over whatever text is actually underneath the movie. Ive tried to do the same by just making the menu go below the movie, but that just gets cut off

View 8 Replies

ActionScript 2.0 :: Center A Mc With Limits?

Jun 18, 2007

I created a hit test for stop a mc on the top of the stage.

It 's blocking all right, but i need that when is blocked then align on the center again.[code]...

View 2 Replies

ActionScript 2.0 :: Stretching Outside The Limits?

Sep 30, 2004

ive seen in a few places were pressing a button drops down a menu, which extends outside the size of the flash movie. So that it goes over whatever text is actually underneath the movie. Ive tried to do the same by just making the menu go below the movie, but that just gets cut off

View 7 Replies

ActionScript 3.0 :: Mc Following Mouse But Within Limits And Smoothly?

Nov 30, 2009

I am doing an animation with a movie clip that needs to follow the mouse on the Y axis only smoothly and needs to stay inside a fixed dimension. (e.g. the mc could moves 200px left or 200px right maximum) And I want it to stop smoothly too when it reach the limits.

View 2 Replies

ActionScript 3.0 :: Bitmap Limits With ScrollRect In 3D?

Oct 19, 2009

If we have a Bitamp with more than 16777216 pixels (or one side larger than 8191 px) Flash 10 doesn't show it (Flash 9 and earlier has smaller limits even).One solution to this is to use scrollRect to limit the size displayed.OK, that works.

But Flash 10 has another problem, if we use any 3D property (rotationX, z, etc), flash transforms your MC in bitmap, so we can reach the above limit even when we are not working with bitmaps...A bigger problem is that although our MC could be really small (at least less than 16777216 pixels), when we apply a 3D transform like rotationX, the displayed MC can grows enough to reach the limit. And... we can't use scrollRect with 3D MC. But we have a trick here too, there are two ways to use scrollRect with 3D:

1. Create a 2D parent, then create the 3D displayObject inside of that parent.
2. Set cacheAsBitmap to true for the 2D parent.
3. Create a grandparent container to hold the first two items.
4. Set cacheAsBitmap to true for the grandparent container.
5. Apply scrollRect to the grandparent container.

These methods are really differents, with the second I couldn't use scrollRect to avoid reaching the bitmap limit. I think that's because in the second we apply scrollRect to the parent and 3D to the child, so nothing breakes our child from growing.With the firs method we apply scrollRect to the child, and the 3D property to the parent.

Code:
var p: Sprite = new Sprite();
var c: Sprite = new Sprite();
p.addChild(c);

[code]....

View 0 Replies

ActionScript 3.0 :: MC Following Mouse But Within Limits And Smoothly

Nov 30, 2009

I am doing an animation with a movie clip that needs to follow the mouse on the Y axis only smoothly and needs to stay inside a fixed dimension. (e.g. the mc could moves 200px left or 200px right maximum) And I want it to stop smoothly too when it reach the limits.

View 1 Replies

ActionScript 2.0 :: Recursive Limits Workaround?

May 11, 2007

I am making a SUDOKU generator(ActionScript2.0), which would (for now) generate the full and correct sudoku table. To do that I need to use recursive functions for calculating all the possible values. The problem is that when I try to run my program I get this error :

Code:

256 levels of recursion were exceeded in one action list.

This is probably an infinite loop.

Further execution of actions has been disabled in this movie.Is it possible to somehow work around this limitation?

View 2 Replies

ActionScript 2.0 :: HTML In Flash Limits?

Apr 5, 2008

was trying to add <div> tag to flash TB. but it doesnt render it,i use htmlText ...

View 8 Replies

ActionScript 2.0 :: (CS4) Stargdrag Multiple Drag Limits?

Oct 9, 2009

Im using the code below to stop a page being moved past certain points when at 25% zoom on my page. This works perfectly however I have 50%, 75% and 100% zoom aswell. How would I alter this code so the drag limits can be different for each level of zoom.The code im using just now is:

pages.onMouseDown = function () {
// check if page is zoomed
if (pages._xscale != 25) {

[code]....

View 4 Replies

ActionScript 3.0 :: Dividing An Amount Evenly Within Limits

Dec 14, 2009

I often need to divide quantities in recipes. Normally, this is straightforward: I have an array of items to divide and a total, so I can do something like

[Code]...

However, this time I have been handed a curve ball: some of the items have a maximum amount they can be. For example, item A has a maximum amount of .25, item B is maximum of 1, the other items have no limits. So if the total amount is 3, and I am dividing it by 3 items I can't simply set each one's amount to 1 (as I normally would, as the code above does). I need to set the amount of A to .25 so there is still the .75 "left over" that I now need to apply evenly to the remaining items.

So that means the other 2 items B and C would be 1.375 each -- but, as I said above B also has a limit (of 1), so B would be 1 and C (no limits) would get the whole .75 remainder, and be 1.75. So A=.25, B= 1, C=1.75 for the total of 3. My question is, even conceptually, how would I approach a problem such as this in AS?

[Code]....

View 1 Replies

Professional :: Extend Memory Limits In Flash?

Mar 29, 2010

I'm been working on a large-scale Flash game for the past 13 months, and a few months ago I was encountering an error message when trying to export saying, "Error creating Flash movie. There was not enough memory available." Here is a screenshot <url...> This isn't due to large videos or photos in the file, it's because theres a huge amount of frame by frame animation, so I can't just reduce quality.

I was off of a crappy laptop so at first I just bought a new computer with tons of ram because I didn't realize the software was an issue. This did not change anything (though I can run flash with less lag).
 
Then, I decided to do as much optimizing as I could. After a few months, all opimization possible as been done, and I have reached the point where I get the error again.
 
Then, I decided to cut the main file up into smaller pieces and link them together. This worked, but now some individual pieces require too much memory and get the error.

View 5 Replies

Flex :: Row Specific Limits On A NumericStepper In A DataGrid?

Sep 30, 2010

I have a datagrid in Flex 4 with a NumericStepper as editor for a numeric value. I can set pre-defined maximum and minimum values for the NumericStepper, but I need to be able to have different limits for each row in the DataGrid. How can I do this?

This is the code for the datagrid:

<mx:DataGrid x="0" y="45" width="272" height="525" dataProvider="{dp}" variableRowHeight="true" editable="true" id="equipmentDG" verticalAlign="middle">
<mx:columns>

[Code].....

but now I get a StackOverflowError when I click on the cell to change the value. I posted a new question regarding that here: [URL]

View 1 Replies

Actionscript 3 :: Pixel Limits On Bitmaps In Flash?

Nov 18, 2010

What are current pixel limits on bitmaps in Flash?

View 2 Replies







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