ActionScript 2.0 :: SWF Views Are Never Centered And Image Is Cut Off?

Apr 7, 2011

Why when I view my flash files in the flash player or by using Control+Enter or F12, are they never centered so that I can see the whole page at once? Toggling, by first zooming in and then fighting to push and pull it the right way, is not only a pain and frustrating, but it also decreases the quality of the image. I know what it looks like when it's clear, but if I need to send it to someone else who doesn't have the program and only the flash player, they are not going to be able to view the image at it's best. Does the problem have to do with how the image is centered on the stage when I save, the file size, what?

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Scaling A Centered Image To Longest Dimension

Apr 11, 2008

URL...Basically I would like the loaded jpg to center and scale to it's longest side within the stage. So a portrait shot will stretch 100% from top to bottom but might have bars on either side. A landscape shot might letterbox if it is short enough. However, if the landscape shot is too tall, the top and bottom would bleed off the screen.

View 14 Replies

ActionScript 2.0 :: Scalable Background Image - Centered Content

Jan 15, 2009

I recently found a great tutorial for making a scalable background image on: [URL] which has worked a treat. But my content is now positioned top left. How can I centre it without effecting the background? The full code I'm using on the first frame is below. I can centre all the content by changing Stage.align to "T", but then the background image has a nasty white space on the left hand side when the user resizes the browser.

I'm a flash newbie, can do some basics:
//set stage for FBF
Stage.align = "TL";
Stage.scaleMode = "noScale";
//define dynamic aspect ratios
picHeight = new Object ();
picHeight = pic._height / pic._width;
[Code] .....

View 6 Replies

Youtube Views Using The Flash API?

May 26, 2011

I have a very simple question. Does youtube count "views" if put a YT video into a swf, using their Flash API? I can't seem to find anyplace that explains how views are counted.

View 1 Replies

Flex :: Programmatically Add Views To A Viewstack

Jun 10, 2010

I'm trying to figure out how to in as3 (not mxml) add views to a view stack.For example I have a view component like so[code]I've being trying to add it to a viewstack in the following way.[code]I'm aware I have to assign ID's but for now I just want to get the view in there

View 2 Replies

Handle Application Views In Flex?

Jul 1, 2010

I have a Flex application with three different views. Only one view is shown at a time, and the choice of view depends on what part of the application the user is working with. If it had been an ordinary HTML webapp I would have created three different HTML-templates/pages for each view.

What is the recommended way to handle such application views in Flex?

View 1 Replies

Actionscript 3 :: Views And Controllers Invisible To Each Other?

Mar 18, 2011

I have read that Views and Controllers should be invisible to each other.How does the controller then listen for say a button click in the UI view?Surely the controller needs to know about the view to addEventListeners or the UI view needs to call functions in the controller, or dispatch events to the controller.

View 1 Replies

Flex :: Access All Views In ViewNavigatorApplication

Sep 13, 2011

I'd like to make an application for PlayBook (using Flex) that has the UI similar to the PlayBook web browser. By similar I mean I want to implement a menu that is shown when the user swipes down from the top bezel of the tablet. I like this feature because I can draw on it, place tons of other objects and handle all kind of events without using screen space when not needed. Plus the PlayBook does not have a "Menu" button like some phones have.Depending on configurations chosen from the first view a number of other views will be pushed onto the the stack view. When the user will access the pull down menu I'd like to show in form of thumbnail snapshot my main (configuration view) and the rest of the views that are on the view stack. This will basically show the user what is going on in different view and let him choose to which one to switch.[code]The menu is accessible from any view, but the code for event handler is in my main MXML file (project.MXML), I found this to be the only way of having one menu for all the views. I managed to pull down the menu from any view and displaying a thumbnail of the current view.

How to get access to all the views. I've been trying all day and all my trials give me access to the active view and my menu object. Here is some code to show what is going on:[code]As I mentioned above this for loop will successfully do the job for the current view then it will crash.Does anyone know how to loop through all the views? This is my first application with flex so if there are any alternatives to my approach I'll be glad to try them. Although I'd like to stick with a single ViewNavigator as opposed to tabbed navigator and multiple views instead of states.

