Cialis Soft 20mg Pills $141.00

ActionScript 2.0 Flash

Cialis soft 20mg pills $141.00 It’s not hard to make a SWF resize itself to the dimensions of the browser.  All it takes, cialis soft 20mg pills $141.00 in fact, cialis soft 20mg pills $141.00 is to set the width and height attributes of the HTML’s <object> <param> element and/or <embed> element to 100%.  There are a number of ways to determine the SWF’s display, cialis soft 20mg pills $141.00 too:  show all (default) makes the entire movie visible while maintaining the original aspect ratio of the SWF (if the browser’s aspect ratio differs, cialis soft 20mg pills $141.00 you’ll get the equivalent of “letterbox” borders either horizontally or vertically); no border gets rid those potential borders, cialis soft 20mg pills $141.00 but may crop parts of the SWF instead; exact fit distorts the SWF, cialis soft 20mg pills $141.00 if necessary, cialis soft 20mg pills $141.00 to make the entire movie visible without borders or cropping.  See Adobe TechNote 12701 for complete details.

Cialis soft 20mg pills $141.00 Fine and good.  Now, cialis soft 20mg pills $141.00 what if you want to allow the Stage to resize, cialis soft 20mg pills $141.00 but not its contents?  What if you want to adjust the position of various movie clips — such as a logo, cialis soft 20mg pills $141.00 navigation, cialis soft 20mg pills $141.00 or content area — in response to the Stage’s new dimensions as the browser is resized?  Luckily, cialis soft 20mg pills $141.00 that’s not hard either.  :)   Let’s take a look. 

An answer, cialis soft 20mg pills $141.00 short and sweet

Cialis soft 20mg pills $141.00 Open a new FLA and draw a quick shape — a circle will do.  Convert the shape to a movie clip (Modify > Convert to Symbol…, cialis soft 20mg pills $141.00 then choose Movie Clip) and give the clip an instance name via the Property inspector.  For this example, cialis soft 20mg pills $141.00 let’s call it mcLogo.

Cialis soft 20mg pills $141.00 Create a scripts layer and type the following into frame 1:

Stage.scaleMode = "noScale";
Stage.align = "TL";
var stageListener:Object = new Object ();
stageListener.onResize = positionContent;
Stage.addListener(stageListener);

function positionContent():Void {
   mcLogo._x = Stage.width - mcLogo._width;
   mcLogo._y = Stage.height - mcLogo._height;
}
positionContent();

Cialis soft 20mg pills $141.00 Test your SWF, cialis soft 20mg pills $141.00 and you’ll see the circle hug the lower right corner as you resize the SWF’s dimensions in Flash.  Either that, cialis soft 20mg pills $141.00 or publish to an HTML file and set the width and height attributes for both the <option> <param> element and the <embed> element to 100% and resize the browser.

How it works

Cialis soft 20mg pills $141.00 In the first line, cialis soft 20mg pills $141.00 we’re telling the SWF not to scale itself.  In your HTML — this is important — you’re going to set the width and height to 100%, cialis soft 20mg pills $141.00 but the SWF itself will not scale to fit those dimensions.  In the second line, cialis soft 20mg pills $141.00 we’re telling the SWF to register itself to its upper left (top left) corner.

Cialis soft 20mg pills $141.00 Next, cialis soft 20mg pills $141.00 an arbitrarily named variable, cialis soft 20mg pills $141.00 stageListener, cialis soft 20mg pills $141.00 is declared as a generic Object instance.  This object acts as an “ambassador” for the Stage.onResize event, cialis soft 20mg pills $141.00 so we need to assign a function to a new onResize property of our object, cialis soft 20mg pills $141.00 rather than of Stage directly.  In this example, cialis soft 20mg pills $141.00 the function is arbitrarily named positionContent() and is defined shortly below.  Note:  if you like, cialis soft 20mg pills $141.00 you may assign a function literal …

stageListener.onResize = function() {
  // instructions here
}

Cialis soft 20mg pills $141.00 … but in this case, cialis soft 20mg pills $141.00 I chose a named function because you may want position dozens of movie clips, cialis soft 20mg pills $141.00 and it’s arguably “cleaner code” to define the function separately. Cialis soft 20mg pills $141.00  If you go the named function route, cialis soft 20mg pills $141.00 as we’re doing, cialis soft 20mg pills $141.00 make sure to omit the parentheses in this line, cialis soft 20mg pills $141.00 as shown.

Cialis soft 20mg pills $141.00 The next line adds our ambassador as a listener to the Stage.  The Stage.addEventListner() method is what “wires up” the listener object to the object that dispatches the event (here, cialis soft 20mg pills $141.00 the Stage).

Cialis soft 20mg pills $141.00 Finally, cialis soft 20mg pills $141.00 the custom positionContent() function tells mcLogo what to do.  In this case the movie clip’s _x property is set to the width of the Stage minus its own width.  That makes it hug the right side.  To center this clip, cialis soft 20mg pills $141.00 you could set its MovieClip._x property to half the Stage’s width minus half its own …

mcLogo._x = Stage.width / 2 - mcLogo._width / 2;

Cialis soft 20mg pills $141.00 Follow suit for vertical positioning.  Makes sense, cialis soft 20mg pills $141.00 right?  Be sure to call the positionContent() function after you declare it, cialis soft 20mg pills $141.00 to make sure everything is positioned at the start, cialis soft 20mg pills $141.00 otherwise the Stage/browser would have to resize first.

Cialis soft 20mg pills $141.00 By the way, cialis soft 20mg pills $141.00 this setup expects movie clips to be registered to their upper left corners.  If mcLogo’s shape was centered horizontally in its own timeline, cialis soft 20mg pills $141.00 you would only have to minus half its width from the Stage’s width to make it hug the right hand side.  If you want a 20 pixel buffer between this right-aligned clip and the Stage, cialis soft 20mg pills $141.00 account for that extra 20:

mcLogo._x = Stage.width - mcLogo._width - 20;

Cialis soft 20mg pills $141.00 To keep a clip to the left side, cialis soft 20mg pills $141.00 set its _x to 0.

Cialis soft 20mg pills $141.00 Keep in mind, cialis soft 20mg pills $141.00 you’re not limited to setting MovieClip._x and _y properties.  You may adjust a clip’s _width, cialis soft 20mg pills $141.00 _height, cialis soft 20mg pills $141.00 _xscale, cialis soft 20mg pills $141.00 _yscale … whatever you like.  Experiment and have fun with it!  For every clip you wish to position, cialis soft 20mg pills $141.00 simply add its entry to the positionContent() function.  Note, cialis soft 20mg pills $141.00 below, cialis soft 20mg pills $141.00 that an mcNav clip is being set to a position based on the original mcLogo clip.  Here, cialis soft 20mg pills $141.00 both clips would hug the right edge of the Stage, cialis soft 20mg pills $141.00 and mcNav would float below mcLogo, cialis soft 20mg pills $141.00 with a buffer of 20 pixels.

function positionContent():Void {
  mcLogo._x = Stage.width - mcLogo._width;
  mcLogo._y = 20;
  mcNav._x = Stage.width - mcNav._width;
  mcNav._y = mcLogo._y + mcLogo._height + 20;
}

Cialis soft 20mg pills $141.00 Note:  See How to Fix Wrong-sized SWFs in Firefox to work around a common issue with 100%-sized SWFs in Firefox.  (Thanks for the cross-reference suggestion, cialis soft 20mg pills $141.00 Markus!)

Average Rating: 4.6 out of 5 based on 257 user reviews.

Leave a Reply