Actionscript 3 :: Loading Swf-fonts With Loader Works Perfectly In SDK 3.5 - Not In SDK 4

Jul 12, 2011

For a large project I have the following setup:

a content editor made with Flex SDK 3.5
a content viewer made with Flex SDK 4.1

Both need to work with dynamically loaded fonts as the user can use the fonts he wants.

So we used this approach:

convert the font files with Flash Professional to SWF-files (Creating a Font SWF)
editor: load the fonts with Loader (Loading a SWF font) the fonts can then be perfectly used within the application to generate htmlText viewer: the same approach to load the fonts + register them with Font.registerFont (Flex 4 Embed font from swf)

Now the problems: although the loaded fonts are listed when you trace Font.enumerateFonts(false), they are not used in the textarea. There the text is shown with the default font.

Maybe the problem is the fonts are loaded as embedAsCFF for the Text Layout Framework, and that way are not usable in an mx.controls.TextArea? But as I can not change that to a spark TextArea for multiple reasons, I need a solution to use the loaded fonts in that mx.controls.TextArea.

View 3 Replies


Similar Posts:


Android :: Camera Works Perfectly In Flex Emulator But Not On Device?

Dec 31, 2011

I have a project that uses video for a chat application, I can get it to work in the flex emulator but when I deploy it to the device the button that initiates the video doesn't change and video never starts. My devices all have 2 cameras except my computer but specifiying Camera.getCamera([1]) didn't change anything except mess up my emulator and cause a NullPointerException. Camera.getCamera([0]) works just the same as not having the ID. I have tried messing with different values quality and nothing makes a difference

