ActionScript 3.0 :: Detect Size Of Swf In Loader Flex?
Jul 24, 2009
I'm creating a map that has points of interest. (POI) When a user mouses over the POI an info bubble pops onto the screen and it loads an swf. I currently have 3 problems. My 4th problem is that this is due Monday 21st! so any help would be greatly appreciated!
1. I can't detect the size of the swf so that my infobubble will size itself to the size of the swf.
2. When I mouse over my swf file, it disappears.
3. have the my swf file pop up in a layer on its own instead of being on the stage of my main flex file...but i have no clue how to do this.
<code>
package com.modestmaps
{
import flash.display.Graphics;
[code]...
View 3 Replies
Similar Posts:
Dec 17, 2009
I'm creating a map that has points of interest. (POI) When a user mouses over the POI an info bubble pops onto the screen and it loads an swf. I can't detect the size of the swf so that my infobubble will size itself to the size of the swf. When I mouse over my swf file, it disappears. I would love to have the my swf file pop up in a layer on its own instead of being on the stage of my main flex file...
package com.modestmaps {
import flash.display.Graphics;
import flash.display.Loader;
import flash.display.Shape;
import flash.display.Sprite;
import flash.filters.BlurFilter;
[Code] .....
View 3 Replies
Apr 30, 2010
Is it possible in Flex 4's VideoPlayer control (spark.components.VideoPlayer) to detect some attributes of the source video?
In my case, it's a local file. I would need to detect the original width and height of the input source video (an h264 f4v).
View 2 Replies
Apr 3, 2012
I'm writing an application in AS3 on Flex that utilises USB removable storage - SD cards - and I need to display the space available on it in a progress bar.Getting the space available on a drive is straightforward enough using:
flash.filesystem.storageVolume.rootDirectory().spaceAvailable
but to display free space graphically, I need to know the total size of the drive and I can't find anyway of getting that info.For now, I've resorted to guessing the size roughly based on the free space, but this is obviously far from ideal.I've scoured the vast documentation that Adobe provides and googled 'til my fingers ache, but no luck. I'm guessing this may not be possible with the standard framework and may require a custom Native extention to be written.
View 1 Replies
Nov 23, 2011
Tried stage.stageWidth and stageHeight on applicationComplete, but for some reason the actual numbers returned do not seem to be accurate - the image always appears off-centered (stageWidth/2 - imageWidth/2). How do you determine the mobile device's actual screen size, to center an object?
View 1 Replies
Dec 19, 2009
I am loading an external swf file using the following code:
//add close button
var reqButton:URLRequest = new URLRequest(btn_close);
var loader2:Loader = new Loader();
loader2.load(reqButton);
addChild(loader2);
[Code] .....
Once the loader loads my image, and I click on it, nothing is happening. Am I supposed to be adding the EventListener to the loader or something else? How can I detect the height and width of the swf file in the loader?
View 1 Replies
Oct 26, 2008
Through a textField you can access images (or it's Loader object) with getImageReference( imgId ). This works fine.Now I want to add eventListeners to the Loader to detect mouseClicks on the images. But somehow that part won't work.[code]
View 4 Replies
Jun 7, 2004
Can i detect size of external file from swf?
I have btn link in SWF for XSL file and the file is 1 mb big.
I possible to detect the size of XLS and then show e.g. with preloader the downloaded size?
View 1 Replies
Jan 29, 2010
From my main flex mxml, I am trying to detect the size of a rect:Rectangle that I created in my InfoBubble.as class. The info bubble itself is created in my InfoMap.as class. How can I access the attributes of the rectangle I created?
Here is the variable portion of the InfoBubble class:
Code:
public class InfoBubble extends Sprite
{
//public var textField:TextField;
[Code]....
View 1 Replies
Jun 2, 2009
Is there a way to detect the total size of all files in a fileReferenceList?
View 1 Replies
Feb 14, 2012
I have a SWF that's 1100 x 730 (odd size, I know). What I want to do is detect the window size (not screen resolution). If the width of the window is less than 1100, scale the SWF to fit the window. If the width of the window is 1100 or higher, do nothing.
View 0 Replies
Dec 26, 2011
since my main swf file has accettable size is it wirth a loader?
here is what I see with a loader on
Frame # Frame BytesTotal Bytes Scene------- ---------- ----------- ----- 154751 54751 Loader (AS 3.0 Classes Export Frame)2 35699 90450 Scene 1
View 1 Replies
Mar 23, 2010
i'm attempting to position a textfield to the bottom left of an image that is added to the display list from the Loader() class. i don't know how to access the width/height information of the image.
var dragSprite:Sprite = new Sprite();
this.addChild(dragSprite);
var imageLoader:Loader = new Loader();
imageLoader.load(new URLRequest("picture.jpg"));
[code]....
within the displayPic function, i could assign the evt.target.content.height and evt.target.content.width to variables that i could use to position the text field?
View 1 Replies
Dec 9, 2006
determine an image files proportions and then manipulate them while importing them via XML,i am attempting to create a scaleable interface that scales based on XML imported images proportions.
here is a link to an archived folder containing the modules and tutorials i am attempting to combine. braingiants_bounce2.fla is the flash that is combining them.
[URL]
View 3 Replies
Oct 29, 2009
My XML Image Loader is working fine, but, my problem is with the size that the flash is generating the .swf i have just codes and vectors inside my .fla and the swf have 294kbs...
View 4 Replies
Nov 15, 2010
I load an SWF using a simple loader but it changes the main applications x/y position and size.Which loader do I use to load an swf that will maintain the position size of my app?
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, function handleInit(event:Event):void{
var UIDesigner:UIComponent = new UIComponent();
[code]......
View 3 Replies
May 12, 2010
Here is my problem (unfortunatelly didn't find solution @google):I'm loading external swf[AS2] into main swf[AS3] using Loader class. The main swf is 800 x 600 and the external swf is 300 x 200.After adding the external swf to the main swf the external swf expands it's size from 300 x 200 to the main swf's size: 800 x 600.
View 1 Replies
Dec 13, 2004
I've found the loader component handy in loading JPEGs and scaling them to the specified size. However, I've found it a little annoying that when the image is loaded, sometimes you can see the image in it's original size for a fraction of a second before it's resized to fit the loader. Is there any way to avoid this -- such as the loader only being visible after the image is resized?
View 1 Replies
Mar 3, 2011
I want to create a panel (or any other component) inside a component that has a 5 pixel border on all sides, but scales fully when the window is resized. I know I can set width to "100%" to make it resize, but that gives me no borders. If I put it to "95%",I have borders, but they scale annoyingly. Also, that only works for borders on the right or lower bounds, and not to the left or upper sides.Is there a convenient way to do this without having to write tons of resize-code (in which case I will not bother and just accept bad rescale behaviour, as it is for a private pet project).
EDIT: I know that I can just overwrite the display handling and set the positions manually every frame. I wondered if there is a cheap way to do it in the mxml-structure, along these lines:
<mx:Panel>
width="100%" height="100%"
</mx:Panel>
Coming from C++ and Java, I am intrigued by the option of setting something to "95%" and let the library work out the details, instead of having to write many lines of code, just so my text-area always keeps a 5 pixel distance from the border, but scales with window width.If there is no easier way to do it than figuring out pixel sizes by hand and setting the coordinates.
View 1 Replies
Aug 10, 2010
I am trying to change my radiobutton size and label size in pure as3...
searchRB = new RadioButton();
searchRB.name = "search";
searchRB.group = rbg;
[Code]....
View 1 Replies
Apr 6, 2011
I have three images and I want change the images size based on the scene size (default size is 1024x768). After each image has completely loaded I call bindableUtils.setter to set width/height when scene size changes but I don't know how to make a pointer or something like that. I'm using a public var img, but it only works with the last complete image.
Here is my code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
[code].......
View 2 Replies
Oct 15, 2011
Could you explain why a Flash Builder source folder - no larger than 2 MB - compiles into a SWF exceeding 15 MB with debugging turned off (exported release build)?
There is only 1 embedded image at about 93k - no other images. The application is not that complicated, basically calls are made to a MySQL db to display information, as well as store information. I have used drop shadows and borders, but all standard to Flash Builder. Some custom classes and one custom skin.
[Code]...
View 3 Replies
Nov 24, 2009
Is there a way for flash to detect a user's bandwidth, and depending the size of bandwidth, stop loading, or continue with the load? Now that I'm thinking about it, this would probably be a javascript detection script and if the bandwidth is high, load .swf, if not load a .jpg?
View 3 Replies
Mar 6, 2008
Actaully I am running a cards game. While running the game in between if I change the style portrait to landscape. then how can I detect the screen size and run the game according the screen style (Portrait or Landscape).
Actaully I have written the code to detect the screen as portrait and landscape. But in between if I change the game portrait into landscape, no more it works.
View 2 Replies
Jan 26, 2010
If my ComboBox is editable how can I tell if a change event comes from a change to the TextInput or a change in the selectedIndex of the drop down?
Is there a way to check for this in the event object?
View 1 Replies
Sep 2, 2010
Is there any way to detect if AdvancedDataGrid itemClick event is actually caused by the user dragging? I'd like to take action on click, but ignore drag.
View 1 Replies
Mar 18, 2011
I need to detect 32-bit or 64-bit OS through Flex.
var osName : String = Capabilities.os;
This only gives Windows XP or Windows 7. I need to detect 64-bit Windows XP.
View 1 Replies
Jan 16, 2012
I have Scroller and in this scroller I have 3 swfloaders. How I can detect when scroll bar is scrolled on (event, my be)?//editSorry for the little information. In scroller I have Group
code:
<s:Scroller>
<s:Group>
[code].....
View 2 Replies
Dec 7, 2009
i'm using swfloader to load swf file in the middle of the screen using the following command:
<mx:SWFLoader id="game_swf" source="crazy_counting.swf" x="198" y="0" width="721" maxWidth="721" height="531" maxHeight="531" />
now stage of the flash file takes the exact size that i stated by the flash file itself is overlapping the stage with some graphics
View 3 Replies
Jul 6, 2009
When a Flex component moves directly, so that its x and y properties change, then a "move" event is dispatched on the component. That's all fine.
However, a component may also move as a result of its parent component moving — or its parent moving, and so on. Now when a parent component moves, its children just "move along" without any properties changing or move events being dispatched on the children. Still, the children are moving on the screen. So how can you detect this kind of generalized movement?
View 2 Replies