ActionScript 3.0 :: Embed Metadata From Variables?

Jan 27, 2011

I have a AS3/CS5 project in which I am dynamically loading in a font whose location is passed in via XML.

I want to then embed the font per below:

Code:
//font location string passed via xml - "/fonts/randomfont.ttf"
var fontLocation = xml.navigation.font.@fontLocation
[Embed(source=fontLocation, fontFamily="font1", embedAsCFF="false",

[Code]....

it works fine. Are you not able to use variables as metadata in the embed tag? Is there a work around for this?

View 7 Replies


Similar Posts:


ActionScript 3.0 :: Set A Root For Embed Metadata?

Oct 13, 2011

I just downloaded the starling API which is the 2D API running on the new Stage3D.

I have run into this issue in other libraries too.

The download package has a folder structure like this

Code:
root
- samples
- starling

[Code]....

So i've set my class path to be root/starling/src.

Now in src, starling has a package of starling/events and inside of that SomeClass.as.

In SomeClass.as there is an embed with a path of "media/blah/blah/somepic.png".

But this fails in the compiler because the embed is looking relative to the class file..

way to change the way the compiler looks for embed assets so that it runs "out of box"???

View 3 Replies

ActionScript 3.0 :: Flash CS4 IDE Based Project And Embed Metadata Tags

Jun 8, 2009

I posted this in one of the other sub-forums before I realised this one was available. I am moving over to using the Flex based embed metadata tags to import assets into my Flash CS4 IDE based project. This is working very well but I have hit one small problem - how do you now create a pre-loader? I've done the usual google to look for a solution and found many Flex based solutions and tried them all out but they do not appear to work from within a CS4 IDE based project - even when tried out on a web page.

View 5 Replies

Actionscript 3 :: Embed Dynamic Audio File(s) / Use Variables In Embed?

Feb 10, 2012

Making a piano/keyboard application and trying to figure out the best way to set this up .I plan on having a directory of sounds for each 'instrument' in my assets folder (piano1/C4.mp3,piano1/D4.mpg,...)Is there a way to import/embed all of these as an array? Also is there a way I can pass a variable to this class to indicate which folder I want to import these from? Something that would be ideal

var type = "piano2"; //passed from class being called by
foreach(notes as note){
[Embed(source = 'assets/sounds/'+type +'/'+note+'.mp3')] private const C3:Class;
public var c3:Sfx = new Sfx(C3);
}

Or would it be a better idea to have a class for each of these "types" that pulls all notes?

View 2 Replies

ActionScript 2.0 :: Loading Variables From The Embed Tag?

Aug 29, 2006

I'm develloping a little image loading application for a client. the same swf has to be reused over and over to load the files. They are passing me the image location in the embed tag but they are not using the usual

flash.swf?path=folderpath&img1=image1.jpg&img2=ima ge2.jpg&img3=image3.jpg

instead they are using this format :

flash.swf?/folderpath/::SPLIT::image1.jpg::SPLIT::image2.jpg::SPLIT::ima ge3.jpg
do you know how I can read those variables into my flash file ?

View 1 Replies

ActionScript 2.0 :: Passing Variables In Embed Code

Mar 10, 2011

what I need to do is have a flash movie jump to a set label in timeline according to which named variable I have defined in the embed HTML code.So, let's say I have a movie with two labeled frames ("shape1" and "shape2") and when the variable pagevar equals "one", the movie jumps to "shape1" while when the variable pagevar equals "two", the movie jumps to "shape2". If the variable is undefined or equals anything else, the movie simply stops.[code]

View 1 Replies

ActionScript 1/2 :: Listing All The Populated Variables When A Swf Is Loaded From An Embed Tag?

Mar 9, 2009

I've been wondering how I could possibily do this for some time now. and all I tried or thought of went nowhere. I'd like to list all the variables an html embed tag passes on to the swf file called, whatever they are named and how many there is. <EMBED src="example.swf?var="varcontent",var2="var2content"> it's not life-threatening, but I hate using things that work when I have an idea for things that would work better x)

View 2 Replies

ActionScript 3.0 :: Use Variables Inside [Embed] Font Tags?

Oct 24, 2009

I seem to have the [Embed] tag working OK for embedding fonts But I want to specify font and font location in an xml file, read in the font location, and pass it into the [Embed] statement. Like this

var xFont = xFormat..navcontrols.font;
//then...
[Embed(source = xFont, fontName = 'myFont', mimeType = 'application/x-font-truetype')]
var csgFont:Class;

The error I get is

'unable to resolve 'xFont' for transcoding

I want to keep this all in AS3 if at all possible. I dont want to use the Flash IDE to create embedded fonts. I would ideally like to minimize the impact of changing a font.

View 4 Replies

Php :: Use SWFObject To Embed A Flash Object In Page And Pass Variables

Feb 28, 2011

i am wanting to know how much I can be sure that users of my website will not be able to pass bogus variables to my Flash movie. Basically I will have some features available to certain users and I realise that for the average user they will not know anything about how to send spoof vars but is it possible for someone to change the variables sent using SWFObject when a page loads and thus be able to use the functionality that I am trying to disable for them.I have a PHP (my_flash_movie.php) page that calls a function from an included globals.php file to determine if the user can see the restricted functionality is_ user_a_subscriber($_SESSION['user_id']); which returns 1 or 0. This 1 or 0 is then passed to Flash which enables or disables certain features. I dont want someone to be able to send a 1 instead of a 0 basically. This isnt a site where security is critical and the functionality that is disabled is not really critical either so wouldnt be too bad if this happened but im just curious about this and wondering if I should think of another way to pass these vars that might be more hidden.

View 3 Replies

ActionScript 3.0 :: Get Variables That Are Passed From Html Object And/or Embed Tags

May 9, 2010

I need to get variables that are passed from my html object and/or embed tags, so I can use them in my flash project.

for example: src="/incl/flash/Line_Graph.swf?a=value1&id=1"

how can I get a and id inside my flash file?

View 3 Replies

Css :: Flex 3 Embed Throws "Invalid Embed Directive In Stylesheet' Error On Linux

Mar 9, 2010

We have a flex application which compiles fine on windows box using mxmlc ant task but when we try to run the same build scripts on linux, it throws the 'Invalid Embed directive in stylesheet' error indicating it is not able to resolve the path to the image files.

Can someone pls. educate me on if there is a difference in the way the image files are looked up, in a CSS file, on windows vs linux.

Flex sdk version is 3.3. The same sdk is used on both windows and linux. Not sure if this has been fixed by any future 3.x sdks.

View 2 Replies

ActionScript 2.0 :: Embed The Fonts Using The Embed... Button In The Flash IDE ?

Jan 30, 2007

I am using the following line before my class declaration .

[Embed(source="C:WINDOWSFontsVERDANA.TTF", fontName="VERDANA", mimeType="application/x-font-truetype", flashType = true)]

But there is no change in the appearance of the Text whatsoever.. I need the text to be crisp and clear.Just like the way it looks when we embed the fonts using the Embed... Button in the Flash IDE.

View 1 Replies

ActionScript 3.0 :: FLVPlayback And Metadata?

Sep 20, 2008

I don't know why, I don't know how, but for some reason setting the FLVPlayback.bufferTime property to anything past its default value of 0.1 will (more often than not) make it so the .flv metadata does not ever make it to the video player. Granted, this may also have to do with my slow connection, but I know I am not the only one who has had this problem hose of you who have made players with custom seek-bars know the lack of metadata is can be a problem because the FLVPlayback.totalTime property is set directly from the"duration" property of the FLVPlayback.metadata objecty suspicion as to why this is not a more widespread issue is due to the "one video per player" nature of players on websites. I don't believe that players often reuse the net connection of the same FLVPlayback control to load one video after another (however, I could be wrong, this is all assumption on my part anyways).1) The FLVPlayback's net connection is reused (that is, you call the load() or play() method several times during the lifetime of the videoplayer.

2) You notice that occasionally meta information is never received when you increase the buffer time to a value above the default.3) Your seek-bar does respond or you get a run-time error when you try to seek (most likely because totalTime property NaN and the playheadPercentage property relies on this value)The simple solution (or so I am led to believe ): set the buffer time back to the default value before every call to the new connection. In other words, make sure that the the FLVPlayback.bufferTime property is set to 0.1 before calling the load() or play() method for a new video. This will ensure that the metadata is properly received by the component for playhead calculations.

Code:
//assume we have an existing FLVPlayback component
myFLVplayback:FLVPlayback = this.flvPlayer as FLVPlayback;

[code].....

View 9 Replies

ActionScript 3.0 :: ID3 MetaData Streaming MP3?

Jan 28, 2009

I've been trying very diligently to recieve id3 metadata from a streaming mp3. I have it streaming and it works great, but I need to grab the duration in the metadata.here's the jist of my code,

id3_ns = new NetStream(connection);
id3_ns.addEventListener(NetStatusEvent.NET_STATUS,
netStatusHandler);[code]....

The only other thing I can think of trying is see if my mp3 is screwed-up, but I don't think it is because I can see the
metadata in the properties of the file.

View 1 Replies

Add Metadata For Searching To FLA Documents?

May 29, 2009

In Flash CS3 when you did Modify/Document it allowed you to type in a document Title and Description which were metadata searchable by internet search engines. According to the book "Brilliant Flash CS4" this is still possible in CS4, but I think they have removed the option, and the book is wrong. add metadata for searching to FLA documents or is this now gone?

View 1 Replies

ActionScript 3.0 :: Handling The FLV Metadata?

Jul 27, 2009

I am trying to get metadate from my NetStream object and do things depending on what is going on. here is what I have, but I get an error I don't know what it means.
 
var customClient:Object = new Object();
customClient.onMetaData = metaDataHandler;
function metaDataHandler(infoObject:Object):void {

[code]....

The error I get is:Error #2044: Unhandled AsyncErrorEvent:.text=Error #2095: flash.net.NetStream was unable to invoke callback onMetaData. error=TypeError: Error #1010: A term is undefined and has no properties.
at AMG_ASP_ICS_072709_fla::MainTimeline/frame1()

View 6 Replies

ActionScript 3.0 :: Metadata In SWF Files?

Apr 6, 2010

I´m playing around with SWF files exported from indesign CS4. I wonder if there is a way to read any metadata from those files. Or is there any? I have not found any AS3 method to trace metadata like time/date or even some unique ID...something that I could use later to specify that file.

View 4 Replies

Professional :: Edit A FLA's Metadata?

Nov 1, 2011

For the longest time, I've been tearing my hair out trying to figure out why my CS4 FLAs were getting larger every time I did a Save and Compact. I finally tracked it down to the @#$% metadata. Every time you save an FLA, it appends a useles chunk of metadata to it, that looks something like this:
 
<rdf:li rdf:parseType="Resource">
<stEvt:action>saved</stEvt:action>
<stEvt:instanceID>xmp.iid:BD2F8041D0ACE01185F1A1E26A912C41</stEvt:ins tanceID>

[Code]....
 
This can be viewed in Flash by going to File -> File Info... -> Raw Data.
 
On frequently-updated files, this junk can easily add dozens or hundreds of K to the size of an FLA. So my question is this: Is it possible to edit an FLA's metadata?

View 1 Replies

Flash :: Extract MetaData From An FLV?

Sep 21, 2010

What software is available for extracting metadata from an FLV? I'm testing an flv streaming module for apache (mod_flvx) and need to extract keyframe info from an flv for debugging purposes. I was only able to find FLV MetaData Viewer, but its dated, from 2006, and doesn't install properly on Win7. [URL] Edit: I'm open to any method of extraction, either app or library.

View 1 Replies

Actionscript :: AS3 - How To Set VideoPlayer's Metadata

Mar 6, 2011

I've set a custom client for a FLVPlayback's netStream, to attach my own functions (onXMPData, onMetaData) to parse the various info myself. However, i'd still like to pass the meta data back to the VideoPlayer. How do I do this? I tried dispatching a METADATA_RECEIVED event with the metadata object (tried dispatching from the client, the netstream, the video player, the flvplayback..), but it does not work.

View 1 Replies

IDE :: Using Metadata To Create Listeners?

Oct 20, 2009

I think this is in the wrong forum... sorry! Should be AS3) I am trying to dynamically create listeners using metadata from a list of instance names in an array. Here is my code:

[Code]...

View 1 Replies

ActionScript 3.0 :: How To Access Image Metadata

Feb 13, 2009

An image, like a jpeg, has a bunch of metadata stored in it.The "IPTC Core" metadata usually includes the photographers name,address, title, description, etc.Is there any way to access this information using AS3 so that, say, captions for images in a flash gallery could be generated automatically?

View 1 Replies

ActionScript 1/2 :: Play A Video If Metadata Is Not Available?

Jan 21, 2010

is it possible to play a video if metadata is not available with the particular video file.

View 1 Replies

ActionScript 3.0 :: Getting FLV Embedded Cue Points From Metadata?

Feb 10, 2010

I would like to read in an FLV's cue point names and times and load them into an array which would have the form: [[cueP0, 0.0], [cueP1, 3.2], [cueP2, 6.8], ...]. I wou ld like to populate this array *before* the flv plays through for the first time, so I need to do this when the flv's metadata is first read in.With rom some of the posts in this forum, I have figured out a way to retrieve the cue point names and times (see the following code), but I am unable to "grab" these variables to populate an array with them.

//the function called when flv first loads
var cuePointNames:Array  //an array I created just to see if I can populate it with cue point names from metadata

[code].....

View 2 Replies

ActionScript 3.0 :: Add Metadata To Live Stream

Apr 14, 2010

I'm having some trouble finding out how you can add metadata to a live stream. I'm streaming the webcam over fms and recording it in main.asc. So far so good. I have 2 applications. One that sends data and one that recieves data. The functionality is more or less like this example. The article says: "Note: If you record the video on the server side (a functionality of FMIS), the  injected events are lso being triggered by the recorded file." That is what I want, but I have no idea how to make it happen. The problem is that I can't find any good examles for as3 and I have never looked into as2 (still new to flash in general )

View 1 Replies

ActionScript 3.0 :: Read XMP Metadata From A Jpeg?

May 17, 2010

This seems like it should be a no-brainer, but I can't find any classes to do this ?? I can find classes to read song titles from MP3 files, I want to do similar with jpeg image files. In photoshop and lightroom you can set up titles and captions (and copyright info) in the metadata. When you save a jpeg this gets embedded in the file. How to read this info and parse it and use it once you have loaded it into a BitMapData? I am Flash/AS3.0 code only no IDE

View 1 Replies

ActionScript 3.0 :: Which Is The Equivalent Metadata Tag But For Flash

Mar 7, 2011

I wondered what would be the equivalent of metadata tag used in flex or flash  builder, but for flash or fla .. For example to use with [Injectors]Greetings!

View 1 Replies

Actionscript :: Inject Metadata Into A F4v File?

Jun 27, 2009

I was wondering how do you inject metadata into an f4v file with quepoints? I've been reading somewhere that it's either during encoding or a custom actionscript that embeds when the file runs.

View 1 Replies

Actionscript 3 :: Air - Using XMPCore To Get Metadata Of A File?

Mar 13, 2011

Is there a simple example to read/write metadata of e.g. a local .jpg? XMPCore ActionScript Reference

Unfortunately I was not able to apply the instructions from adobe.

View 1 Replies

Actionscript 3 :: MetaData Of PNG File Format?

Feb 27, 2012

I tried to convert the PNG file into bytes wit the code below

var enc:Base64Encoder = new Base64Encoder();
enc.encodeBytes(bytes);
var base64data:String = enc.drain();
trace("base64data : "+base64data);
trace("end of base64data ");

But what i get is a chunk of characters like this

[Code]...

View 1 Replies







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