Random .swf file
I am looking to produce a banner that displays a different
.swf file every time. I can guess there are two ways to do that
Upload each file to a directory and use html to do this
Do it in Flash 8 and then upload a single swf
Richard
yes you could do this either way. although if your banner(s)
will run on sites other than your own domain, you may want to make
them within a single swf, and choose which to show via an array
list, so that you don't run into cross domain security issues.
The advantage of using a directory, is that you can place or
remove files at anytime and the SWF using PHP generated directory
list would update automatically on loading.
Similar Messages
-
Selecting random .swf files
My code loads random movie clips from the same folder of the
files "17_1.swf", "17_2.swf" and so on to "17_50.swf". If I have
files that don't start with "17_" but I would like to load them
anyway without having to change all of these file names, is there a
better way for me to write this code?
In other words, how can I simply have it load all of the
movie clips in its folder rather than just the ones named
appropriately?
ThanksThe first problem u describe I suspect is alot more tricky
than when u know the file name structure. I'm guessing u will have
to store all the swf file names in a file that ur flash can access,
or if possible let the web server return a directory content list
which u could parse for *.swf files. Just see to it that u dont
load the swf that u are loading from, which could in worst case
lead to a loop.
For ur second problem, you will need to keep track of the
last loaded movie with a variable, like lastLoaded (which u update
just before loading a new swf with lastLoaded = currentlyLoaded),
or keep them in an array (if u want the possibility of multiple
back clicks). -
Swf files wrongly linked in Mac info 'Open With'
Together with others I have had a serious problem opening swf files with Flash Player. I hope this will help some of you and challenge Adobe to get their act together since this ought not so to be.
1. Background: As you may know, Flash Player 10 is not a stand along but only for web use (a plug in). One must keep or download the latest Flash Player 9 in order to play stand along swf docs. Had Adobe explained this clearly at the get-go it would have saved much frustration.
2. Together with others, some very strange things have happened to what was an automatic double-click=open option. In my Mac Info (on file) dialogue box many of my older swf files appear as programs with which I can open any swf doc. In fact, *all* of my hundreds of stand alone swf files are now set to open with some other swf doc (!) meaning that that doc appears and not the doc I am opening. It looks like the swf file has been recognized as a program rather than a simple swf file.
3. After much frustration, I tried to set Flash Player 9 in the Mac 'Info' dialogue box and then choose 'Change All,' but this is not allowed. It keeps wanting to open my swf with some other swf doc listed in the Info. I then changed each doc separately via the Mac Info dialogue box. This finally stuck ... but when I tried to Change All again with a doc set to open with Flash Player 9, everything returned set to open with some random swf file listed in the 'Open with' dialogue box (and these swf files should not be listed there as programs).
4. This entire confusion makes me think that the Adobe/Apple conflict is somehow coming into play here. Who is to blame I do not know, but I wish Adobe would address this since we how have used Flash to create very complex and beautiful swf docs for the classroom now have to open each doc by dragging it to the Flash Player in the dock, and this means that we must explain this to any user.
5. Summary: For whatever reason 'Open With' is confused, I should be able to correct the problem with choosing Flash Player 9 and then click 'Change All.' Can anyone tell me what is going on and how to solve this?
PS: This is happening to others whose Macs are totally separate from mine.Hi seaslug and welcome to our community
I would think you could test the connectivity by playing them
locally to ensure they work. If the files all work fine on your
local PC, try copying them to a web server that isn't using SSL. If
they work fine there, then try the SSL. Basically, you want to pare
away the layers in order to see where things fall apart.
You may also wish to double check to ensure that all the
necessary files exist in the output folder. For example, maybe
someone forgot to include the associated HTM files. Things like
that.
Hopefully something here was helpful... Rick -
Loading random .swf's in html page
Desired scenario: I have a site which I want random .swf
files to load into index page each time a user refreshes or visits
the site.
Solution: I used a Javascript array solution in the .html
page. Note: it works perfectly in Firefox and Safari.
The javascript code for that is listed below.
Problem: In IE, the page which is supposed to load the
random .swfs in blank. I tried to solve the problem by using an IE
conditional statement with a single .swf embedded (so at least
visitor could have interactive experience).
<!--[if IE]>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
width="800" height="600">
<param name="movie" value="drinks.swf" />
<param name="quality" value="high" />
<embed src="drinks.swf" quality="high" pluginspage="
http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="800"
height="600"></embed>
</object>
<script type="text/javascript"
src="fixit.js"></script>
<![endif]-->
Any help would be appreciated. The link to the site in
question is:
http://www.jayminnickinteractive.comThank you for checking. Yes right now they are all working.
But many times I visit the flv's don't load - i wonder if it is a
flash thing or more connected to my web host.
Gary -
someone here helped with the code to load random SWF files
into a movie clip...however, i need to make sure it doesnt load the
one that's already playing, that it goes on to a new one
everytime..i dont think saying thank you really does it, but really,
thank you.. you've helped me countless number of times, and it's
only made me better at what I do, so I really am great full .
Thanks again -
Random Buttons Appearing in Preview and SWF file
My love/hate relationship with Captivate continues, although it is trending quite a bit towards the latter. Here's the issue: I have created a presentation from a powerpoint and when I preview the project, about half of the "slides" have a random gray captivate button just sitting in the top left corner. This button cannot be clicked. Just appeared out of no where as no button was ever inserted.
When I view the SWF file, the slides that had the button now have a light pink square in the top left of the screen.
Can someone please explain these phantom buttons/images... and more importantly, how to remove them so I dont have to re-create a presentation that's well into 24hrs of creation.
Thanks.Does this button appear randomly on half the slides in the project or only the latter half of the slides?
If there is a particular slide where they seem to start appearing, check that slide and the one before it for any objects that might have been set to appear for Rest of Project but have been hidden on the timeline layers so that they are not visible in Edit mode. -
Loading local swf files from Application Dir (ios)
Hi Guys,
I would like to load additional local swf files to my ios release build but I am confused a little bit because of the new API changes.
As far as I know at the moment (from Air 3.7 or newer) it is allowed to load local swf files that contains compiled actionscript both from local folder and from a predefined remote host as well.
My assumption based on this article:
http://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air- apps-on-ios/
I created the text file to include all of my local swf file names and created the following node in the application.xml:
<iPhone>
<externalSwfs>assets/SampleSWFInfoFile.txt</externalSwfs>
</iPhone>
When I compile the release build (ipa) using command line adt, it converts all of my local swfs into the stripped swfs which is perfect, but even though I include all the swfs in the compiler command, it puts only the SampleSWFInfoFile.txt file into the assets folder in the ipa but not the swf files.
I assume, it thinks I will load these files from an external host, but I would like to include them in the app itself.
I tried to copy the stripped swf files from the externalStrippedSwfs folder and comment the <externalSwfs>assets/SampleSWFInfoFile.txt</externalSwfs> node in the application.xml and compile it and this way it puts the swf files into the ipa, but when I try to install and launch the app it crashes and when I test it using Flash Builder it shows an error message
"VerifyError: Error #1042: Not an ABC file."
Do any of you guys know the solution for this problem?
Thank you for your help in advance!You're publishing in AOT mode as long as you use one of these:
The AIR Developer Tool or ADT has targets that lets you package apps either for the AOT mode or Interpreter mode. The targets for packaging in AOT mode are ipa-app-store, ipa-ad-hoc, ipa-test and ipa-debug.
Flash Pro CS6 and Flash Builder automate this process pretty well so it's invisible but the SWF loads and executes code just fine for me when directly published.
If I take it to command line I can use this to compile successfully (iPad test app):
adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore my.p12 -provisioning-profile my.mobileprovision NameOfApp.ipa NameOfApp-app.xml NameOfApp.swf iTunesArtwork iTunesArtwork@2x AppIconsForPublish swfs/swfs.txt swfs/GenerateText.swf
I at least include generic icons in there but I made a 'swfs' folder and placed 'swfs.txt' and 'GenerateText.swf' in there. The SWF uses code to randomly generate text and changes every second using a Timer. I load it in using the same code you do with the ApplicationDomain.currentDomain context. I see the SWF appear and text start randomly changing.
As I compile there's a folder generated called 'externalStrippedSwfs' with the stripped SWF in there.
One thing to note is I do not supply <externalSwfs>swfs/swfs.txt</externalSwfs> in my iPhone settings. If I do that it doesn't work. I supply the path to the text file containing the SWF I want to be stripped to adt itself along with the SWFs I want stripped and it takes care of the rest. -
Help swf file different from internal movie testing
ok i made a simple website and when i test it while the file
is open it works fine but when i drag the swf file into a web
browser random movie clips are missing, my buttons are gone and the
code dosent work right, Im totally clueless as to how to fix this
since it works fine and with no errors in my flash file so if
anyone has any idea what i should do that would really help cuz im
outta ideas"Laur56" <[email protected]> wrote in
message news:e4g5hf$btf$[email protected]..
> ok i made a simple website and when i test it while the
file is open it works
> fine but when i drag the swf file into a web browser
random movie clips are
> missing, my buttons are gone and the code dosent work
right, Im totally
> clueless as to how to fix this since it works fine and
with no errors in my
> flash file so if anyone has any idea what i should do
that would really help
> cuz im outta ideas
Check for publish version not matching the player. If
publishing for player 8, make sure your browser has that version of
the
player.
tralfaz -
SWF file not working properly in Explorer
I have made a kind of slide show showing jpg images loaded
from the web in an swf file, and it will not work properly. It is
my first .swf application, and I am using the free downloadable
FlashObject.js to load the swf into the browser. The problem is
that it sometimes loads perfectly, while other times it will not
work at all! It is not the paths, because I have tried setting the
images in the same directory as the swf, and not importing the
image names thru flashVars. What drives me mad is that it works
consistently in Explorer, the first time I load it, and the first
time after I have cleared the temporary internet files. Otherwise
it will not load at all. In Firefox however, if randomly fails to
load about one time out of ten or something like that. The code is
compiled using the free downloadable compiler. Anyone have any idea
what may be wrong?I may be late but better late then...
Not true
You can nest hundreds of layers as long as all symbols are graphics.
People try to use a Movie symbol and this is script executed.
I am animator on cartoon all done in flash and we have dozens or more NESTS!!!!
Eyes inside of head inside of Character in car on stage...
many
Trick to not crashing is in FLASH
Set publish settings to FLASH 8.
Never use FLASH 9 with Actionsscript 3... This adds a lot of instability.
1 of these swfs in a project could kill it.
I render SWF at 30fps at 1920x1080 then into AE, then scale down to SD wide screen resolution 720x480 16x9.. set scale to 45.5 x 44.5 percent.
I output final animation at Quicktime ANIMATION 100 millions of colors... 1.21 (16x9)audio added at 48k
I have hundreds of hours trying to make this work reliably and finally I got the mix.
Then I take QT to Premiere for final edit, audio and titles.
Good luck
NATMAX -
SWF file different from internal movie testing
ok i made a basic website in flash when i test the movie
while my file is open everything works fine, no errors pop up or
anything, but when i go to drag the swf file into a web browser,
random movie clips as well as all of my buttons are missing and the
code dosent work like it should, I have absolutely no idea why my
file works in one place and not another so if anyone can give me
any feed back at all id appreciate itI would recommend trying different browsers if you haven't
already. I am working through a similar issue with a dynamic Flash
menu and it is veryyyyy different in IE then in Firefox. Also, if
you have a test site we could look at that might get you more help
too. -
How can I get a swf file to load...
Not sure if this is the place to ask this but I have a swf file embeded in a web page design.
Now here’s the issue, the client wants to add more photos to it making it even larger.
I would prefer not to make it larger but create 2 or 3 swf files that would randomly load when the webpage is refreshed or reloaded.
Is there a way to code a random swf loading in HTML?
Would I use javascript? I googled and found nothing on the subject.
Thank youIf you know JavaScript (ECMA Script) then you might be able to get it done applying a for loop and a random function
to the for loop if you know how to get a page-loaded request into JavaScript.
But an easier solution, if you know ActionScript 3.0, and if your SWF's don't need to be recoded and can load into a "container" SWF would be to create a master FLA file that loads your SWF's in a random fashion using Math.random() as a multiplier, though you won't see much variation if you only have 2-3 SWF's to load--if you had more than that then you would begin to benefit from the random function's capabilities. In ActionScript 3.0 use the load() method along with addChild() to load the SWF and add it to the stage. You will be able to search for specifics on how to code the FLA properly by using Flash's Adobe Help tool and also using an internet search.
-markerline
P.S. Once you have the master FLA coded you can Publish it to an SWF and an HTML and if the container/master SWF needs to be in a page with other content you can simply copy and paste the object and embed tags for the container SWF from the published HTML into any place on your master HTML that you need it to reside. You can then use CSS to control placement of the SWF object if it is in a div tag. -
The old Flash SWF files that don't update in pages created with templates problem
I hate to even ask this question again because I know it's
been posted many times. I've read all the answers I could find but
I'm afraid I still need help. I'm using Dreamweaver CS3 on a Mac.
I've gone in preferences and unchecked "insert using browser-safe
scripts" and "Convert tags" and I've tried to make my paths to the
SWF files relative to the site root but I just can't get it to
work.
There are about three articles on what the Site Root path can
be used for and why it's good or bad. I've read all those and I
guess I'm dense because I just can't figure it out. I select site
root from the "relative to" drop down menu and it makes no
difference whatsoever. I look at the code and it seems OK. This is
what it looks like:
<param name="movie"
value="/public/Images/Regional_Strength/Americas/Americas map.swf"
/>
<param name="quality" value="high" />
<embed
src="/public/Images/Regional_Strength/Americas/Americas map.swf"
quality="high" pluginspage=
There are no ... before the directories and that's what it's
supposed to look like. The files still don't show. Part of me has
to wonder how the heck the html file would know which /image
directory the swf file is in because this particular site is one of
many self-contained site directories that sit in my public folder,
each site has it's own image directory. I thought maybe I'm
supposed to put the SWF files in the "image" directory right in the
first level of the public directory. I moved the files in there
changed the code to:
<param name="movie" value="/public/Images/Americas
map.swf" />
<param name="quality" value="high" />
<embed src="/public/Images/Americas map.swf"
quality="high" pluginspage=
It doesn't work. Like I said, after reading the three or so
articles about the site root on the Adobe Help pages, I still don't
understand. I'd appreciate someone clarifying this for me.
Thanks> <param name="movie" value="/public/Images/Americas
map.swf" />
As a random educated guess, Is your local site folder defined
to the correct
folder? If it isn't, then dw can't make correct site root
relative paths.
Jumping to this from seeing the /public/ folder in the above
path.
Define the local site folder to the folder that directly
contains the site's
homepage index file.
Use the "host directory" line in the remote site info to
correct for any
required subfolder in the ftp setup. If public files need to
be placed in a
subfolder on the remote named public or public_html or htdocs
or www or
similar, put that folder name into the "host directory" line.
Also- to avoid problems adopt a file and folder naming
convention that
doesn't cause you to tear your hair out.
Americas map.swf
There is NO such thing as a blank space in a url. So don't
use blank spaces
in file or folder names.
A conservative naming convention would be to use only
a-->z and 0-->9 and
the _underscore. No blank spaces, no punctuation, no mixed
case.
Right-click on the file or folder in the dw Files Panel and
pick rename.
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/ -
Hi,
Can i know whether there is any way to protect swf files from being decompiling. I have seen that some tools are available for decompiling the swf files. Can anybody help me by providing a tutorial for the same or any ideas.
Thank and Regards,
SreelashYes, as mantissao states, the best you can do for a SWF is to run it through an Obfuscator.
Google: Actionscrip Obfuscation and you will find some products to do this.
What it does is change the Actionscript in the SWF to make it "unreadable" by decompilers. In practice, what happens is this: Decompilers update constantly to work around any problems arising from new obfuscation techniques, and then new obfuscation techniques are created to stop the new decompilers. In the end, a decompiled SWF that was obfuscated becomes difficult to parse through, as all variable names are random strings of text, but not impossible.
Otherwise, the only method you can use is a streaming server (Adobe FMS, Red5, Wowza, etc) and offload all important Actionscript to the server. This would be reliable in protecting that Actionscript, but may not be worth the time and effort of setting it up. Plus, this is overkill if the only goal is to protect some "proprietary" code. -
Can't set flash player as default app to open SWF files on mac
This is the weirdest thing. Somehow the default application
to open SWF files on my mac has changed from the Flash Player to a
random Mac Projector file (i.e. presentation.app) that I published
from Flash for another project. So whenever I double click an SWF
it opens both the file I clicked and the other projector file. They
are in separate windows but if I close one of them they both close.
To try to fix this I went to my SWF hit cmd+i for the info,
changed the Open with application to the Flash Player and hit
change all. After I close the info box and try to open the file,
the same thing happens. It reverts back to opening with the random
projector. So I tried deleting the projector to see what would
happen and instead of opening in the regular flash player it went
and found another random projector file to be the default
application. WTF is going on?!I wish I knew that has happened to me before as well. I never
found a solution. But eventually it seemed to go away on its
own. -
Any fix for not playing swf files?
Hello
Having trouble getting FF to play my Flash 8 swf files on
this page
http://www.enhancedwireless.net/indexrdm.html
There should be a small logo animated for about 3 sec in the
upper left of this page, but instead I get nothing on my MAC OS
10.3.9. and any of my friends using PC and MAC get nothing as well.
Safari plays this fine...Also there are 7 or 8 banners on
this page 4 of which are swf files, and these are scripted to play
randomly on every refresh of this page, however they do not appear
at all on FF/netscape on mac or PC...some machines get nothing,
some get a big Quicktime logo in the middle of where the swf banner
should play. All my swf files need Flash player 8 or higher to
work. IE 6 has problems but IE 7 seems to play these OK.
So, how to fix this?
Thanks
KBYou may have already tried this yet have you tried exporting
your file using a lower flash player? No guarantees but its always
worth a try
Maybe you are looking for
-
What do I need to fill out and print a PDF form?
I need to type on this form save and print it, how do I do that?
-
HT204389 can siri read me my text messages?
can siri read me my text messages?
-
Using 2.5.3.21 with .net (c#) I create a new environment with a few databases. The first time I open the environment (before committing any transactions), it opens instantly. However as soon as I insert any data (even just one byte), it takes about 2
-
External Procedure, Error Oracle-03113
I have configured the database for external procedure: w/ the following: # TNSNAMES.ORA EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(Key = epsid)) (CONNECT_DATA = (SID = extproc0) # LISTENER.ORA EXTERNAL_PROCED
-
I can't log in to face time and imessage with my apple id
i can't log in to face time and imessage with my apple id