Actionscript 3 :: Access The Width Attribute Of The Embed Object From Within Application Swf?

Apr 4, 2012

I have a flex 3 project with a root mx:Application. The width and the height are set to pct values, because the application has several sizes that can be chosen by the user, so the correct size is set on the embed's width attribute.

how to access the value in that attribute. I read in several places that this.root.loaderInfo.width should give me that value, but it always returns 500, which I am guessing comes from the default application container width [URL].

I realize I could pass it as a flashvar, but that is not a good solution in this case due to the nature of the project. I've also tried pplication.application.width, stage.width, and stage.stageWidth, to name a few. I can't depend on any of those values, since they change based on the browser zoom level.

View 2 Replies


Similar Posts:


Html :: Wmode="transparent" Attribute Required In Both The <object Tag As Well As The <embed Tag?

Apr 3, 2012

To get flash to sit behind html elements on a page I read that I have to add this inside the object tag:

<param name="wmode" value="transparent"></param>

And this to the embed tag:

wmode="transparent"

Is it necessary to add both? Because in FF I got it to work with just the second, just wondering if that may cause issues in other browsers and devices.

View 1 Replies

Asp.net :: How To Embed Flash Object In MVC2 Application Home

Sep 24, 2010

I need to put a Flash Object in my website developed on MVC2 .NET, however the third party who made it just gave me an html with this code.HTML errors apart I don't know how to put it on ASP.NET.

<table width="608" border="0" cellpadding="0" cellspacing="0" bgcolor="#F4F4F4">
<tr><td height="412">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="[URL]" id="runtime" width="608" height="412" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
[Code] .....

View 4 Replies

Flash :: Access EMBED / Object Tag Using Javascript?

Jun 25, 2010

Can i use javascript to check whether the video is running or stopped? I have to loop the video but putting loop='true' in the embed doesnt work out well. Is there a javascript method to check if the video is running or stopped?

View 1 Replies

Actionscript :: Set [Embed] Attribute Value Dynamically

Mar 19, 2012

Is there any possibility to set the source attribute value dynamically at run time?
for e.g in the code Embed(source="assets/images/image.pdf",mimeType="application/octet-stream");

I need to set source="set pdf file name using a variable or reading from config xml"

View 1 Replies

Actionscript :: AIR Application: Cannot Access A Property Or Method Of A Null Object Reference?

May 24, 2011

I'm using code for the open source MP3 player Howler and trying to port it to a Spark MobileApplication type. I'm getting a null pointer exception and I have no idea what's causing it. I've tried debugging extensively with breakpoints at what I think is causing the error, and set breakpoints in the untouched Howler project but all the variables in scope seem to be identical between my non-working project, and the Howler project. The only thing I can think of is that Howler uses MX components and I am using spark. I've pasted all my code below (which is very long) but I've bolded the lines that are throwing the error. The error occurs immediately after I choose a folder in the browse folder dialog.

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="Home"

[code].....

View 1 Replies

Professional :: Embed A Video Window From UStream - TypeError: Error #1009: Cannot Access A Property Or Method Of A Null Object Reference

Aug 24, 2010

I have a web page in joomla and I embed a video window from UStream that allows my users to see or hear our transmissions. Every time I load the page in which the embeded window is, I receive this error message:

[Code]...

I posted this message before but I notice it was no longer posted. I have no knowledge of programming so I am lost.

View 1 Replies

Ios :: Embed Adobe Air / Flex Application Inside A Standard Application

Aug 29, 2011

I have a native (Obj-C, standard Xcode project) application and I'd like to integrate a partners iOS application (or specifically, it's functionality) into it as just another view in my application. The problem is that their application is a Flex/Air app. I really don't understand the Adobe compilation process on how it gets from a bunch of flex code down to an IPA. I don't see intermediate projects, shared objects, etc on the disk to produce that IPA. It looks like it doesn't rely on the Apple tool chain... as I understand it, you can produce the IPA on Windows as well. Is there any way to build that Flex app in such a way that I can import it into Xcode so I can link against it and use it as a library from within my application? While I specifically used iOS as an example since that is the most important platform, we'll want to apply this solution to our respective Android and Blackberry 6 apps as well.

View 1 Replies

Professional :: Application.iPhone Is An Unknown Element/attribute

Jan 26, 2012

I can't compile my .ipa with the iPhone attribute in the app.xml file. I don't know what I'm doing wrong but I'm pretty sure I followed the format correctly

[code]...

I thought I followed the instructions to T, but maybe someone else can identify the problem?

View 3 Replies

ActionScript 3.0 :: XML - Access The Attribute Src From Img

May 14, 2011

I'm using to gather information from a RSS feed (I'm interested in the src content to display an image)

[Code]...

So far so good now the tricky part is that I want to access the attribute src from img. If i trace(p[0] is XML); i get true, but if I try to trace trace(p.img.@src); or for that matter trace(p[0].img.@src); I get nothing back what am I doing wrong?

