Search Results

Search found 908 results on 37 pages for 'as3'.

Page 10/37 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • ReferenceError: Error #1008 Class is ambiguous

    - by Dimitree
    I have a As3 file and I get a runtime error: ReferenceError: **Error #1008**: Tooltip is ambiguous; Found more than one matching binding. I have a class named Tooltip and also a symbol in library with linkage class: Tooltip and Base Class fvg.Tooltip (fvg is the name of the package). Why I get this conflict?

    Read the article

  • How can I add a class to my flash cs4?

    - by WarrenFaith
    I am about to create a simple demo in flash where I have 3 layers, 3 keyframes. Currently I am just use some simple gotoAndStop() to move to the next keyframe. But now I need a custom event to do that but I can't create a class inside the action of a keyframe so I am not able to create a custom event. I just have AS3 developing experience in flex so far. Thanks in advance.

    Read the article

  • swfobject weird behavior

    - by David
    Hi All, I'm using swfobject to embed my flash. It's doing weird things. I've created a simple textfield using FlexBuilder. It's an AS3 project, which extends Sprite. I've set its width to be 640 and height to 450. Then, in the swfobject parameters of the page, I've also set 640 x 450. I've made the background nice and red and ugly so you can see it. :) http://www.brighttext.com/flash/TextFieldSetFormat.html It seems to be the right dimensions. BUT I've got a textfield which is supposed to be almost the same size and height. This runs fine in FlexBuilder (is the right size) but is all messed up once I add swfobject Can anyone see what is happening? EDIT NOTE: I just looked at it and it looks ok. But then I refreshed the page and the textfield is postage-stamp size (again -- this is the original behavior I saw.) It's now looking OK in firefox but not in IE8. Flash is supposed to look the same in all browsers !!?? AS3 code: package { import flash.display.Sprite; import flash.text.TextField; import flash.text.TextFormat; import flash.text.Font; [SWF(width="640", height="450", backgroundColor="#FFFFFF", frameRate="30")] public class TextFieldSetFormat extends Sprite { [Embed(source='C:/WINDOWS/Fonts/ArialBD.TTF', fontWeight = 'bold', fontName='ArialBold')] [Embed(source='C:/WINDOWS/Fonts/Arial.TTF', fontWeight = 'regular', fontName='Arial')] public function TextFieldSetFormat() { var tf2:TextFormat = new TextFormat(); tf2.size = 16; tf2.font = "Arial"; Font.registerFont(_VerdanaFontBold); Font.registerFont(_VerdanaFont); var pad:Number = 10; var brightTextField:TextField = new TextField; brightTextField.backgroundColor = 0xDDF3B2; brightTextField.background = true; brightTextField.embedFonts = true; brightTextField.border = true; brightTextField.defaultTextFormat = tf2; brightTextField.wordWrap = true; brightTextField.multiline = true; brightTextField.width = stage.stageWidth - (4 * pad); brightTextField.height = stage.stageHeight - (3 * pad); brightTextField.x = 2*pad; brightTextField.y = 2*pad; brightTextField.text = "Dear Senators, I have become concerned over the idea that some in the Senate will oppose the public option because of a group of wild-eyed, overbearing but misinformed ideologues. These people mistakenly equate insurance reform with Socialism and call our first African-American President unprintable epithets. This is unacceptable. The public option is the choice of more than 70% of Americans, a majority of the House and a great many opinion leaders. Passing insurance reform without a public option persists the current broken system. I am aware that many Senators would prefer to pass a reform bill with bipartisan support. But we cannot allow this critical debate to be hijacked by extremists or corporate profiteers. Thank you, and I look forward to hearing from you."; addChild(brightTextField); } } }

    Read the article

  • Trouble using Loader, can't access properties of loaded swf

    - by anne
    May not have asked question correctly so I’m asking again. I’m using Flash AS3 with code in actions layer. Main movieclip onstage is : design_mc. Within it is a movieclip already in place onstage with an instance name clipart_mc. Now I’m also loading a ListBox to the stage and each time a selection is made from listbox myLoader9 is used to load selected .swf into design_mc.clipArt_mc. Now within each of the .swf files loaded into design_mc.clipArt_mc there is a mc I’d like to color transform called color_mc. So now the listbox is onstage and I make a selection that places heart.swf inside of design_mc.clipArt_mc. I want to access heart.swf so I did this: var child:DisplayObject = myLoader9.content.contentLoaderInfo.content.color_mc; var colorTrans3:ColorTransform = new ColorTransform(); var trans3:Transform = new Transform(child); I still can not get to heart.swf. Can anyone help please? Anne

    Read the article

  • Flash CS5 and dynamic textfields

    - by hood
    I have a "shell" that started life in Flash CS3 (Flash 9, AS3) that has been since used with CS4 and now CS5. It creates TextFields in ActionScript for display (reading the content of those fields from XML). The text fields are either Myriad Pro Regular or Myriad Pro Semibold, both are embedded in the SWF from the Library (any given text field will only use one of those fonts) and using Advanced anti-aliasing. Once a FLA goes into CS5 is still has the same problem when saved back into CS4. The problem is the spacing between letters are now quite random, and the width of each text field is too wide (by about 10%). Changing the letterSpacing property (to something negative) makes this more noticeable. I read on here about Font.registerFont(MyriadPro) but that doesn't seem to be doing anything. Does anyone know how to make CS5 behave like previous versions of Flash? I'm using Flash Professional on Snow Leopard (as part of CS5 Web Premium).

    Read the article

  • actionscript calling javascript with Security Exception

    - by Jeffrey Chee
    I have a swf hosted at domain A, and I have a html at domain B My swf is able to be loaded from accessing the html at domain B. However, the swf gets a SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller http://domainA.com/TrialApp.swf cannot access http://DomainB.com/. The as3 is just the below: ExternalInterface.call("javascript:_invite();"); I've also loaded the crossdomain policy file from Domain B during initialization. Security.loadPolicyFile( "http://DomainB/crossdomain.xml" ); How do I go about solving this? in my html, I have allowscriptaccess='always' Thanks in Advance

    Read the article

  • Auto generate SWF in Flex SDK

    - by Nick
    I'm building my first website with AS3, and I'm using Flash Builder 4 to create/edit my AS classes. I have two .fla files (preloader.fla and portfolio.fla) which I both published as .swc and loaded them into my ActionScript project in FB4 (build path). When I hit debug, FB4 automatically generates a .SWF in bin-debug folder called Preloader.swf, but in my Preloader.as I have new URLRequest("Portfolio.swf"); and this Portfolio.swf isn't being generated by itself. Now the real question; how can I tell FB4 to automatically create both .SWF files for me? Or isn't that possible, any workaround then? Thanks.

    Read the article

  • How to define enum in as3?

    - by Nava Carmon
    Is there a way to define an enum in AS3 in a way we do it in other languages? I can define constants with defined values like that: private const CONST_1:int = 0; private const CONST_2:int = 1; private const CONST_3:int = 2; and so on. If I want to insert some other constant between 3 these I need to move all values like that: private const CONST_1:int = 0; private const CONST_2:int = 1; private const CONST_2A:int = 2; private const CONST_3:int = 3; while in other language I would end up with only adding a new member to enum closure like that: enum { CONST_1 = 0, CONST_2, CONST_2A, CONST_3 } MyConstEnum; Does AS3 has something similar? Thanks

    Read the article

  • GUI Framework for flash (as3)

    - by widgisoft
    I can't seem to find any GUI framework's for as3 that are as good as any the applications I already see out on the web; Is this something most people code themselves or am I missing something in flash itself? I'm looking for dialogs/windows, buttons, text boxes, combos, drop downs, menus, etc etc and the ability to extend the components to make new ones. I'd also prefer it to be as3 but any others will do also. May need to elaborate a little.. I'm actually looking for a framework to allow me to create my own GUIs in flash, custom skins, colors, styles, etc.

    Read the article

  • Action script 3 bitmap glitch, alpha fade in out

    - by user150946
    I have actually solved this problem but it was a weird one so I will post it and my solution. I had a movie clip with several children each of which had it's own alpha settings. It also had a bitmap child object with a masked movie clip sitting on top of it. I was fading in and out the parent movie clip and was getting some odd results all of the alpha settings of the children were being removed and the bitmap was glitching and showing the contents of the masked object that was above it. The problem was that my alpha value for fully opaque was 100 (as in AS2) not 1 (as per AS3). It took me ages to work this out so hopefully this helps someone else.

    Read the article

  • could i get access to the loaded uri in actionscript for "loadmovie"

    - by softi
    i wanna load a movieclip inside another movieclip with loadmovie or anything like this. so my question is.... could have i access to the location of the loaded swf-file inside the loaded swf-file? example: swf#1 loads swf#2 inside itself, so now the swf#2 should check its own uri with an identical key.. but without access to the loaded uri... it would be hard to pass this step :-). is there any information given? as2, as3 dosn't matter.... could use both :-)

    Read the article

  • Context menu not firing when clicking on a line in a MovieClip

    - by Quandary
    Question: In Flash AS3, I have a furniture movieclip (converted from CAD) in another movieclip [to crop the border]. My first problem was that it didn't fire onclick at all. So I had to draw a background, and it started working when I did not click on a CAD drawing line. Then I checked mousevent.target for classname, and if it was not CustomMovieClip, I took object.parent.parent. That worked for onclick. But now I seem to have a similar problem with the contextmenu. When I right-click anywhere, I get the contextmenu, but the context menu event-handler doesn't fire if I right-clicked on a CAD line (but it works if I right-click on the background)... The problem now is it doesn't fire, so I can't take target.parent.parent.

    Read the article

  • Can hitTestPoint be used with local coordinates at all?

    - by mars
    In AS3 I have a game where a vehicle rotates to the direction of the cursor, but when it "moves", its sprite stays stationary in the middle of the stage while the map layer below it actually moves, causing the illusion of movement of the vehicle on the map. There are obstacles on the map that the vehicle cannot pass. The obstacles are in a movie clip that is a part of the map layer and move with it. hitTestPoint seems only to be able to check if the obstacle clip is touching points on the stage rather than points on the map, meaning that I cannot feed it the same coordinates I use to check the map boundaries, which are points on the map. I don't think I can use localToGlobal because the function I use to check obstacle collisions does not have access to a reference to the obstacle movie clip. Is there a way in these conditions to force hitTestPoint to use its local coordinate system on the map? I have included a diagram:

    Read the article

  • Registered Symbol Problem with Flash Mailto Link

    - by Nick
    The problem I'm having is an extra  Chracter being added before the ® symbol in the body of an email created from a mailto: link in flash. This only happens on the PC in MS Outlook Instead of: MasterCard®! It shows up as MasterCard®! The code in flash AS3: var req = new URLRequest("mailto:"); var variables = new URLVariables(); variables.body="Blah Blah Blah MasterCard®!"; variables.subject="Make some music!"; req.data = variables; req.method = URLRequestMethod.GET; addEventListener(MouseEvent.CLICK, onClick); function onClick(e:MouseEvent) { navigateToURL(req, "_self"); } } This works fine on the mac with mac mail.

    Read the article

  • Custom cell in list in Flash AS3

    - by Stian Flatby
    I am no expert in Flash, and I need some quick help here, without needing to learn everything from scratch. Short story, I have to make a list where each cell contains an image, two labels, and a button. List/Cell example: img - label - label - button img - label - label - button As a Java-programmer, I have tried to quicly learn the syntax and visualness of Flash and AS3, but with no luck so far. I have fairly understood the basics of movie clips etc. I saw a tutorial on how to add a list, and add some text to it. So I dragged in a list, and in the code went list.addItem({label:"hello"}); , and that worked ofc. So i thought if I double-clicked the MC of the list, i would get to tweak some things. In there I have been wandering around different halls of cell-renderers etc. I have now come to the point that I entered the CellRenderer_skinUp or something, and customized it to my liking. When this was done, I expected i could use list.addItem(); and get an empty "version" of my cell, with the img, labels and the button. But AS3 expects an input in addItem. From my object-oriented view, I am thinking that i have to create an object of the cell i have made, but i have no luck reaching it.. I tried to go var test:CellRenderer = list.listItem; list.addItem(test); ..But with no luck. This is just for funsies, but I really want to make this work, however not so much that I am willing to read up on ALOT of Flash and AS3. I felt that I was closing in on the prize, but the compiler expected a semicolon after the variable (list.addItem({test:something});). Note: If possible, I do NOT want this: list.addItem({image:"src",label:"text",label"text",button:"text"}); Well.. It actually is what I want, but I would really like to custom-draw everything. Does anyone get what I am trying to do, and has any answers for me? Am I approaching this the wrong way? I have searched the interwebs for custom list-cells, but with no luck. Please, any guiding here is appreciated! Sti

    Read the article

  • Learning C++ from AS3

    - by grey
    I'm a decent AS3 programmer. I work in games, and that is my reason for programming. While there is much I can accomplish with Adobe AIR, my understanding at this point is that learning C++ is probably a good direction to take. I would learn a lot of valuable lower level programming if I needed it down the road, and I would have an easier time learning other C oriented languages. I see a lot of information for people looking to learn AS3 who know C++, but not the other way around. Why C++? Cross platform compatibility is important to me, so I'm not particularly interested in C# or Objective-C at this junction. I'm also aware of HaXe, and while I love the concept, after doing some research I'm worried about investing a lot of time into something so recent with limited learning resources and documentation. I'm looking for advice and resources (books, articles) related to this topic. Thanks in advance!

    Read the article

  • Monitoring file upload progress in Actionscript 3

    - by helloworlder
    I'm trying to track the progress of a file upload in AS3, and I'm getting strange behavior. When I select a file and upload it, the progress is instantaneously 100% even if the file is 10 or more megabytes, but it's not finished. The onComplete event is fired about 30 second to a few minutes later (depending on file size) when the file has really finished uploading. I've tested this locally and on the server, the behaviour is the same. Has anyone else experienced this? Very frustrating ... Otherwise, the file is uploading fine. The code is simple: myFileReference.addEventListener(ProgressEvent.PROGRESS, onUploadProgress); function onUploadProgress(e:ProgressEvent) { var pctDone:Number = (e.bytesLoaded / e.bytesTotal) * 100; trace(pctDone); }

    Read the article

  • using html text in as3

    - by vincent
    Hello, i'm having a bit of a question, I have some newspost from my database. But there are tags in it and some tags aswell. My questiion is how i should go about it to get the newspost showing as it should be. The images should get shown instead of the tags etc. I know i'll have to work with a loader to use the images but how would as3 recognize them? Is there anyway i could use htmltext or something so as3 knows automaticly where the imagetags are? Also, if i add the image would it be possible to wrap the text around it? So i dont have an empty space next to the image?

    Read the article

  • Loading XML with possible infinite tags

    - by Firstmate
    (I'm doing this in AS3, but I'm sure the answer could be given in psuedocode) Basically, I have a XML file similar to: <Main> <Event> <Name>Blah</Name> <Event> Name>Blah2</Name> <Event> <Name>Blah3</Name> ... </Event> </Event> </Event> </Main> Yeah, to some extent it's poor design. But the idea I'm going for is that any Event has the potential to compromise of other Events and this idea kinda loops. Any ideas on how to do this?

    Read the article

  • AS3 get closest date to today

    - by fana
    Hi, I have a XML file with a few concert dates. In my flash/AS3 file, I would like to show only the up coming event, relative to current date. Like this: Event 01: 30-05-2010 Event 02: 02-06-2010 Event 03: 05-06-2010 Today is 28-05-2010, so I need to list Event 01. On 01-06-2010 I need to list Event 02. I have the basic AS3 code for listing the XML working, but I'm having trouble filtering the result. Any ideas? Thanks.

    Read the article

  • Is there something wrong with this code? AMFReader vs AMFWriter

    - by Triynko
    Something doesn't seem right about the source code for Flash Remoting's Date(AS3) <- DateTime(.NET) stream reader/writer methods, when it comes to handling UTC <- Local times. It seems to write the DateTime data fine, including a 64-bit representation as milliseconds elapsed since Jan 1, 1970, as well as a UTC offset. public void WriteDateTime(DateTime d) { this.BaseStream.WriteByte(11); DateTime time = new DateTime(0x7b2, 1, 1); long totalMilliseconds = (long)d.Subtract(time).TotalMilliseconds; long l = BitConverter.DoubleToInt64Bits((double)totalMilliseconds); this.WriteLong(l); int hours = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Today).Hours; this.WriteShort(hours); } But when the data is read... it seems to be ignoring the short UTC offset value that was written, and appears to just discard it! private DateTime ReadDateValue() { long num2 = (long)this.ReadDouble(); DateTime time2 = new DateTime(0x7b2, 1, 1).AddMilliseconds((double)num2); int num3 = this.ReadInt16() / 60; //num3 is not used for anything! return time2; } Can anyone make sense of this? I also found some similar source code for AMFReader here, which has a ReadDateTime method, that seems to do something very similar... but goes on to use the UTC offset for something.

    Read the article

  • Suggest the way to design several classes

    - by Oleg Tarasenko
    Hi, I'm building simple application on as3. Kind of starship game. What I want to do is to create several different star ships. Each one should have different images (different look), different sets of animation (e.g. when it's flying, burning, damaged), different kind of weapon and also different controllers (e.g. one can be managed by user, another one by computer, and I want to be able to reuse same ships for AI controller as well as for users controls). Each ship is created in the following way: Create entity Add spatial Add renderers Add other components.... ...... n. init the ship So what I am trying to do: 1) Create StarShip superclass, to store HP (as every ship has it), store spatial (same reason) 2) Create inherited class for any other ship... (It will contain renderer - (responsible for display part), weapon, set of animations), etc What do you think about such way of composition? Maybe it's better to place everything in super class, and then just create instances using long, long, long constructors like: StarShip(hp:HP, animations:DICT, weapon:Weapon, ....) Need advice

    Read the article

  • When I zip up my demo FlashDevelop project..why does it break?

    - by Ryan
    I built an AS3 image gallery using FlashDevelop. Before I zip up the application, I can run the image gallery in my browser by simply opening the index.html for the project. Everything works perfectly. I then zip up the project as proj-0.1.2.zip using winrar. I then unzip this newly created zip and try to load the application using the project index.html like above. The gallery doesn't function properly. From seeing what happens, it appears as though the image metadata is not present(but I'm not sure, see below). There are other applications as well that are broken. Videos don't load. If an application doesn't depend on any external assets then everything looks fine. Another thing..If I then build the FlashDevelop project and republish the swf..then it works in the index.html like I want. What is going on here? I want people to be able to fire up my demo apps out of the box by just running the index.html. If that doesn't always work and they have to figure out that they need to rebuild the SWF then that's pretty bad.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >