Help with Loader component!
hi, i've got a Loader component on a swf i call holder.swf
i am loading an external.swf in this loader
i have a variable called music in holder.swf.
is there any way for me to access the variable music that was
defined in holder.swf, from the externally loaded external.swf?
in code:
basically i have in "holder.swf"
onClipEvent (load) {
_root.myLoader.contentPath = "external.swf";
_global.music=5;
and in external.swf
i am trying to do
if(_root.music==5){
do something;
}
Hi
Won't using _global.music work (rather than _root.music)? I
use various ways to load swf files and usually pass variables via
_global.
Don't think I've used your particualr load method
though.
Similar Messages
-
Please help with Load Variables / ASP
Hello,
I am using Load Variables to retreive a variable from an ASP
page, (which uses a response.write) to output the variable
getfile.onRelease = function()
myData = new LoadVars();
myData.onLoad = function(success){
if(success) {
getfile_txt.text = this.strString;
} else {
getfile_txt.text = "error";
myData.load("sendFile.asp");
stop();
the problem is that the output says "undefined", but when I
access the .asp page through my web browser I get the expected
result of the variable which is "Test1.Doc"
if any1 can help with this, i would be massivley thankful,
thanks.p.s strString is the variable that I am trying to pass from
the ASP page. -
Window Component with Loader Component
I have the SWF loading into a shell using a Loader component.
Within one swf is a trigger for a window - which ,suprise suprise,
doesn't work. It works fine if I access the swf directly just not
when loaded through the shell. I have added the component to the
shell fla and then although a window component loads up, the
content (which is linked in the library) is not found. Anyone come
across this before?There is a discussion of modules and popups on my blog
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui -
Help with loading image in Air
Hello there, hope you can help me with this situation. Getting into FlexSDK/AirSDK development. I am very familiar with Flex development using Flash Builder 4, however, I would like to get into development using the the two(2) SDK development tools mentioned above especially from an AIR development perspective. Coming along pretty good, and ran into one problem that driving me nuts: I have an image in a folder called AirSamples/Air/HelloWorld/southwest.jpg. I tried to bind the image to the image tag by issuing the following:
<mx:Image source="@Embed('AirSamples/Air/HelloWorld/southwest.jpg')" /> in my mxml file (HelloWorld.mxml). Let assume this is the only component tag in the file.
When I go to the command prompt and issue the command: amxmlc Helloworld.mxml, it compiles without an error. When I issue adl HelloWorld-app.mxml from the command line prompt, it loaded in Flash Player, however, the graphic symbol came up indicating that a graphic was there, but no graphic. Can you offer any suggestions as to how I can make this work even if I have to use ActionScript.
Jerry McLeodI already know how to do that, but I specifically stated in my post that I can't use the Loader class. The reason for that is that my program is an image manipulation program, and I need to load the data into a BitmapData object. However, since I originally made my post, I have found some more information. I used trace() to find out the length of the ByteArray I was loading the data into, and then the position after trying to create the BitmapData object, like so:
import flash.display.*;
import flash.events.*;
import flash.filesytem.*;
import flash.net.FileFilter;
import flash.utils.ByteArray;
import flash.geom.Rectangle;
import flash.errors.EOFError;
var file:File = File.documentsDirectory;
var myImage:BitmapData;
var myFilter:FileFilter = new FileFilter("GIF Image","*.gif");
file.addEventListener(Event.SELECT,loadImage);
file.browseForOpen("Open",[myFilter]);
function loadImage(e:Event):void{
var stream:FileStream = new FileStream();
stream.open(file,FileMode.READ);
var bytes:ByteArray = new ByteArray();
stream.readBytes(bytes);
stream.close();
trace(bytes.length); //Outputs: 4631
//By the way, this image is a special format and will always be 160 by 160 pixels.
myImage = new BitmapData(160,160);
bytes.position = 0;
try{
myImage.setPixels(new Rectangle(0,0,160,160),bytes);
} catch(e:EOFError){
trace(bytes.position); //Outputs: 4628
addChild(new Bitmap(myImage));
As the comments show, though the ByteArray is 4631 bytes, it is only read up until byte number 4628. Then it throws an error. Any idea what's going on? -
Help with loading infocube from flat file
Hi:
I am using SCM 5.1 and the BI 7.0 component that comes with it. I am trying to create an infocube and load it with flat file data but getting errors.
1. First I created the infoobjects and the infocube.
2.a I first tried to create only the data source and activate the datasource. This was not successful.
2.b I then tried to create the application component, infosource etc. (like one does in BW 3.0) but was still not successful.
If you have any pointers, could you please let me know? Thanks.
SatishYou can go through the following Blog for flat file loads.
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60debae1-84dd-2b10-e7bf-bdedf1eabdf9
If you are getting any specific error, then you can post it here.
Regards,
Gaurav -
Need help with loading MySQL results into a query
Hello, I need some help figuring out why my tree component
isn't being populated with my MySQL results.
I have a table of categories:
ParentID - CategoryID - Name
Every top-level category has a ParentID of 0 (zero). I'm
using php and a recursive function to build an array of nested
results, then passing those results back to Flex, making those
results a new ArrayCollection, then assigning that to the
dataProvider of the tree.
Result: my tree component is blank
Suspicion: it has to be a way with how my array is being
formed in PHP. If I play around with how it is formed I can get
some odd results in the tree, so I know it's not a problem with the
data being passed back to Flex.
I am attaching the PHP code used to form the array, and the
output of the array being createdWhy not just build xml and send it back? Xml is hierarchical
by nature.
However, if you want to stick with the nested ACs then are
you using a labelFunction() with your tree? The node values are in
different properties, so you can't just set labelField.
Tracy -
Need help with load balancing and DNS proxy
Hi,
I need help on how to configure my router so it will work with my DNS proxy and load balancing.
I have a Linksys LRT224 router. I have two broadband connections from two separate ISPs,500Mbps each (WAN1 & WAN2). WAN1 has a static IP and WAN2 is dynamic assigned. I use Unlocator (www.unlocator.com) so I can access geographically restricted sites (Pandora, Netflix, etc.).
The problem I have is that unlocator registers only one IP address (WAN1 address) and since I am doing load balancing I have no way of knowing if the DNS request will go through the registered IP (WAN1) or through the other (WAN2). I am not an expert in routing or networking but I'm guessing I have a way of configuring the router so all the DNS requests go out through WAN1, right?
In the router's Dual WAN config page there is a section for Protocol Binding. I tried to configure but only managed to screw up the internet at home. I used:
DNS[UDP/53-53]->192.168.1.1-192.168.1.254(0.0.0.0-0.0.0.0)WAN2
Any help or suggestions are appreciated.
AlexGood solution though. That's probably the only way you could do true Load Balancing anyway.
Please remember to Kudo those that help you.
Linksys
Communities Technical Support -
Need help with load balancing and DNS proxy -Repost
Hi,
I need help on how to configure my router so it will work with my DNS proxy and load balancing.
I have a Linksys LRT224 router. I have two broadband connections from two separate ISPs,500Mbps each (WAN1 & WAN2). WAN1 has a static IP and WAN2 is dynamic assigned. I use Unlocator (www.unlocator.com) so I can access geographically restricted sites (Pandora, Netflix, etc.).
The problem I have is that unlocator registers only one IP address (WAN1 address) and since I am doing load balancing I have no way of knowing if the DNS request will go through the registered IP (WAN1) or through the other (WAN2). I am not an expert in routing or networking but I'm guessing I have a way of configuring the router so all the DNS requests go out through WAN1, right?
In the router's Dual WAN config page there is a section for Protocol Binding. I tried to configure but only managed to screw up the internet at home. I used:
DNS[UDP/53-53]->192.168.1.1-192.168.1.254(0.0.0.0-0.0.0.0)WAN2
Any help or suggestions are appreciated.
AlexGood solution though. That's probably the only way you could do true Load Balancing anyway.
Please remember to Kudo those that help you.
Linksys
Communities Technical Support -
Need help with CF component call, please
Hi!
I've been working with component lately but still learning. In one of my logic I need to use an existing component and I'm not sure how to correctly call the function and get the return result from that.
Can anyone help me please?
Basically I created a component:
<cfcomponent displayname="X">
<CFFUNCTION name="GetNames">
<fargument name="1" type="String" required="TRUE">
<cfargument name="2" type="String" required="TRUE">
<!---- I do my work here ---->
within my logic, I need to call an existing function located at
in a different component And I need to use the result returned by this function.
(see below)
I'm not sure how to correctly call that function from here
Can I simply do:
<cfinvoke component="the location of Y component" method="Compare" MyVar = "MyNames" Returnresult="Z">
<CFIF #Z# NEQ 0>
<!--- DO something --->
<CFELSE>
<!--- do something else --->
</CFIF>
</CFFUNCTION>
</cfcomponent>
This is the existing componen that I need to use. It's located at the same directory:
<cfcomponent displayname="Y">
<!--- assuming this is the function that I need to call --->
<CFFUNCTION name="Compare" hint="verify names">
<cfargument name="MyVar" type="String" required="TRUE">
<cfscript>
some logic here
return return_struct;
</cfscript>
</CFFUNCTION>
</cfcomponent>
Please advice, thank you!I hopo the following example will be helpful for. Please let me know if you have any questions.
childComponent.cfc:
<cfcomponent displayname="childComponent">
<cffunction name="childComponentFunction" access="remote" returntype="string">
<cfargument name="myArgument" type="string" required="yes">
<cfset var finalString="">
<cfinvoke component="baseComponent" method="baseComponentFunction" returnvariable="finalString">
<cfinvokeargument name="stringArgumentToReturn" value="#arguments.myArgument#">
</cfinvoke>
<cfreturn finalString>
</cffunction>
</cfcomponent>
baseComponent.cfc:
<cfcomponent displayname="baseComponent">
<cffunction name="baseComponentFunction" access="public" returntype="string">
<cfargument name="stringArgumentToReturn" required="yes" type="string">
<cfreturn arguments.stringArgumentToReturn>
</cffunction>
</cfcomponent>
FYI - There several other methods through which we can call functions of different functions. -
Help with load xml driven swf in another swf
Hello people ... (sorry for my Google transalte English)
... I am desperate, tapping in place last week.
In fact, i make flash CD presentation in Adobe Flash CS5 AS2 (with minimal use of ActionScript). It occurs to me the next problem ... need to load flash image gallery that i already have created, in new presentation file. Gallery was created in Flash Slideshow maker and as products I have. Swf,. Xml and folders with thumbnails and picture (no. Fla file).
The concept of the presentation (as root is concerned) should look like in uploaded picture "izgled otvorenog cd-a". In each of the folder on cd presentation (as on picture) is a Flash presentation controlled by their xml file whose name I must not change. Exe file "Prezentacija 2011" is a presentation (Flash Projector) that i try to make. In the same presentation i create frames and for each of the frames added action:
loadMovie ("02_Kapije/kapije.swf", "kapije_ucitavanje");
kapije_ucitavanje._x = 23;
kapije_ucitavanje._y = 167;
stop ();
(Of course, for each item varies loadMovie root and instance name).
The problem is that presentations can't find xml file, apparently because they do not have the appropriate root. When all the files of the one gallery set in the same folder with the "Presentation 2011.exe" file, everything works normally ( however, as i said, i cannot change the name of Xml file and that disturb the concept of my CD presentation).
How can I drive loaded swf file from the above script to use Xml file in its folder?
HELP PLEASE!!!
P.S. ...and it looks so easyyou're welcome.
p.s. please mark helpful/correct responses. -
Help With Loading an Image In AIR
I need to load an image (GIF) with AIR using File and FileStream, but can't figure out how to do it. I need to load the image into a Bitmap or BitmapData object, so I can't use the loader class. Here's what I have so far:
import flash.display.*;
import flash.events.*;
import flash.filesytem.*;
import flash.net.FileFilter;
import flash.utils.ByteArray;
import flash.geom.Rectangle;
var file:File = File.documentsDirectory;
var myImage:BitmapData;
var myFilter:FileFilter = new FileFilter("GIF Image","*.gif");
file.addEventListener(Event.SELECT,loadImage);
file.browseForOpen("Open",[myFilter]);
function loadImage(e:Event):void{
var stream:FileStream = new FileStream();
stream.open(file,FileMode.READ);
var bytes:ByteArray = new ByteArray();
stream.readBytes(bytes);
stream.close();
//By the way, this image is a special format and will always be 160 by 160 pixels.
myImage = new BitmapData(160,160);
bytes.position = 0;
myImage.setPixels(new Rectangle(0,0,160,160),bytes);
addChild(new Bitmap(myImage));
However, this never works. I always get this error:
Error #2030: End of file was encountered.
I don't quite understand why. Help would be much appreciated.I already know how to do that, but I specifically stated in my post that I can't use the Loader class. The reason for that is that my program is an image manipulation program, and I need to load the data into a BitmapData object. However, since I originally made my post, I have found some more information. I used trace() to find out the length of the ByteArray I was loading the data into, and then the position after trying to create the BitmapData object, like so:
import flash.display.*;
import flash.events.*;
import flash.filesytem.*;
import flash.net.FileFilter;
import flash.utils.ByteArray;
import flash.geom.Rectangle;
import flash.errors.EOFError;
var file:File = File.documentsDirectory;
var myImage:BitmapData;
var myFilter:FileFilter = new FileFilter("GIF Image","*.gif");
file.addEventListener(Event.SELECT,loadImage);
file.browseForOpen("Open",[myFilter]);
function loadImage(e:Event):void{
var stream:FileStream = new FileStream();
stream.open(file,FileMode.READ);
var bytes:ByteArray = new ByteArray();
stream.readBytes(bytes);
stream.close();
trace(bytes.length); //Outputs: 4631
//By the way, this image is a special format and will always be 160 by 160 pixels.
myImage = new BitmapData(160,160);
bytes.position = 0;
try{
myImage.setPixels(new Rectangle(0,0,160,160),bytes);
} catch(e:EOFError){
trace(bytes.position); //Outputs: 4628
addChild(new Bitmap(myImage));
As the comments show, though the ByteArray is 4631 bytes, it is only read up until byte number 4628. Then it throws an error. Any idea what's going on? -
Help with cfgrid / component
Hey everyone...
I'm working on the following piece code
<cfinvoke
component="elements.assets.cf.components.Reports"
method="pKreport"
returnvariable="qryKres">
</cfinvoke>
<cfform name="Kform">
<cfgrid name="pKreport"
bindonload="true"
sort="yes"
highlighthref="yes"
griddataalign="left"
gridlines="yes"
selectmode="row"
insertbutton="Add"
deletebutton="Delete"
enabled="yes"
visible="yes"
format="html"
preservepageonsort="false"
striperows="yes"
selectonload="false"
autowidth="false"
pagesize="100"
bind="cfc:elements.assets.cf.components.Reports.pKreport({cfgridpage},{cfgridpagesize},{cf gridsortcolumn},{cfgridsortdirection})">
<cfgridcolumn name="buildingName"
header="Building Name"
headeralign="left"
dataalign="left"
select="no"
display="yes"
headerbold="yes" />
<cfgridcolumn name="allocatedSF"
header="Allocated SF"
headeralign="left"
dataalign="left"
select="no"
display="yes"
headerbold="yes" />
<cfgridcolumn name="capacity"
header="Capacity"
headeralign="left"
dataalign="left"
select="no"
display="yes"
headerbold="yes" />
<cfgridcolumn name="occupancy"
header="Occupancy"
headeralign="left"
dataalign="left"
select="no"
display="yes"
headerbold="yes" />
<cfgridcolumn name="vacancy"
header="Vacancy"
headeralign="left"
dataalign="left"
select="no"
display="yes"
headerbold="yes" />
</cfgrid>
</cfform>
But I keep getting the following error - and I'm not sure why...
The specified CFC elements.assets.cf.components.Reports could not be found.
The path to the CFC must be specified as a full path, or as a relative path from the current template, without the use of mappings.
I'm using the same component in both the cfinvoke & cfgrid -- it works fine with the cfinvoke...Yes the two code blocks are on the same page...
Can you help? -
Need support person for help with loading the adobe reader
We purchased Adobe reader but it will not load onto my computer and per my boss I need to get help from you.
my phone number is 813-445-7295 ext 104Nobody will ring you, sorry. But perhaps we can help (this is not Adobe staff).
Let's start with what you purchased. Check your receipt. Adobe Reader is free, nobody should have charged you for that..
Then, let us know what you mean by "will not load". If you get any messages, please let us know the exact words. -
Need Your Help with Loading SWF into another Flash Movie!
Hello,
I have created TWO Flash movies. They work just fine
individually, but I get problem when I put one into another one!
The main Flash is a Menu and the second one if a Photo Album.
The Menu is series of animation (Moving Objects) which finally
comes into rest and create the menu. The photo album is another SWF
file which is called with in the first Flash Movie (The Menu). The
SWF file is loaded as follow into the Main Flash.
MovieClip.prototype.drawRect = function(x, y, w, h) {
this.beginFill(0xFF0000, 100);
this.moveTo(0, 0);
this.lineTo(0+w, 0);
this.lineTo(0+w, 0+h);
this.lineTo(0, 0+h);
this.lineTo(0, 0);
this.endFill();
this._x = x;
this._y = y;
this.createEmptyMovieClip("mc6", 6);
mc6.lineStyle (3, 0x000000, 100);
mc6.drawRect(-77, -17, 20, 20);
mc6._xscale = 100;
mc6._yscale = 100;
loadMovie("photoAlbum.swf", mc6);
Problem arises when I click on the Play Button of the
photoAlbum.swf (Photo Album) since the execution of the play button
causes the Flash starts once again from the beginning of the entire
Flash Movie (Beginning of the animation creating the menu) and it
simply jumps into the Firm One of my Flash Movie.
Could you tell me how I can isulate what is in layer 6 (Where
the photoAlbum is loaded to) from the rest of my Flash Movie?
I hope I managed to explain my problem. I would like to take
this opportunity to thank you in advance for your help.
Cheers,
BabakHello Anya,
I have realized the problem arises from the Wait Function
which causes the Photo Album to pause for a period of time (Two
Seconds) once a Photo is fully displayed (I have Fade in/out Photo
Album). I realized everything works OK once I remove the function
and rather left the Photos to be flipped without any pausing (This
is an Auto-loading Album which simply Flips the photos!).
Here is the Wait Function which is causing all the trouble.
function wait()
stop();
var myInterval = setInterval(function ()
play();
clearInterval(myInterval);
}, 2000);
Thank you so much for your help.
Cheers,
Babak -
Help with loading multiple images via LoadVars
Hello everybody.
I need a hand loading multiple images using the LoadVars
method with a text file. I can get it to load 1 image but not
anymore than that. I am aware of other methods like using
components but I am looking for a method where I can access and
change all data from 1 text file (there will be text variable text
within the file aswell to, but I am more concerned with the images
at the moment).
Anyway on to the issue. I have created a much simple .fla
file that outlines my problem.
The movie contains 3 layers:
- top layer contains AS
- middle layer contains an empty movie clip with the
instance name of mcImage1
- bottom layer contains an empy movie clip with the instance
name of mcImage2
The AS layer contains the following code:
imagedata = new LoadVars()
imagedata.load("data.txt")
imagedata.onLoad = function(ok){
if(ok){
mcImage1.loadMovie(this.Image1)
mcImage2.loadMovie(this.Image2)
} else trace("Problem Loading")
In the same folder of my .swf file I have a text file called
data.txt which contains the following
&Image1=image1.gif
&Image2=image2.gif
Also in the same folder of my .swf file I have two images
image1.gif and image2.gif.
When I run the flash the image2.gif is imported correctly.
image1.gif does not appear.
You can download my source files and all images here
http://www.myrealpage.com/projects/var_test/var_test.zip
Any help that can be shed on this problem is much
appreciated.
Thanks
MattGlad to help. It is just that I see so many folks who have
two different parts of a problem smushed together – each
problem isn't so hard on its own, but together they are difficult
to wrap your head around. Always try and break down each step of
the problem and it will help you in the end.
That being said, I'm not quite so sure on this next problem.
I don't do so much timeline stuff along with the Actionscript. I
can get tricky. So this I don't quite have as much of clear mental
picture of what you are describing. But here are some questions
that I would ask – either of myself if I was doing it or of
you.
Is there a stop() on frame one to wait for the
LoadVars.onLoad? Does the onLoad then say to play?
If not, what happens if we get to Frame 10 before the
LoadVars has even finished? That could be a problem.
Remember that the LoadVars object is an actual object that
will exist until it is deleted or removed in various ways. You can
access it at any time after it is loaded. The onLoad event handler
is just that thing you want to happen immediately after it is
loaded.
So my design would probably be.
LoadVars on Frame 1.
Where I am stopped.
In the onLoad handler load the first image and tell the
timeline to play
On frame 10, the LoadVars object will still exist (unless
you've deleted it)
Get the variable out of the LoadVars and load the image.
If you want to check this. Put a stop() in frame 10 and run
it in the testing environment. When it gets to that frame, go to
the debug menu and List Variables. You should see that your
LoadVars object is still there.
Does that answer your question or am I totally missing the
point?
Maybe you are looking for
-
I trace data On Instance DEV_W0 the had Error as below A *** ERROR => RFC ======> connection closed (no data) Please Kindly verify the cuase and recommend in this issue . Edited by: SoeyTH on Dec 6, 2010 3:38 PM
-
My kids dropped my iPad and the volume control on the side got jammed in and it will not move, how can I fix this? Can it be pulled out to unstuck it. The glass got chipped right next to it, but it is not that noticible. Everything else works on t
-
Looking for handy Alarm app!
I am looking for a very small, small, compact, simple application that sits in the menu bar and allows me to set a time at which it will remind me of something. (ex.: taking an eye-break, taking food out of the oven, etc..) No, iCal doesn't cut it (a
-
Action buttons to display orders per specific period - Agentry
Hi; I am working on SAP Work Manager 6.0 customizing using Agentry 6.1.3. I have these two toolbar buttons that I have created, that is, "Previous Week" and "Next Week". I would like to say, when the use clicks on "Previous week", only Orders for the
-
Basic Questions related EHPs for SEM
Hi Guys, I've some basic questions related to EHPs: - 1. If we don't mean to implement any of the new functionalities does it make any sense to implement EHP? In other words do EHPs also have some general improments other than the functionalities whi