View 5 Replies

Professional :: Error 103: Application.version Is An Unexpected Element/attribute

Jul 28, 2011

while i'm publishing iOS app from Flash, i get that thing
 
Unexpected or unknown element or attribute in the application descriptor file.
 
/Users/stockingem/Documents/DWP/1-app.xml(44): error 103: application.version is an unexpected element/attribute
 
application.version is an unexpected element/attribute

View 17 Replies

ActionScript 3.0 :: Error: Application.icon Is An Unexpected Element/attribute

Nov 8, 2011

I'm trying to publish my AIR app from Flash CS5.  Publishing has been fine, until I tried to use my own icon.
 
In the Adobe AIR 2.5 settings, under the ICON tab, I select my icon.
 
Now when I publish, I get the error: application.icon is an unexpected element/attribute
 
Now even if I don't include the icon, I can't publish.
 
I've found a ton of articles on fixing the same problem re application.version is an unexpected element/attribute - but nothing on this icon prob.

View 5 Replies

ActionScript 3.0 :: How To Access Specific Attribute In XML

Aug 2, 2010

Suppose I have an xml looking like this?

Code:
var emp:XML =
<employees>
<employee id="6401" code="231">
<lastName>Wu</lastName>
<firstName>Erin</firstName>
</employee>
<employee id="6402" code="232">
<lastName>Wu</lastName>
<firstName>Erin</firstName>
</employee>
<employee id="6403" code="233">
<lastName>Wu</lastName>
<firstName>Erin</firstName>
</employee>; </employees>

How would I access the specific attribute "6403"? I tried sth like this but did not work :
"emp.employee[2].@id"

View 0 Replies

Xml :: Flex - Access The Value Of An Attribute Using A String Variable?

Aug 1, 2011

Using e4x in flex:

var attr : String = "foo";
var xml : XML =
<resultSet>
<node foo="1"/>
</resultSet>;

How can I use the variable "attr" to access

xml.node.@foo

I thought I could do it with

xml.node.@[attr]

But this doesn't seem to work. How can I access this attribute by a dynamic value like this?

Both

xml.node.@[attr];

and

xml.node.attribute(attr);

work, as Constantiner suggested.

Updates:

Say I have an XMLList in this form:

var bar:XML =
<resultSet>
<node>value</node>
</resultSet>;

I want to filter the original xml above by matching "foo" attributes with the "value" from node in bar.

Essentially I want a sublist of the original xml such that

xml.node.@foo == bar.value

for each xml row in the original value

As Constantiner mentioned, I can filter the original list by the value in foo, but what if I want to filter on multiple values?

Can I do something like:

xml.node.(bar.node.contains(attribute(foo)) ? attribute(foo) : null);

Or perhaps a cleaner method instead of the null?

View 1 Replies

Professional :: Access UserLabel Attribute In Flash Builder

Oct 14, 2009

Is there a way to access the d:userLabel attribute in Flash Builder? I want to use a number of different files created from Illustrator -> Catalyst -> Flash Builder

Looks like this:
<fx:DesignLayer d:id="2" d:userLabel="A1">
<s:Rect d:userLabel="R_1" x="150" y="200" width="500" height="300" ai:knockout="0">
<s:fill><s:SolidColor color="0xffffff"/></s:fill></s:Rect>
<s:Rect d:userLabel="R_2" x="150" y="200" width="80" height="60" ai:knockout="0" >
</s:Rect>... </fx:DesignLayer>
 
Now the question:
Can I access the "userLabel" with a scriptfunction? Something similar to getElementByID? I want to change for example the fillcolor of a rect or path with that function. Because I have no id here I can't do something like:
R_1.fill = blue
And I don't want to manually change the files from Illustrator.

View 1 Replies

ActionScript 3.0 :: Flex Access Attribute Values Via Variable Name?

Feb 2, 2009

I have a flex app where I need to be able to access and modify component attributes using variable names.

eg, say I want to edit the text attributes of text label.

I am not sure what object or attribute will need to be updated until runtime.

Say I get passed the following variables:

var objId:String = "label1";
var objAtt:String = "text";
var objVal:String = "Hello World";

I need to take these and update the "text" property of label that has the ID "label1" to "Hello World".

I have tried different variations to accomplish this but am stuck One example is

this[objId][objAtt] = objVal;

View 2 Replies

Media Server :: Application Is Not A Valid Signed Application Loading Access Denied

Oct 29, 2009

We have an application that works no problems on our server with FMS in test mode. As soon as we enter our FMS license key we get this error: "application is not a valid signed application loading access denied".We removed the license key and it works again, but with user limits obviously, so this is not an acceptable fix.

View 5 Replies

ActionScript 3.0 :: Get Height / Width From Embed?

Feb 19, 2009

How can I use the width and height that's set by the object's embed code within my Flash movie?