private function publishVideo():void{
_publishingVideo = true;
_ns = new NetStream(_nc);

[code]......

View 1 Replies

ActionScript 2.0 :: Created Xml Driven Menu That Works Perfectly On Html Page

May 3, 2010

I created a xml driven menu that works perfectly on a html page but would like to use it in a flash site. I loaded the the external menu movie in by using the:loadMovie(); reference but when I try to point the movie link from the menu to the empty movieclip it wont work. below is the code for the button action:[code]

View 0 Replies

Data Integration :: SendAndLoad XML Request That Works Perfectly But Inside Of Any Browser It Stops ?

Sep 20, 2006

I have a simple sendAndLoad XML request that works perfectly on 95% of the computers I have used. I have check crosssite stuff and everything i can think of. Its not browser specific ,os specific, or flash version specific. On these computers I can run the same flash file on a standalone player and everything works flawlessly but inside of any browser it makes the request for the XML file and stops right there. After a while like 10 minutes flash gets tired of waiting and returns not found. I can navigate to the xml file via the same browser. Upgrading Flash doesn't help.The only thing consistent is it only happens to windows computers. The requested URL is the complete URL. I have changed this and still the same.IE or Firefox still the same. Version 9 player in both. I have montiored network traffic and see the request made and maybe a response but flash has moved.

View 1 Replies

Professional :: BitmapData / GetPixel Mystery - Works Perfectly On Local, Failing When Uploaded?

Dec 13, 2010

I'm working with a video in Flash where I am capturing each frame and testing the color of a single pixel. I'm using it to determine when a white/transparent background changes to be a color. The following AS2 code works flawlessly when I preview it in Flash and on my desktop in the browser (the direct SWF and placed inside HTML using SWFObject) but as soon as I upload it to my server it fails and produces "FFFFFF" continuously regardless.

this.onEnterFrame = function()[code]..........

There is no difference in the files; they are both pulling from the same video source (hosted on an Flash FLV server).The only difference is one set of files is hosted on my local computer and the other is hosted on my web server.

View 2 Replies

ActionScript 2.0 :: Right Button Code Works Perfectly, But When I Press Left It Doesnt Rotate?

Sep 24, 2008

I have a movieclip that will rotate by 10 right if the right button is pressed, or 10 left if the left button is pressed.Now, some genius tell me why the right button code works perfectly, but when i press left it doesnt rotate. It moves left, but no rotation to be found .heres the code

onClipEvent (enterFrame) {

if (Key.isDown(Key.LEFT)) {
xspeed -= power;[code].....

View 3 Replies

Load The .swf, And Click "Play Trailer" Locally It Works Perfectly?

May 30, 2009

I have a problem with a FlvPlayBack movie. So when I load the .swf, and click "Play Trailer" locally it works perfectly. But when I load the .html page, and click "Play trailer" the player doesn't show up and it won't play the video.
 
Link to .html page What files exactly need to be on my server in order for the video to play? Have I called the video wrong? (the .flv file is on my server)

View 3 Replies

ActionScript 3.0 :: Uploading Fonts - Loading Fonts From The Server?

Jul 21, 2010

Right I can upload the font to the server.But the only examples I can find - require registerFont(Verdana);Which means I'll need to create a new SWF with the new font embedded and reupload to the server. I need an automated way of doing this or perhaps something different altogether?

View 2 Replies

ActionScript 3.0 :: Embedded Fonts - Downloading From Separate Swf - Works Locally Not From Web Server

Feb 9, 2009

I'm new to AS & Flash, but not programming in general. I've got a project where I'm needing to use embedded fonts. To save the size of my main .swf, I've been using the Loader class to import .swf files with the fonts embedded at runtime. The "font library" .swf files contain just the embedded font, and in frame 1 have

[Code]...

View 1 Replies

Actionscript 3 :: Loader() - Loading Multiple Images With One Loader?

Mar 11, 2010

I am attempting to load multiple images in AS3 and I'm exploring different options on how this can be done.I would like to have to only use one Load() instance and handle the various image assignments in the onComplete handler...here is my first attempt:

var buttonLdr:Loader = new Loader();
buttonLdr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
buttonLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadCo

[code]....

View 1 Replies

ActionScript 2.0 :: Simple Loader Fails When Loading In An .swf Containing The Loader?

Jun 26, 2007

Sorry for the complicated topic. I got a .swf that loads in other .swfs. Rather than figuring out how to make a loader for loading .swfs I thought I'd just use a simple loader in the .swf I'm loading.

However, it doesn't work. It starts fully loaded but doesn't finish. Heres the AS:[AS]_root.stop();
PercentLoaded = _root.getBytesLoaded()/_root.getBytesTotal()*100;

[code].....

View 1 Replies

ActionScript 3.0 :: Loader URL Works In .swf But Not In .html?

Mar 3, 2009

I'm using a Loader to load an external image. And when I'm in flash and test the movie it works perfectly, but as soon as I publish it (creating a .html in the same folder, not uploading it online) it says that there's something wrong with the URL - still it works when I test the movie in flash! This is very irritating, because I have no idea what's causing this. What's even more strange is that I have this class inside my movie, that uses the exact same loader method - only it's used inside a class - and it WORKS published.

Here's the code:

Code:
imageLoader = new Loader();
antalBildObjekt += 1;
imageLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,

[Code]....

View 1 Replies

Loader Works In Test But Not On Website

Jun 3, 2009

Sorry, I'm a newbie with what I'm sure is a deafeningly stupid problem. I'm self-taught, as well, so... there you go. I'm working with buttons that trigger images into a loader. When I test it on my computer it works fine. When I upload the SWF to my site with the code, the buttons appear but they don't load the images. I assumed this was because the images have to load from somewhere, so I uploaded the images to the same folder, but I it still won't work. Now I'm assuming it's an action script issue, but I don't know how to resolve it. My current action script is: on (rollover) {loader.contentPath = "image.jpg";}

View 8 Replies

Loader Works In Test But Not On Website?

May 25, 2011

I'm self-taught, as well, so... there you go.  I'm working with buttons that trigger images into a loader.  When I test it on my computer it works fine.  When I upload the SWF to my site with the code, the buttons appear but they don't load the images.  I assumed this was because the images have to load from somewhere, so I uploaded the images to the same folder, but I it still won't work.  Now I'm assuming it's an action script issue, but I don't know how to resolve it.  My current action script is:

View 6 Replies

ActionScript 2.0 :: Cannot Test If The Pre-loader And Or Bar Works?

Aug 17, 2004

I have a music player and because of my fast connection I cannot test if the pre-loader and or bar works.Also no matter what I do I can't get the second track to play. It has the same set of actions pretty much as the first.

View 2 Replies

ActionScript 1/2 :: Pre-loader Works But Then Movie Reloads?

Dec 9, 2009

I have created a pre-loader that creates a movie clip holder then loads an external swf into the created movie clip holder. The pre-loader downloads the external swf but then the downloaded swf re-loads on entry into it's first frame.

View 4 Replies

ActionScript 3.0 :: Url Loader Works In Flash But Not On Server?

May 28, 2010

i am trying to load the html code of a page in to flash. It is working and running fine when i compile in flash but when i run it of my web server it wont load. the code that loads it is:textLoader.load(textReq);textLoader.addEventListener(Event.COMPLETE, textLoadComplete);So once it has loaded the url in to textLoader it calls the function textLoadComplete. Like i say it works fine in flash but not on the server. I was wondering if it might be a security problem? i have used this at the start of the class:

View 2 Replies

ActionScript 2.0 :: MovieClip Loader Works Intermittently With SWF

Dec 28, 2010

I have created a moviecliploader that loads an external SWF and has player controls. I have a slider that moves with the movie, which works perfectly with cc_1.swf, but will not move with p_2.swf. The code below shows how the movie is loaded and how I update the x coordinate of the slider. Also, the attached zip file contains the fla and both swf movies.

Code:
//Working: cc_1.swf
//Not Working: p_2.swf
//Load Movie
var myMCL = new MovieClipLoader();
myMCL.loadClip("cc_1.swf", _root.container);
[Code] .....

View 7 Replies

ActionScript 2.0 :: Flash8 Loader Works In Flash IDE, But Not In HTML.?

Mar 23, 2009

I made a very simple loader, it's only a textbox with a percent loaded displayed.

It works perfectly when I use Test Movie in the Flash IDE but when I upload the .swf to my webserver, I get a blank grey box until the entire game is loaded, then it starts the game.

Is there any common mistakes one could make that would lead to this behaviour?

-- Detailed information -- Flash 8 game has 2 scenes. Loader, and MainGame Loader scene has the following code in frame 1:

Code:
stop();
onEnterFrame = function()
{

[Code].....

frame 2 has all my dynamically loaded movieclips placed on the stage (since I can't use 'export to frame 1' or that breaks the loader) frame 3 has a bunch of mp3's the game uses (same reason)

MainGame Scene has one frame that has actionscript code that does everything by code alone, loading movieclips and sounds dynamically.

It's that simple, and the loading works perfectly with various bandwidth settings using Test Movie, but once loaded from a website, the loader fails to appear at all, instead you are greeted to a grey box until the game is fully downloaded.

View 1 Replies

ActionScript 2.0 :: Music Player - Cannot Test If The Pre-loader And / Or Bar Works

Aug 17, 2004

I have a music player and because of my fast connection I cannot test if the pre-loader and or bar works. Also no matter what I do I can't get the second track to play.

View 2 Replies

XML Scrolling Thumbnail, Image Loader, & Buttons [halfway Works]?

Jul 2, 2009

Intro:I started a flash-based website a few years ago. Back in 2006 I was able to get a xml scrolling thumbnail, image loader to work without a glitch.For numerous reasons I had to put the project on hold until now. [one was that my 30 day trial of flash expired and only recently was I able to purchase the Adobe Web Suite CS4 as well as a new computer which could run the apps.]

Last Friday saw a bump in the road in the development of my site as two, rather straightforward task, turned into something short of a nightmare as I have been unable to get past these two, seemingly, relatively simple task.I have posted in 4 other flash forums the issues, in detail, that I am facing - and have quite a bit of interest/views in the topic as the numbers suggest - yet no response/answer as of yet. [Which confirms other messages I have seen which seem to state that working with buttons has become increasingly difficult with the newer version of flash - something Im a bit surprised with actually from Adobe. - I would have thought there would be a palette where you could set parameters...] 

Screenshot of Site/Timeline: Before getting into the two questions I have, I would like to post an image of the site as it looks whenever an swf file is saved out, as well as a piece of the timeline in the back for reference.As of now when the swf file is saved out you get exactly what you see above:

a: A scrolling thumbnail

b: ...which loads a large image when clicked on it - PEFECT...
 
BUT...1a: I need for the buttons to load in this action, not for it to just load on its own.[i.e., the silk_paintings gallery is what is open, so I need the "silk_paintings" button to call up this action]
 
note: Initially I had attacked this problem by taking out the actions layer you see above and applying it directly to the individual buttons with some crude MouseEvent Listener/Handerls... that did not work - at all.Im sure it may be "easier" to make an array out of it, but with my coding level it may be "easier" to apply it to the buttons.
 
1b: How I currently see it, I would take the xml-list and duplicate it for the number of galleries I have.[I would then re-name the xml-list to reflect the name of the galleries they are to represent, i.e. "silk_paintings"][also, I would have to rename the folders to "thumbnails1,2,3, etc., & "images 1,2,3, etc"
 
From there I would duplicate the actions and paste it into the buttons, changing the xml-list name to that of "silk_paintings", etc., as well as write in the MouseEvent listener Handler to make it work. [ah, ha, but what is that magic phrase, I have tried to implement various code from other tutorials, and all in vein.]
 
At this point I would be tickled pink just to get this to basic function to work.However, once the buttons are working and calling up the xml, etc., then I need the buttons to stay on the semi-transparent blue color it is whenever in the 'hit' state. [note: NOT pictured above.]With the way the buttons are currently set up, and with wanting to use scripting to get them to interact with the thumbnail gallery, it will have to be some miraculous code to tell that button what color to stay as whenever its clicked, and of course it going back to white when another button is clicked.
 
Conclusion:Since this is an Adobe Forum I would like to make a few additional statements in hopes that the developers, etc. may take heed.Adobes products are not cheap, and when I went to purchase the websuite I went in as a designer needing a program as not to need to program.I understand the flexibility that coding gives, but something as simple as linking buttons should not be in the realms of rocket science.

stop();
fscommand(allowscale, false);//keep SWF display at 100%

var x:XML = new XML ();//Define XML Object[code]....

View 31 Replies

ActionScript 3.0 :: Cannot Acces Loader.content On Online Swf, Works Fine Locally?

Jul 1, 2010

I have an image gallery with a thumbnail class which needs information about the content being loaded to be able to resize it appropiatly. Using.content.height and .content.width I can acces this information, however the swf (online) stops working when this code is encountered. No errors are thrown.piece of code from where it stops working

Code:
if (targetThumb.content.width > targetThumb.content.height) {
//scale the width

[code]......

View 1 Replies

Actionscript 3 :: Prohibit Users From Loading Swf Files By Flash Loader.load() And Only Allow Loading Images?

Apr 1, 2010

I want to have an AS3 app load images from url supplied by the user. But I don't want a malicious user to be able to load an SWF file in place of the image, such as with an altered extension "maliciousSwf.png". Well, not sure how big a security threat that is above and beyond the ability of the hacker to decompile swf, but I think that ideally such behavior should not be allowed.

So, is there any way to prevent this? When people allow users to load images in their Flash apps, do they somehow guard against loading of SWF? Or is this really absolutely no big deal?

View 1 Replies

ActionScript 3.0 :: Image Viewer And Im Loading An Image To A Loader And Then Add The Loader To The Stage?

Aug 12, 2009

im working on an image viewer and im loading an image to a loader and then add the loader to the stage.I want the user to be able to drag and drop the image but since it's a loader i dont know how to do it.
I tried

imageLoader.startDrag = true;
imageLoader.content.startDrag = true;
 
but im getting an error on both.

View 2 Replies

ActionScript 2.0 :: Dynamically Loading Fonts?

Oct 23, 2009

Can fonts be dynamically loaded or do all of the fonts have to be compiled into a swf?

View 1 Replies

ActionScript 2.0 :: Loading Fonts Into Flash?

Sep 5, 2009

Say I have a dynamic textfield and I'm using a specific font that the user doesnt have. Is it not possible to put the font into the same directory as the flash file and get flash to load it?

View 1 Replies

ActionScript 2.0 :: How To Use Loading Bitmap Fonts

Jan 3, 2010

I have spent quite a few hours looking into loading bitmap fonts to use and I cant seem to find anything on it. I have a bitmap font saved in a png file and I'm thinking I will need to create a new font, set the dimensions etc.

View 1 Replies

ActionScript 3.0 :: Dynamic Loading Fonts?

Aug 25, 2010

I know this question comes up often, but I have been through the forum several times and I am now confused as to which approach I should take. Hopefully someone can guide me as I am new to AC3.I have a Flash file with a dynamic text object.I have some existing AS3 which loads in text content from an XML file, and drops this into the dynamic text object. This all works fine.What I would like to do is be able to specify a font name in the XML and hence change the font used in the Dynamic text field.Later I would like to explore the option of dynamically loading in the fonts as and when needed, but for now I have embedded two fonts in the Flash file.I have tried the code below, which just manually changes the font (not from the XML yet), but this just doesn't seem to work? Have I missed something?

import flash.events.Event;
import fl.containers.UILoader;
import flash.text.Font;

[code].....

View 1 Replies

ActionScript 3.0 :: Loading Fonts At Runtime

Jul 30, 2009

Posting this is my last resort�I've spent the entire afternoon trying to figure this out. I'm to load a font at runtime using some updated code found here. The problem is no matter what I try I always get the following error:

TypeError: Error #2007: Parameter font must be non-null.
at flash.text::Font$/registerFont()
at cardmaker::FontLoader/fontLoaded()

which is saying that "FontLibrary._Bradley" is null in registerFont(); I know the swf exists on the server and the font symbol is being Exported for ActionScript with a class name and symbol name of both "_Bradley".

[Code]...

View 5 Replies

ActionScript 2.0 :: Loading External Fonts From SWF?

Apr 30, 2010

In AS2, if I have a swf file that I have added a font to the library how do I load that swf file into my main swf on runtime and utilize that font? I figured it would be use loadmovie, but not sure after that.

I really don't want to load the fonts directly in the library of the main swf if I don't have to, because I have 12 fonts to load. So, I will be passing the main swf file a variable that will tell it which font file to load.

View 3 Replies







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