NON-AIR allowLoadBytesCodeExecution - Converting ByteArray to SWF/MovieClip
Hello everyone,
is there any way to convert a ByteArray (obviously containing a loaded swf's data) to an SWF/MovieClip at runtime in Flash Player 10? Even a very complicated byte-by-byte conversion?
There is a very easy solution for this in AIR, that is using Loader.loadBytes() with the allowLoadBytesCodeExecution set to true. But the allowLoadBytesCodeExecution property is inaccessible in Flash Player 10.
Thank you in advance for any respose.
Maciej,
Poland.
I even tried porting the code to Gumbo and running it there - still, no fonts are being enumerated.
If you're too lazy to read the whole above post, here's the problem in one sentence
An SWF that contains a textfield with embedded fonts, when launched by itself succeeds to return the embedded font using Font.enumerateFonts(false), however when loaded using Loader.loadBytes into AIR, it fails to see those fonts even though the textfield in it is displayed and editable.
How do I make the loaded child application and AIR see the embedded font?
Similar Messages
-
How can make byteArray from swf
Hi all,
i need to make byteArray from swf and save it into DB, because i need load the swf(in byteArray) to adobe air with URLLoader and loadBytes(). But I do not know how can i convert swf to byteArray, is it possible with php, or i need as3 script, which make byteArray...
thanks for help!I don't know if you better post this in the Adobe AIR forum?
-
Batch convert illustrator layers to movieclips
Hello all,
Ik was wandering if it it possible to batch convert ai-layers to movieclips.Also I would like that the layer name will be the movieclip name and the instancename. Hopefully you can help me!
kind regards!
ArjanFirst of all ... yes ... it is possible to save illustrator files as movie clips(which to me are .swf).
Since i suppose you`re making a reference to .fla files(because u need instance name to be the same name as the layer and so the .fla layer it is in), that should also be possible but you`ll have to play a bit with the flash scripting. Here's a start:
this will save every layer as a swf in the same location as the .ai file ...
exportToFlashFile(app.activeDocument.path.fsName + "/export.swf");
function exportToFlashFile(destFile) {
if ( app.documents.length > 0 ) {
var exportOptions = new ExportOptionsFlash();
var type = ExportType.FLASH;
var fileSpec = new File(destFile);
exportOptions.resolution = 150;
exportOptions.exportStyle = FlashExportStyle.LAYERSASFILES;
exportOptions.jpegQuality = 10;
app.activeDocument.exportFile( fileSpec, type, exportOptions ); -
Can I update my Android AIR app with a non-AIR app?
A few years ago I published an Android app using Adobe AIR. Now I've created a new version of the app with a different technology (HaxeFlixel / OpenFL) which uses native C++ code.
The certificate I used for the AIR version is in "p12" format, and it seems that I need to use "jks" format. I tried using a p12 to jks converter I found online, which seemed to work, but when I try to submit the app I get an error saying that the certificates don't match.
Any suggestions on how I can update the app with a non-AIR app? Is it possible? Thanks in advance.I'm still having trouble with this, I asked in the OpenFL forums but nobody responded.
I converted the p12 file to JKS from the site you suggested (I think I've actually tried it before), and the file was created successfully, the apk compiled fine with the JKS file, but when I try to update the app for Google Play it says "Upload failed
You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s):"
When I try to sign with the original p12 file, I get the error "Invalid keystore format"
I noticed that for the AIR app, I also had a file called SelfSigned.pfx, which I think was used to create the p12 certificate? Can this have something to do with the problem? I even tried using this pfx file to sign the app, which didn't work either. -
How do I use transparent=true in my Air app but still displaying swf ?
How do I use transparent=true in my Air app but still displaying swf's files ?
The thing is that I created a customized chrome, and looks nice when it is transparent cause seems to be floating, it works as a browser, but the problem is that when I navigate with it into a page wich contains embedded youtube videos, as in example, or any other swf file... it just doesn't show...
Any help ? thanks in advance,Contact iTunes Support: http://www.apple.com/support/itunes/contact/
-
Converting video to swf files in flash for breeze
Hello,
I am using Adobe Premiere Pro 2 and wanted to know what the
best video codec and audio codec to use when I export to create a
video file to insert into flash to convert to a swf file for
breeze? I am having trouble with the audio, must I demux it first
before I put into Flash? Or is there a audio codec that I can use
in Premiere so I don't have to demux the audio?
Also, when I insert a swf file in breeze plug-in for PPT, it
does not play the video or give me the controll by presentation
playbar I checked off. Not sure what I'm doing wrong, could use
some help, thanks.billcorrigan schrieb:
> Jerich0, I tried this and when I publish it, the swf
opens a connection to the
> server, and starts streaming but nothing happens. Just a
blank movie.
>
> The content is at (FLV):
>
>
http://breeze.extn.washington.edu/p45023528/
>
> and the swf is at
>
>
http://breeze.extn.washington.edu/p17629788/
>
> I created the swf by creating a new document in Flash 8,
selected components,
> edited the infomation in media player and saved the
file.
>
> any suggestions?
>
hi,
if you work with the player component the .flv is not
embedded in the
swf. In Breeze you can only insert a single flash file I
suppose, so the
attached .flv file won't show up.
Kathrin -
Acessing loaded swf movieclip sctructure on as3
Hi, I'm using external swf files to add skins to an
application. Currenlty,I'm loading isolated elements successfully
by the use of the Loader class. However, now I want to load a more
complex skin structure that will have some movieclips already
placed on the loaded swf stage. The question is: when I load an swf
that athe edit time, I placed some elements on stage and gave them
instance names, how can I access this external swf movieclip
structure? It's something like this:
1. First, I create the external file by placing some elements
on its stage, naming these elements instances, like "console_bar"
and "console_button".
2. Then, I load this swf using the Loader class (into a
loader called "playerConsole", for example) and, whe it finishes
loading I try to access the elements placed on stage:
this.addChild(playerConsole);
playerConsole.console_bar.x = 0; // won't work - how can I
access this instance?This code generates an error when I try to compile:
1119: Access of possibly undefined property console_bar
through a reference with static type
flash.display:DisplayObject. -
Is there a command line program that converts WAV to SWF?
Is there a command line program that converts WAV to SWF?
thankswhy you want to do that? you can import your wav into the
swf! -
Slow wifi on iPad Air after converting to iOS8
I am experiencing painfully slow wifi response on my iPad Air after converting to iOS8. I tried disabling the WiFi Networking setting under System Services and even did a "Reset Network Settings". All to no avail.
I changed the DNS settings on the iPad Air Wi-Fi settings to Google DNS 8.8.8.8
It helped but this morning I've noticed Safari webpage not opening...
Worth a try,video see here: http://youtu.be/XYeYLUn9nj0 -
Convert MP4 (or SWF) to FMR SWF?
Hi Everyone,
I could be completely overlooking something here, but this is starting to do my head in so thought I would see if anyone had a solution for me:
I have a video (originally an MP4 however have converted it to SWF and FLV) that I would like to insert into my project. However I would like the video/animation to be inserted as an FMR slide so I can see the FMR Edit Options as i need to Trim, Split and Insert.
Is this possible in Captivate? I can use version 5, 5.5 or 6 however would prefer to do this in CS5 if possible (although not the end of the world if i cannot).
So far the only way I have found to do what I want is to create a FMR project and record Windows Media Player as the video plays which is giving terrible quality (as expected).
If you need any more information please let me know.
Any help would be greatly appreciated.
Cheers
GarryAnyone?
Is it not possible? -
AIR app doesn´t recognize SWF files
Hi
I have done an AIR app (in Flex). One of the features of it needs external SWF files to be browsed in a text field. Everything has worked very well for couple of years, but now I got a report from a client who uses that app. He says that AIR app doesn´t recognize SWF files anymore. When he clicks browse button, a normal file selection dialog opens but all the SWF files are greyed out.
He send one SWF file to me and it worked well in my computer/AIR app. Anybody have any idea what may cause that? He has used my app a lot, and two weeks ago it worked normally. He uses mac, not sure whis version, quite new I suppose.Hi,
That's odd that this just started occurring for the customer. A couple of things come to mind, first, are you using FileFiters when you call browseForOpen()? If you are, could you try a test where you remove them and then see if the swf's become enabled? Do the swf files have extensions on the mac? If not, try adding them and see if that makes a difference.
If you'd like, I can also give this a try since I have both platforms available to me. Could you attach or email me ([email protected]) some sample code and a sample swf that would illustrate the problem?
Thanks,
Chris -
AIR for iOS, Embedded SWF MovieClip
I would like to play a movie clip that I have a in a separate SWF file. The following code works on my PC debugger, but the movie does not play (or even load) on iPhone. Is this possible on iOS? What am I doing wrong? Thanks in advance...
[Embed(source = '../assets/cinematics/test.swf', mimeType='application/octet-stream')] static public const CINEMATIC_A_SWF:Class;
loader = new Loader();
var context:LoaderContext = new LoaderContext();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, movieLoadComplete);
loader.loadBytes(new CINEMATIC_C_SWF() , context);
private function movieLoadComplete(evt:Event):void
movieClip = (loader.content as MovieClip);
movieClip.play();Vincent35, can you elaborate a little on this please?
Can this trick somehow be used to take 5 swf files (each of 1 game) and then make 1 swf with a menu which can start somehow 1 of those 5 games? (on iOS of course)
Can a complete swf be put in a swc and then loaded in from a menu-app made in as3 on ios ?
Kind regards,
Bart -
URLRequest cacheResponse solution for non AIR SWFs?
I am needing to turn off caching for and URLRequest and cannot seem to find a solution for a plain flash SWF. I see that cacheResponse can be set to false for AIR apps, but I am working in plan ol' Flash Pro creating a SWF.
Has anyone succesfully set cacheResponse on an URLRequest (using URLLoader) so it does not cache any of the responses and loads the files new every time?
This is a restating of my post here: http://forums.adobe.com/message/4095632#4095632
Thank you for any help.
Dougif this is a web app, append a query string with a changing value.
-
Flex3/air calling functions in embedded swf problem
i'm a newbie to flex so i'm hoping there is going to be a
simple answer to this problem. it's caused a massive headache!
i have been using a swfLoader to load a swf, then triggering
function calls within the swf from flex by using the following in
the script tag of my mxml
var mc:MovieClip = MovieClip(myMP3player.content);
mc.loadMP3Player("file:///"+path, artist, title);
where loadMP3Player is the function in the linked swf and
myMP3player is the id of the swfLoader.
this works great, no problems... but when i change the code
so that the swf is embedded, rather than loaded at runtime the code
above gives a
"ReferenceError:Error #1069 Property loadMP3Player not found"
error
when i try to trigger the function.
i have tried many different ways of referencing and embedding
the swf, all have the same result. i.e. swf loads fine and the flex
project compiles without errors, but i am unable to call the
function. see the code snippet for my details.
any help will be really appreciated.
btw: i need to embed the swf as i am distributing the
finished article as an air app.
-------------------------------------------------code
excerpt--------------------------------------------------1. You must be using the Flex Component Kit for Flash
2. Select the clip in the library that you want to turn into
a component for Flex
3. Use the command (command menu in Flash) to convert the
clip to a Flex Component
4. Publish -> your swc is ready
If you don't have a document class, one is made automatically
and it has the same name as the name of the clip in the library
You can provide a document class. Look at the linkage
identifier for the clip in the library. There you will see what the
name of the class is. Create the class yourself and Publish. Now
add the swc to your library path in Flex. Now you can use the
component as any other component in Flex. So, put the clip on the
stage using mxml or in ActionScript using var myplayer = new
MyPlayer(); -
AIR for desktop and multiple swfs
I know when packaging AIR for mobile devices, you can load external swfs as long as they contain no code, but I was wondering if the same limitation exists for AIR on the desktop.
Building a kiosk application and would like to organize and load the various 'views' similar to how I would create and organize a flash based web application.Hi jbach...
In AIR for desktop, you can definitely load external swfs and they can contain code (works on Android also).
There's a in-depth discussion of how to accomplish this here:
http://blogs.adobe.com/cantrell/archives/2010/03/extending_air_applications_with_plugins.h tml
This article talks about security considerations, etc - and is worth understanding.
However, if you want to just test it out without worrying about security:
var stream:FileStream = new FileStream();
stream.open(_file, FileMode.READ);
var bytes:ByteArray = new ByteArray();
stream.readBytes(bytes);
stream.close();
var context:LoaderContext = new LoaderContext();
context.allowCodeImport = true;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);
loader.loadBytes(bytes, context);
function loadHandler(e:Event):void
_content = DisplayObject(e.target.content);
So basically:
Read the file as a byte array.
Create a loader context and set allowCodeImport to true.
Create a loader and use loadBytes to "convert" to a useable swf.
On complete, e.target.content contains your swf (fully accessible with code, etc.)
Hope this helps! Good luck with your application.
Maybe you are looking for
-
This was listed as a new feature in the 10.1 Logic Pro X update but how do you do it? I don't see it in any documentation. Thanks
-
Can someone please tell me if there is a way to unarchive the Archived vend
Hi all, Recently we have Archived all Old Vendor Invoice (KR) Documents in production till 2007. but we realised that there are some more Payment Documents which are not cleared in 2007. i.e., the checks on those Payment documents are not encashed/cl
-
We generate very big PDF-Files. 200 an more pages. Is anybody able to calculate the following two parameters? with the default of 8192 KB it is not able to generate the big files. 0 KB means no limitation <XMLP> <InputStreamLimitInKB> 0</InputSt
-
H
-
Iphone 5.1.1 update
ben iphone u pc ye bağladığımda 5.1 sürümü var güncellemek istermisiniz diyor benim arkadaşlarım güncellemiş ama telefon kilitlenmiş neden kilitleniyor ve o güncelleme yüklenmelimi?