I've got items that position based on stage height/width. Problem is although the object appears re-sized when you adjust the values in the embed, the stage size obviously does not change.

Ideally I'd like to position and scale objects based on the dimensions provided in the embed.

View 1 Replies

Flash :: Get Embed Tag's Width / Height In Actionscript?

Jun 14, 2011

I am using the stage ScaleMode as NO_SCALE and want to know the width and height specified in HTML in the embed tag. Is there a way to go about it?

View 1 Replies

Flex :: Size Get Width And Height Of Embed Image

Jun 13, 2011

I have the follow declaration :[code]How can i determine "img6" width and height ?

View 1 Replies

ActionScript 2.0 :: Embed An Image And Change Width And Height?

Sep 10, 2006

I have created a Movie Clip and named it member_image and have put in the actionscript to load an external Image. that works fine, but i cannot resize that image to fit in the Movie Clip area. The width and Height of "member_image" is 215 X 160. I am trying to be able to load any image into that area and size it to the same as the movie clip.[code]...

View 1 Replies

Html :: Youtube Embed Code Custom Width And Height?

Feb 10, 2011

The problem is im unable to set a custom height and width for it. It seems to leave some ugly whitespace and doesnt fully stretch.

<object width="540" height="350">
<param name="movie" value="http://www.youtube.com/cp/vjVQa1PpcFOEm1zAacTga1hxrmYl7Q0lOFesqks2LI="></param>

[code]....

View 1 Replies

Flex :: Interface - Getting Value Of The Object Attribute

Dec 1, 2009

i have an xml which contains 'interface' sub tag, iam converting xml to object using SampleXmlDecoder. compiler did not allow me to access the value of the 'inteface' attrible of the resultobject.

[Code]....

its treating interface as keyword. the solution for this.

View 1 Replies

Embed A Previously Created Flash Application Into Another Flash Application?

Jul 23, 2009

What is the best way to embed a previously created flash application into another flash application?

View 1 Replies

ActionScript 3.0 :: TotalFrames Attribute Of MovieClip Object

Jun 27, 2011

Recently I got trouble with totalFrames attribute of MovieClip object, this is the case: in Flash CS, I created two movieclips, one has say 10 frames animation, another one, I drag the first MC in to it, then the second MC has only one frame in it's own time line, right? Then I export them as SWC file to include them in my project. Here's the problem, when I'm trying to get total frame number of these to MC like below, I just get to actual number of frames in the second MC:

[Code]...

So my question is, is there any way to get the actual number of frame for those MovieClip resource like the second one, without visiting any sub-movieclips in it

View 4 Replies

AS3 :: Flex - Object List Search With Attribute Value Only?

Oct 16, 2010

Suppose I have a list of objects of a certain custom type and I need to find an object given only the value of one of its attributes, how do I do it?

Eg.

// Where user1 ... usern are objects of some class User
users = [ user1, user2, user3 ... usern ]
// How do I find out the objects that have the "foo" attribute set to "bar"

View 1 Replies

ActionScript 3.0 :: Sockets - Flash Application And Windows Application Works For String Buffer But Not For Object?

May 6, 2011

I want adobe sockets to send "customized" class object to a server socket(WinSock2). I used socket.writeObject(myClassObj). Actually My flash application and windows application works for string buffer but not for object.

Code:
//Flash
var buffer:String = "God Bless Us";
socket.writeUTFBytes(buffer);

// WinSock2
iResult = recv(ClientSock, recvbuf, recvbuflen, 0);

Is there anything I must do before writeObject() is used.?

View 3 Replies

Actionscript 3 :: Flex - Use Variables For Object Attribute Names?

Mar 19, 2010

How do you use variables to access Object attributes? Suppose I have an Object declared as follows,

var obj:Object = new Object;
obj.Name = "MyName";
obj.Age = "10";

[code].....

View 1 Replies

Search Flex XML Object To Find Attribute When Given Element Name?

Oct 13, 2010

I have a Flex XML object as follows:

private var _xmlCountries:XML =
<Countries>
<option value="AF">Afghanistan</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AO">Angola</option>

[Code]...

This object is ok, and shows up correctly in debug mode. The problem is I have a country name i.e. private var _country:String = "Angola";, and I want to get the corresponding value 'AO' from the XML object. Do you know how to do this?

I have tried loads of Livedocs examples, but cant get it to work. P.S. I am working on a HtpService & WebService driven app to display global weather conditions overlayed on a Google Maps interface. Going to make it available to the Flex community when finished.

View 2 Replies

Actionscript 3 :: Flex - Object Attribute / Variable Null

Jan 6, 2011

If I execute the code below in FlashBuilder, I get the following error (I translate it) TypeError: Error #1009: Access to an Attribute or Method of an null-Object is not possible. at components::NumDisplay()[srccomponentsNumDisplay.mxml:39] This line in NumDisplay.mxml is the problem:

[Code]....

View 3 Replies







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