View 1 Replies

Media Server :: How To Video Views Counter

Jan 5, 2011

I have a dynamic playlist that is populated by XML and I would like to have a "viewed" textfield next to each video showing how many times it has been clicked to play, exactly like YouTube's views.I'm not 100% certain how I want/should tackle this, but I was looking at the File object from FMS and somehow interacting with that or my web server runs ASP 3.5 and I was thinking a hit counter that way

View 2 Replies

Flex :: Handling Multiple Views Of The Same ArrayCollection

Feb 22, 2010

I have an ArrayCollection bound to a view, I use a filterFunction on this view to only display parts of the contents. Additionally I have another component where I want to display other parts of the ArrayCollection.

What I would like to do is wrap ArrayCollections around each other, meaning I could have one ArrayCollection containing the model data, and then two separate outer ones where I can set the filterFunction property (setting this in the model seems inappropriate in all cases). Is this possible somehow? If not, how else can this be solved, preferably without forcing model logic to end up in my view?

View 2 Replies

Flex :: Multiple Instances Of Views In PureMVC

Sep 15, 2010

Often multiple instances of the view component would be used in multiple places in an application. Each time I do this, I register the same mediator with a different name. When a notification is dispatched, I attach the name of the mediator to the body of the notification, like so:

[Code]...

View 1 Replies

Android :: Sharing Data When Popping Views?

Dec 16, 2010

We can pass data to the next view while using navigator.pushview, but the data is lost when the back button is clicked (popview).

I have views that make remote calls and I want to keep the data when the user navigates back to the view using the back button so I don't have to make a remote call again.

Is there a way to set a global variable that's accessible from all views, or a way to retain data when a user navigates back to a view using the back button?

View 4 Replies

Flex :: Passing Parameters Between Views In ViewStack?

Mar 19, 2011

how I would pass a value to "SelectedChild" in ViewStack:

In the example below, I am trying to set a public property in a form called "register" after I have navigated there from another form called "login".

The result I get seems to be a compilation error:

Error: Access of possibly undefined property pagename through a reference
with static type mx.core:INavigatorContent.
vsMain.selectedChild.pagename = "register page";

[Code]....

View 2 Replies

Flex :: Passing Data Into Tabbed Views?

Apr 18, 2011

I have a project that has 4 views where I'm using the tabBar with viewStack/NavigatorContent. I have a couple HTTPServices set up gathering the XML and converting to Bindable ArrayCollections. When and how is the best way to pass that data to such things as charts, dataGrids, etc. that aren't seen until the user clicks a tab? Right now I have each item set up with creationComplete functions that pass it then. Although it seems to be working, is this the best way, or is there something better and maybe even quicker?

View 2 Replies

Flash :: Share Same NetConnection Object Between Two Views?

Jun 11, 2011

Flex Mobile applications are view based. And I'm using Adobe Cirrus (im assuming its the same for any FMS netConnection) Does anyone know how to maintain a persistent netConnection between views in a flex Mobile Application?[code]I want to be able to trace(netConnection.nearID) on this view, go to another view and trace(netConnection.nearID) and get the same result. and be able to have a cirrusStatusHandler() function like I have a above to listen for cirrus events. Then be able to do netConnection.close() on another view if i wanted to to be able to close the connection.

Brainstorming Ideas what I was thinking I could do:I was thinking I could maybe set up the connection on the main ViewNavigatorApplication mxml file, but i have so much going on and being triggered based on netConnection status events it seems it might be really complicated to handle everything from that mxml file on each of the views. Maybe I could declare the netCon vars in the ViewNavigatorApplication mxml file, and just add event listeners to those vars on each view? But i'm not familiar with accessing vars that exist in the mainViewNavigatorApplication mxml file.I just need to be able to make the connection once, and then it stays persistent until I call netConnection.close()I guess I could use separate views where I dont need the netConnection and just have this particular view use "states" inside the view where the netCon needs to be persistent. It just seems silly be be using states since this is a view based application.[code]and the same in my Home View but i'm getting a null error when i try and call trace(netConnection.nearID) in the crationComplete function on profileView (which is after homeView) to see if it still has the same netConnection and should then be able to get the same nearID

