Load and control AS2 interactive SWF in AS3 and get properties of AS2 swf
Hi,
Can anyone please tell me how to load AS2 and AS3 swf file in AS3 Loader class. I have tried "ForcibleLoader.as, AVM1Loader.as, AVM2Loader.as but as of now I have not get successes yet. There are some issue in all library.
I am looking for below solution.
1) Load SWF file AS2, AS3 via flashVars params and load it in AS3 player.
2) After successfully loaded, below properties should be shown -
a) totalFrames
b) currentFrames
c) FPS of loaded swf file
d) Should wok play(), stop() properties of loaded swf file.
e) SWF file should work just like video player application where we can do Play, Pause, Stop, Seek (All properties and methods
should be supported. )
3) Player should be capable of loading all swf file regardless of any version AVM1 AVM2 both in AS3 Player.
4) After loading player should scale external loaded swf file as per Player stage width and height and content should be scale
proportionate in 4:3.
4) AS2 & AS3 action script must be supported in AS3 player. (All interactive swf file should be supported)
Thanks
http://gskinner.com/blog/archives/2007/07/swfbridge_easie.html
Similar Messages
-
I was wondering if anyone has tried to install Home Monitoring and Control with a third party monitoring, and or controlling the same devices. I know many systems offer multiple control points such as auxilary control touch screens. Has anyone made this work? I have Z wave devices on my home security system (lighting), and would also like to monitor them via Verizon. Possibly also adding some energy monitoring and control, that is not available via my security company. My security monitoring company provide support through Alarm.com, but has limited energy monitoring to thermostat control and such.
The only interactive control with my security company is for alarm monitoring and control, with limited lighting control. All of my devices are GE in the wall mounted lighting controls, and I would prefer to pay Verizon the few extra dollars for the additional features VIA the web, rather than pay Verizon. There used to be an energy package, that included the main power panel load and I thing Thermostat, but I believe some of the bundles have been split up.
There are other options out there now, but I have neen exploring. My GE Switches are from the Lowes Iris system. Much less expensive, and can replace existing wall switches, not like the power cord switches. Plus the store is four miles from my house.I started with Verizon home monitoring, but if you read through the threads the service is extremely unreliable, still to this day. I am stillusing it, although I am waiting for a refund on the services that I have used since it is so bad but I bought a MiCasaVerde Vera3 system. You pay appoximately $300 for the unit and there is no monthly charge and you get all the features plus pretty much unlimited types of z wave devices to use on it. I would seriously consider using that before Verizon.
-
Hi, i have facing some problem during i upgrade a project. This project is an opened loop system, it only achieved up to controlling the speed of motor, detecting the speed of motor, and switching the direction of motor while controlling the motor (This motor is a 12 VDC motor).
In order to improve the project, closed-loop dc motor control system will be implemented to correct the error of the motor's speed and maintaining the speed for the initial setting. I would like to use PID control method to do the closed loop system.
I already installed the PID toolkit V8.2 and control design toolkit V2.1.2, and i'm using DAQ usb 6221, LabVIEW 8.5
Below is my problem.
http://img177.imageshack.us/my.php?image=howtocreatethesetpointnx2.jpg
question: 1. How to generate a icon for set point? my setpoint is duty cycle...
2. How to feedback the output duty cycle to summing junction?
below this is my basic concept
http://img237.imageshack.us/my.php?image=closedloopbz5.jpg
Problem 2:
http://img357.imageshack.us/my.php?image=problem1yk2.jpg
question: Why PID toolkit icon cannot wire to cd series.vi?
Below is my original program...
http://rapidshare.com/files/140538836/pwm_generate-final_PSMII.vi.htmlHi Cyrus
Have you had the opportunity to see our
developer zone site on the PID toolkit? This article also has sample
code at the bottom that may help you in developing your application. I
have also linked below knowledge bases regarding setting a point
profile and generating a PWM from a digital output line.
PID toolkit
http://zone.ni.com/devzone/cda/tut/p/id/6440
How to generate a set point profile:
http://digital.ni.com/public.nsf/allkb/125F27AC143B6AFD86256C2B0004A4DC?OpenDocument
How to generate a PWM on a digital output line:
http://digital.ni.com/public.nsf/allkb/1561D31534F07D608625727900391114?OpenDocument
Thank You
Eric Reid
Thank You
Eric Reid
National Instruments
Motion R&D -
Load AS2 swf into AS3 swf problem
I have a flash with AS3 and inside this swf i load in a AS2 swf.
to load swf works just fine, but the problem is when i load this i want to go to
a specific part of it, for example i want to go to frame 3 in the loaded swf.
i must control this from the AS3 swf, does someone know if this is possible?
thanks in advanceso can i do like this then to go to frame 3 in my loaded swf?
MovieClip(ldr.content).gotoAndStop(3); ?
sorry for being such an airhead
thanks for helping me out =)
Date: Sun, 7 Jun 2009 10:25:09 -0600
From: [email protected]
To: [email protected]
Subject: load AS2 swf into AS3 swf problem
no.
if, in your loaded swf, you have a function f1() on the loaded swf's main timeline and you load that swf using a loader (say ldr), use:
MovieClip(ldr.content).f1(); // to call f1() in the loaded swf
> -
AS3: How to access and control embedded sounds in an external swf?
I rarely use sounds in AS3/Flash. I am using Flash Pro CS6, but I can't seem to figure out how to access, control (play, stop, etc) sounds embedded in an external SWF loaded into the main SWF.
It's easy to control them when embedded on the main swf. However, on an externally loaded SWR, I get all kinds of errors. For this app, I really need to embed them in the external SWF.
I read several solutions, but none seem to work.
I embed the sound an mp3 file called soundSegment1.mp3 using Flash CS6 import tool and then open the actionscript properties panel on flash to select the class name: SoundSegment1. Then I edit the class code and create a file called SoundSegment1.as and it's saved right next to my document class main.as in the same directory. The code of the SoundSegment1 class looks like this:
package {
import flash.media.*;
public class SoundSegment1 extends Sound
public function SoundSegment1 ()
// no code in here
public function playSound()
var soundSegment1:Sound = new SoundSegment1();
var channel:SoundChannel = soundSegment1.play();
Then, in my main.as, I have done several attempts to play this sound such as:
var fileLocation:URLRequest = new URLRequest(SWFToLoad); loader.load(fileLocation); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeListener); loader.contentLoaderInfo.addEventListener(Event.INIT, initListener);
function initListener(e:Event):void // I also placed this code on the completeListener and it didn't work { loader.content.soundSegment1.playSound(); // doesn't work. }
I get:
Line XXX 1061: Call to a possibly undefined method playSound through a reference with static type flash.display:DisplayObject.
or, I also read that I should be able to do something like this anywhere in the Main.as file:
var theClass:Class = Class(loader.content.getDefinitionByName("SoundSegment1")); var theSound:theClass = new theClass(); theSound.play() //doesn't work either.
I also tried on the completeListener:
var TheClass:Class = e.target.applicationDomain.getDefinition("SoundSegment1") as Class; var theSound:TheClass = new TheClass();
theSound.play() //doesn't work either.
I get:
ReferenceError: Error #1065: Variable SoundSegment1 is not defined. at flash.system::ApplicationDomain/getDefinition()
I am stuck and I really need to get this to work. I would be genuinely grateful for your help.
Thank you in advance for any help provided. I really need to get it to work, because I can't simply embed them in the main SWF or load them individually externally one by one.
Thanks again!THANK YOU!
I think your code may be over my head though. I think you are using an anonymous function which is not something I am familiar with (but I want to learn about if it's useful).
I also don't know where the classS came from. I see that it's a parameter sent along with the event, but I don't really see where that came from.
Someone at: http://www.kirupa.com/forum/showthread.php?305098-Playing-a-embedded-sound-in-an-external- swf&p=2658098#post2658098
Is showing what seems to be an easier solution, but my problem there is I can't access the source file of the "child" swf.... ayayay.....
I am going to tinker with your solution and see if it gets me anywhere. Thanks so much for your help again. -
Hi All,
I am new to this forum.
Can anyone tell me how to load as2 swf in as3?
If this is possible,can anyone give me some sample example?
Thanks
HarshalYou can talk to loaded AVM1 (AS1/2) SWF using LocalConnection. I used Grant Skinner's SWFBridge class in the past and worked very well:
http://gskinner.com/blog/archives/2007/07/swfbridge_easie.html
Kenneth Kawamoto
http://www.materiaprima.co.uk/ -
Loading external swfs and controlling their actionscript
I'm in need of some tutorials/examples for loading external
swfs placed in empty movie clips using loadmovie into the main
movie.
I have actionscript and alot of interactive features within
these loaded swf files and I'm having a heck of a time figuring out
how to code and path the AS from them to work in the main timeline.
I'm also open to using loadMovieNum and working with levels
if it might be easier, however I'd like to keep this as simple as
possible.
PLEASE ANY HELP!!!????I am by no means an expert however it is my understanding
that if you have a loaded swf within your main application and you
wish to control features on the main timeline you need to use the
_root function.
Without knowing exactly what type of controlling you need
it's hard to explain in great detail. -
301 unable to load plugin"controls" url'flowplayer.controls-32.13.swf What is this and how to reapair this?
I have no idea what to do.Probably because "latin-9" doesn't exist?
# nano /usr/share/X11/xkb/symbols/fr
xkb_symbols "latin9" {
include "latin"
include "nbsp(level3)"
name[Group1]="French (legacy, alternative)";
key <TLDE> { [ oe, OE, leftdoublequotemark, rightdoublequotemark ] };
key <AE01> { [ ampersand, 1, dead_acute, periodcentered ] };
key <AE02> { [ eacute, 2, asciitilde, Eacute ] };
Try it without the dash (without the "-").
And don't forget to mark it as solved (by editing the first post). -
Hi,
I want to know if you can load an SWF into another SWF and
control it for example:
load SWF b into SWF a and control SWF b from SWF a
is this possible because I want to be able to trigger a
particular mc or frame in SWF b but do it from SWF a?
Cheers
Scott
Text
Textyes and yes: wait until loading is complete and then
reference the target movieclip or _level of your loadMovie(),
loadMovieNum() or loadClip() method. -
I have a swf (written in AS3) that loads other swfs into it.
There are no issues when loading other AS3 swfs but there is a
problem loading AS2 swfs. I get the following error:
TypeError: Error #1034: Type Coercion failed: cannot convert
flash.display::AVM1Movie@35d3a51 to flash.display.MovieClip.
Is there any way to convert the AS2 swf into a AS3 swf so it
will be compatible with my loader? I cannot go back and change the
AS2 swfs because I do not have the fla files. Or is there any way
to incorporate AS3 code that will load AS2 swfs properly? It seems
hard to believe that Adobe would neglect this backwards
compatibility issue. ThanksHello Andrei1,
Thanks for looking at my simple AS3 code. The AS2 swfs that
I've been working (and having difficulties) with are components
that I've purchased from places like www.flashden.com. Some are
image transitions (such as "Dynamic Image Draw found at
http://www.flashden.net/item/dynamic-image-draw/7532)
while another is used to create a looped banner rotator animation
(IMG_loop, a free d/l from www.afcomponents.net). I have another
that uses an .xml file to configure a slideshow animation.
You mention "needing to do more" if AS2 scripts inside its
swf are to be run by the parent AS3 fla; what would these lines of
code be?
In researching my problem further I've since realized that
most of these issues deal both with the version of AS used, as well
as the version of the Flash player the fla is set up to animate
for. In particular, the "Dynamic Image Draw" component requires
that Flash Player 8 or 9 be used with AS2.
Given that many of my purchased components are like this,
I've since changed my main fla movie from AS3 back to AS2 and have
learned that the scripting needed to call individual multiple swfs
into it at various points in the timeline is MUCH simpler!!!!! One
single, easily interpreted, line of code vs. 5 lines using
variables and much more arcane (to me) function calls.
I started my file with AS3 figuring that I'd be better off
learning the new version of the language; much stress and
forehead-rubbing later, I've seen just how much easier and
understandable AS2 is to learn.
I recognize that there are likely very strong arguments for
the more structured coding approach used by AS3, but for someone
like me who wants to generate customized Flash presentations with
little fuss, I'm not qualified to make them.
Perhaps this is a no brainer for those many flash gurus out
there, but for me this tiny bit of wisdom has been hard fought for!
That being said, is there an easy way to convert a swf file
created using AS2 to something that AS3 can work/interact with?
I've come across a free d/l product called actionscript bridge, but
haven't been able to understand how to get it to work. -
Captivate 4, interaction SWF using XML and the Reviewer tool Problem
Hello everyone!
I am an advanced AS3er and am only months old working with Captivate 4. I've found some cool ways to use Captivate and incorporating swfs that use CSS and XML for their dynamic content builder and interactivity as well. However, I've run into a problem:
The Reviewer tool will NOT display my swf interactions that use XML, however when published as a course, I can see them perfectly fine (once I move over my css and xml folders after publishing)
Has anyone found a work around for this problem?
Thanks in advance!Hi,
Not sure if you want to control the audio used in Captivate of if you want to control you own audio form files loaded externally. If you try to control the audio associated with captivate, believe me it will be a mess. I tried it once and hit so many hurdles that I gave up. The Captivate framework is not meant at all for extending and adding functionality. I had to to create proxy classes that allowed me to gain access to internal variable but even then my control over audio streams was incomplete. Captivate completely lacks an eventing framework!
On an other subject, can you tell me how you got the swf to use the CSS and XML files? Do you have to manually copy them to a folder? Which folder?
Thanks,
Yves -
I have been producing a VI that loads a set of data and displays it in a table: A table control is initialised with an empty variable, the loaded data takes the place of the variable and fills the table, while some headers are added. That table feeds an intensity graph to give a pictorial impression of the data.
With this scheme, a user can change any value of the table, and the changes are interactively reflected on the graph.
Problem: after few saving of the VI, the access to the table doesn't work anymore. It is the same with all my numerical controls in the VI where it should be possible to enter a value.
If anybody has an idea on the potential
causes of these problem, I would be really grateful as it is very useful...when it works !
Regards,
Elie AllouisI can not image what is causing the error. Would you be willing to post some code to see if we can reproduce the problem?
Jeremy7 -
I'd just like to check something. When I was trying out a bit
of as3, I tried having as3 objects, but as2 code on the timeline,
so I'm guessing that you can't nest or load as3 objects inside as2
movieclips because it probably treats everything like it's as2, so
as3 objects don't work..
But does it work the other way around? To have as3 objects
nesting as2 "objects" or loading as2 swfs?
Or is it either-either, no mixing whatsoever?you can load as2 swfs into as3 swfs. to communicate between
the two, use the localconnection class. -
I want to load external swf in movieclip and next external swf should load Automatically
I want to load external swf in movieclip and next external swf should load Automatically when current swf is finished in AS3.
How can we can check total frame and current frame of imported swf in a movie clip.
any help will be appreciated
regards,
Jatin Demblain as3 you use the loader class (not movieclips) to load external swfs.
you can use an Event.COMPLETE event listener (applied to the loader's contentLoaderInfo property) to check when loading is complete and start the next swf loading.
you can use the loader's content property (caste as a movieclip) to determine info (including totalFrames) about the loaded swf's main timelnie (once loading is initialized, for the totalFrames, or complete, for some other properties like height and width).
var loader:Loader=new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadcompleteF);
loader.load(new URLRequest("swf1.swf"));
var loadedSWF:MovieClip;
function loadcompleteF(e:Event):void{
loadedSWF=MovieClip(loader.content);
trace(loadedSWF.totalFrames); -
Sup buddies,
How can I control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?
As the project grows in size the load time increases. How does one control not loading all images ,divs,elements etc. until they're
needed on the timeline? For example some sections are off and only become visible when recalled. My projects slowly grow in size so loading
all images , is counter productive . My other option would be to create separate htmls but that breaks the seamless user experience .
TY...Over N Out...hello, kiwi
quote: "Is there an easy way to burn a completed project to DVD, but keep only the (lo res, lo size) previews on my hard drive?"
yes.
maybe,...
1. you might think of making DVD backups first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
or,
2. bring in the photographs to hard drive first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
the low rez Previews will stay in Aperture but the high quality Versions will be exported onto DVDs and gone from the hard drive (if you delete the originals).
another way would be to export small about 50-70 pixel wide high quality jpegs to a folder on your Desktop and import & keep these in Aperture Library as a reference. make metadata to show where the original Project DVDs are stored and DVD filing system used.
victor
Maybe you are looking for
-
Hi I would like to receive information and maybe an example on how do I could develop a pluggin or perferable JavaScript to read the DOM and present to the user information about the objects found to the Acrobat user. Thank you.
-
7200 rpm disk in MacBook?
Hi, at AppleStore it says that you can invidualize your MacBook with a faster hard drive for better performance, but there are no option to choose anything faster than 5400 rpm, only different sizes or solid state. Is it or isn't it possible to get a
-
ClassCastException while looking up RMI objects bound to weblogic.JNDI under WLS 6.1
We deploy a servlet (in a single .war archive) establishing a RMI connection to an external Java object bound into weblogic JNDI (WLS 6.1). We get a ClassCastException on invoking JNDI lookup: Servlet failed with Exception> java.lang.ClassCastExcepti
-
Schema level with particular partition tables
Hi All, I need to export all objects ie. schema level option but I need to export the particular partition of a table.. ie. i need EXCLUDE particular partition data for schema level back up. Kindly suggest me how to archive the above.. Thanks & Regar
-
My iphone 4s is not charging. It has been on the charger for over 4 hours.
my iphone is not charging. The screen shows a battery, with sliver of red, and a lightning bolt, while on the charger. The Apple frequently appears and then disappears and the red batter/lightning bolt appears. I have tried several different charge