ActionScript 3.0 :: Can't Interact With Loaded SWF?
Dec 9, 2010
The following code loads the external SWF just fine and displays it in the correct position. The SWF plays automatically as it should and stops at the first stop statement, as it also should. However, my mouse doesn't recognize any buttons. All text that is TLF read only can be selected. The SWF playes perfectly on its own, but loaded into the main SWF, all user interactions are not working. Here's the code:
I'm currently having a little trouble in a project where I have the following occuring: Code: preloader.swf --- loads 2x --- homepage.swf --- can load --- products.swf
When the products.swf is loaded, the starting animation occurs as expected and is displayed on the screen without an issue. However, I can't interact with any of the buttons contained in the products.swf. The products page works like an overlay over the top, and the homepage.swf contains an background which can be clicked on to close the overlay. If you click on the products.swf it reacts as if the background was clicked, which it shouldnt as the products.swf is located on top of the background.
I have already checked the obvious parts, and am ensuring that products.swf is located at numChildren-1, so nothing is getting in the way. The catch is that everything was working fine when the code was internal to the fla, and now as soon as I moved the code to an external .as file nothing works. I am using the same way of loading the products.swf as I am loading the homepage.swf, which looks like:
Code: var productsLoader:Loader = new Loader(); productsLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onProductsCompleteHandler); productsLoader.load(new URLRequest("products.swf")); onProductsCompleteHandler: [Code] .....
I'd like to know how to interacte with an FLV playing in a Flash file?I have an FLV of a person talking and I'd like to make icons pop over her (in the FLV) on a blue screen and make em clickable to go to another page (getURL).
I embedded a swf file in my application [code]now with the help of the flex documentation I wanted to interact with my loaded swf by creating a SystemManager.[code]But when starting the application the error#1034 occurs and says that Main__ embed_ mxml_mod_ VideoModule_ swf_856293516@33f53c1 could not be converted into mx.managers.SystemManager.
I have an app written in adobe flex (action script 3) that I want to have interact with a web service. Because it appears I can't access the server, I've created a simple app. Source code for the ActionScript
I'm working on a web application which displays a 3D model (Acrobat 3D PDF file) and allows users to interact with the model. I need to be able to communicate with PDF from the web page: 1) Programmatically highlight a node in the 3D PDF (given the node name) when, say, the user clicks on a list item referencing that node name in the web page 2) The reverse way, know which node the user selected in the 3D PDF so I can highlight that node name in the web page.
My questions: a) The UI of my page is Flex. Is it possible to do this interaction directly from Flex? b) If not, is it possible to do this from browser javascript? (which I will in turn call from Flex) I have seen an article on browser-pdf communication [URL] but am not sure if 3D objects can be accessed from external browser javascript. c) Or does the Acrobat Reader ActiveX control expose methods to perform these operations from browser javascript? d) Lastly, do folks have any recommendations based on their experience, on which 3D CAD viewer software integrate with browsers and enable this kind of interaction? (Apart from Acrobat 3D, I am evaluating a few such as 3DVIA Composer Player).
I'm triyng to use the Facebook AS3 API but it's actually inconsistent. Frustrating.I'm thinking to use the Javascript SDK, from an Flash/AS3 based app, using the ExternalInterface object, and the addCallback method...
I need (for a project I'm working on) to act on a MC that is outside of the MC containing the button and the script. but it seems I'm unable to do it.let's say I have two MC, let's call one MC_1 and one MC_2.now, I want to set alpha of MC_1 to 0 via a button included inside MC_2.it simply don't works as inside MC_2 there's nothing with instance name "MC_1". I can act on any MC inside MC_2, and on MC_2 itself (using "this"), but not on something "outside" it.there's a way to interact from inside a MC to the outside of it?
I am set to learn all I can about flash. Here's my first problem: Code: stage.addEventListener(Event.ENTER_FRAME,go); function go(e:Event):void { bijtje_mc.x=mouseX; bijtje_mc.rotation=Math.random()*20; bijtje_mc.y=mouseY; [Code] .....
I am not sure if the Mouse events are suited.. but the biggest problem is the MC's, I think. I want the mouse to interact with them.. just like a button you know. Made 3 different MC's, one for when its idle, one when MOUSE_OVER, and one when you click it.. they are on frame 1 , 5 and 10. The problem is.. the mouse cursor isn't interacting with anything.. the custom cursor "bijtje_mc" does work though.
I'm programming my game using Flash Builder 4, in an "ActionScript project". I'm not using Flex. I want to build my menus and cutscenes in Flash Professional, then export them as SWF and embed them into my final project.Embedding the SWFs works fine, I do something like this:
Code: [Embed(source = 'test.swf')] private var SwfClass:Class; var myMovieClip:MovieClip = new SwfClass(); parent.addChiled( myMovieClip )
My problem is that I can't access the buttons and other elements of the SWF that I need to communicate with and manipulate. For example, the main menu will have a "Play" button. I need to know if that button has been pressed. The level select screen will have a "Best Time" text field, that should show the player's best time on a level - this text needs to be set. But I can't figure out how to access these things.
I don't think that the children of the MovieClip are visible within my Actionscript project - it seems like the SWF is loaded in as one big "chunk" that can't be interacted with (it plays fine though).So what is the best way to interact/communicate with an embedded SWF? I've found a bit of information on the topic, but usually people are talking about using Flex or loading in external SWF (which seems to behave different from embedding). Is there even a way to do this?
I created several SWF files, now i want them to interact with each other So there is main SWF file lets call it: main.swf then within that file(main.swf) I would like to create buttons which will be calling other swf files for instance by pressing one button one.swf will be open by pressing other button two.swf will be open and so on. Then I would like to create buttons within one.swf and two.swf which will allowed to go back to main.swf.
If a swf file is destined to be loaded into a container file and interacted with from there, is it considered better practice for the code for the interaction to reside in the loaded file or the container file? I am writing on the timeline, rather than creating classes. Also if a movie clip on the stage contains buttons with event listeners attached and I remove the movie clip as a child, do the event listeners disappear with it, or should i remove them separately?
I have a Flex application with wmode=transparent and a transparent section that allows whatever is underneath it on the HTML page to show through. In this case, what's showing through is another Flash application. This works fine, but I can't interact with the Flash application showing through.
I tried setting the z-index of the Flash app to something greater than my Flex app, and that worked, but unfortunately that solution doesn't work for my case because the Flex application has components that occasionally overlay in that area, and setting the z-index of the Flash app to be higher means those components are always stuck behind it.
I'm currently working on a corporate intranet application. Part of the requirements are to have the application start a program on the users local PC (Minitab) and then have the webapp communicate with it via it's COM interface.
What are my options for doing something like this?
A signed Java applet and Jacob ActiveX and .NET (this will only work in IE, correct?) Flash? (can flash be given permission to the local PC?) Silverlight???
I'm leaning towards trying the java approach (all users will have Java and flash installed) but am wondering what's the path of least resistance.
The application runs from Apache2/Python/modwsgi on Gentoo Linux. All users will be running WinXP or Win7 with Firefox or IE6/7/8.
I have a list with a itemrenderer. When I put a button in the itemrenderer I can not interact with it. If I rollover the button the list item rollover is triggered but not the button's rollover. I can't click on the button either. You can see below I have a click event set in the itemrenderer and it is not called on click when I run app. Must I override rollover and click methods of itemrender? Why is it such a pain to put a button in an itemrenderer?[code]...
I am trying to create an automated program in Python that deals with Flash. Right now I am using Python Mechanize, which is great for filling forms, but when it comes to flash I don't know what to do. Does anyone know how I can interact with flash forms (set and get variables, click buttons, etc.) via Python mechanize or some other python library?
I have a movieclip on stage: I load inside it a form (via addChild). The form is made of textfields and movieclips and it is contained in a library object of MyForm class, extending MovieClip. So I have:
var myForm:MyForm = new MyForm(); myClip.addChild(myForm);
What happens: the MyForm class lets me interact with textfields (if I change a value of a textfield I can see it very clearly). But I can't manually reach the input textfields and the buttons (they don't respont to pressure, and I can't modify their content in the case of textfields). There seems to be something related to the fact that MyForm is contained inside myClip because if I load the form without the myClip container anything works again. I tried to use mouseChildren and mouseEnabled on myClip but it doesn't work.
I am looking for advice how to set web pages where user can interact with it using microphone. The aim would be that user can say word and the word would be recorder and the file compared on server with another sound (word) and then the result (the searched word) would be displayed. It would be a spoken dictionary.
I have 4 bars that they interact with a rollOver event. On each bar movieclip I have another movieclip that I want to do some stuff with the onRelease event but it doesn't work. If I don't use any action on the bars, the command this.mc.mc.onRelease... works fine.
I have a menu and each button reveals a hidden layer which includes it's submenu (another swf).The submenus have sub-submenus in the same swf.
When I take the mouse away from these layers the submenus hide again.All these work.
The problem is that when a sub-submenu is opened and then the layer hides, when it's shown again the sub-submenu is still opened.Is there a way to clear memory or unload a swf file through html or through the main menu swf?
I have a game that has 13 stopped slides. after completing each stage, you get to the next frame. is there anyway to have one frame interact with an object from a different frame?
I have written a library. This library has a function that has an argument being a function. Actionscript Code: //(its static)class MyClass { function foo(method:Function):void;}
I have created over 30 functions that are acceptable as an argument to that function. But they raise the file size by 6kb alone! So I've found that most people won't use more than an average 6 functions in a program, so why use all that extra space? I am trying to find a way to have all of these functions available in their own 'namespace' so that compiler only puts in the functions that are referenced specifically. I also want a way that I can still force all of them to be compiled in (like a manifest).
Below, is how these functions are currently setup: Actionscript Code: class MyClass { function foo (method:Function):Array;}class Methods { function bar1 (param1, param2):void; function bar2 (param1, param2):void; function bar3 (param1, param2):void; function bar4 (param1, param2):void; etc...}
I really just want personal preference input here. If you were using a library that was built this way, how would you want to interact with these interchangeable functions?
Options:
1. Package Level Functions: Make them all package level functions. You would import one at a time. Actionscript Code: package com.net.methods { function bar1 (param1, param2):void; }package com.net.methods { [Code] .....
To cover the manifest problem, I could create a class that imports all of the functions, then all you have to do is reference that class in any class. Actionscript Code: package { import com.net.methods.bar1 import com.net.methods.bar2 import com.net.methods.bar3 import com.net.methods.bar4
2. Grouped by Functionality: Another idea is to group the function by commonality. Actionscript Code: class Xbased { function bar1 (param1, param2):void; function bar2 (param1, param2):void; function bar3 (param1, param2):void; [Code] .....
3. One Class, One Function Lastly, I guess you could make a separate class for each function. Maybe this would give me greater flexibility in the end but that is unclear. Actionscript Code: class bar1 { function execute (param1, param2):void; }class bar2 { function execute (param1, param2):void; [Code] .....
I have a Flex project in which I am embedding a Flash SWF containing an image viewer. The SWF file I'm embedding is supplemented by an XML file, which contains a list of images to show, and an images folder containing the images. The problem I'm running into is that the embedded SWF file is unable to load the pictures. I am able to see the forward/backward navigation buttons, but there are no loaded images. When I view the SWF file outside of the Flex project it works fine. Is this because Flex isn't allowing the SWF to reach outside and access other project assets?
Here's my code for embedding the SWF: <mx:Script> <![CDATA[ import mx.controls.Image; import mx.events.CloseEvent; import mx.managers.PopUpManager; [Code] .....
My goal is to build a program trader for the upcoming CNBC porfolio challenge. I need a way to collect quotes, current positions and place orders in the flash object.
I have a win32 window in which I have a child window which runs a swf. Thus i have a swf running inside my main win32 window created using c++. Now how can i make the events of flash(swf) appear in my c++ code. For example how can i send a string from my flash to c++ ?
Does ExternalInterface help in this regard ? If yes, then how can c++ recieve what flash sends ??