View 4 Replies

Actionscript :: Flex 4.5 - Global Variable Across All Views?

Nov 20, 2011

How do you define a global variable that is accessible across all views on Flex mobile / Flex 4.5/4.6

(Edited for clarification)

Is it still necessary to have to use a separate global class?

(additional) There is a new PersistanceManager in Flex 4.5, is there something like a GlobalObjectsManager that can be used to just set/get stuff in memory?

View 2 Replies

Flex :: Modularity - Decompose An Application In Views?

Nov 21, 2011

What are the criteria for decomposing a Flex applicaiton to views? I find quite difficult to apply the Single Responsibility Principle in this context.I've come to the following conclusions through my experience:More monolithic approach(e.g. one view per tab, lots of panels in the same tab)Very easy communication between components as only one Presentation Model is used Cannot use multiple States, only on the top level component.More modular approach (e.g. one view per panel)(the opposite to the monolithic one)

View 1 Replies

AS3 :: Flex - Inherited Classes And Dynamic Views In PureMVC

Jul 14, 2009

I was wondering best practices for views of inherited classes in PureMVC in this situation: Multiple classes inherit a BaseClass (lets say InheritedClass1 and InheritedClass2) Each InheritedClass has a respective view (derived from a base view class, but each unique) With a given dataset (lets say ArrayCollection of InheritedClass1/2 Objects), the respective views need to be dynamically loaded. The dataset is relatively large, so a TileList would be nice (since it only instantiates objects which are currently displayed) I can think of a couple solutions, but I find them to be too "hackish" to be the best solution:

