Urgent: Passing Metadata to SWF loaded via SWFElement?
Hi!
my problem: I have a SWF-Animation made in Flash. This animation will be loaded via a OSMF-Plugin as an overlay (SWFElement in ParallelElement). That works perfectly so far. But now I have to pass some Text (Metadata) to the SWF. Passing the metadata to the plug in works. But how does the plugin inject the metadata into the SWF or how do I access the metadata within the SWF?
Any ideas?
Thanks in advance,
Simon
Since the forums were down I played around on my own. I came up with the following solution.
I'm not sure if there are better ways that are more straight forward (e.g. with metadata etc.) but it works fine so far.
override public function set proxiedElement(value:MediaElement):void {
log( "proxiedElement was set" );
var overlayResource:URLResource = new URLResource( OVERLAY_URL );
var overlayElement:SWFElement = new SWFElement( overlayResource );
overlayElement.addEventListener( MediaElementEvent.TRAIT_ADD,
function(e:MediaElementEvent):void {
if ( e.traitType == "displayObject" ) {
var el:SWFElement = e.currentTarget as SWFElement;
var dot:DisplayObjectTrait = DisplayObjectTrait( el.getTrait( MediaTraitType.DISPLAY_OBJECT ) );
var loader:Loader = Loader( dot.displayObject );
if ( loader.content.hasOwnProperty( "setMetadata" ) ) {
Object( loader.content ).setMetadata(
{ title: "Grant Skinner", details: "FITC 2011 - Amsterdam" }
var layout:LayoutMetadata = new LayoutMetadata();
layout.width = 520;
layout.height = 100;
layout.bottom = layout.left = 0;
layout.index = 999;
overlayElement.addMetadata( LayoutMetadata.LAYOUT_NAMESPACE, layout );
var durationElement:DurationElement = new DurationElement( 5, overlayElement );
var parallel:ParallelElement = new ParallelElement();
parallel.addChild( durationElement );
parallel.addChild( value );
super.proxiedElement = parallel;
Similar Messages
-
Passing in movie to load via loadmovie from page
Hi all,
My page loads a default swf using SWFObject, which in turn
loads other swfs containing page content. Using SWFObject, I have
non Flash content for the default page that loads if the flash
player is not present.
I would like to have each flash page replicated as an HTML
page, passing the flash page to load into the default Flash page.
For example, if the user visits mysite.com/aboutus.cfm, the
page should pass in aboutus.swf as the page for default.swf to
load, or if the user visits mysite.com/services.cfm, then
services.swf should be passed in to the default.swf movie.
I have tried the method shown on
http://blog.deconcept.com/swfobject/,
using:
<script type="text/javascript">
var so = new SWFObject("default.swf",
"flash", "760", "800", "9", "#FFFFFF");
so.addParam("wmode", "transparent");
so.addParam("allowscriptaccess", "samedomain");
so.addVariable("movieToLoad", "homepage_v1.swf");
so.write("flash");
</script>
but this fails to load the movie "homepage_v1.swf" using the
following in my default Flash page:
// LOAD DEFAULT PAGE
loadMovie(_root.movieToLoad, 10);
Any advice on where I am going wrong?
TIA,
PaulThank you clbeech,
I think you may have misunderstood me (if I have not
misunderstood you).
My reasoning for doing what I am is that each flash page will
have its own search engine friendly html page, for example
aboutus.html. All pages will contain an html version of the site
complete with links, which will be replaced by the swfobject for
browsers with Flash capabilities.
So once google (without Flash player) has indexed all my html
pages, if a user clicks on the google result for about us, the
aboutus.html page will load, which will then load the default Flash
movie, passing in a variable telling it to load aboutus.swf as the
default page. If the user clicks the result for services.html, that
html page will load, which will again load the same default flash
page, passing in the variable telling it to load services.swf.
It all works when hardcoding the swf to load into the first
frame as outlined in my snippet above, but does not seem to like
the variable name.
Any other ideas anyone?
Thanks,
Paul -
If I load an external swf:
my_loader.load(new URLRequest("abc.swf"));
addChild(my_loader);
abc.swf starts playing - how do I get it to tell the main movie that it reached the end of its timeline and finished playing? Added bonus: the loaded swf is AS1 and the main movie is AS3. I'm not sure if I could convert the loaded swf to AS3.
Thanks,
SeanI have not used this component but it may work for you:
http://www.jumpeyecomponents.com/Flash-Components/Various/ActionScript-Bridge-91/ -
SWF LOAD UNLOADING SWFLOADER ISSUES
Hello Everyone,
I wonder if anyone ran into this issue. I have a view stack
with 3 visual screens. One of the screen has SWFLoader placed in
with "id = contentLoader";
I have two buttons on this screen on the top: "LOAD MOVIE 1"
and "LOAD MOVIE 2".
So pretty much, user can load the movie into the SWF LOADER
via this two button navigation. Well, I am able to load the first
movie with "AUTOLOAD". But when I click for the "LOAD MOVIE 2", the
second movie does load in but then the application crashes and
closes itself.
My Questions:
How can I unload the currently loaded SWF Movie before
Loading the next one. I have searched for days for this on google
and nothing has come through.
ContentLoader.unloadandStop() doesn't work and application
still crashes.
ContentLoader.source = ""; doesn't work, app still crashes
ContentLoader.source = null; doesn't work, app still crashes
Any help would highly be appreciated on this, please.Hello Everyone,
I wonder if anyone ran into this issue. I have a view stack
with 3 visual screens. One of the screen has SWFLoader placed in
with "id = contentLoader";
I have two buttons on this screen on the top: "LOAD MOVIE 1"
and "LOAD MOVIE 2".
So pretty much, user can load the movie into the SWF LOADER
via this two button navigation. Well, I am able to load the first
movie with "AUTOLOAD". But when I click for the "LOAD MOVIE 2", the
second movie does load in but then the application crashes and
closes itself.
My Questions:
How can I unload the currently loaded SWF Movie before
Loading the next one. I have searched for days for this on google
and nothing has come through.
ContentLoader.unloadandStop() doesn't work and application
still crashes.
ContentLoader.source = ""; doesn't work, app still crashes
ContentLoader.source = null; doesn't work, app still crashes
Any help would highly be appreciated on this, please. -
Access the SWF loaded by a SWFElement?
Is there a way to access the SWF loaded by a SWFElement? For example in a plugin, load a SWF, then pass data to the SWF and or listen to event broadcast by the SWF.
Well we got it working. Excluded classes make the framework really frustrating at times.
What we ended up doing is creating a new media element that extends MediaElement and just did our own loading and then applied the Loader/DisplayObject via a DisplayTrait. -
Revision: 13855
Revision: 13855
Author: [email protected]
Date: 2010-01-28 09:44:32 -0800 (Thu, 28 Jan 2010)
Log Message:
Modify plugin framework code to automatically pass MediaFactory to PluginInfo.initializePlugin via the existing metadata namespace. Update unit tests.
Modified Paths:
osmf/branches/sprint9-candidate/framework/OSMF/org/osmf/plugin/PluginLoader.as
osmf/branches/sprint9-candidate/framework/OSMFTest/org/osmf/plugin/TestPluginManager.asRevision: 13855
Revision: 13855
Author: [email protected]
Date: 2010-01-28 09:44:32 -0800 (Thu, 28 Jan 2010)
Log Message:
Modify plugin framework code to automatically pass MediaFactory to PluginInfo.initializePlugin via the existing metadata namespace. Update unit tests.
Modified Paths:
osmf/branches/sprint9-candidate/framework/OSMF/org/osmf/plugin/PluginLoader.as
osmf/branches/sprint9-candidate/framework/OSMFTest/org/osmf/plugin/TestPluginManager.as -
Change the SWF loading text for a single presentation
This question was posted in response to the following article: http://help.adobe.com/en_US/Presenter/7.0/WS8815BC0A-5D22-4f29-87B9-D9047B5B57E4.html
Hi,
I have Adobe Presenter 7.0.5, in which with recently updating to 7.0.7 version.
When I tried the fix of this "Change the SWF loading text for a single presentation" workaround fix, I passed to have the error:ReferenceError: Error #1069: Property ADOBE_PRESENTER not found on Pool_P75.Resource.UIText
But before this error comes, I see that the loading text is changes from the original 2Adobe Presenter" to the one defined by me on the UIText, as the fix said.
And what's happen is that the scrren with the loading text is not being changed by the learning first slide....
Is there any workaround to correct that error?
Many thanks in advance for any feedback from the adobe support team or from any other colleagues that are using Adobe Presenter (;-)). -
Ajax .swf load help needed
Hello all,
I'm trying to load in a .swf file (via an external html page)
dynamically using an Ajax script (loads into a div) and while it
works with the ol' <object> method of putting flash in an
html the .swf file won't load if I try to load it in via javascript
(either SWFobject or the flash exported .js load files).
I know a lot of people have had this problem but I have never
seen any solutions given. Does anyone know?
Any help would be MUCH Appreciated.Wiki is your friend - http://wiki.archlinux.org/index.php/Main_Page
I do not mean to be mean, it's simply inefficient to try and answer all the questions you _will_ have while trying to configure Arch to your liking, especially since Wiki covers most of them, and covers them well. If you come across a problem that's not covered in the wiki post here and we will definitely try and help you -
Loading external SWF's into an SWF Loader as3 style?
Hi,
I've recently made the switch from as2 to as3 and am still struggling to get my head around one aspect in particular. I've managed to load one external swf into a blank file via the script
import LoadDisplayObject;
var loader:LoadDisplayObject = new LoadDisplayObject("button_01.swf", true);
loader.addEventListener("displayObjectLoaded", onComplete, false, 0, true);
addChild(loader);
function onComplete(evt:Event):void {
trace("loaded complete received");
loader.scaleX = loader.scaleY = .75;
.....however I'm struggling with the script to make a swfs load into a space when one of my 3 buttons is clicked....
My page currently has three buttons (button_01, button_02 and button_03) and in a local folder three separate swfs with the same names which I wish to load in, when the appropriate button is pressed.
I have managed to get them to load in using a tutorial...however they load over the top of each over...far from ideal. From research on the internet I've found a range of different script...but I just can’t find anywhere I can find script to make this work..hence why I have turned to here.
Any help much appreciated...thanks in advance.Hi,
Just throught I would let you know that I've manged to get this to work this morning. Changed the script slightly and used a different method of:
var home:MovieClip = this;
function butt1Click(evt:MouseEvent):void {
var ldr:Loader = new Loader();
ldr.load(new URLRequest("button_01.swf"));
ldr.contentLoaderInfo.addEventListener(Event.INIT, loaded);
function butt2Click(evt:MouseEvent):void {
var ldr:Loader = new Loader();
ldr.load(new URLRequest("button_02.swf"));
ldr.contentLoaderInfo.addEventListener(Event.INIT, loaded);
function butt3Click(evt:MouseEvent):void {
var ldr:Loader = new Loader();
ldr.load(new URLRequest("button_03.swf"));
ldr.contentLoaderInfo.addEventListener(Event.INIT, loaded);
function loaded(evt: Event):void {
if(contentClip.numChildren > 0){
contentClip.removeChildAt(0);
contentClip.addChild(evt.target.content);
button_01.addEventListener(MouseEvent.MOUSE_UP, butt1Click);
button_02.addEventListener(MouseEvent.MOUSE_UP, butt2Click);
button_03.addEventListener(MouseEvent.MOUSE_UP, butt3Click);
seems to work well. Only small question is if I want one page to load automatically upon opening...how do I alter the script to do this??? Thanks -
Rendering of SWF Loader child SWFs
I am using the swf loader with an Xcelsius OpenDoc link (http://<server>:8080/Xcelsius/opendoc/documentDownload?sIDType=CUID&iDocID=<CUID>&sKind=Flash&CELogonToken=<CELogonToken>) and it works beautifully so long as the parent swf is also opened using and OpenDoc link. However, if the parent swf is opened via InfoView, the child swf does not render properly (either way too large or too small). Has anyone else come across this or have any ideas for resolution?
Regards,
Alison"whomba" <[email protected]> wrote in
message
news:glq6j0$b20$[email protected]..
> Hello all,
> I have a Flex app that loads in a swf using 'SWFLoader'
tag. the SWFloader
> and
> the swf being loaded in are the same height and width
(see attached code)
> Now,
> the SWF getting loaded in is also 468 X 351 however the
designers that
> made it
> have crazy amount of random Movie Clips EVERYWHERE that
isn't on the
> stage. My
> guess is that the actual height and width of the SWF is
close to 1000 X
> 1000.
> When I load this SWF in to my SWFLoader it scales
everything down so all
> of the
> MovieClips are inside of this SWFLoader rather than just
the SWF's Stage.
> Any
> Suggestions?
>
> <mx:SWFLoader id="mainMovieSWF" height="351"
width="468"
> source="{mainMovieSrc}" scaleContent="false"/>
Try wrapping it as a component with the Flex component kit.
That way you
get to specify the bounding box.
HTH;
Amy -
Controlling SWF loaded through MovieClipLoader
Hello AS gurus,
I have a two-level site for a portfolio where users can view
still images and videos for different projects. The top level SWF
file can be considered as the "parent SWF" and within this file,
the user navigates by choosing which project he/she wants to
explore. After choosing, the "parent SWF" loads in a "child SWF"
via MovieClipLoader of the selected content. It is within this
"child SWF" that the user can view the various images and videos
(with sound) of the selected project. To go back out and choose a
different project, the parent SWF is used and the user navigates to
and chooses another project.
The problem is that I can't figure out how to communicate
from the child SWF to the parent SWF (and vice versa)...well not
really...this is difficult to explain...hmmm... It would be better
to explain it with an example...
If you go to:
http://www.culshaw.info/junk_drawer/xdin/swf/
(1) Choose the "Examples" square (when this box zooms up, you
are presented with a way to navigate to various projects -- this
SWF that loads as the zoom up happens is what I am calling the
"parent SWF").
(2) Choose the second project, labelled "Ford : Ti-VCT" by
clicking on it (after clicking on the Ford project, the "child SWF"
is loaded via a MCL from the "parent SWF").
(3) You can see that the Ford project has 8 images and one
video that the user can view. Choose the video and ensure that it
begins to play and hit the mute button so that you hear sound
(sound is default muted. It is within this "child SWF" that the
video is NetStream(ed) and the sound is controlled. (there is a bug
with my code here so you may need to hit play/pause to get the
video going).
(4) Now, as the video is playing and you hear sound, click on
the "Other Examples" button that is located below the video player.
This button is actually embedded in the the "parent SWF" that
allows the user to navigate back up to see other projects and not
in the "child SWF" which contains all of the content. Notice that
you continue to hear the sound and that the net connection is still
streaming the video within the "child SWF". I don't want this to
happen. I want the "parent SWF" to tell the "child SWF" to stop
streaming and stop all sounds when this "parent SWF" - embedded
"Other Examples" button is pushed.
I can't figure out how to do this. Any info that may help
would be appreciated...
-johnHi,
It looks to me that the example you are going by has a main
navigation in the parent swf that is controlling which child movie
is loaded in and each child swf has its own internal navigation. If
this is what you are trying to achieve and you are using
_root.MoveClipName to target things you need to use the lockroot
code so the flash player knows what root you are talking about.
Place on the first frame of each Child swf
this._lockroot = true;
Hope this helps -
Hi Gurus,
I have been looking through other questions like this, and not sure if the resolutions that I have seen will work. I have a dashboard that I want to use the SWF loader in to bring in SWF files (obviously) but they are not stored in InfoView - which is what has been talked about in other questions.
I have looked in the user guide and have seen that I can use DocumentDownload or OpenDoc, not that I am familiar with either. My question really is this:
1. could i use one or other of these even though i am not going through infoview (so i dont have a cuid)
2. how would I write the syntax?
I tried using a URL button, but I have a container on the main summary dashboard that I want the swf's to load in, rather than have a new screen load up.
Could someone give me some advice on this??
Many thanks,
SarahHi Roman,
Thanks for the response,
I got that point that i cannot use SWF loader to show my Sub Dashboard inside my main dashboard.
So my question What is the way (Working) to show the sub dashboard inside the main dashboard using the BICS(On EP).
I have tried to published my Sub Dashboard and Main Dashboard on EP and tried to call the Sub Dashboard using the HTML Link...(SWF Loader/Slide Show)...but these comp. wont work...
so which way i shd go..
Are you saying i shd go via "Web Application Designer--creating the template and calling Dashboards(main n Sub) seperately???
Sam...
Edited by: Sapbpc_user on Dec 1, 2010 12:57 PM -
Communication from a flex app. to a swf loaded inside it at runtime
I am loading a swf (made with Flex 2) inside another flex
application using the SWFLoader as:
<mx:SWFLoader id="swfLoader1" source="Modules.swf"
width="100%" height="100%"/>
the swf ("Modules.swf' ) loads as expected, but form the
parent movie I want to be able to control (change values of
variables) parameters on the child swf (swfLoader1).
When a click a button in the host movie I want to change the
text on a label on the child movie, but it is not working for me.
I have done this:
when clicking the button call a function doStuff()
public function doStuff():void
var myMovie:* = swfLoader1.content;
myMovie.mod1_desc.text = "blah blah";
But it's not working. Then I tried
public function init():void
_loader = new Loader;
extContent.addChild(_loader);
_loader.contentLoaderInfo.addEventListener(Event.INIT,
doStuff);
_loader.load(new URLRequest("Modules.swf"));
init() is called from creationComplete on the Application
(MXML) and when the _loadr is loaded it calls the doStuff function
above. Again is not working.
Any suggestions on how to do this right?
GilbertProbably not. Otherwise lots of great malware would be delivered via Flash.
-
I would like to transfer all data from my iPod classic to my new computer with windows 8.1. My old computer's cpu died. Utilizing iTunes which only allows iTunes albums purchased at iTunes store. The cd's were loaded via iTunes originally.
Install disk drive from old computer in an external enclosure.
Then copy the complete iTunes library from the disk drive to the disk drive in the new computer. -
Data Loads via an Integration Interface
In our Demantra 7.3 environment, Open Orders, Pricing and Trade Spend all get loaded via Integration Interfaces (IIs). Those IIs get called after ep_load_main runs, and there is nothing in the workflow after those II calls.
So how does the data get transferred from the BIIO tables into sales_data and/or mdp_matrix? Since there is nothing in the workflow to do that, I would expect to see triggers on the BIIO tables, but there aren't any.Hi,
Data is loaded from BIIO tables into Sales_Data/Mdp_matrix using a workflow step 'Transfer Step' in Demantra.
Transfer step takes the Import integration interface as input and load data from the corresponding BIIO tables into Demantra base tables.
Please check if there is a transfer step in the workflow after ep_load_main run.
Thanks,
Rohit
Maybe you are looking for
-
How can I insert into a view cache???
I have a problem in JClient like that: A form that have 3 JTable: - Table1 get data from UserTable in DB - Table2 get data from GroupTable in DB - Table3 get data from GroupTable in DB and 2 buttons: btnAdd, btnRemove. When I select a row in Table1,
-
Windows 8.1 does not recognize my iphone.
windows 8.1 does not recognize my iphone.
-
Officejet Pro 8610 - Can't connect to wireless network
Tried to setup the new printer from both Windows 8 and Vista os. Can't retrieve wireless info (even tho the printer will pick it up). HP used to produce good products.
-
ReferenceError: Error #1065: Variable userAction_btn is not defined.
i have been having issues with flash player for months and no one on here seems to be able to follow through and help me fix it.. I am also getting error #1009. I am using windows 8 pro 64 bit in desktop mode and constantly get a pop up with errors.
-
Dear all, I would like to implement a box within the main window of my sapscript in order to have horizontal line covering the /: height 0 tw frame 10 tw /e item header blablabla /: height 0 tw frame 10 tw The first line works fine but not the second