In View: Repeater over a BaseClassView which attributes a view to a State (set to the "InheritedClass1" state to add a InheritedClass1 object) Pros: No unneeded memory increase (States' objects are instantiated when needed) Cons: View is dependent on the data types, so adds coupling In Mediator: Loop over the ArrayCollection and addChild() the views based on data type Pros: Works. Cons: Mediator is adding things to the View, which defeats the point of the separation of Mediator and View. Slower than a Repeater.

View 4 Replies

Flex :: Single Model - Multiple Filtered Views

May 17, 2010

I have data model (dataProvider as ArrayCollection) i want to display in few views , each view should show filtered data. As you probably know, filterFunction is property of ArrayCollection,so I can't use this solution (unless creating new instance of ArrayCollection for each view on top original and impementing filterFunction).

View 2 Replies

Flash :: HTTP Streaming For Less Than 1000 Daily Views?

Jun 29, 2010

I want to use http streaming (ie. partial download) to serve some videos (medium to HD quality) to public.Idea is to have videos on server and offer some web page with embedded video player for user to watch selected video.Planned capacity is about 250 to 1000 daily views, with low concurrency requirement (ie. not many users in parallel watching video)I am thinking of complete solution like FLVPlayer or flowplayer to support this.What bothers me are network bandwidth requirements (what is minimum kbps) mainly, and this video player performance when in "heavy" use.For "heavy use" I consider adding possibility to stream many separate video files that I will add in back-end (via XML file or similar) and don't have experience with these players.

View 1 Replies

Flash :: Flex - Builder - 4 - Using MXML As Views - Any References?

Dec 14, 2010

I'm looking to create a flashBuilder document which uses seperate MXML files as "views" which are controlled by states - I believe it's a design pattern of sorts but I'm relatively new to FlashBuilder. I was wondering if anyone knew what design pattern it was and if I can be pointed in the direction of some good references! FYI I'm looking into using FlashBuilder to design Android apps

View 1 Replies

Flex :: Data - Pass Multiple Strings Between Views?

Aug 10, 2011

I have a list of txt files and when one is selected it is read and assigned to a string variable. this string is then pushed to a view : pushView(viewer, string), where the string is displayed in a textarea. I want to also pass the relative path of the file also. Is this possible to pass two strings?

[Code]...

View 1 Replies

Flash :: PureMVC Mediators And Views - Creation And Control?

Aug 16, 2011

I'm making an app with flash AS3 and puremvc, the way to correctly handle view mediators is sort of throwing me a little...I have 3 or 4 distinct views, each governed by it's own mediator.Each view is only displayed on its own - ie. when 1 is visible/on stage - the others are invisible/removed from stage (over simplified, but I guess could be thought of as seperate pages, viewed one at a time, a nav bar allows a user to change views when they like)

At first each view mediator I had creating and added to stage it's own view component, and as such, when it was 'turn' to show or hide that view, it was simple - addChild and removeChild for it's view component.However, I read over at puremvc.org that it's not good practice to

a. pass round the stage (which was the viewComponent for each mediator in my case - where each view was added to - eg. viewComponent.addChild(foo)

b. create its own view - which allowed me to add and remove it in the first place.

So I changed to the recommended way - when I create each mediator, what I pass in is the view component it governs (rather than the stage/main doc class eg.

var view:MyView = new MyView();
facade.registerMediator( new MyViewMediator( view ) );
viewComponent.addChild(view);

with that the case - I have no idea how I would go about removing/adding each view when needed.I could easily enough set the visibility from within each mediator, but I sort of wanted to avoid doing that - prefer removing when not in use for resource management...how I am 'meant' to go about this (as in, when a view is no longer needed on stage, remove it - temporarily, and add it later on when it is needed?)

View 3 Replies

Actionscript 3 :: Switching Views Creating Memory Leak?

Oct 28, 2011

I have been switching views with navigator.pushView over and over again but it seems to continually take up more memory.

View 2 Replies

Flex :: MXML Views - Passing Dependencies Into Constructor Of Classes

Oct 6, 2009

I'm used to building applications using pure AS3. I always pass dependencies into the constructor of classes I make, but this method seems to not work out well for Flex MXML views. It seems like I should define setters on the MXML class, which map to attributes in the tag/class instantiation. But using this method I cannot specify which properties are required and in what order I expect them etc. What is the preferred method to give a Flex view it's dependencies?

View 3 Replies

Flex :: Flash Builder Data Passing Between Split Views

Feb 22, 2012

I have a SplitViewNavigator with two split views. In one of the views I have a list and in another one I have questions. User must solve the question and when user click send button, he will see another question.

But when user click to send button in one view, how can i know this in the other view? I'm a newbie in Flash Builder and I'm searching for this for hours.

View 1 Replies

Actionscript :: Simply Track Flash Views With Google Analytics?

Feb 29, 2012

Tracking should be independent of hosted page. So flash views should be able to recorded on pages that don't have Google Analytics code.

View 1 Replies

ActionScript 2.0 :: Intro Only Plays First Time Viewer Views Website

Oct 11, 2006

I'm creating a flash intro and i was wonder how i would set it up so that the intro only plays the first time the viewer views the website. so that the next time they visit it takes them directly to the main page. this is dealing with cookies b/c once they clear their cookies it would play again.

View 5 Replies

ActionScript 2.0 :: Create Date 5 From The Time The Person Views The Movie

Apr 7, 2009

I'm in need of a script which gives the date 5 weeks from the time the person views the movie. So today is 07 April and would like the script to draw up 12 May.

View 1 Replies

Actionscript 3 :: MVC Pattern - Bind Event Listeners From Controller Onto Views Elements?

Sep 2, 2010

How do you bind an event listener from the controller to the view's elements eg button (click event) to its own handler? Originally I was doing this from the view eg. button.addEventListener(MouseEvent.CLICK, controller.buttonClick); But now realise this is wrong since reading "each view is only supposed to "know" about the model which it represents, and "know" nothing of the controller"

View 2 Replies







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